1. 24 May, 2019 1 commit
  2. 22 May, 2019 1 commit
  3. 15 May, 2019 1 commit
  4. 13 May, 2019 1 commit
  5. 10 May, 2019 1 commit
    • Ross McIlroy's avatar
      Revert "[class] implement private method declarations" · bf07d790
      Ross McIlroy authored
      This reverts commit b9191bd3.
      
      Reason for revert: Clusterfuzz bugs
      BUG=chromium:961507,chromium:961508
      
      Original change's description:
      > [class] implement private method declarations
      >
      > This patch implements the declarations of private methods, the access
      > of private methods would be left to a future patch.
      > When a private methods declaration is encountered, we now:
      >
      > - Create a brand symbol during class evaluation and store it in the
      >   context.
      > - Create the closures for the private methods
      > - Load the brand from the context and store it in the instance in the
      >   constructor.
      >
      > Design: https://docs.google.com/document/d/1T-Ql6HOIH2U_8YjWkwK2rTfywwb7b3Qe8d3jkz72KwA/edit#
      >
      > Bug: v8:8330
      > Change-Id: I2d695cbdc8a7367ddc7620d627b318f779d36150
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1568708
      > Commit-Queue: Joyee Cheung <joyee@igalia.com>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#61387}
      
      TBR=rmcilroy@chromium.org,gsathya@chromium.org,verwaest@chromium.org,joyee@igalia.com
      
      Change-Id: I429bbe8af9f94598de132814aa2c3ab9fa69b986
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:8330
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1605730
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61406}
      bf07d790
  6. 09 May, 2019 1 commit
  7. 29 Apr, 2019 2 commits
    • Clemens Hammacher's avatar
      [cleanup] Remove {StrLength} function · 423b357b
      Clemens Hammacher authored
      The {Vector} class does not use it any more. External uses should be
      converted to {size_t} instead of {int}.
      This CL removes the function from vector.h and updates all users to
      either use {size_t}, or cast to {int} explicitly. In tests, no further
      checks are needed if the string is a constant.
      
      R=mstarzinger@chromium.org
      
      Bug: v8:9183
      Change-Id: I60f99302504c74d8a7c79b147ca01d8ba61b6879
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1587393Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61092}
      423b357b
    • Clemens Hammacher's avatar
      [cleanup] Use Vector::begin instead of Vector::start · 4b0f9c85
      Clemens Hammacher authored
      Our {Vector} template provides both {start} and {begin} methods. They
      return exactly the same value. Since the {begin} method is needed for
      iteration, and is also what standard containers provide, this CL
      switches all uses of the {start} method to use {begin} instead.
      
      Patchset 1 was auto-generated by using this clang AST matcher:
          callExpr(
              callee(
                cxxMethodDecl(
                  hasName("start"),
                  ofClass(hasName("v8::internal::Vector")))
              ),
              argumentCountIs(0))
      
      Patchset 2 was created by running clang-format. Patchset 3 then
      removes the now unused {Vector::start} method.
      
      R=jkummerow@chromium.org
      TBR=mstarzinger@chromium.org,yangguo@chromium.org,verwaest@chromium.org
      
      Bug: v8:9183
      Change-Id: Id9f01c92870872556e2bb3f6d5667463b0e3e5c6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1587381Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61081}
      4b0f9c85
  8. 03 Apr, 2019 1 commit
  9. 04 Mar, 2019 1 commit
  10. 01 Mar, 2019 1 commit
    • Sathya Gunasekaran's avatar
      [fni] Mark computed props as computed, not anonymous function · ab24897c
      Sathya Gunasekaran authored
      I thought about potentially adding the identifer ref to the error but
      that would require allocating a new string or at the very least
      increasing the size of the resulting cons string. Given that the
      parser is pretty performance sensitive, I've decided to not display
      the identifier.
      
      Previously, the error was:
        _test.js:3: Error
        a[foo].c = () => { throw Error(); };
                           ^
        Error
          at a.(anonymous function).c (_test.js:3:26)
          at _test.js:5:1
      
      With this patch, the error becomes:
        _test.js:3: Error
        a[foo].c = () => { throw Error(); };
                           ^
        Error
          at a.<computed>.c (_test.js:3:26)
          at _test.js:5:1
      
      Bug: v8:8823
      Change-Id: I557b3517e317652c447ca06c5a400e9625353d9b
      Reviewed-on: https://chromium-review.googlesource.com/c/1495017
      Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarMathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59985}
      ab24897c
  11. 29 Nov, 2018 1 commit
  12. 19 Nov, 2018 1 commit
  13. 13 Nov, 2018 4 commits
  14. 02 Nov, 2018 3 commits
  15. 31 Oct, 2018 3 commits
  16. 27 Sep, 2018 1 commit
    • Benedikt Meurer's avatar
      [parser] Name outer promise ".promise" in the desugaring. · bd68cc82
      Benedikt Meurer authored
      The Parser inserts a temporary .promise variable to hold the outer
      promise for async functions, but doesn't assign an actually visible
      name to it. This change puts the name ".promise" on it (similar to
      what we do for other special variables like .result), which makes it
      easier to debug this (for V8 developers). It's not observable to
      regular developers.
      
      Bug: v8:7522, v8:8015
      Change-Id: I388352ad931a49102cb5afe350314337a505a150
      Reviewed-on: https://chromium-review.googlesource.com/1249106Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56276}
      bd68cc82
  17. 20 Sep, 2018 1 commit
    • Ross McIlroy's avatar
      [Compile] Refactor CompilerDispatcher for inner function compilation jobs · 80195fc5
      Ross McIlroy authored
      Refactors the CompilerDispatcher to be able to enqueue eager inner functions
      for off-thread compilation during top-level compilation of a script.
      
      Unoptimized compile jobs are simplified to only have two phases - compile
      and finalization. Only finalization requires heap access (and therefore
      needs to be run on the main thread). The change also introduces a requirement
      to register a SFI with a given compile job after that job is posted, this
      is due to the fact that an SFI won't necessarily exist at the point the job
      is posted, but is created later when top-level compile is being finalized.
      Logic in the compile dispatcher is update to deal with the fact that a job
      may not be able to progress if it doesn't yet have an associated SFI
      registered with it.
      
      BUG=v8:8041
      
      Change-Id: I66cccd626136738304a7cab0e501fc65cf342514
      Reviewed-on: https://chromium-review.googlesource.com/1215782
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56088}
      80195fc5
  18. 11 Sep, 2018 1 commit
  19. 16 Jul, 2018 1 commit
  20. 02 May, 2018 1 commit
    • Leszek Swirski's avatar
      Revert "[parser] Slice the source string where possible" · 18bc2856
      Leszek Swirski authored
      This reverts commit 2df5e7a7.
      
      Reason for revert: Mystery crashes https://bugs.chromium.org/p/chromium/issues/detail?id=838805
      
      Original change's description:
      > [parser] Slice the source string where possible
      > 
      > When internalizing string literals (for quoted strings or property names),
      > try to create a sliced string of the source string rather than allocating
      > a copy of the bytes.
      > 
      > This will not work for string literals that contain escapes (e.g. unicode
      > escapes), and currently does not support two-byte strings.
      > 
      > Bug: chromium:818642
      > Change-Id: I686e5ad36baecd1a84ce5e124118431249b6c980
      > Reviewed-on: https://chromium-review.googlesource.com/1010282
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
      > Reviewed-by: Marja Hölttä <marja@chromium.org>
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52898}
      
      TBR=marja@chromium.org,yangguo@chromium.org,jarin@chromium.org,mlippautz@chromium.org,leszeks@chromium.org,verwaest@chromium.org
      
      Change-Id: I598b6668c43a3e843e2dd8e60852b2b2f3461954
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:818642
      Reviewed-on: https://chromium-review.googlesource.com/1039885
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52919}
      18bc2856
  21. 01 May, 2018 1 commit
  22. 09 Apr, 2018 1 commit
  23. 06 Apr, 2018 2 commits
    • Michael Achenbach's avatar
      Revert "[cleanup] Refactor the Factory" · 503e07c3
      Michael Achenbach authored
      This reverts commit f9a2e24b.
      
      Reason for revert: gc stress failures not all fixed by follow up.
      
      Original change's description:
      > [cleanup] Refactor the Factory
      > 
      > There is no good reason to have the meat of most objects' initialization
      > logic in heap.cc, all wrapped by the CALL_HEAP_FUNCTION macro. Instead,
      > this CL changes the protocol between Heap and Factory to be AllocateRaw,
      > and all object initialization work after (possibly retried) successful
      > raw allocation happens in the Factory.
      > 
      > This saves about 20KB of binary size on x64.
      > 
      > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      > Change-Id: Icbfdc4266d7be8b48d2fe085f03411743dc6a0ca
      > Reviewed-on: https://chromium-review.googlesource.com/959533
      > Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52416}
      
      TBR=jkummerow@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,hpayer@chromium.org
      
      Change-Id: Idbbc53478742f3e9525eee83342afc6aedae122f
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/999414Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52420}
      503e07c3
    • Jakob Kummerow's avatar
      [cleanup] Refactor the Factory · f9a2e24b
      Jakob Kummerow authored
      There is no good reason to have the meat of most objects' initialization
      logic in heap.cc, all wrapped by the CALL_HEAP_FUNCTION macro. Instead,
      this CL changes the protocol between Heap and Factory to be AllocateRaw,
      and all object initialization work after (possibly retried) successful
      raw allocation happens in the Factory.
      
      This saves about 20KB of binary size on x64.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: Icbfdc4266d7be8b48d2fe085f03411743dc6a0ca
      Reviewed-on: https://chromium-review.googlesource.com/959533
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52416}
      f9a2e24b
  24. 27 Nov, 2017 1 commit
    • Sathya Gunasekaran's avatar
      [class] Store class fields initializer on the constructor · 4ca9d843
      Sathya Gunasekaran authored
      Previously, the class fields initializer function was stored on a
      synthetic context allocated variable. This approach had sevaral
      problems:
      
      - We didn't know that class literal had fields until after we had
      completely parsed the class literal. This meant that we had to go back
      and fix up the scope of the constructor to have this synthetic
      variable. This resulted in mismatch between parser and preparsed scope
      data.
      
      - This synthetic variable could potentially resolve to an initializer
      of an outer class.
      
      For ex:
      class X extends Object {
        c = 1;
        constructor() {
          var t = () => {
            class P extends Object {
              constructor() {
                var t = () => { super(); };
                t();
              }
            }
            super();
          }
          t();
        }
      }
      
      In this the inner class P could access the outer class X's initiliazer
      function. We would have to maintain extra metadata to make sure this
      doesn't happen.
      
      Instead this new approach uses a private symbol to store the
      initializer function on the class constructor itself.
      
      For the base constructor case, we can simply check for a bit on the
      constructor function literal to see if we need to emit code that loads
      and calls this initializer function. Therefore, we don't pay the cost
      of loading this function in case there are no class fields.
      
      For the derived constructor case, there are two possiblities:
      (a) We are in a super() call directly in the derived constructor:
      
      In this case we can do a check similar to the base constructor check,
      we can check for a bit on the derived constructor and emit code for
      loading and calling the initializer function.
      
      This is usually the common case and we don't pay any cost for not using
      class fields.
      
      (b) We are in a super() call inside an arrow function in the derived
      constructor:
      
      In this case, we /always/ emit code to load and call the initializer
      function. If the function doesn't exist then we have undefined and we
      don't call anything. Otherwise we call the function.
      
      super() can't be called twice so even if we emit code to load and call
      the initializer function multiple times, it doesn't matter because it
      would have already been an error.
      
      Bug: v8:5367
      Change-Id: I7f77cd6493ff84cf0e430a8c1039bc9ac6941a88
      Reviewed-on: https://chromium-review.googlesource.com/781660
      Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49628}
      4ca9d843
  25. 09 Nov, 2017 1 commit
    • Ross McIlroy's avatar
      [Ast] Teach Ast Printer to print raw literal values. · ff4e4ab4
      Ross McIlroy authored
      Converts the ast prettyprinter to printing literals from the raw values
      rather than internalized on-heap strings. This enables ast printing before
      internalizing, and means we can avoid use of the isolate in the interpreter's
      off-thread phase.
      
      Also removes --print-builtin-ast and relies on just --print-ast to print
      everything.
      
      Finally, converts FunctionLiteral's debug_name function to return a
      char[] which is created from the raw name literal where it exists, rather
      than relying on the value having been internalized.
      
      BUG=v8:5203
      
      Change-Id: Ib69f754e254736f415db38713e6209465817e6f1
      Reviewed-on: https://chromium-review.googlesource.com/758681Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49276}
      ff4e4ab4
  26. 08 Nov, 2017 1 commit
  27. 07 Nov, 2017 1 commit
  28. 03 Nov, 2017 2 commits
    • Ross McIlroy's avatar
      Revert "[Ast] Teach Ast Printer to print raw literal values." · 5dc02ef2
      Ross McIlroy authored
      This reverts commit c60934e9.
      
      Reason for revert: breaks nosnap build
      
      
      Original change's description:
      > [Ast] Teach Ast Printer to print raw literal values.
      > 
      > Converts the ast prettyprinter to printing literals from the raw values
      > rather than internalized on-heap strings. This enables ast printing before
      > internalizing, and means we can avoid use of the isolate in the interpreter's
      > off-thread phase.
      > 
      > Also removes --print-builtin-ast and relies on just --print-ast to print
      > everything.
      > 
      > Finally, converts FunctionLiteral's debug_name function to return a
      > char[] which is created from the raw name literal where it exists, rather
      > than relying on the value having been internalized.
      > 
      > BUG=v8:5203
      > 
      > Change-Id: I0e358d6acc9ae4516ed49e7a763e208fea5fcf66
      > Reviewed-on: https://chromium-review.googlesource.com/749261
      > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Adam Klein <adamk@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#49119}
      
      TBR=rmcilroy@chromium.org,adamk@chromium.org
      
      Change-Id: Ic9d511f5107666a2f6a2bf59d8e93643c32d4d2b
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:5203
      Reviewed-on: https://chromium-review.googlesource.com/753627Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49120}
      5dc02ef2
    • Ross McIlroy's avatar
      [Ast] Teach Ast Printer to print raw literal values. · c60934e9
      Ross McIlroy authored
      Converts the ast prettyprinter to printing literals from the raw values
      rather than internalized on-heap strings. This enables ast printing before
      internalizing, and means we can avoid use of the isolate in the interpreter's
      off-thread phase.
      
      Also removes --print-builtin-ast and relies on just --print-ast to print
      everything.
      
      Finally, converts FunctionLiteral's debug_name function to return a
      char[] which is created from the raw name literal where it exists, rather
      than relying on the value having been internalized.
      
      BUG=v8:5203
      
      Change-Id: I0e358d6acc9ae4516ed49e7a763e208fea5fcf66
      Reviewed-on: https://chromium-review.googlesource.com/749261
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49119}
      c60934e9
  29. 27 Oct, 2017 1 commit
    • Adam Klein's avatar
      [ast] Move AstValue implementation into Literal · 317cf321
      Adam Klein authored
      This eliminates the AstValue class, effectively moving its
      implementation into the Literal AstNode. This should cause
      no difference in behavior, but it does signal some shifts
      in the underlying system. Biggest changes include:
      
        - Reduction in AST memory usage
        - No duplicate HeapNumbers in Ignition constant pools
        - Non-String values are allocated either at constant pool
          creation time (or at boilerplate creation time for literals),
          rather than at AstValueFactory::Internalize() time.
      
      There are a variety of test-only/debug-only changes due to these
      switches as well.
      
      Bug: v8:6984
      Change-Id: I5f178040ce2796d4e7370c24d1063419e1c843a1
      Reviewed-on: https://chromium-review.googlesource.com/731111
      Commit-Queue: Adam Klein <adamk@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49013}
      317cf321
  30. 24 Oct, 2017 1 commit