This reverts commit 97628eeeb9.
Reason for revert: breaks compilation in Lite mode, which does not allow overriding of certain flags. See https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8926078411629093216/+/steps/build/0/steps/compile/0/stdout.
Original change's description:
> [error] extend error stack w/ function parameters
>
> Extend FrameArray to hold weak references to parameters for functions in
> the call stack. The goal here is to provide more metadata for postmortem
> tools (such as llnode), especially in cases of rethrowing (this will be
> particularly useful when using postmortem with promises on Node.js).
>
> Besides postmortem, these changes allow us to print a more detailed
> stack trace for errors with parameters types (or even values), which can
> be useful since JavaScript functions can receive any number of
> parameters of any type, and having a function behave differently
> according to the number of parameters received as well as their types is
> a common pattern on JS libraries and frameworks.
>
> R=bmeurer@google.com, yangguo@google.com
>
> Change-Id: Idf0984d0dbac16041f11d738d4b1c095a8eecd61
> Reviewed-on: https://chromium-review.googlesource.com/c/1289489
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58468}
TBR=yangguo@chromium.org,bmeurer@google.com,bmeurer@chromium.org,mat@mmarchini.me
Change-Id: Ide0a434c1521ab2bbeca6821397ff63ba7d40fe5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1390128
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58469}
Extend FrameArray to hold weak references to parameters for functions in
the call stack. The goal here is to provide more metadata for postmortem
tools (such as llnode), especially in cases of rethrowing (this will be
particularly useful when using postmortem with promises on Node.js).
Besides postmortem, these changes allow us to print a more detailed
stack trace for errors with parameters types (or even values), which can
be useful since JavaScript functions can receive any number of
parameters of any type, and having a function behave differently
according to the number of parameters received as well as their types is
a common pattern on JS libraries and frameworks.
R=bmeurer@google.com, yangguo@google.com
Change-Id: Idf0984d0dbac16041f11d738d4b1c095a8eecd61
Reviewed-on: https://chromium-review.googlesource.com/c/1289489
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58468}
The concurrent marker can now visit maps and mark the subset of
descriptors that a map requires.
Bug: v8:8486
Change-Id: I184442ec90a8f60c73cfe16d6e9d66f4efa92a01
Reviewed-on: https://chromium-review.googlesource.com/c/1384320
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58466}
Factory::NewRawOneByteString initializes the string length without
atomic accessor. This leads to data race if the string is pretenured
and black allocated because the concurrent marker loads the string
length before checking the string markbits.
This patch changes the order to check the markbits first.
Bug: v8:8579
Change-Id: Ic434f7dde9baa6264fe133499d2394c0d4cc5394
Reviewed-on: https://chromium-review.googlesource.com/c/1388542
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58465}
Logic is added to InterpreterEntryTrampoline to detect flushed functions,
and enter CompileLazy instead. Get the bytecode array from the function
object and load it. The bytecode array could have been flushed from the
shared function info, if so, call into CompileLazy.
This fixes:
cctest/test-heap/TestBytecodeFlushing
cctest/test-heap/TestOptimizeAfterBytecodeFlushingCandidate
debugger/debug/lazy-deopt-then-flush-bytecode
[mips] Macro-assembler fix
Fix massive failing of tests after fa3cbf6.
Change-Id: Ic1978b5233eefc743fd7b020f65153630ffa281f
Reviewed-on: https://chromium-review.googlesource.com/c/1388528
Reviewed-by: Sreten Kovacevic <skovacevic@wavecomp.com>
Commit-Queue: Sreten Kovacevic <skovacevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#58463}
These test off-heap builtin call sequences and don't make sense in
noembed builds.
Tbr: sigurds@chromium.org
Bug: v8:7777
Change-Id: I2795257e33b6ad87958d08f0845b75a7e88988f2
Reviewed-on: https://chromium-review.googlesource.com/c/1390120
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58461}
noembed bots have started failing since https://crrev.com/c/1382461.
The reason was that inline_offheap_trampolines option was set to true
even in noembed builds, and the assembler tried to inline trampolines
to non-existent embedded builtins.
Tbr: sigurds@chromium.org
Bug: v8:7777
Change-Id: I483dd8b77269b8684e57f8da6e659a9648b1657b
Reviewed-on: https://chromium-review.googlesource.com/c/1390117
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58458}
- Removes ModuleCompiledCallback typedef and Set function.
- Adds WasmStreaming::Client abstraction and Set function.
Bug: chromium:719172
Change-Id: I8a207b628394a7660bda73cde560da1e461248a7
Reviewed-on: https://chromium-review.googlesource.com/c/1377450
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58454}
Presumably this was obsoleted when this functionality moved to
the BytecodeGenerator.
Change-Id: I691fdaa01610ea050511825b5ad1f3ba4963421c
Reviewed-on: https://chromium-review.googlesource.com/c/1387991
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58453}
A computed property can never be a private field. That's a SyntaxError.
Change the check to a DCHECK.
Bug: v8:5368
Change-Id: I6701b60f3193639f3ccffacda25074d32d5de5b8
Reviewed-on: https://chromium-review.googlesource.com/c/1385267
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58451}
Change-Id: I8292b10afd2494199b5db11a5e3d64912cff919b
Reviewed-on: https://chromium-review.googlesource.com/c/1387988
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58450}
NATIVE_CONTEXT_IMPORTED_FIELDS are no longer different from other
NATIVE_CONTEXT_FIELDS, so this CL joins them together.
While doing so, removed the OBJECT_VALUE_OF slot, which is not
referenced anywhere.
Change-Id: I79c46e6e6cc92c90e90e68165cf7b0ae31e8151d
Reviewed-on: https://chromium-review.googlesource.com/c/1387631
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58449}
%AddNamedProperty was only used by regression tests, and is easily
replaced by Object.defineProperty (or deleted, in the case of a
cctest that was designed to test it directly).
%AddElement was unused (probably due to the death of array.js).
Bug: v8:7624
Change-Id: Icc17fd7a7419aa649275414a351f176f104040e2
Reviewed-on: https://chromium-review.googlesource.com/c/1387990
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58448}
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}