1. 30 Jan, 2017 1 commit
    • 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
  2. 27 Jan, 2017 2 commits
  3. 26 Jan, 2017 2 commits
  4. 23 Jan, 2017 2 commits
  5. 20 Jan, 2017 2 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
    • marja's avatar
      includes: move Label out of assembler.h. · 226e4540
      marja authored
      E.g., ast/ast.h uses Label but shouldn't need to include assembler.h for that. With
      this change, we can hope for proper layering in the future (not quite there
      yet).
      
      Also includes minor random include lowering and relevant IWYU fixes.
      
      BUG=v8:5294
      
      Review-Url: https://codereview.chromium.org/2645063002
      Cr-Commit-Position: refs/heads/master@{#42563}
      226e4540
  6. 18 Jan, 2017 3 commits
  7. 16 Jan, 2017 2 commits
  8. 12 Jan, 2017 1 commit
  9. 09 Jan, 2017 2 commits
  10. 05 Jan, 2017 2 commits
    • gsathya's avatar
      [ESnext] Implement Object spread · a40b7172
      gsathya authored
      This patch adds parsing of spread object property.
      
      -- Changes ParsePropertyName to parse Token::ELLIPSIS.
      -- Throws if rest is encountered by setting a pattern error.
      -- Adds a new PropertyKind enum (SPREAD)
      -- Adds a new ObjectLiteralProperty::kind (SPREAD)
      -- Adds a new harmony-object-spread flag and protects the parser code
      with it.
      -- Adds a new runtime function called CopyDataProperties
      -- Does not add any support for this feature in fullcodegen.
      -- Ignition calls out to a runtime function CopyDataProperties to
      perform spread operation.
      -- Move FastAssign from builtins-objects.cc to objects.cc
      -- Refactor Builtin_ObjectAssign to use SetOrCopyDataProperties
      
      Object rest will be implemented in a follow on patch.
      
      BUG=v8:5549
      
      Review-Url: https://codereview.chromium.org/2606833002
      Cr-Commit-Position: refs/heads/master@{#42102}
      a40b7172
    • franzih's avatar
      [runtime] Collect IC feedback in DefineDataPropertyInLiteral. · 81736c71
      franzih authored
      Add a feedback vector slot for computed property names in object
      and class literals. Introduce new slot kind for storing
      computed property names.
      
      Change StaDataPropertyInLiteral to use the accumulator (again), so
      we don't exceed Bytecodes::kMaxOperands.
      
      We assume that most computed property names are
      symbols. Therefore we should see performance
      improvements, even if we deal with monomorphic ICs only.
      
      This CL only collects feedback but does not use
      it in Reduce() yet.
      
      BUG=v8:5624
      
      Review-Url: https://codereview.chromium.org/2587393006
      Cr-Commit-Position: refs/heads/master@{#42082}
      81736c71
  11. 04 Jan, 2017 1 commit
    • adamk's avatar
      [ignition] Only initialize [[HomeObject]] for class constructors if needed · 3e20d381
      adamk authored
      This moves the initialization of [[HomeObject]] for constructors from
      the %DefineClass runtime function into the bytecode generator, and
      makes it conditional (resolving an old TODO). As part of this refactor,
      avoid a load of "prototype" by returning the class prototype from
      %DefineClass.
      
      This is one of many steps in moving more of class definition into
      bytecode.
      
      R=rmcilroy@chromium.org
      
      Review-Url: https://codereview.chromium.org/2610683003
      Cr-Commit-Position: refs/heads/master@{#42072}
      3e20d381
  12. 03 Jan, 2017 1 commit
  13. 29 Dec, 2016 1 commit
  14. 22 Dec, 2016 1 commit
  15. 21 Dec, 2016 1 commit
    • mvstanton's avatar
      [TypeFeedbackVector] Root literal arrays in function literals slots · 93df0940
      mvstanton authored
      Literal arrays and feedback vectors for a function can be garbage
      collected if we don't have a rooted closure for the function, which
      happens often. It's expensive to come back from this (recreating
      boilerplates and gathering feedback again), and the cost is
      disproportionate if the function was inlined into optimized code.
      
      To guard against losing these arrays when we need them, we'll now
      create literal arrays when creating the feedback vector for the outer
      closure, and root them strongly in that vector.
      
      BUG=v8:5456
      
      Review-Url: https://codereview.chromium.org/2504153002
      Cr-Commit-Position: refs/heads/master@{#41893}
      93df0940
  16. 19 Dec, 2016 3 commits
  17. 16 Dec, 2016 2 commits
    • littledan's avatar
      Remove class fields desugaring · 61833f5b
      littledan authored
      This patch removes parser code implementing desugaring for ESnext
      public and private fields on classes. The desugaring should probably
      be implemented in the interpreter instead, and more work needs to go
      into optimization and debugger support. The actual parsing of class
      fields is left in, as the syntax is relatively stable, and there are
      strong cctests for the grammar.
      
      R=marja
      BUG=v8:5367
      
      Review-Url: https://codereview.chromium.org/2578893005
      Cr-Commit-Position: refs/heads/master@{#41776}
      61833f5b
    • mstarzinger's avatar
      Introduce {ConstantElementsPair} struct for type safety. · 92b370ee
      mstarzinger authored
      This introduces an explicit struct for the communication channel between
      the {ArrayLiteral} AST node and the corresponding runtime methods. Those
      methods take a pair of {ElementsKind} as well as an array (can either be
      a FixedArray or a FixedDoubleArray) of constant values.
      
      For bonus points it also reduces the size of the involved heap object by
      one word (i.e. length field of FixedArray not needed anymore).
      
      R=mvstanton@chromium.org
      
      Review-Url: https://codereview.chromium.org/2581683003
      Cr-Commit-Position: refs/heads/master@{#41752}
      92b370ee
  18. 15 Dec, 2016 1 commit
    • mstarzinger's avatar
      Fix usage of literal cloning for large double arrays. · 6c620e53
      mstarzinger authored
      This fixes a corner case where the {FastCloneShallowArrayStub} was used
      for literals that are backed by a double backing store and would exceed
      limits for new-space allocations on 32-bit architectures. The stub in
      question does not support such literals, callers must use the runtime.
      Note that this fix is for Ignition as well as FullCodeGenerator.
      
      R=rmcilroy@chromium.org
      TEST=mjsunit/regress/regress-crbug-672792
      BUG=chromium:672792
      
      Review-Url: https://codereview.chromium.org/2570843002
      Cr-Commit-Position: refs/heads/master@{#41713}
      6c620e53
  19. 14 Dec, 2016 1 commit
  20. 08 Dec, 2016 1 commit
    • neis's avatar
      [parsing] Fix maybe-assigned flag in some cases. · fcb75915
      neis authored
      This CL attempts to set the maybe-assigned flag for variables that are written
      to as part of a destructuring or loop header.
      
      For instance, in the following two cases we now mark x as maybe-assigned.
      
      a) [x] = [1];
      b) for (x of [1,2,3]) {};
      
      There's more work to do here, this is just a first step.
      
      R=adamk@chromium.org, mstarzinger@chromium.org
      BUG=v8:5636
      
      Review-Url: https://codereview.chromium.org/2562443003
      Cr-Commit-Position: refs/heads/master@{#41582}
      fcb75915
  21. 07 Dec, 2016 2 commits
    • caitp's avatar
      [ignition] desugar GetIterator() via bytecode rather than via AST · b5f146a0
      caitp authored
      Introduces:
      - a new AST node representing the GetIterator() algorithm in the specification, to be used by ForOfStatement, YieldExpression (in the case of delegating yield*), and the future `for-await-of` loop proposed in http://tc39.github.io/proposal-async-iteration/#sec-async-iterator-value-unwrap-functions.
      - a new opcode (JumpIfJSReceiver), which is useful for `if Type(object) is not Object` checks which are common throughout the specification. This node is easily eliminated by TurboFan.
      
      The AST node is desugared specially in bytecode, rather than manually when building the AST. The benefit of this is that desugaring in the BytecodeGenerator is much simpler and easier to understand than desugaring the AST.
      
      This also reduces parse time very slightly, and allows us to use LoadIC rather than KeyedLoadIC, which seems to have  better baseline performance. This results in a ~20% improvement in test/js-perf-test/Iterators micro-benchmarks, which I believe owes to the use of the slightly faster LoadIC as opposed to the KeyedLoadIC in the baseline case. Both produce identical optimized code via TurboFan when the type check can be eliminated, and the load can be replaced with a constant value.
      
      BUG=v8:4280
      R=bmeurer@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, neis@chromium.org, jarin@chromium.org
      TBR=rossberg@chromium.org
      
      Review-Url: https://codereview.chromium.org/2557593004
      Cr-Commit-Position: refs/heads/master@{#41555}
      b5f146a0
    • henrique.ferreiro's avatar
      Install the 'name' property in classes at runtime · afd5ff55
      henrique.ferreiro authored
      This allows to detect a static property also named 'name', and also makes sure 'name' is added last, to be standards-compliant.
      
      BUG=v8:4199
      
      Review-Url: https://codereview.chromium.org/2423053002
      Cr-Commit-Position: refs/heads/master@{#41546}
      afd5ff55
  22. 05 Dec, 2016 1 commit
  23. 02 Dec, 2016 1 commit
  24. 01 Dec, 2016 2 commits
  25. 29 Nov, 2016 2 commits