1. 07 Feb, 2017 6 commits
  2. 06 Feb, 2017 2 commits
  3. 03 Feb, 2017 2 commits
  4. 01 Feb, 2017 3 commits
    • adamk's avatar
      [parser] Remove hoist_scope from DeclarationDescriptor · 59b8496c
      adamk authored
      The hoist_scope member of DeclarationDescriptor was only used to pass the function
      scope for declaration of parameters containing sloppy evals, for example:
      
        function f(x = eval("var y")) { }
      
      In cases like this, "x" is declared in the function scope but "y" is declared in an inner scope.
      Rather than passing the function scope as "hoist_scope", we simply ask for the outer_scope()
      of the inner scope as needed in PatternRewriter.
      
      This reduces the cognitive overhead of understanding what a DeclarationDescriptor has; for
      example, it removes some dead code from the PreParser which never has to deal
      with a situation like the example above.
      
      Review-Url: https://codereview.chromium.org/2662183002
      Cr-Commit-Position: refs/heads/master@{#42861}
      59b8496c
    • marja's avatar
      [iwyu] Minor iwyu fixes. · a6e24607
      marja authored
      BUG=v8:5294
      
      Review-Url: https://codereview.chromium.org/2662393004
      Cr-Commit-Position: refs/heads/master@{#42857}
      a6e24607
    • gsathya's avatar
      [ESnext] Disallow using new with import() · d08fd93b
      gsathya authored
      Throw a syntax error on "new import(1)"  expression. Adds a new error msg as well.
      
      BUG=v8:5785
      
      Review-Url: https://codereview.chromium.org/2661113002
      Cr-Commit-Position: refs/heads/master@{#42827}
      d08fd93b
  5. 31 Jan, 2017 2 commits
  6. 30 Jan, 2017 2 commits
    • marja's avatar
      [scanner] Fix bom handling · d2936564
      marja authored
      The bug used to show up when
      - we were streaming a script starting with 0xef 0xbb 0xbf
      - we aborted preparsing a function (and reset to a bookmark)
      
      BUG=chromium:685618
      
      Review-Url: https://codereview.chromium.org/2663773002
      Cr-Commit-Position: refs/heads/master@{#42790}
      d2936564
    • mvstanton's avatar
      [TypeFeedbackVector] Combine the literals array and the feedback vector. · 93f05b64
      mvstanton authored
      They have the same lifetime. It's a match!
      
      Both structures are native context dependent and dealt with (creation,
      clearing, gathering feedback) at the same time. By treating the spaces used
      for literal boilerplates as feedback vector slots, we no longer have to keep
      track of the materialized literal count elsewhere.
      
      A follow-on CL removes even more parser infrastructure related to this count.
      
      BUG=v8:5456
      
      Review-Url: https://codereview.chromium.org/2655853010
      Cr-Commit-Position: refs/heads/master@{#42771}
      93f05b64
  7. 27 Jan, 2017 1 commit
  8. 26 Jan, 2017 2 commits
    • marja's avatar
      [parser] Skipping inner funcs: add variable names into the data for test purposes. · 03e43811
      marja authored
      (Only in debug mode.)
      
      BUG=v8:5516
      
      Review-Url: https://codereview.chromium.org/2657943003
      Cr-Commit-Position: refs/heads/master@{#42696}
      03e43811
    • marja's avatar
      [parser] Skipping inner funcs: add info about variables. · d4507a6c
      marja authored
      - Declaring a variable called "this" for preparsed functions was unnecessary;
        DeclarationScope ctor already adds the variable.
      
      - "arguments" for preparsed scopes need to be declared after parsing the
        function, like it's done in the parser.
      
      - Now arguments_ can be the dummy variable, so adapted code to it.
      
      - A previous refactoring CL ( https://codereview.chromium.org/2638333002 ) was
        incomplete; it had added ParserBase::ParseFunctionBody but
        PreParser::ParseFunction didn't call it. This CL completes that work. This is
        needed for getting "arguments" declared properly for preparsed functions.
      
      - AllocateVariablesRecursively is already called for preparsed scopes (without
        this CL, that is), and it bails out early. However, before the bailout it used
        to dcheck num_stack_slots_ == 0; that is no longer true since we've done scope
        analysis for preparsed scopes.
      
      - Test fix: we cannot have any lazy inner functions in the test, except the
        topmost lazy inner function. Such functions would also be lazy in the parser
        case, and the parser would just throw away their variables. Then the test
        tries to verify the preparsed data against the scopes without variables and fails.
      
      - Disabled a test w/ a sloppy block function, will get that working again in the
        upcoming CLs.
      
      BUG=v8:5516
      
      Review-Url: https://codereview.chromium.org/2655623005
      Cr-Commit-Position: refs/heads/master@{#42685}
      d4507a6c
  9. 25 Jan, 2017 1 commit
  10. 24 Jan, 2017 4 commits
  11. 23 Jan, 2017 2 commits
  12. 21 Jan, 2017 1 commit
  13. 20 Jan, 2017 5 commits
    • franzih's avatar
      [runtime] Allocate space for computed property names. · 399f36b5
      franzih authored
      Allocate space in the backing store for computed property names.
      
      The property backing store was pre-allocated for the constant
      properties up to the first non-constant (computed name) property.
      To use lowering for storing data properties in literals
      with computed property names effectively, a fast store is needed, i.e.,
      available space in the property backing store for properties
      with computed names.
      
      backing_store_size is the number of all properties (including
      computed names, but without __proto__)
      that is calculated in the ast and passed to the runtime function that allocates
      the property backing store. backing_store_size and
      constant_properties constitute a BoilerplateDescription.
      
      backing_store_size might be slightly too high because computed names
      can evaluate to the same name, but that should be a rare
      case so over-allocating is OK.
      
      If a property is __proto__, we don't store it as a regular
      property, because the map changes. Keep track of
      has_seen_proto in the parser to calculate the
      backing store size correctly.
      
      BUG=v8:5625
      
      Review-Url: https://codereview.chromium.org/2632503003
      Cr-Commit-Position: refs/heads/master@{#42576}
      399f36b5
    • rmcilroy's avatar
      [Parse] ParseInfo owns the parsing Zone. · 4b0101d3
      rmcilroy authored
      Moves ownership of the parsing Zone to ParseInfo with a shared_ptr. This is
      in preperation for enabling background compilation jobs for inner functions
      share the AST in the outer-function's parse zone memory (read-only), with the
      and zone being released when all compilation jobs have completed.
      
      BUG=v8:5203,v8:5215
      
      Review-Url: https://codereview.chromium.org/2632123006
      Cr-Original-Commit-Position: refs/heads/master@{#42539}
      Committed: https://chromium.googlesource.com/v8/v8/+/839b06b64fcaaaa9cceb2c3fd8fd5429e2932095
      Review-Url: https://codereview.chromium.org/2632123006
      Cr-Commit-Position: refs/heads/master@{#42562}
      4b0101d3
    • rmcilroy's avatar
      Revert of [Parse] ParseInfo owns the parsing Zone. (patchset #4 id:60001 of... · 37cdb18b
      rmcilroy authored
      Revert of [Parse] ParseInfo owns the parsing Zone. (patchset #4 id:60001 of https://codereview.chromium.org/2632123006/ )
      
      Reason for revert:
      Crashes on Windows in:
       CompilerDispatcherJobTest.CompileFailureToFinalize
       CompilerDispatcherJobTest.ScopeChain
      
      Original issue's description:
      > [Parse] ParseInfo owns the parsing Zone.
      >
      > Moves ownership of the parsing Zone to ParseInfo with a shared_ptr. This is
      > in preperation for enabling background compilation jobs for inner functions
      > share the AST in the outer-function's parse zone memory (read-only), with the
      > and zone being released when all compilation jobs have completed.
      >
      > BUG=v8:5203,v8:5215
      >
      > Review-Url: https://codereview.chromium.org/2632123006
      > Cr-Commit-Position: refs/heads/master@{#42539}
      > Committed: https://chromium.googlesource.com/v8/v8/+/839b06b64fcaaaa9cceb2c3fd8fd5429e2932095
      
      TBR=marja@chromium.org,mstarzinger@chromium.org,ahaas@chromium.org,verwaest@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:5203,v8:5215
      
      Review-Url: https://codereview.chromium.org/2645613008
      Cr-Commit-Position: refs/heads/master@{#42542}
      37cdb18b
    • rmcilroy's avatar
      [Parse] ParseInfo owns the parsing Zone. · 839b06b6
      rmcilroy authored
      Moves ownership of the parsing Zone to ParseInfo with a shared_ptr. This is
      in preperation for enabling background compilation jobs for inner functions
      share the AST in the outer-function's parse zone memory (read-only), with the
      and zone being released when all compilation jobs have completed.
      
      BUG=v8:5203,v8:5215
      
      Review-Url: https://codereview.chromium.org/2632123006
      Cr-Commit-Position: refs/heads/master@{#42539}
      839b06b6
    • marja's avatar
      Parsing: Create the same scopes for non-simple params in PreParser & Parser. · 35340917
      marja authored
      Rationale:
      
      - To do scope analysis based on PreParser, and use the result again when parsing
        later, PreParser and Parser need to produce the same Scopes and variable
        declarations in them.
      
      - This is not the case for non-simple parameters: Parser creates an additional
        inner Scope where the declarations were, whereas PreParser does
        DeclareVariableName directly in the function Scope.
      
      - So this CL fixes that by moving the Scope creation for non-simple parameters
        into ParserBase.
      
      - As a side product (and a partial proof that this change makes sense),
        PreParser::ParseEagerFunctionBody is now gone.
      
      BUG=v8:5516
      
      Review-Url: https://codereview.chromium.org/2638333002
      Cr-Commit-Position: refs/heads/master@{#42537}
      35340917
  14. 19 Jan, 2017 1 commit
  15. 18 Jan, 2017 5 commits
  16. 17 Jan, 2017 1 commit
    • leszeks's avatar
      [ast] Remove internalization before AST rewriting · bb71555e
      leszeks authored
      This internalization was not necessary, since the rewriting does not use
      the .result name string.
      
      The subsequent internalization is still needed, so to simplify later
      refactoring, this CL also adds "releasing" of the disallow scopes and
      uses them here immediately before the second internalize. Notably, this
      means that the rewriting is now also in the disallow scopes.
      
      Driveby: Remove isolate from the rewriter's processor constructor.
      
      BUG=v8:5832
      
      Review-Url: https://codereview.chromium.org/2635913002
      Cr-Commit-Position: refs/heads/master@{#42403}
      bb71555e