This will allow the devtools UI to display private fields on the scope
panel.
Instead of extending GetInternalProperties, we expose a separate
GetPrivateFields method on the debug interface. This allows us to do
better type checking, for example, we can directly cast to a
v8::Private as this can only contain private fields.
This also allows us to have better constraints on the input type --
v8::Object, as opposed to a v8::Value.
The KeyAccumulator is extended to collect private names for the
PRIVATE_NAMES_ONLY PropertyFilter.
Bug: v8:8773
Change-Id: Id47c551186c59dae9a06721074ef78144f25892f
Reviewed-on: https://chromium-review.googlesource.com/c/1475664
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59920}
WebAssembly's specification tests use a timeout annotation.
This change allows the shared testrunner to use it to calculate
the testcase timeout.
Currently, the allowed timeout values are: long. Other values will
emit a warning.
Change-Id: Id7f453f5fd49854c8f53ff86ef2ec58aa0ae8748
Reviewed-on: https://chromium-review.googlesource.com/c/1480376
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#59919}
This is a port of the improvements to the ArgumentsAdaptorTrampoline
that previously landed for x64. It skips the arguments adaptor frame
creation if the callee cannot observe the actual arguments (as indicated
by the "is_safe_to_skip_arguments_adaptor" bit on the SharedFunctionInfo),
and instead just massages the current stack frame appropriately (either
by pushing more undefineds in case of under application, or by removing
the superfluous arguments in case of over application).
Bug: v8:8895
Doc: http://bit.ly/v8-faster-calls-with-arguments-mismatch
Change-Id: I96a0425d390f041001df0356d4bfd71ad1e98b5a
Reviewed-on: https://chromium-review.googlesource.com/c/1491592
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59918}
Constructors have been removed. Initialization syntax with {}
for structs and classes is now limited to the initialization
expressions for the fields, so "constructors" deviating from
that explicit and complete list of field initialization
values must be declared as separate macros.
Bug: v8:7793
Change-Id: Ibc26e685c0c8a182732df90b1631eae9371309cb
Reviewed-on: https://chromium-review.googlesource.com/c/1489080
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59917}
This is a reland of 71d29f7892
Original change's description:
> [nojit] Don't flush the icache in jitless mode
>
> We don't allocate executable memory in jitless mode hence there's no
> need to flush the icache.
>
> Bug: v8:7777
> Change-Id: I70a1884e6c9f11405465f5741f2eccd4f7a273fb
> Reviewed-on: https://chromium-review.googlesource.com/c/1488765
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59887}
Bug: v8:7777
Change-Id: Id48455cf4e6d28ad2a0b753580ca51cbe0e983d3
Reviewed-on: https://chromium-review.googlesource.com/c/1491601
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59916}
That way we don't need to internalize kValue property names on object literals
(both STRING and identifier tokens). This speeds up object literal preparsing
by quite a bit (15% on a microbenchmark; 7-8% on actual object literals looking
like json from FB).
Change-Id: I9d7baeb94f1a8e4f7e3b7cd6406a826ba37017f3
Reviewed-on: https://chromium-review.googlesource.com/c/1491605
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59915}
Bytecode flushing can make tests using assertOptimized flaky if the bytecode is
flushed between marking and optimization. It can also be flaky if the feedback vector
is collected before optimization. To prevent this, a new %PrepareForOptimization
runtime-test function is added that hold onto the bytecode strongly until it is
optimized after being explicitly marked for optimization by %OptimizeFunctionOnNextCall.
BUG=v8:8801,v8:8395
Change-Id: Idbd962a3a2044b915903f9c5e92d1789942b5b41
Reviewed-on: https://chromium-review.googlesource.com/c/1463525
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59914}
Instead of using our own atomic utils, use std::atomic.
R=mstarzinger@chromium.org
Bug: v8:8916, v8:8834
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Change-Id: I663d7f28dbaaa476a62407cf42dca1927c69f68b
Reviewed-on: https://chromium-review.googlesource.com/c/1491631
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59913}
This reverts commit 9215ac2c2a.
Reason for revert: Turns out it fails on windows too: https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8920360960120786848/+/steps/Check_-_extra__flakes_/0/logs/SampleWhenFrameIsNotS../0
Original change's description:
> [cpu-profiler] Disable failing tests on arm simulator only
>
> These tests still fail on arm simulators and don't appear easily fixable
> but are low priority. Let's still run them on other build configs.
>
> Bug: v8:8917
> Change-Id: If0a2f44b746eff5e82eb750103304e788dfbbfb5
> Reviewed-on: https://chromium-review.googlesource.com/c/1491593
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59903}
TBR=sigurds@chromium.org,petermarshall@chromium.org
Change-Id: Ic77791ddfd37e67307af6ec7b064e31e2db92039
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8917
Reviewed-on: https://chromium-review.googlesource.com/c/1491604
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59911}
This avoids having occurrences of both 0x000012345678 and
0x12345678 in the log.
Change-Id: Id3603993362d1dd327aad567ef3448d00ce3a8fd
Reviewed-on: https://chromium-review.googlesource.com/c/1491514
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59910}
Includes various fixes and cleanups here and there.
Bug: v8:7703, v8:8852
Change-Id: I603eb0212cab3fecabfa15dceb70ee23b81cdb5a
Reviewed-on: https://chromium-review.googlesource.com/c/1491595
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59909}
A small refactoring to reduce complexity. It also moves the call to
{RegisterTrapHandlerData} out of the mutex to reduce the time in this
critical section.
R=mstarzinger@chromium.org
Bug: v8:8916
Change-Id: I644f03db6099ebef22b2e33b607a2dc038b36423
Reviewed-on: https://chromium-review.googlesource.com/c/1478196
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59907}
Also enable test runner to differentiate between clang and gcc.
Bug: v8:8919
Change-Id: Icdcae0aba3644a1b1b9ddc6c037eabde27d717f7
Reviewed-on: https://chromium-review.googlesource.com/c/1491634
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59906}
This fixes the libstdc++ build after commit 4b6b8cf610 ("[cleanup] Start
cleaning up utils.h"), as string-util.cc was including <cmath> indirectly
via src/conversions.h.
Bug: chromium:819294
Change-Id: I5be7eac355d0c316a432eab4c50ae66d885b03d7
Reviewed-on: https://chromium-review.googlesource.com/c/1491591
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59905}
These tests still fail on arm simulators and don't appear easily fixable
but are low priority. Let's still run them on other build configs.
Bug: v8:8917
Change-Id: If0a2f44b746eff5e82eb750103304e788dfbbfb5
Reviewed-on: https://chromium-review.googlesource.com/c/1491593
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59903}
Happily, with the port of Array.prototype.find and findIndex, we can
remove a large set of library functions from array-builtins-gen.cc.
BUG: v8:7672
Change-Id: I74e07fe00162b34b2246c868386d4551ba4dc032
Reviewed-on: https://chromium-review.googlesource.com/c/1484296
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59902}
This is a reland of 19291bfc58
Same as original, but with ThrowTypeError/ThrowRange updated to use an implicit context.
Original change's description:
> [typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque
>
> Reduces TypedArrayPrototypeSubArray builtin size by 392 bytes:
> - TFJ Builtin, TypedArrayPrototypeSubArray, 2448 -> 2056
>
> Small 3-4% perf increase on JSTests/TypedArrays/SubarrayNoSpecies benchmark
>
> Bug: v8:7161, v8:8906
> Change-Id: Ia2b906a93db7199ca4592c46c40638cca0a33eec
> Reviewed-on: https://chromium-review.googlesource.com/c/1485241
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#59894}
Bug: v8:7161, v8:8906
Change-Id: Ic3784e2d4db262b1968ba467b7b46b98203f11d4
Reviewed-on: https://chromium-review.googlesource.com/c/1491533
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59901}
Keeping the {owned_code_} vector sorted might add unnecessary work
executed during compilation and under a mutex.
This CL moves the sort operation into {Lookup()}, such that it can be
executed in bulks and at later stages.
R=mstarzinger@chromium.org
Bug: v8:8916
Change-Id: I8d5f4520e4ce087234c0a1e3d97e7e98229206eb
Reviewed-on: https://chromium-review.googlesource.com/c/1476994
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59900}
This CL changes a few AST nodes and one internal structure to use "Identifier"
instead of a simple std::string, allowing the use of the exact source position
of such a name.
Drive-by change: Add new constructor to Binding that allows creation from
an Identifier. It sets the declaration_position to the source position of
the name instead of using "CurrentSourcePosition".
R=tebbi@chromium.org
Bug: v8:7793
Change-Id: I456d20822b6528d2e96400c28ebfebea3ca80613
Reviewed-on: https://chromium-review.googlesource.com/c/1491223
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59899}
AdvanceUntil always starts at the character after c0_. This means that we
needed to handle first, causing some duplication. Instead of doing that, we can
also just not Advance() before AdvanceUntil, making c0_ a character that's
already handled.
Change-Id: I3e23f62a617b5d607579641fc19b12de4f179e8e
Reviewed-on: https://chromium-review.googlesource.com/c/1491512
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59897}
The spec repo version in DEPS now gets updated automatically by the
autoroller, but we still have to update the spec tests manually because
it requires ocaml. Updating the core spec tests is what this CL does.
There is a bug to also do this update automatically. It's on Sergiy's
list but does not have the highest priority.
R=titzer@chromium.org
Change-Id: I65085dcbca93d41d9f12c5ba227130197ebd203f
Reviewed-on: https://chromium-review.googlesource.com/c/1491219
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59891}
We don't allocate executable memory in jitless mode hence there's no
need to flush the icache.
Bug: v8:7777
Change-Id: I70a1884e6c9f11405465f5741f2eccd4f7a273fb
Reviewed-on: https://chromium-review.googlesource.com/c/1488765
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59887}
Moved CoverageMode and TypeProfileMode enums to interface-types.h
to save one include in isolate.h. This reduces the expanded lines of code
count by ~45k.
Bug: v8:8834
R=yangguo@chromium.org
Change-Id: I399fe8cf66b1aec79bcb5831afd46a74e358244d
Reviewed-on: https://chromium-review.googlesource.com/c/1489072
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59886}
We didn't update the arguments count properly when changing the JSCall
node to a direct Call node.
Bug: chromium:936302, v8:8895
Change-Id: I59a39a07e41151d8eaa2e1a1ea7b1835e00fb501
Reviewed-on: https://chromium-review.googlesource.com/c/1491191
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59885}
This is a reland of 734a657522
Original change's description:
> Do not enqueue or run a microtask on detached contexts
>
> This CL disables EnqueueMicrotask and RunMicrotasks on detached
> contexts. That is, if an embedder call DetachGlobal() on a v8::Context,
> EnqueueMicrotask on that context will not take effect, and all Microtask
> that is enqueued before DetachGlobal will be cancelled.
>
> On Blink, this implies that a frame will no longer run a microtask after
> it's navigated away. OTOH, detached frames in Blink are not affected.
>
> Bug: v8:8124
> Change-Id: I5b00ceef5ea2afb87cf067a65eb95c29bf91176d
> Reviewed-on: https://chromium-review.googlesource.com/c/1416071
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59445}
Tbr: adamk@chromium.org, yangguo@chromium.org, verwaest@chromium.org
Bug: v8:8124
Change-Id: I959a18ae214f1385d5f453b3ed94772e60f71e0f
Reviewed-on: https://chromium-review.googlesource.com/c/1469544
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59884}
This adds support for dynamically checking the newly introduced
is_safe_to_skip_adapt_arguments flag on the SharedFunctionInfo inside
the ArgumentsAdaptorTrampoline builtin, so that if there's an arguments
mismatch, but said bit is set, we can just massage the current stack
frame according to the SharedFunctionInfo and don't need to create an
arguments adaptor frame.
This improves the general (baseline) performance of calls with arguments
mismatches by up to 35%, as can be seen with the test case from the tracking
bug, which goes from around
callUnderApplication: 608 ms.
callOverApplication1: 633 ms.
callOverApplication2: 635 ms.
to
callUnderApplication: 390 ms.
callOverApplication1: 439 ms.
callOverApplication2: 443 ms.
when the TurboFan fast-path (that was previously introduced) is forcibly
disabled. That's a pretty solid baseline improvement and there's probably
still some room for further improvement (i.e. avoid loading the SFI multiple
times, etc.).
Drive-by-fix: Refactor and cleanup the ArgumentsAdaptorTrampoline
builtin a bit to make it more efficient and easier to read (it's still
pretty messy, but I don't wanna change too many things at once).
This is only the initial x64 port, since for ia32 we're really short on
registers and it might not even pay off (initial prototype shows a lot
less performance impact). The arm and arm64 port is in progress and will
land once ready.
Bug: v8:8834, v8:8895
Change-Id: I2e1c8e4767a808a43b932487fdedc0e44cdd35c5
Reviewed-on: https://chromium-review.googlesource.com/c/1488751
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59881}
OS::Allocate() previously was calling zx_vmo_replace_as_executable()
when executable access is requested. This breaks the case when the
OS::SetPermission() is called to mark that memory as executable later.
Updated it to call zx_vmo_replace_as_executable() for all VMOs.
This solution is not ideal, but it's consistent with other platforms,
so it's acceptable short-term.
Bug: v8:8899, chromium:934582
Change-Id: Ifeb818c93d8b9c80e73a057f5e6f3ca5a7b1c23f
Reviewed-on: https://chromium-review.googlesource.com/c/1483613
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59880}
I can't reproduce any of these flakes anymore on windows or linux.
Some are confirmed fixed with the same root cause as crbug.com/v8/8883.
Others are not reproducible anymore and were probably fixed by other
de-flaking and bugfixes in the last 6 months.
Bug: v8:5193, v8:7054
Change-Id: I23ce47a98f11f3637ccf4baf01ffab5c461a0ebd
Reviewed-on: https://chromium-review.googlesource.com/c/1489074
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59873}