1. 26 Aug, 2016 1 commit
    • nikolaos's avatar
      [parser] Clean up type definitions · 58cfe4d6
      nikolaos authored
      This patch:
      
      1. Removes the unecessary inheritance of ParserBaseTraits<Impl>
         in ParserBase<Impl>.
      2. Flattens ParserBaseTraits<Impl> and renames it to
         ParserTypes<Impl>.  The Traits parameter/member is renamed to
         Types.
      3. Removes unecessary v8::internal:: qualifications from parser
         types.
      
      R=adamk@chromium.org, marja@chromium.org
      BUG=
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2279773002
      Cr-Commit-Position: refs/heads/master@{#38927}
      58cfe4d6
  2. 25 Aug, 2016 2 commits
    • nikolaos's avatar
      [parser] Clean up (pre)parser traits, part 5, last · ba9367db
      nikolaos authored
      This patch moves the following methods from the traits objects to
      the (pre)parser implementation objects:
      
      - AddFormalParameter
      - AddParameterInitializationBlock
      - DeclareFormalParameter
      - ExpressionListToExpression
      - GetNonPatternList
      - GetReportedErrorList
      - IsTaggedTemplate
      - MaterializeUnspreadArgumentsLiterals
      - NoTemplateTag
      - ParseArrowFunctionFormalParameterList
      - ReindexLiterals
      - SetFunctionNameFromIdentifierRef
      - SetFunctionNameFromPropertyName
      
      It moves the Void method from the preparser traits object to the
      preparser implementation object.  It also removes the traits zone
      method and replaces it with that of ParserBase, which it turns to
      public.
      
      After all this, the traits objects contain just typedefs and the
      delegate methods are no more necessary.
      
      R=adamk@chromium.org, marja@chromium.org
      BUG=
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2277843002
      Cr-Commit-Position: refs/heads/master@{#38892}
      ba9367db
    • nikolaos's avatar
      [parser] Clean up (pre)parser traits, part 4 · 3c1d076a
      nikolaos authored
      This patch moves the following methods from the traits objects to
      the (pre)parser implementation objects:
      
      - ExpressionFromIdentifier
      - ExpressionFromLiteral
      - ExpressionFromString
      - FunctionSentExpression
      - GetNextSymbol
      - GetNumberAsSymbol
      - GetSymbol
      - NewExpressionList
      - NewPropertyList
      - NewStatementList
      - NewSuperCallReference
      - NewSuperPropertyReference
      - NewTargetExpression
      - ThisExpression
      
      Also, the method GetIterator is specific only to the parser and is
      removed from the preparser's implementation.
      
      R=adamk@chromium.org, marja@chromium.org
      BUG=
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2274113002
      Cr-Commit-Position: refs/heads/master@{#38890}
      3c1d076a
  3. 24 Aug, 2016 2 commits
    • nikolaos's avatar
      [parser] Clean up (pre)parser traits, part 3 · c374d413
      nikolaos authored
      This patch moves the following methods from the traits objects to
      the (pre)parser implementation objects:
      
      - BuildIteratorResult
      - BuildUnaryExpression
      - EmptyExpression
      - EmptyFunctionLiteral
      - EmptyIdentifier
      - EmptyIdentifierString
      - EmptyLiteral
      - EmptyObjectLiteralProperty
      - GetLiteralTheHole
      - NewThrowReferenceError
      - NewThrowSyntaxError
      - NewThrowTypeError
      - NullExpressionList
      - ReportMessageAt
      
      R=adamk@chromium.org, marja@chromium.org
      BUG=
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2268413002
      Cr-Commit-Position: refs/heads/master@{#38862}
      c374d413
    • nikolaos's avatar
      [parser] Clean up (pre)parser traits, part 2 · 62630927
      nikolaos authored
      This patch moves the following methods from the traits objects to
      the (pre)parser implementation objects:
      
      - AsIdentifier
      - CheckAssigningFunctionLiteralToProperty
      - GetPropertyValue
      - InferFunctionName
      - IsArguments
      - IsArrayIndex
      - IsBoilerplateProperty
      - IsConstructor
      - IsDirectEvalCall
      - IsEval
      - IsEvalOrArguments
      - IsFutureStrictReserved
      - IsIdentifier
      - IsPrototype
      - IsThisProperty
      - IsUndefined
      - MarkExpressionAsAssigned
      - PushLiteralName
      - PushPropertyName
      - ShortcutNumericLiteralBinaryExpression
      
      R=adamk@chromium.org, marja@chromium.org
      BUG=
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2273693002
      Cr-Commit-Position: refs/heads/master@{#38861}
      62630927
  4. 23 Aug, 2016 3 commits
    • nikolaos's avatar
      [parser] Clean up (pre)parser traits · 6fe0b39b
      nikolaos authored
      This patch removes 26 elements of the (pre)parser traits objects.
      Some methods are removed completely and called directly from the
      implementation objects:
      
      - ParseAsyncFunctionExpression
      - ParseClassLiteral
      - ParseDoExpression
      - ParseEagerFunctionBody
      - ParseFunctionLiteral
      - ParseV8Intrinsic
      
      Some methods have to be moved to at least one implementation object:
      
      - AddTemplateExpression
      - AddTemplateSpan
      - CheckConflictingVarDeclarations
      - CloseTemplateLiteral
      - MarkCollectedTailCallExpressions
      - MarkTailPosition
      - OpenTemplateLiteral
      - ParseAsyncArrowSingleExpressionBody
      - PrepareSpreadArguments
      - QueueDestructuringAssignmentForRewriting
      - QueueNonPatternForRewriting
      - RewriteAssignExponentiation
      - RewriteAwaitExpression
      - RewriteDestructuringAssignments
      - RewriteExponentiation
      - RewriteNonPattern
      - RewriteYieldStar
      - SkipLazyFunctionBody
      - SpreadCall
      - SpreadCallNew
      
      Also, the inner class/struct TemplateLiteralState is moved to the
      implementation objects.
      
      R=adamk@chromium.org, marja@chromium.org
      BUG=
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2267783002
      Cr-Commit-Position: refs/heads/master@{#38837}
      6fe0b39b
    • nikolaos's avatar
      [parser] Apply an adaptation of the CRTP · 6c2c17cd
      nikolaos authored
      This patch applies an adaptation of the Curiously Recurring Template
      Pattern to the parser objects.  The result is roughly:
      
          // Common denominator, needed to avoid cyclic dependency.
          // Instances of this template will end up with very minimal
          // definitions, ideally containing just typedefs.
          template <typename Impl>
          class ParserBaseTraits;
      
          // The parser base object, which should just implement pure
          // parser behavior.  The Impl parameter is the actual derived
          // class (according to CRTP), which implements impure parser
          // behavior.
          template <typename Impl>
          class ParserBase : public ParserBaseTraits<Impl> { ... };
      
          // And then, for each parser variant:
          class Parser;
      
          template <>
          class ParserBaseTraits<Parser> { ... };
      
          class Parser : public ParserBase<Parser> { ... };
      
      Using the CRTP, we will ultimately achieve two goals:
      (1) clean up the traits objects, but most importantly
      (2) clearly separate pure/impure parser implementation and facilitate
      experimentation with different parser variants.
      
      R=adamk@chromium.org, marja@chromium.org
      BUG=
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2267663002
      Cr-Commit-Position: refs/heads/master@{#38819}
      6c2c17cd
    • nikolaos's avatar
      [parser] Modify some const qualifications · dc18cc1d
      nikolaos authored
      This patch const-qualifies some methods of ParserBase.
      It also unqualifies some methods of Parser and Preparser.
      The reason for the latter is that, in principle, the methods
      of AstNodeFactory should be allowed to change the factory's
      state, therefore should not be const and should not be used
      from const-qualified parser/pre-parser methods.
      
      R=adamk@chromium.org, marja@chromium.org
      BUG=
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2263973003
      Cr-Commit-Position: refs/heads/master@{#38813}
      dc18cc1d
  5. 20 Aug, 2016 2 commits
  6. 19 Aug, 2016 1 commit
  7. 18 Aug, 2016 1 commit
  8. 16 Aug, 2016 1 commit
  9. 15 Aug, 2016 1 commit
  10. 12 Aug, 2016 1 commit
  11. 11 Aug, 2016 1 commit
  12. 08 Aug, 2016 1 commit
    • verwaest's avatar
      Reduce number of scope() accesses · 8cdb64d8
      verwaest authored
      To be able to lazily allocate BlockScopes, we need to reduce access to scope(). The explicit accesses removed here just need access to the current scope to allocate unresolved variable proxies. Those in the future should go over ScopeState rather than directly to Scope.
      
      BUG=v8:5209
      
      Review-Url: https://codereview.chromium.org/2224843003
      Cr-Commit-Position: refs/heads/master@{#38456}
      8cdb64d8
  13. 05 Aug, 2016 3 commits
  14. 22 Jul, 2016 1 commit
  15. 21 Jul, 2016 1 commit
  16. 20 Jul, 2016 3 commits
  17. 19 Jul, 2016 2 commits
  18. 15 Jul, 2016 1 commit
    • verwaest's avatar
      Templatize AstVisitor with its subclass · ebf166df
      verwaest authored
      This replaces the vtable on AstNode with a NodeType tag. The visitors replace double dispatch with a single switch over the NodeType.
      
      For now, visitors with subclasses still have virtual methods themselves. We should probably specialize them later as well.
      
      The uint8_t NodeType allows us to better pack memory, saving 8-16 bytes on many AST nodes (with additional packing that I'll do in a follow-up CL)
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2142233003
      Cr-Commit-Position: refs/heads/master@{#37788}
      ebf166df
  19. 11 Jul, 2016 1 commit
  20. 30 Jun, 2016 1 commit
  21. 10 Jun, 2016 1 commit
    • nikolaos's avatar
      Reduce the memory footprint of expression classifiers · dfb8d333
      nikolaos authored
      This patch attempts to reduce the (stack) memory footprint of
      expression classifiers.  Instead of keeping space in each
      classifier for all possible error messages that will
      (potentially) be reported, if an expression turns out to be
      a pattern or a non-pattern, such error messages are placed in
      a list shared by the FunctionState and each classifier keeps a
      couple of indices in this list.  This requires that classifiers
      are used strictly in a stack-based fashion, which is also in line
      with my previous patch for revisiting non-pattern rewriting.
      
      R=adamk@chromium.org
      BUG=chromium:528697
      
      Review-Url: https://codereview.chromium.org/1708193003
      Cr-Commit-Position: refs/heads/master@{#36897}
      dfb8d333
  22. 09 Jun, 2016 1 commit
    • lpy's avatar
      Move hashmap into src/base. · 2fd55667
      lpy authored
      We ported hashmap.h into libsampler as a workaround before, so the main focus of
      this patch is to reduce code duplication. This patch moves the hashmap into
      src/base as well as creates DefaultAllocationPolicy using malloc and free.
      
      BUG=v8:5050
      LOG=n
      
      Review-Url: https://codereview.chromium.org/2010243003
      Cr-Commit-Position: refs/heads/master@{#36873}
      2fd55667
  23. 17 May, 2016 2 commits
  24. 16 May, 2016 2 commits
  25. 13 May, 2016 1 commit
  26. 12 May, 2016 1 commit
  27. 10 May, 2016 1 commit
  28. 04 May, 2016 1 commit
    • ishell's avatar
      [es8] More spec compliant syntactic tail calls implementation. · 1350eb3d
      ishell authored
      Unlike previous implementation where the 'continue' keyword was a feature of a return statement the keyword is now recognized as a part of expression. Error reporting was significantly improved.
      
      --harmony-explicit-tailcalls option is now orthogonal to --harmony-tailcalls so we can test both modes at the same time.
      
      This CL also adds %GetExceptionDetails(exception) that fetches hidden |start_pos| and |end_pos| values from the exception object.
      
      BUG=v8:4915
      LOG=N
      
      Review-Url: https://codereview.chromium.org/1928203002
      Cr-Commit-Position: refs/heads/master@{#36024}
      1350eb3d