1. 04 Nov, 2016 2 commits
    • verwaest's avatar
      Preparse lazy function parameters · 4ff2cafe
      verwaest authored
      Parameters of a lazily parsed function used to be parsed eagerly, and parameter
      handling was split between Parser::ParseFunctionLiteral and
      ParseEagerFunctionBody, leading to inconsistencies.
      
      After this CL, we preparse (lazy parse) the parameters of lazily parsed
      functions.
      
      (For arrow functions, we cannot do that ofc.)
      
      This is needed for later features (PreParser with scope analysis).
      
      -- CL adapted from marja's https://codereview.chromium.org/2411793003/
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2472063002
      Cr-Commit-Position: refs/heads/master@{#40771}
      4ff2cafe
    • neis's avatar
      [modules] Assign cell indices at validation time. · 1dd241c4
      neis authored
      Instead of having a MODULE variable's index be 0 or 1, let it be the index of
      its cell.  In this CL, we assign the indices but we continue to only use them to
      distinguish imports from exports.  Actually using them to directly access the
      cells will be done in a later CL.
      
      R=adamk@chromium.org
      BUG=v8:1569
      
      Review-Url: https://codereview.chromium.org/2460233003
      Cr-Commit-Position: refs/heads/master@{#40752}
      1dd241c4
  2. 03 Nov, 2016 1 commit
    • verwaest's avatar
      Turn Scope::locals_ into a ThreadedList · 4fa2ebcb
      verwaest authored
      This turns the ZoneList with minimum 6 words overhead into a linked list through variables, using 2 words for the empty list. Additionally the average number of pointers per entry goes down to the optimal 1 per variable that's in a list.
      
      This does introduce 1 pointer unnecessary overhead for dynamic variables. If that becomes a problem we could distinguish between variables in lists and variables not in lists. We can distinguish them at construction-time.
      
      BUG=v8:5209
      
      Review-Url: https://codereview.chromium.org/2475433002
      Cr-Commit-Position: refs/heads/master@{#40714}
      4fa2ebcb
  3. 20 Oct, 2016 1 commit
    • adamk's avatar
      [ignition] Eliminate hole checks where statically possible for loads and stores · 35a3ccbf
      adamk authored
      Move hole check logic from full-codegen into scope analysis, and store the
      "needs hole check" bit on VariableProxy. This makes it easy to re-use in
      any backend: it will be trivial to extend the use of this logic in, e.g.,
      full-codegen variable stores.
      
      While changing the signatures of the variable loading/storing methods in
      Ignition, I took the liberty of replacing the verb "Visit" with "Build", since these
      are not part of AST visiting.
      
      BUG=v8:5460
      
      Review-Url: https://chromiumcodereview.appspot.com/2411873004
      Cr-Commit-Position: refs/heads/master@{#40479}
      35a3ccbf
  4. 07 Oct, 2016 1 commit
  5. 23 Sep, 2016 1 commit
  6. 20 Sep, 2016 1 commit
  7. 12 Sep, 2016 3 commits
  8. 09 Sep, 2016 1 commit
  9. 07 Sep, 2016 1 commit
  10. 31 Aug, 2016 2 commits
    • adamk's avatar
      Remove CONST_LEGACY VariableMode · 7516fe1e
      adamk authored
      The only remaining use of this VariableMode is for the names of sloppy
      named function expressions. This patch instead uses CONST for such
      bindings (just as we do in strict mode) and instead marks those
      Variables specially. During code generation a new helper method,
      Variable::throw_on_const_assignment(), is called to decide whether
      to throw or silently ignore the assignment.
      
      Review-Url: https://codereview.chromium.org/2233673003
      Cr-Commit-Position: refs/heads/master@{#39052}
      7516fe1e
    • neis's avatar
      [modules] Partial scope info support of modules · 840d1e84
      neis authored
      This introduces a new heap object ModuleInfo, which is to ModuleDescriptor
      what ScopeInfo is to Scope.  When deserializing a scope info that contains
      a module info, we deserialize the module info into a module descriptor and
      put it into the synthesized module scope.
      
      Currently, module infos only store exports.
      
      R=adamk@chromium.org
      BUG=v8:1569
      
      Review-Url: https://codereview.chromium.org/2277253003
      Cr-Commit-Position: refs/heads/master@{#39049}
      840d1e84
  11. 29 Aug, 2016 2 commits
  12. 26 Aug, 2016 1 commit
  13. 25 Aug, 2016 1 commit
  14. 19 Aug, 2016 1 commit
  15. 16 Aug, 2016 3 commits
  16. 15 Aug, 2016 1 commit
  17. 12 Aug, 2016 1 commit
  18. 11 Aug, 2016 1 commit
  19. 10 Aug, 2016 1 commit
  20. 20 Jun, 2016 1 commit
    • adamk's avatar
      [cleanup] Remove dead code from DeclareLookupSlot and rename it · cbc6adc8
      adamk authored
      Runtime_DeclareLookupSlot is used when generating code for var and function declarations
      originating in an eval. Over time, it's accumulated quite a bit of cruft, which this CL removes:
      
        - With legacy const gone, lookup slots never have any property attributes.
        - There was a bit signaling that the variable was from an eval, but that was redundant since
          DeclareLookupSlot is only used for eval.
        - Some Proxy-related code didn't make sense here.
      
      Its name was also not terribly clear: while "LookupSlot" is used in several places, this
      particular function is only used for declaring variables and functions inside sloppy eval.
      Renamed (and split into two) to make this clear for future archeologists.
      
      Also added various DCHECKs to check the assumptions being made.
      
      Review-Url: https://codereview.chromium.org/2061173002
      Cr-Commit-Position: refs/heads/master@{#37111}
      cbc6adc8
  21. 18 Feb, 2016 1 commit
  22. 08 Jan, 2016 1 commit
    • 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
  23. 26 Nov, 2015 1 commit
  24. 12 Oct, 2015 1 commit
    • littledan's avatar
      Test for var declarations in eval which conflict with let · d515e513
      littledan authored
      Previously, name conflicts between var and let declarations were only
      made into exceptions if they were visible at parse-time. This patch adds
      runtime checks so that sloppy-mode direct eval can't introduce conflicting
      var declarations. The change is implemented by traversing the scope chain
      when a direct eval introduces a var declaration to look for conflicting
      let declarations, up to the function boundary.
      
      BUG=v8:4454
      R=adamk
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1382513003
      
      Cr-Commit-Position: refs/heads/master@{#31211}
      d515e513
  25. 30 Sep, 2015 1 commit
  26. 04 Aug, 2015 1 commit
    • rossberg's avatar
      Correct handling of temporaries as parameters. · 222b70d1
      rossberg authored
      They need to be properly recorded in the scope's temps set, otherwise allocation doesn't know about them and can break. (Not observable right now, but necessary for follow-up changes to parameter destructuring.)
      
      Also, print temporary variables in a useful manner.
      
      R=adamk@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1263563002
      
      Cr-Commit-Position: refs/heads/master@{#29998}
      222b70d1
  27. 06 Jul, 2015 1 commit
  28. 12 Jun, 2015 5 commits
  29. 02 Jun, 2015 1 commit
    • arv's avatar
      [es6] Super call in arrows and eval · 4b8051a0
      arv authored
      This splits the SuperReference AST node into SuperPropertyReference and
      SuperCallReference. The super call reference node consists of three
      unresolved vars to this, new.target and this_function. These gets
      declared when the right function is entered and if it is in use. The
      variables gets assigned in FullCodeGenerator::Generate.
      
      This is a revert of the revert 88b1c917
      
      BUG=v8:3768
      LOG=N
      R=wingo@igalia.com, adamk@chromium.org
      
      Review URL: https://codereview.chromium.org/1168513004
      
      Cr-Commit-Position: refs/heads/master@{#28769}
      4b8051a0