- 14 Mar, 2018 1 commit
-
-
Caitlin Potter authored
- Add a new bytecode for the ToString operation, replacing the old intrinsic call (currently does not collect type feedback). - Add a new AST node to represent TemplateLiterals, and avoid generating unnecessary ToString operations in some simple cases. - Use a single feedback slot for each string addition, because the type feedback should always be the same for each addition This seems to produce a very slight improvement on JSTests benchmarks and bench-ruben.js from v8:7415, and it's possible that type feedback for the ToString bytecode could provide more opportunities to eliminate the runtime call in TurboFan. Doesn't touch tagged templates [esnext] fix OOB read in ASTPrinter::VisistTemplateLiteral Fixes an error where TemplateLiteral printing in --print-ast would try to read an element beyond the length of a vector. BUG=v8:7415, chromium:820596 R=adamk@chromium.org, gsathya@chromum.org, rmcilroy@chromium.org, ishell@chromium.org, bmeurer@chromium.org Change-Id: Ie56894f73a6445550a5f95f42160c4e29ab1da42 Reviewed-on: https://chromium-review.googlesource.com/958408Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Caitlin Potter <caitp@igalia.com> Cr-Commit-Position: refs/heads/master@{#51933}
-
- 13 Mar, 2018 1 commit
-
-
Georg Neis authored
This removes the last use of %AppendElement (and the function itself), which was in the pattern rewriter's code for destructuring assignment with an array rest pattern. In its place, it introduces a StoreInArrayLiteral AST node that corresponds to the StoreInArrayLiteral bytecode (which in turn corresponds to the StoreInArrayLiteral IC). Change-Id: I1d212407b025cf0919263d119f6f47c88bd9a71e Reviewed-on: https://chromium-review.googlesource.com/955307 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#51898}
-
- 10 Mar, 2018 3 commits
-
-
Michael Achenbach authored
This reverts commit 8ae19e08. Reason for revert: Speculative revert for layout test: https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/22215 See: https://github.com/v8/v8/wiki/Blink-layout-tests Original change's description: > [esnext] re-implement template strings > > - Add a new bytecode for the ToString operation, replacing the old > intrinsic call (currently does not collect type feedback). > - Add a new AST node to represent TemplateLiterals, and avoid > generating unnecessary ToString operations in some simple cases. > - Use a single feedback slot for each string addition, because the > type feedback should always be the same for each addition > > This seems to produce a very slight improvement on JSTests benchmarks > and bench-ruben.js from v8:7415, and it's possible that type feedback > for the ToString bytecode could provide more opportunities to eliminate > the runtime call in TurboFan. > > Doesn't touch tagged templates > > BUG=v8:7415 > R=rmcilroy@chromium.org, ishell@chromium.org, bmeurer@chromium.org > > Change-Id: If5a8c68558431f058db894d65776324abf54218e > Reviewed-on: https://chromium-review.googlesource.com/945408 > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Commit-Queue: Caitlin Potter <caitp@igalia.com> > Cr-Commit-Position: refs/heads/master@{#51853} TBR=rmcilroy@chromium.org,caitp@igalia.com,ishell@chromium.org,bmeurer@chromium.org Change-Id: Id0529b065493ffc20c8f2b1abacc4c1484c3c046 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:7415 Reviewed-on: https://chromium-review.googlesource.com/958163Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#51862}
-
Michael Achenbach authored
This reverts commit 0802e2b2. Reason for revert: For reverting https://crrev.com/c/945408 Original change's description: > [esnext] fix OOB read in ASTPrinter::VisistTemplateLiteral > > Fixes an error where TemplateLiteral printing in --print-ast > would try to read an element beyond the length of a vector. > > BUG=v8:7415, chromium:820596 > R=adamk@chromium.org, gsathya@chromium.org > > Change-Id: Idf9e0da8c165ee62bc1a348a91c2ed5ed798404a > Reviewed-on: https://chromium-review.googlesource.com/957883 > Reviewed-by: Adam Klein <adamk@chromium.org> > Commit-Queue: Caitlin Potter <caitp@igalia.com> > Cr-Commit-Position: refs/heads/master@{#51857} TBR=adamk@chromium.org,gsathya@chromium.org,caitp@igalia.com Change-Id: I5fe950cd823ae350b5f6c09227a62aef9dc2a008 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:7415, chromium:820596 Reviewed-on: https://chromium-review.googlesource.com/957724Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#51861}
-
Caitlin Potter authored
Fixes an error where TemplateLiteral printing in --print-ast would try to read an element beyond the length of a vector. BUG=v8:7415, chromium:820596 R=adamk@chromium.org, gsathya@chromium.org Change-Id: Idf9e0da8c165ee62bc1a348a91c2ed5ed798404a Reviewed-on: https://chromium-review.googlesource.com/957883Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Caitlin Potter <caitp@igalia.com> Cr-Commit-Position: refs/heads/master@{#51857}
-
- 09 Mar, 2018 1 commit
-
-
Caitlin Potter authored
- Add a new bytecode for the ToString operation, replacing the old intrinsic call (currently does not collect type feedback). - Add a new AST node to represent TemplateLiterals, and avoid generating unnecessary ToString operations in some simple cases. - Use a single feedback slot for each string addition, because the type feedback should always be the same for each addition This seems to produce a very slight improvement on JSTests benchmarks and bench-ruben.js from v8:7415, and it's possible that type feedback for the ToString bytecode could provide more opportunities to eliminate the runtime call in TurboFan. Doesn't touch tagged templates BUG=v8:7415 R=rmcilroy@chromium.org, ishell@chromium.org, bmeurer@chromium.org Change-Id: If5a8c68558431f058db894d65776324abf54218e Reviewed-on: https://chromium-review.googlesource.com/945408Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Caitlin Potter <caitp@igalia.com> Cr-Commit-Position: refs/heads/master@{#51853}
-
- 05 Mar, 2018 1 commit
-
-
Adam Klein authored
This patch moves the has_braces_ bool to the bit_field_, and moves function_literal_id_ into the freed-up slack space. This saves 4 bytes on 32-bit platforms and 8 bytes on 64-bit. Change-Id: Ib5ba475915e46494c75019cfc184aafe72f6407f Reviewed-on: https://chromium-review.googlesource.com/947467Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#51742}
-
- 20 Feb, 2018 1 commit
-
-
Adam Klein authored
Also delete a bit of dead code depending on dead types. Change-Id: I6cfc7e2f6c8fd006bd0de054bfc3e9f725996741 Reviewed-on: https://chromium-review.googlesource.com/923083Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#51403}
-
- 15 Feb, 2018 1 commit
-
-
Adam Klein authored
Tbr: jarin@chromium.org Change-Id: I17477e2c82398b228a366a3d1fd8eb521dd51eae Reviewed-on: https://chromium-review.googlesource.com/922270 Commit-Queue: Adam Klein <adamk@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Reviewed-by: Brad Nelson <bradnelson@chromium.org> Cr-Commit-Position: refs/heads/master@{#51317}
-
- 13 Feb, 2018 1 commit
-
-
Camillo Bruni authored
FATAL(...) avoid creating literal strings for line number in release mode. Bug: v8:7310 Change-Id: I6a3e329adce36b0efcc240068f6a241d1cca4b6f Reviewed-on: https://chromium-review.googlesource.com/915066Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#51277}
-
- 12 Feb, 2018 1 commit
-
-
Caitlin Potter authored
Implements the change outlined in https://github.com/tc39/ecma262/pull/890, which has been ratified and pulled into the specification. In particular, template callsite objects are no longer kept in a global, eternal Map, but are instead associated with their callsite, which can be collected. This prevents a memory leak incurred by TaggedTemplate calls. Changes, summarized: - Remove the TemplateMap and TemplateMapShape objects, instead caching template objects in the feedback vector. - Remove the `hash` member of TemplateObjectDescriptor, and the Equals method (used by TemplateMap) - Add a new FeedbackSlotKind (kTemplateObject), which behaves similarly to FeedbackSlotKind::kLiteral, but prevents eval caching. This ensures that a new feedback vector is always created for eval() containing tagged templates, even when the CompilationCache is used. - GetTemplateObject bytecode now takes a feedback index, and only calls into the runtime if the feedback is Smi::kZero (uninitialized). BUG=v8:3230, v8:2891 R=littledan@chromium.org, yangguo@chromium.org, bmeurer@chromium.org, rmcilroy@chromium.org Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: I7827bc148d3d93e2b056ebf63dd624da196ad423 Reviewed-on: https://chromium-review.googlesource.com/624564 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#51248}
-
- 03 Feb, 2018 1 commit
-
-
Sathya Gunasekaran authored
Report an error during scope analysis if we're unable to find a variable proxy for the given private field. This can happen if we try to access a private field that was not defined or if we're outside the class scope. This doesn't correctly throw an early error when pre parsing a top level function because we don't track it's variables. Bug: v8:5368 Change-Id: I0a1193fe0ae213c0732fae5d435e150852a8d87d Reviewed-on: https://chromium-review.googlesource.com/892093Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#51082}
-
- 02 Feb, 2018 1 commit
-
-
jgruber authored
This check verifies that all .h files in the src/ directory have an include guard of the form #ifndef V8_PATH_TO_FILE_H_ #define V8_PATH_TO_FILE_H_ // ... #endif // V8_PATH_TO_FILE_H_ The check can be skipped with a magic comment: // PRESUBMIT_INTENTIONALLY_MISSING_INCLUDE_GUARD Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I0a7b96abec289ad60f64ba8418f1892a6969596d Reviewed-on: https://chromium-review.googlesource.com/897487Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#51079}
-
- 29 Jan, 2018 1 commit
-
-
Sathya Gunasekaran authored
Things that don't work yet: (a) pre parsed scope data is broken (b) private fields can be accessed outside classes (c) no early or runtime error for accessing unknown fields Things that do work: everything else Change-Id: I3d58be44e2be73ec50defb42403112a8a5e68c54 Bug: v8:5368 Reviewed-on: https://chromium-review.googlesource.com/865497 Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Cr-Commit-Position: refs/heads/master@{#50935}
-
- 24 Jan, 2018 3 commits
-
-
Leszek Swirski authored
Bug: v8:7178 Change-Id: Ib86942acff8419699d739c6fb28479613b04e745 Reviewed-on: https://chromium-review.googlesource.com/878179 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#50846}
-
Leszek Swirski authored
Instead of collecting eagerly compilable inner function literals (IIFEs etc.) during AST numbering, collect them during bytecode generation, exposing them on the CompilationJob. Bug: v8:7178 Change-Id: I47451f412d2796e5857b4bc38c4f29c80cb0745d Reviewed-on: https://chromium-review.googlesource.com/873872 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#50842}
-
Leszek Swirski authored
Instead of building suspend_ids in the AST numbering, collect suspend counts in the parser and assigning suspend ids during bytecode generation. Bug: v8:7178 Change-Id: I53421442afddc894db789fb9d0d3e3cc10e32ff0 Reviewed-on: https://chromium-review.googlesource.com/817598 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#50830}
-
- 11 Jan, 2018 1 commit
-
-
Caitlin Potter authored
https://github.com/tc39/ecma262/pull/988 gained concensus during the september 2017 TC39 meetings. This moves the load of the "next" method to the very beginning of the iteration protocol, rather than during each iteration step. This impacts: - yield* - for-of loops - spread arguments - array spreads In the v8 implementation, this also affects async iteration versions of these things (the sole exception being the Async-From-Sync iterator, which requires a few more changes to work with this, likely done in a followup patch). This change introduces a new AST node, ResolvedProperty, which can be used as a callee by Call nodes to produce the same bytecode as Property calls, without observably re-loading the property. This is used in several AST-desugarings involving the iteration protocol. BUG=v8:6861, v8:5699 R=rmcilroy@chromium.org TBR=neis@chromium.org, adamk@chromium.org Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: I9685db6e85315ba8a2df87a4537c2bf491e1e35b Reviewed-on: https://chromium-review.googlesource.com/857593 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#50518}
-
- 09 Jan, 2018 2 commits
-
-
Michael Achenbach authored
This reverts commit bf4cc9ee. Reason for revert: Breaks windows with msvc and linux with gcc https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/841 https://build.chromium.org/p/client.v8/builders/V8%20Linux%20gcc%204.8/builds/17265 Original change's description: > [esnext] load `iterator.next` only once at beginning of iteration > > https://github.com/tc39/ecma262/pull/988 gained concensus during the > september 2017 TC39 meetings. This moves the load of the "next" method > to the very beginning of the iteration protocol, rather than during > each iteration step. > > This impacts: > > - yield* > - for-of loops > - spread arguments > - array spreads > > In the v8 implementation, this also affects async iteration versions of > these things (the sole exception being the Async-From-Sync iterator, > which requires a few more changes to work with this, likely done in a > followup patch). > > This change introduces a new AST node, ResolvedProperty, which can be used > as a callee by Call nodes to produce the same bytecode as Property calls, > without observably re-loading the property. This is used in several > AST-desugarings involving the iteration protocol. > > BUG=v8:6861, v8:5699 > R=rmcilroy@chromium.org, neis@chromium.org, adamk@chromium.org > > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng > Change-Id: Ib81106a0182687fc5efea0bc32302ad06376773b > Reviewed-on: https://chromium-review.googlesource.com/687997 > Commit-Queue: Caitlin Potter <caitp@igalia.com> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Georg Neis <neis@chromium.org> > Cr-Commit-Position: refs/heads/master@{#50452} TBR=rmcilroy@chromium.org,adamk@chromium.org,neis@chromium.org,caitp@igalia.com,caitp@chromium.org Change-Id: I1797c0d596dfd6850d6f0f505f591a7a990dd1f1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:6861, v8:5699 Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Reviewed-on: https://chromium-review.googlesource.com/857616Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#50454}
-
Caitlin Potter authored
https://github.com/tc39/ecma262/pull/988 gained concensus during the september 2017 TC39 meetings. This moves the load of the "next" method to the very beginning of the iteration protocol, rather than during each iteration step. This impacts: - yield* - for-of loops - spread arguments - array spreads In the v8 implementation, this also affects async iteration versions of these things (the sole exception being the Async-From-Sync iterator, which requires a few more changes to work with this, likely done in a followup patch). This change introduces a new AST node, ResolvedProperty, which can be used as a callee by Call nodes to produce the same bytecode as Property calls, without observably re-loading the property. This is used in several AST-desugarings involving the iteration protocol. BUG=v8:6861, v8:5699 R=rmcilroy@chromium.org, neis@chromium.org, adamk@chromium.org Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: Ib81106a0182687fc5efea0bc32302ad06376773b Reviewed-on: https://chromium-review.googlesource.com/687997 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#50452}
-
- 08 Jan, 2018 1 commit
-
-
Sathya Gunasekaran authored
This is just a rebased version of https://chromium-review.googlesource.com/c/v8/v8/+/571453 with no functional changes Bug: v8:6889 Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: Ia082cc09ca527505b288ac88e68e0b74eae94765 Reviewed-on: https://chromium-review.googlesource.com/849423Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#50417}
-
- 04 Jan, 2018 2 commits
-
-
Sathya Gunasekaran authored
Create a new function kind for initializer functions and ban arguments if used in such a function. Bug: v8:5367, v8:7183 Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: Id3089e587b3d6a25f27224045f250e032b831818 Reviewed-on: https://chromium-review.googlesource.com/850547 Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#50369}
-
Sathya Gunasekaran authored
This patch breaks out bailout reasons into two enum classes. This helps save 3 bits on the SharedFunctionInfo as we don't have to track the abort reasons. Change-Id: Ic2e7e7e32b0fa31491f1c6f0003a61390d68fd97 Reviewed-on: https://chromium-review.googlesource.com/848244Reviewed-by: Ben Titzer <titzer@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#50364}
-
- 19 Dec, 2017 2 commits
-
-
peterwmwong authored
This is a reland of ab38b03d Original change's description: > [builtins] Port Object.p.toLocaleString to CSA from JS > > - Added ObjectPrototypeToLocaleString TFJ > - Remove v8natives.js > - Move GetMethod and GetIterator into prologue.js > > TBR=adamk@chromium.org > > Bug: v8:6005 > Change-Id: I2b5b65892304e62bf64375458f8ffb9473b2c9b7 > Reviewed-on: https://chromium-review.googlesource.com/826479 > Reviewed-by: Peter Wong <peter.wm.wong@gmail.com> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Commit-Queue: Peter Wong <peter.wm.wong@gmail.com> > Cr-Commit-Position: refs/heads/master@{#50120} Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng TBR=adamk@chromium.org Bug: v8:6005 Change-Id: Ie8c8810c5231e933e61ea8babe963e58bb6dcaed Reviewed-on: https://chromium-review.googlesource.com/831156Reviewed-by: Peter Wong <peter.wm.wong@gmail.com> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com> Cr-Commit-Position: refs/heads/master@{#50218}
-
Leszek Swirski authored
Move the object and array literal flag and depth initialization to when they are visited by the bytecode generator. This avoids issues with doing this initialization before we know whether the (syntactic) literal is actually a literal value or a destructuring assignment. Bug: chromium:795922 Bug: v8:7178 Change-Id: I022178ab4bc9e71f80560f3b78a759d95d4d0584 Reviewed-on: https://chromium-review.googlesource.com/833882Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#50204}
-
- 18 Dec, 2017 3 commits
-
-
Leszek Swirski authored
Move the one remaining optimization disabling in AST numbering (native function literals) to be in the parser. Bug: v8:7178 Change-Id: Icd96020622cbe64afa11b42c5831618247e3e021 Reviewed-on: https://chromium-review.googlesource.com/814399 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#50170}
-
Leszek Swirski authored
Move literal initialization out of AST numbering and into the parser. The initialization includes setting the depth and flags of Object and Array literals, and calculating the emit store of object literals. Bug: v8:7178 Change-Id: I9af59a2fea44f8a1adcc5a0261f29ce97fa8da92 Reviewed-on: https://chromium-review.googlesource.com/814634 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#50168}
-
Yang Guo authored
This changes the implementation of v8::ScriptCompiler::CompileFunctionInContext See design doc: https://goo.gl/ppkK6Q R=adamk@chromium.org, marja@chromium.org, mstarzinger@chromium.org Bug: v8:7172, chromium:70895 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: Iab0b6e879c1a3b33b623bfa2af9c706643c06fa7 Reviewed-on: https://chromium-review.googlesource.com/810946 Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#50148}
-
- 15 Dec, 2017 3 commits
-
-
Caitlin Potter authored
This gets rid of all the RewriteNonPattern gunk in the parser and expression classifier, and removes one use of RewritableExpression. This borrows pieces from several other CLs of mine which are currently open, and includes a new and modernized abstraction for dealing with iterators in BytecodeGenerator (so, this CL adds that, moves code from BuildGetIterator around, and makes some minor changes to yield* which should maintain compatability with the old behaviour). This also implements a portion of the changes to the iteration protocol (implemented fully in https://chromium-review.googlesource.com/c/v8/v8/+/687997), but only for the spread operator in Array Literals (the rest will follow). BUG=v8:5940, v8:3018 R=rmcilroy@chromium.org, marja@chromium.org, adamk@chromium.org TBR=adamk@chromium.org Change-Id: Ifc494d663d8e46066a439c3541c33f0243726234 Reviewed-on: https://chromium-review.googlesource.com/804396 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Cr-Commit-Position: refs/heads/master@{#50138}
-
Michael Achenbach authored
This reverts commit ab38b03d. Reason for revert: https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/20480 https://github.com/v8/v8/wiki/Blink-layout-tests Original change's description: > [builtins] Port Object.p.toLocaleString to CSA from JS > > - Added ObjectPrototypeToLocaleString TFJ > - Remove v8natives.js > - Move GetMethod and GetIterator into prologue.js > > TBR=adamk@chromium.org > > Bug: v8:6005 > Change-Id: I2b5b65892304e62bf64375458f8ffb9473b2c9b7 > Reviewed-on: https://chromium-review.googlesource.com/826479 > Reviewed-by: Peter Wong <peter.wm.wong@gmail.com> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Commit-Queue: Peter Wong <peter.wm.wong@gmail.com> > Cr-Commit-Position: refs/heads/master@{#50120} TBR=adamk@chromium.org,peter.wm.wong@gmail.com,jgruber@chromium.org Change-Id: Ib406a55562735cc4d879d62b76f27edf3f1ed211 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:6005 Reviewed-on: https://chromium-review.googlesource.com/828813Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#50123}
-
peterwmwong authored
- Added ObjectPrototypeToLocaleString TFJ - Remove v8natives.js - Move GetMethod and GetIterator into prologue.js TBR=adamk@chromium.org Bug: v8:6005 Change-Id: I2b5b65892304e62bf64375458f8ffb9473b2c9b7 Reviewed-on: https://chromium-review.googlesource.com/826479Reviewed-by: Peter Wong <peter.wm.wong@gmail.com> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com> Cr-Commit-Position: refs/heads/master@{#50120}
-
- 12 Dec, 2017 4 commits
-
-
Marja Hölttä authored
If an initializer is a NaryOperation, its position ends up as a start position of a Scope, and a DCHECK used to fire. Interestingly, this was not caught by our existing tests. BUG=chromium:791256 Change-Id: Id47f850c7ad17ca580352f9bd56c9567b485c3b8 Reviewed-on: https://chromium-review.googlesource.com/822093Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#50051}
-
Georg Neis authored
This is a reland of c3bd741e Original change's description: > Fix "this" value in lazily-parsed module functions. > > When preparsing top-level functions in a module, we didn't track > unresolved variables. Consequently, "this" ended up referencing > the global "this", which has the wrong value (in a module "this" > is supposed to be the undefined value). > > This patch fixes that. This also lets us stop forcing context > allocation of all variables in module scopes, which the patch > takes care of as well. > > Bug: chromium:791334 > Change-Id: Ifac1f1adc033f3facfb3d29dd4bca32ee27bffcf > Reviewed-on: https://chromium-review.googlesource.com/808938 > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> > Commit-Queue: Georg Neis <neis@chromium.org> > Cr-Commit-Position: refs/heads/master@{#50025} TBR=adamk@chromium.org TBR=kozyatinskiy@chromium.org Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Bug: chromium:791334 Change-Id: I57acc7b84a345565b36cbb55924fa2ff9b449eec Reviewed-on: https://chromium-review.googlesource.com/822341 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#50045}
-
Michael Achenbach authored
This reverts commit c3bd741e. Reason for revert: Breaks layout tests: https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/20384 Original change's description: > Fix "this" value in lazily-parsed module functions. > > When preparsing top-level functions in a module, we didn't track > unresolved variables. Consequently, "this" ended up referencing > the global "this", which has the wrong value (in a module "this" > is supposed to be the undefined value). > > This patch fixes that. This also lets us stop forcing context > allocation of all variables in module scopes, which the patch > takes care of as well. > > Bug: chromium:791334 > Change-Id: Ifac1f1adc033f3facfb3d29dd4bca32ee27bffcf > Reviewed-on: https://chromium-review.googlesource.com/808938 > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> > Commit-Queue: Georg Neis <neis@chromium.org> > Cr-Commit-Position: refs/heads/master@{#50025} TBR=adamk@chromium.org,marja@chromium.org,neis@chromium.org,kozyatinskiy@chromium.org Change-Id: I81f69334ed2ce104c00e6205d50001e4bdf07d15 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:791334 Reviewed-on: https://chromium-review.googlesource.com/822258Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#50036}
-
Georg Neis authored
When preparsing top-level functions in a module, we didn't track unresolved variables. Consequently, "this" ended up referencing the global "this", which has the wrong value (in a module "this" is supposed to be the undefined value). This patch fixes that. This also lets us stop forcing context allocation of all variables in module scopes, which the patch takes care of as well. Bug: chromium:791334 Change-Id: Ifac1f1adc033f3facfb3d29dd4bca32ee27bffcf Reviewed-on: https://chromium-review.googlesource.com/808938Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#50025}
-
- 01 Dec, 2017 1 commit
-
-
Marja Hölttä authored
BUG=chromium:789764 Change-Id: I6a466660159721683c4979af32019d740094151b Reviewed-on: https://chromium-review.googlesource.com/803217Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#49795}
-
- 30 Nov, 2017 1 commit
-
-
Ulan Degenbaev authored
Currently RuntimeCallStats stores CounterIds as inner pointers. This patch replaces them with enums and removes static table. Bug: chromium:758183 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: Icb4030fc3ad3dd02e9c2648ce7c43b6f2d47fa9d Reviewed-on: https://chromium-review.googlesource.com/796477Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#49743}
-
- 27 Nov, 2017 2 commits
-
-
Adam Klein authored
Besides avoiding the weird hack of inserting a statement at the 0th index of the function body, we also avoid allocating (and initializing) the variable if it's unreferenced (which I'd wager is the common case). Bug: v8:6092 Change-Id: If917d422bb4818cf21e8272aa786ca84d4472802 Reviewed-on: https://chromium-review.googlesource.com/784092Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#49646}
-
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: Georg Neis <neis@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Cr-Commit-Position: refs/heads/master@{#49628}
-
- 24 Nov, 2017 1 commit
-
-
jgruber authored
This is a reland of 4d3bc552 Original change's description: > [coverage] add coverage for binary expressions > > Adds block-level coverage tracking for binary && and || > expressions. Introduces a BinaryOperation source-range > for tracking the operations themselves and an Expression > source-range, used for tracking NaryLogical expressions. > > This builds on work by jgruber@chromium.org in > the issue. > > TBR=marja@chromium.org > R=jgruber@chromium.org, rmcilroy@chromium.org > > Bug: v8:6660 > Change-Id: I83a81f13a3514a734c06948b2d3e91138fb00e18 > Reviewed-on: https://chromium-review.googlesource.com/754564 > Commit-Queue: Jakob Gruber <jgruber@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/master@{#49304} Bug: v8:6660 Change-Id: I1c8571660d6c501d526886867bd841c49d5c44fd Reviewed-on: https://chromium-review.googlesource.com/778288Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#49613}
-