1. 02 Feb, 2016 1 commit
    • jarin's avatar
      Remove the template magic from types.(h|cc), remove types-inl.h. · ef35f11c
      jarin authored
      This CL removes the Config templatization from the types. It is not
      necessary anymore, after the HeapTypes have been removed.
      
      The CL also changes the type hierarchy - the specific type kinds are
      not inner classes of the Type class and they do not inherit from Type.
      This is partly because it seems impossible to make this work without
      templates. Instead, a new TypeBase class is introduced and all the
      structural (i.e., non-bitset) types inherit from it.
      
      The bitset type still requires the bit-munging hack and some nasty
      reinterpret-casts to pretend bitsets are of type Type*. Additionally,
      there is now the same hack for TypeBase - all pointers to the sub-types
      of TypeBase are reinterpret-casted to Type*. This is to keep the type
      constructors in inline method definitions (although it is unclear how
      much that actually buys us).
      
      In future, we would like to move to a model where we encapsulate Type*
      into a class (or possibly use Type where we used to use Type*). This
      would loosen the coupling between bitset size and pointer size, and
      eventually we would be able to have more bits.
      
      TBR=bradnelson@chromium.org
      
      Review URL: https://codereview.chromium.org/1655833002
      
      Cr-Commit-Position: refs/heads/master@{#33656}
      ef35f11c
  2. 01 Feb, 2016 1 commit
    • adamk's avatar
      Remove unnecessary ClassLiteral name member and simplify Function.name handling · 8f89ad74
      adamk authored
      A class's name is its constructor's name, so there's no need to treat it separately,
      either in the parser or in code generation. The main parser use of the name is
      for ES2015 Function.name handling, and this patch also cleans up handling there
      by adding a new IsAnonymousFunctionDefinition() method to Expression (the name
      comes from the spec).
      
      Also removed unused ParserTraits::DefaultConstructor method.
      
      BUG=v8:3699
      LOG=n
      
      Review URL: https://codereview.chromium.org/1647213002
      
      Cr-Commit-Position: refs/heads/master@{#33643}
      8f89ad74
  3. 27 Jan, 2016 1 commit
  4. 26 Jan, 2016 1 commit
    • ishell's avatar
      [es6] Tail calls support. · 6131ab1e
      ishell authored
      This CL implements PrepareForTailCall() mentioned in ES6 spec for full codegen, Crankshaft and Turbofan.
      When debugger is active tail calls are disabled.
      
      Tail calling can be enabled by --harmony-tailcalls flag.
      
      BUG=v8:4698
      LOG=Y
      TBR=rossberg@chromium.org
      
      Review URL: https://codereview.chromium.org/1609893003
      
      Cr-Commit-Position: refs/heads/master@{#33509}
      6131ab1e
  5. 25 Jan, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Switch JSForInPrepare to %ForInPrepare style. · 825ece48
      bmeurer authored
      Now TurboFan always uses the newly introduced %ForInPrepare, no matter
      whether baseline is the interpreter or fullcodegen. For fullcodegen, we
      introduce a new PrepareId bailout point for this purpose.
      
      Drive-by-fix: Avoid the NoObservableSideEffectsScope in Crankshaft and
      use the PrepareId bailout point instead.
      
      R=jarin@chromium.org
      BUG=v8:3650
      LOG=n
      
      Review URL: https://codereview.chromium.org/1630523002
      
      Cr-Commit-Position: refs/heads/master@{#33480}
      825ece48
  6. 21 Jan, 2016 2 commits
  7. 19 Jan, 2016 1 commit
  8. 18 Jan, 2016 1 commit
    • nikolaos's avatar
      Fix re-indexing for literals in do-expressions · 9ed5596a
      nikolaos authored
      This became temporarily a big issue, because spreads are desugared
      into do-expressions.  This patch fixes the problem with having
      spreads as parameter initializers in arrow expressions, e.g., this
      line would crash:
      
          [], ((x = [...[42]]) => x)();
      
      R=rossberg@chromium.org
      BUG=chromium:578038
      LOG=N
      
      Review URL: https://codereview.chromium.org/1581403007
      
      Cr-Commit-Position: refs/heads/master@{#33365}
      9ed5596a
  9. 16 Jan, 2016 1 commit
    • adamk's avatar
      [ast cleanup] Remove unnecessary frozen_ bit from ModuleDescriptor · dc6a5939
      adamk authored
      This may have made more sense in the old module design (where
      "unification" was a thing), but as-is it's only used for a few
      asserts in debug mode. These asserts don't make much sense inside
      ModuleDescriptor; instead, as the modules implementation is fleshed
      out, I expect the appropriate replacement asserts to show up at the
      use of the ModuleDescriptor.
      
      Review URL: https://codereview.chromium.org/1598433006
      
      Cr-Commit-Position: refs/heads/master@{#33345}
      dc6a5939
  10. 15 Jan, 2016 1 commit
  11. 14 Jan, 2016 1 commit
    • nikolaos's avatar
      Add spread rewriting · 07f1c362
      nikolaos authored
      In short, array literals containing spreads, when used as expressions,
      are rewritten using do expressions.  E.g.
      
          [1, 2, 3, ...x, 4, ...y, 5]
      
      is roughly rewritten as:
      
          do {
            $R = [1, 2, 3];
            for ($i of x) %AppendElement($R, $i);
            %AppendElement($R, 4);
            for ($j of y) %AppendElement($R, $j);
            %AppendElement($R, 5);
            $R
          }
      
      where $R, $i and $j are fresh temporary variables.
      
      R=rossberg@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1564083002
      
      Cr-Commit-Position: refs/heads/master@{#33307}
      07f1c362
  12. 11 Jan, 2016 1 commit
  13. 08 Jan, 2016 5 commits
    • adamk's avatar
      Clean up FunctionLiteral AST node cruft · 316dc173
      adamk authored
      Removed unused name_ field, made bitfield 16-bits long, and moved it to
      the start of the struct, resulting in a reduction of 8 bytes on both
      32 and 64-bit platforms.
      
      Most other changes (which prompted this work) are cosmetic:r
        - Combined redundant enums
        - Named enum values kConsistently
        - Consistently use booleans in bitfield, using enum values
          only for passing information into NewFunctionLiteral
        - Removed unneeded arguments from NewFunctionLiteral, reducing
          clutter at callsites
        - Added const correctness consistently
      
      Review URL: https://codereview.chromium.org/1566053002
      
      Cr-Commit-Position: refs/heads/master@{#33194}
      316dc173
    • caitpotter88's avatar
      [parser] parenthesized Literals are not valid AssignmentPatterns · 1f1af42d
      caitpotter88 authored
      Encode "parenthesized" status of parenthesized Expressions to prevent
      them from being treated as Patterns.
      
      BUG=v8:4657, v8:811
      LOG=N
      R=rossberg@chromium.org, adamk@chromium.org, littledan@chromium.org
      
      Review URL: https://codereview.chromium.org/1570793002
      
      Cr-Commit-Position: refs/heads/master@{#33190}
      1f1af42d
    • littledan's avatar
      Fix sloppy block-scoped function hoisting with nested zones · eb9deba8
      littledan authored
      The sloppy block-scoped function declaration placeholder statements
      are held in parser_zone_-allocated hashtables. These hashtables are
      not updated when local_zone_s are removed. Therefore, the
      NewSloppyBlockFunctionStatement method should allocate
      SloppyBlockScopeFunctionStatements in the parser_zone_ to avoid a
      use-after-free. Scope fixup code may end up updating something which
      is thrown away, but this is a small cost and much simpler than
      removing dead hashtable entries later.
      
      R=adamk
      LOG=Y
      BUG=chromium:537816
      
      Review URL: https://codereview.chromium.org/1564923007
      
      Cr-Commit-Position: refs/heads/master@{#33185}
      eb9deba8
    • nikolaos's avatar
      Fix for temporaries in parameter initializers · 0406fa22
      nikolaos authored
      This patch introduces a mechanism for changing the scope of temporary
      variables, which is necessary for rewriting arrow parameter
      initializers.
      
      It also fixes a potential bug in AstExpressionVisitor, which did not
      visit the automatically generated members of ForEachStatement.
      
      Fixes test/mjsunit/harmony/regress/regress-4658.js
      
      R=rossberg@chromium.org
      BUG=v8:4658
      LOG=N
      
      Review URL: https://codereview.chromium.org/1564343002
      
      Cr-Commit-Position: refs/heads/master@{#33183}
      0406fa22
    • yangguo's avatar
      [regexp] move regexp parser into own files. · 0a808704
      yangguo authored
      R=rossberg@chromium.org, ulan@chromium.org
      
      Review URL: https://codereview.chromium.org/1565183002
      
      Cr-Commit-Position: refs/heads/master@{#33169}
      0a808704
  14. 07 Jan, 2016 1 commit
  15. 06 Jan, 2016 1 commit
  16. 04 Jan, 2016 1 commit
  17. 31 Dec, 2015 1 commit
  18. 23 Dec, 2015 1 commit
    • mvstanton's avatar
      Partial revert of rest parameter desugaring. · d3f074b2
      mvstanton authored
      We'll be able to optimize rest parameters in TurboFan similarly to the arguments array. This CL restores the previous behavior, and a follow-on will enable TurboFan optimization.
      
      (TBR for rossberg since we discussed the revert beforehand. The only changes are a few lines related to tests and rebasing.)
      
      TBR=rossberg@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1537683002
      
      Cr-Commit-Position: refs/heads/master@{#33024}
      d3f074b2
  19. 17 Dec, 2015 1 commit
  20. 16 Dec, 2015 2 commits
  21. 14 Dec, 2015 1 commit
    • yangguo's avatar
      [debugger] fix debug-evaluate wrt shadowed context var. · 089edbfa
      yangguo authored
      Debug-evaluate used to resolve stack variables that shadow
      context variables incorrectly, since the stack variable is
      not visible in the context chain.
      
      To fix this, we limit local variables accessible by debug-
      evaluate to the ones directly referenced inside the function.
      What is not referenced by the function itself, is considered
      optimized out and not accessible by debug-evaluate.
      
      To achieve this, we duplicate the entire context chain up to
      the native context, and write back changes after debug-
      evaluate. Changes to the original context chain will however
      be overwritten. This already happens for catch and block
      scopes though.
      
      Also fix a crash caused by declaring variables inside debug-
      evaluate.
      
      R=mstarzinger@chromium.org
      BUG=v8:4593
      LOG=N
      
      Review URL: https://codereview.chromium.org/1500933002
      
      Cr-Commit-Position: refs/heads/master@{#32828}
      089edbfa
  22. 12 Dec, 2015 1 commit
  23. 11 Dec, 2015 4 commits
  24. 10 Dec, 2015 1 commit
  25. 09 Dec, 2015 3 commits
  26. 07 Dec, 2015 1 commit
  27. 04 Dec, 2015 2 commits
    • caitpotter88's avatar
      [es6] implement destructuring assignment · b634a61d
      caitpotter88 authored
      Attempt #<really big number>
      
      Parses, and lazily rewrites Destructuring Assignment expressions. The rewriting strategy involves inserting a placeholder RewritableAssignmentExpression into the AST, whose content expression can be completely rewritten at a later time.
      
      Lazy rewriting ensures that errors do not occur due to eagerly rewriting nodes which form part of a binding pattern, thus breaking the meaning of the pattern --- or by eagerly rewriting ambiguous constructs that are not immediately known
      
      BUG=v8:811
      LOG=Y
      R=adamk@chromium.org, bmeurer@chromium.org, rossberg@chromium.org
      
      Review URL: https://codereview.chromium.org/1309813007
      
      Cr-Commit-Position: refs/heads/master@{#32623}
      b634a61d
    • bmeurer's avatar
      Revert of Provide call counts for constructor calls, surface them as a vector... · e89e08ca
      bmeurer authored
      Revert of Provide call counts for constructor calls, surface them as a vector IC. (patchset #4 id:60001 of https://codereview.chromium.org/1476413003/ )
      
      Reason for revert:
      Seems to be (mostly) responsible for the most recent Speedometer regression, not 100% sure. Let's see what the bots have to say.
      
      Original issue's description:
      > Provide call counts for constructor calls, surface them as a vector IC.
      >
      > CallIC and CallConstructStub look so alike, at least in the feedback they gather even if the implementation differs...and CallIC has such a nice way of surfacing the feedback (CallICNexus), that there is a request to make CallConstructStub look analogous. Enter ConstructICStub.
      >
      > BUG=
      >
      > Committed: https://crrev.com/66d5a9df62da458a51e8c7ed1811dc9660f4f418
      > Cr-Commit-Position: refs/heads/master@{#32452}
      
      TBR=mvstanton@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=
      
      Review URL: https://codereview.chromium.org/1489413006
      
      Cr-Commit-Position: refs/heads/master@{#32599}
      e89e08ca
  28. 03 Dec, 2015 1 commit