This reverts commit 3411e7c3e8.
Reason for revert: Breaks test expecations - https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_rel_ng/260731
Original change's description:
> [parser] Create arrow function scopes while parsing the head
>
> This simplifies NextArrowFunctionInfo, allows us to Scope::Snapshot::Reparent
> directly rather than moving it, and allows us to skip reparenting in the simple
> parameter arrow function cases.
>
> This CL additionally fixes arrow function name inferring.
>
> Change-Id: Ie3e5ea778f3d7b84b2a10d4f4ff73931cfc9384a
> Reviewed-on: https://chromium-review.googlesource.com/c/1386147
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58405}
TBR=ishell@chromium.org,verwaest@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I8f31b96f844f0673364bf435fa6c809e40d62fa3
Reviewed-on: https://chromium-review.googlesource.com/c/1388541
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58446}
Always pass in the target scope for the body, and check whether we're in
LexicalVariableMode instead to distinguish for(let/const from for(var.
Change-Id: Idf59423466f45eebe7c9d716f8eb6ccd92235abc
Reviewed-on: https://chromium-review.googlesource.com/c/1388534
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58445}
This CL makes both absolute address and opcode literal (byte sequence
of the instruction) display optional, which improves readability.
Additionally, jump offsets are parsed and can now once again be clicked.
TBR=neis@chromium.org
Bug: v8:7327
Notry: true
Change-Id: I709f44540b32f6d4afabdd1e5eb27e932208e7fc
Reviewed-on: https://chromium-review.googlesource.com/c/1388540
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58444}
This changes a few bits about how continuation counters are handled.
It introduces a new mechanism that allows removal of a continuation
range after it has been created. If coverage is enabled, we run a first
post-processing pass on the AST immediately after parsing, which
removes problematic continuation ranges in two situations:
1. nested continuation counters - only the outermost stays alive.
2. trailing continuation counters within a block-like structure are
removed if the containing structure itself has a continuation.
R=bmeurer@chromium.org, jgruber@chromium.org, yangguo@chromium.org
Bug: v8:8381, v8:8539
Change-Id: I6bcaea5060d8c481d7bae099f6db9f993cc30ee3
Reviewed-on: https://chromium-review.googlesource.com/c/1339119
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58443}
Ensure that GetUnusedRegister is always called before
acquiring the scratch register in case it is needed
for spilling the value of the used register.
Bug: v8:6600, chromium:910824
Change-Id: I93ae684ad504584807dfa6227b6af14609c6bcf5
Reviewed-on: https://chromium-review.googlesource.com/c/1387498
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58442}
This CL does two things:
1. It introduces Call/JumpCodeObject as the bottleneck for all calls
to non-heap-constant Code objects; and
2. it dispatches directly to the off-heap entry point for all embedded
code.
Codegen at runtime remains unchanged to preserve the shorter,
branch-less calling sequence.
Bug: v8:7777
Change-Id: I15fdcb51625209904c6a56737f085a23219319b9
Reviewed-on: https://chromium-review.googlesource.com/c/1382461
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58440}
Since code serializer also serializers descriptor arrays, the clearing
has to be done in deserializer.
Bug: v8:8486
Change-Id: Ic2c5848e5add80176a6f7191c56e7af9e9a6019f
Reviewed-on: https://chromium-review.googlesource.com/c/1388532
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58439}
This also adjusts debug printing of descriptor arrays and adds a check
to the code serializer.
Bug: v8:8617
Tbr: mlippautz@chromium.org
Change-Id: Ic04f01abf9f7ed5a310b9e51a22c04fda108f563
Reviewed-on: https://chromium-review.googlesource.com/c/1387501
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58438}
This reverts commit 2963f1b2e3.
Reason for revert: Speculative revert, possibly causing timeout in layout test https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/WebKit%20Linux%20Trusty%20MSAN/11631
Original change's description:
> [parser] Simplify ParseFunctionBody
>
> - Merge is_simple branches at the top
> - Remove block around inner_body parsing. Always merge fully at the end.
> - Remove conditional inner block adding to outer body. Simply add it to the
> inner body making merge push it to the parent.
>
> Change-Id: I1f062918a7abac354b949136463517bd0440984f
> Reviewed-on: https://chromium-review.googlesource.com/c/1386111
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58390}
TBR=ishell@chromium.org,verwaest@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I0ab903df5caaadff56625e9b46b03981c8a9b930
Reviewed-on: https://chromium-review.googlesource.com/c/1388524
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58436}
Before computing the merge state, compute the list of free registers.
This list is used when we need a register for ensuring single register
use. It avoids picking a register which is in use by a not-yet-visited
merge slot, which would then have to be moved to another register or to
the stack.
On epic, this saves ~10.5% generated code size in Liftoff.
R=herhut@chromium.org
Bug: v8:8423
Change-Id: If9fac24abbfe2273bf18d9cb287c7c05a59b2118
Reviewed-on: https://chromium-review.googlesource.com/c/1387488
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58435}
It's nice to have a quick way to get stable results on the local
machine for the classic d8 benchmarks. CSuite revitalizes an
old tool called BSuite which offers multiple averaged runs,
and a nice ascii display of results.
Sample usage:
./csuite.py octane baseline ~/src/v8/out/d8
./csuite.py octane compare ~/src/v8/out-mine/d8
benchmark: score | master | % |
===================================================+==========+========+
Richards: 26201.0 | 26568.0 | -1.4 |
DeltaBlue: 55744.0 | 58309.0 | -4.4 |
Crypto: 31831.0 | 31815.0 | |
RayTrace: 73481.0 | 73185.0 | 0.4 |
............<snip>............................
Octane: 36388.0 | 35741.0 | 1.8 |
---------------------------------------------------+----------+--------+
See README.md for more documentation.
Change-Id: I182490506ca07fab1240bd485bd1d7a8920db893
Reviewed-on: https://chromium-review.googlesource.com/c/1387487
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58434}
This defines V8_JITLESS_MODE if the v8_enable_lite_mode build-time
option is enabled. Jitless mode will thus be tested by existing lite
bots.
The build-time option for jitless mode will only be needed temporarily
and is expected to be removed again in the near future.
Bug: v8:7777
Change-Id: I556ba5069dbd0810a6d7376601d8f7d498fef8c9
Reviewed-on: https://chromium-review.googlesource.com/c/1387499
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58433}
That way we can drop PatternRewriter::scope_ and just use parser_->scope()
instead.
Change-Id: I66137d3ff8e7b805afc7108fd2d55537f69f11e6
Reviewed-on: https://chromium-review.googlesource.com/c/1387500
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58432}
This silences the new presubmit check for the whole src/wasm directory.
This change uncovered that MSVC is a bit behind with noexcept annotations
on standard containers. This makes all implicit constructors and
assignment operators noexcept(false) if the class contains any standard
container.
Thus disable noexcept on MSVC for now.
R=tebbi@chromium.orgCC=marja@chromium.org
Bug: v8:8616, v8:7999
Change-Id: Ica86ac84a5b8a835dcea9b783c7987d9b850241a
Reviewed-on: https://chromium-review.googlesource.com/c/1386869
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58430}
This replaces another use of std::vector. Stack states (consisting of
locals plus operand stack) are also typically small, thus optimize for
those cases.
Using StackVector as part of CacheState requires the definition of move
constructors and copy constructors, plus a few other methods.
R=tebbi@chromium.org
Bug: v8:8423
Change-Id: I5d39c1ebc4d6d65e4849dd06c556114cd2cd36ff
Reviewed-on: https://chromium-review.googlesource.com/c/1380053
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58429}
Disassembly selections now work even if no origin node is associated
with the disassembly code range that the user selects.
TBR=neis@chromium.org
Bug: v8:7327
Change-Id: Ib5bfcaded66deb65314fde7d3cb9ed2c3c4f6fe9
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/1387492
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58423}
Since FallThruTo is often followed by PopControl, we can save a few
cache state copy operations in Liftoff by merging the two.
On epic workloads, this saves ~18% of Steal operations and ~22% of
Split operations.
R=herhut@chromium.org
Bug: v8:8423
Change-Id: I99900eaa49ae14ead6a0c08b69da2175730e077e
Reviewed-on: https://chromium-review.googlesource.com/c/1384093
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58420}
This is a reland of 0e22ec737b
Original change's description:
> [regexp] Escape newlines when setting [[OriginalSource]]
>
> This escapes LineTerminator characters in a regexp pattern when
> creating the string that will be stored in the [[OriginalSource]] slot.
>
> As an example, the source property for all following objects will equal
> "\n" (a '\' character followed by 'n'):
>
> /\n/
> new RegExp("\n")
> new RegExp("\\n")
>
> Bug: v8:1982, chromium:855009
> Change-Id: I3b539497a0697e3d51ec969cae49308b0b312a19
> Reviewed-on: https://chromium-review.googlesource.com/c/1384316
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58387}
Bug: v8:1982, chromium:855009
Change-Id: I1ba22395477ec37e8e8c944000f9beade1e3250b
Reviewed-on: https://chromium-review.googlesource.com/c/1386495
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58419}
This fixes a bug from 0400fc2049,
which assumed that we can set the markbits and the marked
descriptors counter independently. This does not work because
the Scavenger skips slots recording for non-black promoted objects.
The fix is to mark the descriptor array black whenever we change
the marked descriptors counter.
Bug: v8:8617, v8:8618, v8:8486
Tbr: mlippautz@chromium.org
Change-Id: I80f3488061fa648b6c81963ba802ef045d92bcc6
Reviewed-on: https://chromium-review.googlesource.com/c/1387486
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58417}
Also remove ImportNow() and helper runtime functions and Context methods
that are now unused.
Bug: v8:7624
Change-Id: I109b112d2147240e72eb0ed6112a267057de59cb
Reviewed-on: https://chromium-review.googlesource.com/c/1385224
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58415}
The DCHECK was overly restrictive when checking that a weak handle is
not a finalizer when hitting it through a regular scavenge processing
path.
Only happened with finalizers to unmodified API wrappers or regular
objects that were also marked as independent.
Bug: v8:8586
Change-Id: I2c2a5b21f6e8a5ddc6671f762b508ba083c04335
Reviewed-on: https://chromium-review.googlesource.com/c/1387485
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58414}
This CL makes several changes to bootstrapper to reduce
code verbosity:
- Adds an InstallToStringTag helper and uses it everywhere (while
removing now-redundant comments).
- Reduces explicit calls to Factory::InternalizeUtf8String
by adding some overloads of helpers and of JSObject::AddProperty.
- Uses InstallConstant in all applicable cases.
- Removes attributes arguments when all callers pass DONT_ENUM.
Change-Id: Ifb5f5102f5fbf89d475045270eeda78a2ee99248
Reviewed-on: https://chromium-review.googlesource.com/c/1385526
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58413}
It failed on the CHECK when receiver object was JSAsyncFunctionObject.
BUG=chromium:901241
Change-Id: I7ce563758185908728135005cb5ba2878fdea446
Reviewed-on: https://chromium-review.googlesource.com/c/1382822
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58412}
This silences the new presubmit check for the whole src/compiler
directory.
R=neis@chromium.org
Bug: v8:8616
Change-Id: Ib76d669861f829b4f35f9e9921b72b073300da08
Reviewed-on: https://chromium-review.googlesource.com/c/1386871
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58411}
Merging the temporary HeapObjectPtr back into HeapObject.
Bug: v8:3770
Change-Id: I5bcd23ca2f5ba862cf5b52955dca143e531c637b
Reviewed-on: https://chromium-review.googlesource.com/c/1386492
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58410}
The simulated C++ signature for generated code entry points should
rely on primitive values (as opposed to ObjectPtr).
Bug: v8:3770
Change-Id: I6f6f4dc8a93c7ba46bfc7052dc4745b16e9fd62f
Reviewed-on: https://chromium-review.googlesource.com/c/1386875
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58409}
Avoid named constructors for Value and Control and the hack to also have
them on subclasses.
Instead, add a new template type and a constructor to create the subtype
from this template. Instead of the named constructors on the subtype,
we now create a template and initialize the subtype from the template.
R=herhut@chromium.org
Bug: v8:8562
Change-Id: I374fc4104ab1ae5769c587bdf5a4ca7f9a0a10d7
Reviewed-on: https://chromium-review.googlesource.com/c/1382454
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58408}
The V8_NOEXCEPT annotation is not needed for deleted class members.
Also our DISALLOW_COPY_AND_ASSIGN macro does not add it there.
Additionally, include the file name to find the reported location more
easy.
R=jkummerow@chromium.org
Bug: v8:8616
No-Try: true
Change-Id: I93162804493542fed2a5832649b80386e338bd47
Reviewed-on: https://chromium-review.googlesource.com/c/1386870
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58406}
This simplifies NextArrowFunctionInfo, allows us to Scope::Snapshot::Reparent
directly rather than moving it, and allows us to skip reparenting in the simple
parameter arrow function cases.
This CL additionally fixes arrow function name inferring.
Change-Id: Ie3e5ea778f3d7b84b2a10d4f4ff73931cfc9384a
Reviewed-on: https://chromium-review.googlesource.com/c/1386147
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58405}
Forgetting V8_NOEXCEPT annotations on copy constructors, move
constructors, copy assignment operators or move assignment operators
can cause subtle performance bugs or compilation failures, sometimes
only on specific architectures or compilers. Thus check that all those
special class members are marked V8_NOEXCEPT.
This check is only executed on modified files for now, and can be
bypassed. Please report any false positives on the associated bug.
Bug: v8:8616
R=jgruber@chromium.org, machenbach@chromium.org
Change-Id: Ieefd8e39fbb1b314dc8d72ee87f6138b784205af
Reviewed-on: https://chromium-review.googlesource.com/c/1386496
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58404}
This does not include moving function definitions from objects-inl.h
to heap-object-inl.h, because that would be messy for no immediate
benefit.
This is in preparation for merging HeapObjectPtr into HeapObject.
Bug: v8:5402
Change-Id: Id170d9cac8ebabb2876b85bad29ce90fe02d842d
Reviewed-on: https://chromium-review.googlesource.com/c/1386491
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58401}
- Reduce ExpressionResultScope size by reusing accessing the generator
from its RegisterAllocationScope member
- Mark the ExpressionResultScope destructor non-virtual since there are
no destructors in subclasses
Change-Id: I3abe1856c091100217c668cd6bd5e7fd96eb8397
Reviewed-on: https://chromium-review.googlesource.com/c/1386485
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58398}
This is work towards making instructions in the sequence view
selectable. For now, they are clickable and will select the
corresponding instructions in the disassembly view.
Bug: v8:7327
Notry: true
Change-Id: I8850efeec7f94487bd80c11a7ad250a959062393
Reviewed-on: https://chromium-review.googlesource.com/c/1386112
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58397}