1. 06 Mar, 2016 1 commit
    • neis's avatar
      Get rid of the different kinds of yield in the AST & full-codegen. · f24dffea
      neis authored
      Now there is just one kind, corresponding to what was called "initial" before.
      Replacement for "suspend": when the parser sees a yield in JS code, it
      will turn it into a Yield node but wrap its argument in an iterator result
      object.  Replacement for "final": the parser simply inserts a return statement
      instead.
      
      R=littledan@chromium.org, mstarzinger@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1751613004
      
      Cr-Commit-Position: refs/heads/master@{#34515}
      f24dffea
  2. 04 Mar, 2016 1 commit
  3. 03 Mar, 2016 1 commit
    • bmeurer's avatar
      [runtime] Rename IsUndetectableObject to IsUndetectable. · 0b3e436a
      bmeurer authored
      This is more consistent with the current naming scheme (i.e. IsCallable
      for callable bit on map, IsConstructor for constructor bit on map, and
      now IsUndetectable for undetectable bit on map).
      
      Also simplify the fallthrough case for Object::Equals, because we don't
      need to check for Null or Undefined or Undetectable, as both Null and
      Undefined already have the undetectable bit set on their maps.
      
      R=machenbach@chromium.org
      
      Review URL: https://codereview.chromium.org/1756413003
      
      Cr-Commit-Position: refs/heads/master@{#34458}
      0b3e436a
  4. 02 Mar, 2016 1 commit
    • yangguo's avatar
      [debugger] Ensure at least one breakable position per function. · 44e9622a
      yangguo authored
      The function literal consists of a list of statements. Each statement
      is associated with a statement position including break location. The
      only exception to this rule is when the function immediately throws if
      scope resolution found an illegal redeclaration. Make sure that we add a
      break location for this case as well. The debugger relies on this.
      
      R=bmeurer@chromium.org, vogelheim@chromium.org
      BUG=v8:4690
      LOG=N
      
      Review URL: https://codereview.chromium.org/1759603002
      
      Cr-Commit-Position: refs/heads/master@{#34422}
      44e9622a
  5. 01 Mar, 2016 1 commit
  6. 29 Feb, 2016 1 commit
    • bmeurer's avatar
      [stubs] Introduce a proper ToBooleanStub. · d1df58e8
      bmeurer authored
      Rename the existing (patching) ToBooleanStub to ToBooleanICStub to match
      our naming convention, and add a new TurboFan-powered ToBooleanStub,
      which just does the ToBoolean conversion without any runtime call or
      code patching, so we can use it for Ignition (and TurboFan).
      
      Drive-by-fix: Add an Oddball::to_boolean field similar to the ones we
      already have for to_string and to_number, so we don't need to actually
      dispatch on the concrete Oddball at all.
      
      R=epertoso@chromium.org, rmcilroy@chromium.org, yangguo@chromium.org
      
      Review URL: https://codereview.chromium.org/1744163002
      
      Cr-Commit-Position: refs/heads/master@{#34361}
      d1df58e8
  7. 27 Feb, 2016 1 commit
  8. 26 Feb, 2016 1 commit
  9. 25 Feb, 2016 1 commit
  10. 24 Feb, 2016 4 commits
  11. 23 Feb, 2016 1 commit
    • mstarzinger's avatar
      [fullcodegen] Implement operand stack depth tracking. · 38915ed7
      mstarzinger authored
      This implements a mechanism to track the exact depth of the operand
      stack in full-codegen for every sub-expression visitation. So far we
      only tracked the depth at statement level, but not at expression level.
      With the introduction of do-expressions it will be possible to construct
      local control flow (i.e. break, continue and friends) that target labels
      at an arbitrary operand stack depth, making this tracking a prerequisite
      for full do-expression support.
      
      R=rossberg@chromium.org,jarin@chromium.org
      BUG=v8:4755,v8:4488
      LOG=n
      
      Review URL: https://codereview.chromium.org/1706283002
      
      Cr-Commit-Position: refs/heads/master@{#34211}
      38915ed7
  12. 22 Feb, 2016 1 commit
    • mstarzinger's avatar
      [fullcodegen] Lift restriction on --debug-code flag. · 0427abf3
      mstarzinger authored
      This removes a restriction from full-codegen that limited the usability
      of the --debug-code flag to only no-snap configurations. The reasoning
      for the restriction would still hold, if we ever put full-codegen code
      into the snapshot, which we don't. Also there already are several places
      in full-codegen that queried the FLAG_debug_code directly, a more
      reliable mechanism will be needed if we snapshot full code.
      
      R=yangguo@chromium.org
      
      Review URL: https://codereview.chromium.org/1722593002
      
      Cr-Commit-Position: refs/heads/master@{#34189}
      0427abf3
  13. 19 Feb, 2016 2 commits
  14. 17 Feb, 2016 5 commits
  15. 16 Feb, 2016 2 commits
  16. 15 Feb, 2016 3 commits
  17. 12 Feb, 2016 3 commits
    • bmeurer's avatar
      [runtime] Remove obsolete %ObjectEquals runtime entry. · c67262d4
      bmeurer authored
      There are only two uses of %_ObjectEquals left, which should actually
      use strict equality instead, so there's no need to keep this special
      logic at all.
      
      R=mvstanton@chromium.org
      
      Review URL: https://codereview.chromium.org/1692193002
      
      Cr-Commit-Position: refs/heads/master@{#33948}
      c67262d4
    • bmeurer's avatar
      [runtime] Kill %Arguments and %ArgumentsLength. · 98aec4a7
      bmeurer authored
      This removes support for the %Arguments and %ArgumentsLength runtime
      entries and their intrinsic counterparts. If you need variable arguments
      in any builtin, either use (strict) arguments object or rest parameters,
      which are both compositional across inlining (in TurboFan), and not that
      much slower compared to the %_Arguments hackery.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1688163004
      
      Cr-Commit-Position: refs/heads/master@{#33943}
      98aec4a7
    • bmeurer's avatar
      [runtime] Introduce FastNewStrictArgumentsStub to optimize strict arguments. · 09d84535
      bmeurer authored
      The FastNewStrictArgumentsStub is very similar to the recently added
      FastNewRestParameterStub, it's actually almost a copy of it, except that
      it doesn't have the fast case we have for the empty rest parameter. This
      patch improves strict arguments in TurboFan and fullcodegen by up to 10x
      compared to the previous version.
      
      Also introduce proper JSSloppyArgumentsObject and JSStrictArgumentsObject
      for the in-object properties instead of having them as constants in the
      Heap class.
      
      Drive-by-fix: Use this stub and the FastNewRestParameterStub in the
      interpreter to avoid the runtime call overhead for strict arguments
      and rest parameter creation.
      
      R=jarin@chromium.org
      TBR=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1693513002
      
      Cr-Commit-Position: refs/heads/master@{#33925}
      09d84535
  18. 11 Feb, 2016 2 commits
    • ishell's avatar
      [es6] Further fixing of tail Calls. · e519e6fa
      ishell authored
      1) Update profiling counters in Full codegen.
      2) Call Runtime::kTraceTailCall when tracing is on
      
      test/mjsunit/es6/tail-call-simple.js is disabled for now, because Turbofan does not fully support TCO yet.
      
      BUG=v8:4698
      LOG=N
      
      Review URL: https://codereview.chromium.org/1670133002
      
      Cr-Commit-Position: refs/heads/master@{#33886}
      e519e6fa
    • bmeurer's avatar
      [compiler] Sanitize entry points to LookupSlot access. · 4ff159bd
      bmeurer authored
      Add dedicated %LoadLookupSlot, %LoadLookupSlotInsideTypeof,
      %LoadLookupSlotForCall, %StoreLookupSlot_Sloppy and
      %StoreLookupSlot_Strict runtime entry points and use them
      appropriately in the various compilers. This way we can
      finally drop the machine operators from the JS graph level
      completely in TurboFan.
      
      Also drop the funky JSLoadDynamic operator from TurboFan,
      which was by now just a small wrapper around the runtime
      call to %LoadLookupSlot.
      
      R=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1683103002
      
      Cr-Commit-Position: refs/heads/master@{#33880}
      4ff159bd
  19. 10 Feb, 2016 1 commit
    • verwaest's avatar
      Mark null and undefined as undetectable, and use it to handle abstract... · 3ce9e808
      verwaest authored
      Mark null and undefined as undetectable, and use it to handle abstract equality comparison in the generic compare ic
      
      Marking as undetectable makes abstract equality of null, undefined, and
      other undetectable objects easier. Supporting it in the generic compare
      IC significantly speeds up dynamic comparison between those values and
      JSReceivers by not falling back to the runtime.
      
      MIPS port contributed by Balazs Kilvady <balazs.kilvady@imgtec.com>
      
      Review URL: https://codereview.chromium.org/1683643002
      
      Cr-Commit-Position: refs/heads/master@{#33858}
      3ce9e808
  20. 09 Feb, 2016 1 commit
    • bmeurer's avatar
      [intrinsics] Kill the %_IsMinusZero intrinsic. · 00f7d1f5
      bmeurer authored
      By now only the default %TypedArray%.prototype.sort compare function
      and the JS implementation of SameValueZero were still using the odd
      %_IsMinusZero intrinsic, whose semantics both included a number check
      (actually HeapNumber test) plus testing if the heap number stores the
      special -0 value. In both cases we already know that we deal with
      number so we can reduce it to a simple number test for -0, which can
      be expressed via dividing 1 by that value and checking the sign of
      the result. In case of the compare function, we can be even smarter
      and work with the reciprocal values in case x and y are equal to 0
      (although long term we should probably rewrite the fast case for
      the typed array sorting function in C++ anyway, which will be way,
      way faster than our handwritten callback-style, type-feedback
      polluted JS implementation).
      
      R=yangguo@chromium.org
      
      Review URL: https://codereview.chromium.org/1680783002
      
      Cr-Commit-Position: refs/heads/master@{#33833}
      00f7d1f5
  21. 08 Feb, 2016 3 commits
    • mstarzinger's avatar
      Remove --stop-at flag from several backends. · 664110f8
      mstarzinger authored
      The flag in question is a debug-only flag supported by full-codegen and
      Crankshaft only. In it's current form there are some unresolved issues:
      - The flag is defeated by inlining in Crankshaft.
      - The flag is not supported by TurboFan.
      - The flag is not supported by Ignition.
      
      Instead of addressing the above issues and increasing maintenance cost
      for all backends and also given the "slim" test coverage, this CL fully
      removes the support from all backends.
      
      R=bmeurer@chromium.org,jkummerow@chromium.org
      
      Review URL: https://codereview.chromium.org/1676263002
      
      Cr-Commit-Position: refs/heads/master@{#33817}
      664110f8
    • bmeurer's avatar
      [compiler] Remove the special case "prototype" load in class literals. · 1ffa4547
      bmeurer authored
      This allows us to remove the somewhat awkward BuildLoadObjectField
      from the AstGraphBuilder and also allows us to simplify fullcodegen
      for class literals.
      
      R=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1679813002
      
      Cr-Commit-Position: refs/heads/master@{#33815}
      1ffa4547
    • bmeurer's avatar
      [runtime] Optimize and unify rest parameters. · 3ef573e9
      bmeurer authored
      Replace the somewhat awkward RestParamAccessStub, which would always
      call into the runtime anyway with a proper FastNewRestParameterStub,
      which is basically based on the code that was already there for strict
      arguments object materialization. But for rest parameters we could
      optimize even further (leading to 8-10x improvements for functions with
      rest parameters), by fixing the internal formal parameter count:
      
      Every SharedFunctionInfo has a formal_parameter_count field, which
      specifies the number of formal parameters, and is used to decide whether
      we need to create an arguments adaptor frame when calling a function
      (i.e. if there's a mismatch between the actual and expected parameters).
      Previously the formal_parameter_count included the rest parameter, which
      was sort of unfortunate, as that meant that calling a function with only
      the non-rest parameters still required an arguments adaptor (plus some
      other oddities). Now with this CL we fix, so that we do no longer
      include the rest parameter in that count. Thereby checking for rest
      parameters is very efficient, as we only need to check whether there is
      an arguments adaptor frame, and if not create an empty array, otherwise
      check whether the arguments adaptor frame has more parameters than
      specified by the formal_parameter_count.
      
      The FastNewRestParameterStub is written in a way that it can be directly
      used by Ignition as well, and with some tweaks to the TurboFan backends
      and the CodeStubAssembler, we should be able to rewrite it as
      TurboFanCodeStub in the near future.
      
      Drive-by-fix: Refactor and unify the CreateArgumentsType which was
      different in TurboFan and Ignition; now we have a single enum class
      which is used in both TurboFan and Ignition.
      
      R=jarin@chromium.org, rmcilroy@chromium.org
      TBR=rossberg@chromium.org
      BUG=v8:2159
      LOG=n
      
      Review URL: https://codereview.chromium.org/1676883002
      
      Cr-Commit-Position: refs/heads/master@{#33809}
      3ef573e9
  22. 05 Feb, 2016 3 commits
    • jarin's avatar
      [fullcode] Change fullcode to compile finally using the token approach. · 334d1794
      jarin authored
      This change should unify handling of finally blocks in Turbofan's
      AstGraphBuilder and in full-code. This should enable smooth deoptimization
      from finally blocks.
      
      Review URL: https://codereview.chromium.org/1663323003
      
      Cr-Commit-Position: refs/heads/master@{#33780}
      334d1794
    • mvstanton's avatar
      Revert of Type Feedback Vector lives in the closure (patchset #2 id:40001 of... · 3f36e658
      mvstanton authored
      Revert of Type Feedback Vector lives in the closure (patchset #2 id:40001 of https://codereview.chromium.org/1668103002/ )
      
      Reason for revert:
      Must revert for now due to chromium api natives issues.
      
      Original issue's description:
      > Type Feedback Vector lives in the closure
      >
      > (RELAND: the problem before was a missing write barrier for adding the code
      > entry to the new closure. It's been addressed with a new macro instruction
      > and test. The only change to this CL is the addition of two calls to
      > __ RecordWriteCodeEntryField() in the platform CompileLazy builtin.)
      >
      > We get less "pollution" of type feedback if we have one vector per native
      > context, rather than one for the whole system. This CL moves the vector
      > appropriately.
      >
      > We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
      > vector actually lives in the first slot of the literals array (indeed there is
      > great commonality between those arrays, they can be thought of as the same
      > thing). So we make greater effort to ensure there is a valid literals array
      > after compilation.
      >
      > This meant, for performance reasons, that we needed to extend
      > FastNewClosureStub to support creating closures with literals. And ultimately,
      > it drove us to move the optimized code map lookup out of FastNewClosureStub
      > and into the compile lazy builtin.
      >
      > The heap change is trivial so I TBR Hannes for it...
      > Also, Yang has had a look at the debugger changes already and approved 'em. So he is TBR style too.
      > And Benedikt reviewed it as well.
      >
      > TBR=hpayer@chromium.org, yangguo@chromium.org, bmeurer@chromium.org
      >
      > BUG=
      >
      > Committed: https://crrev.com/bb31db3ad6de16f86a61f6c7bbfd3274e3d957b5
      > Cr-Commit-Position: refs/heads/master@{#33741}
      
      TBR=bmeurer@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=
      
      Review URL: https://codereview.chromium.org/1670813005
      
      Cr-Commit-Position: refs/heads/master@{#33766}
      3f36e658
    • neis's avatar
      [generators] Remove full-codegen implementation of yield*. · 9096aef4
      neis authored
      The recently introduced desugaring of yield* renders this code dead.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1648773003
      
      Cr-Commit-Position: refs/heads/master@{#33762}
      9096aef4