Commit Graph

22000 Commits

Author SHA1 Message Date
Sigurd Schneider
e58c9d924d Revert "[js-perf-test] Add more WeakMap perf tests"
This reverts commit 62a8bdca52.

Reason for revert: Test times out on atom

Original change's description:
> [js-perf-test] Add more WeakMap perf tests
> 
> Change-Id: I46eb94e58fc4da55cb1b2adb9ffdbb09e5e33a5d
> Bug: v8:8557
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530800
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60326}

TBR=ulan@chromium.org,jarin@chromium.org,sigurds@chromium.org

Change-Id: I88ae85bea2ad04db11137a602bd3d8ee6978fa04
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8557
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532061
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60353}
2019-03-20 09:51:25 +00:00
Michael Lippautz
73c62c845e profiler: Provide raw heap snapshots
Omit user roots when raw heap snapshots are used, i.e., when
the gn flag v8_enable_raw_heap_snapshots is enabled. For regular
Chrome production builds this is not the case.

Blink CL: https://crrev.com/c/1529096

Bug: chromium:936797
Change-Id: I5ae0ec1ecfab9a76352d8ce927d1c40e707262cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528994
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60351}
2019-03-20 09:27:32 +00:00
Leszek Swirski
ffabcbe8c0 [test] Manually restore changed flags in SaveFlags
SaveFlags previously worked by re-setting the flags using the command
line. Unfortunately, this could reset flags being used by concurrent
processes, which would cause TSAN issues.

Now, SaveFlags stores a copy of the state of all flags on creation, and
only resets changed flags in its destructor. It does this by (ab)using
the flag-definitions.h pseudo-header, adding a new mode to that header
which applies an includer-defined macro to each flag definition.

Change-Id: I4c156ecb36b4b7c05402138088266465d31e33b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530809
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60350}
2019-03-20 09:16:03 +00:00
Maya Lekova
07a711a5fa [turbofan] Fix wrongly inlined small functions
R=neis@chromium.org,bmeurer@chromium.org

Bug: v8:9002
Change-Id: I778585b8a76561531fd8c6713e48b3a96cf40351
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528233
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60346}
2019-03-20 08:46:41 +00:00
Ben Smith
ea9e5a7664 [wasm] Rename CheckCallViaJS with argument array
WasmRunner provides CheckCallViaJS, which calls a wasm function through
JS and checks its result.

There are currently two overloads, one that takes a variable number of
arguments, and another more general 4-argument version that takes an
array of arguments. This means if you run code like:

    r.CheckCallViaJS(0, 0, 0, 0);

The overload resolution kicks in, and chooses the general version, which
will always segfault.

This CL renames the general version to `CheckCallApplyViaJS` so the
above example will call the variable-argument version instead.

Change-Id: I14a742c467692e09e84f03504cec2306a794fc24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1529990
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60345}
2019-03-20 04:17:31 +00:00
Z Duong Nguyen-Huu
9a05c175de Further optimize object.assign fast path for symbol properties
This is a follow-up CL from https://chromium-review.googlesource.com/c/v8/v8/+/1432597
Indices of first and last symbol properties are recorded and used on a second iteration of DescriptorArrayForEach() to potentially reduce the iteration range

Bug: v8:6705
Change-Id: Iac73909d138214d1128e935eff686f2f058e17f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1516021
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60344}
2019-03-20 00:42:11 +00:00
Michael Achenbach
455b79efeb [test] Skip flaky test
NOTRY=true

Bug: v8:8964
Change-Id: I63e2ab53f3466a86b498c56fac1b296f1bd4d904
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530818
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60343}
2019-03-19 19:58:47 +00:00
Andreas Haas
d2542089c7 [wasm] Don't allow anyref globals when anyref is not enabled
R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: I93044dc0065d1d0146ec9b5190e50ca63ce94f4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530808
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60341}
2019-03-19 18:10:26 +00:00
Paolo Severini
3cda21de77 V8 x64 backend doesn't emit ABI compliant stack frames
On 64 bit Windows, the OS stack walking does not work because the V8 x64
backend doesn't emit unwinding info and also because it doesn't emit ABI
compliant stack frames. See
https://docs.google.com/document/d/1-wf50jFlii0c_Pr52lm2ZU-49m220nhYMrHDi3vXnh0/edit
for more details.

This problem can be fixed by observing that V8 frames usually all have the same
prolog and epilog:

push rbp,
mov rbp, rsp
...
pop rbp
ret N

and that it is possible to define XDATA (UNWIND_CODEs) that specify how Windows
should walk through V8 frames. Furthermore, since V8 Code objects are all
allocated in the same code-range for an Isolate, it is possible to register a
single PDATA/XDATA entry to cover stack walking for all the code generated
inside that code-range.

This PR contains changes required to enable stack walking on Win64:

EmbeddedFileWriter now adds assembler directives to the builtins
snapshot source file (embedded.cc) to emit additional entries in the .pdata and
in the .xdata section of the V8 executable. This takes care of stack walking
for embedded builtins. (The case of non-embedded builtins is not supported).
The x64 Assembler has been modified to collect the information required to emit
this unwind info for builtins.

Stack walking for jitted code is handled is Isolate.cpp, by registering
dynamically PDATA/XDATA for the whole code-range address space every time a new
Isolate is initialized, and by unregistering them when the Isolate is
destroyed.

Stack walking for WASM jitted code is handled is the same way in
wasm::NativeModule (wasm/wasm-code-manager.cpp).

It is important to note that Crashpad and Breakpad are already registering
PDATA/XDATA to manage and report unhandled exceptions (but not for embedded
builtins). Since it is not possible to register multiple PDATA entries for the
same address range, a new function is added to the V8 API:
SetUnhandledExceptionCallback() can be used by an embedder to register its own
unhandled exception handler for exceptions that arise in v8-generated code.
V8 embedders should be modified accordingly (code for this is in a separate PR
in the Chromium repository:
https://chromium-review.googlesource.com/c/chromium/src/+/1474703).

All these changes are experimental, behind:

the 'v8_win64_unwinding_info' build flag, and
the '--win64-unwinding-info' runtime flag.

Bug: v8:3598
Change-Id: Iea455ab6d0e2bf1c556aa1cf870841d44ab6e4b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1469329
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60330}
2019-03-19 14:36:17 +00:00
Michael Starzinger
b1f89b6169 [wasm] Extend support of "except_ref" global variables.
This extends the support for the "except_ref" type on global variables
to support mutable globals, as well as importing and exporting such
globals. Test coverage is also increased.

R=ahaas@chromium.org
TEST=mjsunit/wasm/exceptions-global
BUG=v8:8091

Change-Id: I816406e322ffb574a4f054947682491e7b40335f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530802
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60327}
2019-03-19 13:57:13 +00:00
Sigurd Schneider
62a8bdca52 [js-perf-test] Add more WeakMap perf tests
Change-Id: I46eb94e58fc4da55cb1b2adb9ffdbb09e5e33a5d
Bug: v8:8557
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530800
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60326}
2019-03-19 13:54:37 +00:00
Clemens Hammacher
2328b5add7 [wasm] Make WasmCompilationResult self-contained
This makes it easier to publish them in batches. Function index and
requested compilation tier are duplicated from the WasmCompilationUnit.

R=titzer@chromium.org

Bug: v8:8916
Change-Id: I87852670be029b1d729f98f01729362ca379fb50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1529009
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60325}
2019-03-19 13:24:51 +00:00
Leszek Swirski
4f719cca23 Revert "[regalloc] Introduce deferred fixed ranges"
This reverts commit b176931311.

Reason for revert: Flag access breaks TSAN (not an issue with this
CL as such, but we need to revert to re-open the tree).

Original change's description:
> [regalloc] Introduce deferred fixed ranges
> 
> Fixed ranges are used to express register constraints in the
> allocator. This change splits these fixed ranges into one for
> normal code and deferred code. The former are handeled as before
> whereas the latter are only made visible while allocating
> registers for deferred code.
> 
> This prevents forward looking decisions in normal code to be
> impacted by register constraints from deferred code.
> 
> Change-Id: I67d562bb41166194e62765d5ab051bc961054fc7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1477742
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60322}

TBR=jarin@chromium.org,sigurds@chromium.org,herhut@chromium.org

Change-Id: I5675a96acf0b5e5f7d63c60a742d2971b6d0d34d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530803
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60324}
2019-03-19 13:10:03 +00:00
Yu Yin
a6d328472a [mips] Skip cctest/test-jump-table-assembler.
We should use 'constant pool' to allow concurrent patching of
the jump table like arm. For now just skip the test to make CI
mips bot green.

Bug: v8:8974
Change-Id: Iaf2b0245128fdcf2c8ed964f796781134570c889
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524755
Commit-Queue: Yu Yin <xwafish@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60323}
2019-03-19 12:59:51 +00:00
Stephan Herhut
b176931311 [regalloc] Introduce deferred fixed ranges
Fixed ranges are used to express register constraints in the
allocator. This change splits these fixed ranges into one for
normal code and deferred code. The former are handeled as before
whereas the latter are only made visible while allocating
registers for deferred code.

This prevents forward looking decisions in normal code to be
impacted by register constraints from deferred code.

Change-Id: I67d562bb41166194e62765d5ab051bc961054fc7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1477742
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60322}
2019-03-19 12:54:41 +00:00
Peter Marshall
da66158fe1 [platform] Implement delayed tasks in the default worker runner
This was unimplemented but is needed for Perfetto which posts delayed
tasks on worker threads e.g. drain the trace buffer into a file every x
seconds.

This is implemented by adding a second queue which holds the delayed
tasks in chronological order of 'next-to-execute'. We use an
std::multimap for the queue so that we can easily get the next delayed
task with begin().

The implementation will move delayed tasks into the main task queue
when their deadline expires.

Drive-by cleanup of the runner destructor which can just use = default.

Bug: v8:8339

Change-Id: I3629c5d6e15ced2fc47eb1b7519a2dbbf8461fce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521114
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60320}
2019-03-19 11:28:30 +00:00
Benedikt Meurer
d6a60a0ee1 [turbofan] Significantly improve ConsString creation performance.
This change significantly improves the performance of string
concatenation in optimized code for the case where the resulting string
is represented as a ConsString. On the relevant test cases we go from

  serializeNaive: 10762 ms.
  serializeClever: 7813 ms.
  serializeConcat: 10271 ms.

to

  serializeNaive: 10278 ms.
  serializeClever: 5533 ms.
  serializeConcat: 10310 ms.

which represents a 30% improvement on the "clever" benchmark, which
tests specifically the ConsString creation performance.

This was accomplished via a couple of different steps, which are briefly
outlined here:

  1. The empty_string gets its own map, so that we can easily recognize
     and handle it appropriately in the TurboFan type system. This
     allows us to express (and assert) that the inputs to NewConsString
     are non-empty strings, making sure that TurboFan no longer creates
     "crippled ConsStrings" with empty left or right hand sides.
  2. Further split the existing String types in TurboFan to be able to
     distinguish between OneByte and TwoByte strings on the type system
     level. This allows us to avoid having to dynamically lookup the
     resulting ConsString map in case of ConsString creation (i.e. when
     we know that both input strings are OneByte strings or at least
     one of the input strings is TwoByte).
  3. We also introduced more finegrained feedback for the Add bytecode
     in the interpreter, having it collect feedback about ConsStrings,
     specifically ConsOneByteString and ConsTwoByteString. This feedback
     can be used by TurboFan to only inline the relevant code for what
     was seen so far. This allows us to remove the Octane/Splay specific
     magic in JSTypedLowering to detect ConsString creation, and instead
     purely rely on the feedback of what was seen so far (also making it
     possible to change the semantics of NewConsString to be a low-level
     operator, which is only introduced in SimplifiedLowering by looking
     at the input types of StringConcat).
  4. On top of the before mentioned type and interpreter changes we added
     new operators CheckNonEmptyString, CheckNonEmptyOneByteString, and
     CheckNonEmptyTwoByteString, which perform the appropriate (dynamic)
     checks.

There are several more improvements that are possible based on this, but
since the change was already quite big, we decided not to put everything
into the first change, but do some follow up tweaks to the type system,
and builtin optimizations later.

Tbr: mstarzinger@chromium.org
Bug: v8:8834, v8:8931, v8:8939, v8:8951
Change-Id: Ia24e17c6048bf2b04df966d3cd441f0edda05c93
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Doc: https://bit.ly/fast-string-concatenation-in-javascript
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1499497
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60318}
2019-03-19 10:43:00 +00:00
Michael Starzinger
aecbdd1e9b [wasm] Preliminary support for "except_ref" globals.
This adds basic support and tests for having global variables of type
"except_ref" that are default initialized to "null". The functionality
is part of the exception handling proposal and solely enabled by the
corresponding feature flag.

R=ahaas@chromium.org
TEST=mjsunit/wasm/exceptions-global
BUG=v8:8091

Change-Id: I581bc942fbe6688a5c58790a842fb024de22d924
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528439
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60317}
2019-03-19 10:40:30 +00:00
Mike Stanton
97d106f47e [TurboFan] Optimize map checks with pointer compression
If pointer compression is on, it makes sense to embed the map as
a 32-bit constant, for direct comparison. No need to uncompress
the receiver map.

Bug: v8:8982
Change-Id: I285ca4d5b49b26536873776d298e18bcbf84b23e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1518182
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60313}
2019-03-19 09:54:03 +00:00
Sven Sauleau
55bbcc4c08 [wasm] a grown shared memory should stay SharedArrayBuffer
According to WebAssembly's thread proposal, the memory type is decided
at the Object's creation and don't change over time.

When growing a shared memory and the old buffer was marked as shared;
setup the new buffer as shared as well.

Bug: v8:8564
Change-Id: I7e59071d11b41315429232ae0c90436c6810bd0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526012
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Auto-Submit: Sven Sauleau <ssauleau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#60312}
2019-03-18 21:59:13 +00:00
Sathya Gunasekaran
1cb05f1ff4 [await] Update async iterators to return a rejected promise on error
This implements the behavior discussed and specified here:
https://github.com/tc39/ecma262/issues/1461
https://github.com/tc39/ecma262/pull/1470

As part of making this change, I realized that we didn't actually
toggle the behavior between the optimized and unoptimized version
based on the --harmony-await-optimization flag at all and just the
unoptimized version by default.

This patch removes the unoptimized version and uses the optimized
version as the default.

The other builtins that use this flag are not touched as part of this
CL, they will be updated separately.

Bug: v8:8998
Change-Id: I315e1b39dda91d0127b5e567986485d713eaa78d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1525872
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60310}
2019-03-18 18:32:58 +00:00
Andrew Comminos
efa249a898 [cpu-profiler] Expose parent pointer in a CpuProfileNode
Consumers can use this to derive the full stack from sampled leaf nodes
without having to flatten the tree.

Bug: v8:8999
Change-Id: I42c638dd2c757837b0c03514c204be0182653291
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1525877
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60309}
2019-03-18 18:23:08 +00:00
Ulan Degenbaev
f04462620c Make mkgrokdump depend on the page size
Bug: chromium:852420

Change-Id: I9fd2353a3120c6d1566c1f74a581d005fd34ddae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528438
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60308}
2019-03-18 17:49:48 +00:00
Clemens Hammacher
434066820f [wasm] Test that compile errors contain function names
Even in streaming mode we want to generate deterministic compile
errors, in particular they should contain the function name.
This CL adds a test to check that the name is present in the error
message even if the blob containing the function names is not present
at the time the compile error is detected.

R=ahaas@chromium.org

Bug: v8:8814
Change-Id: I17eb1b3bca48ee2b58b462089c140c30a3511be8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526001
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60302}
2019-03-18 16:06:18 +00:00
Georg Neis
d922171717 [turbofan] Unify code that determines a JSCreate's map
There were four places where we did essentially the same steps in
order to extract the initial map for inlining a JSCreate operation.
This CL creates a function on NodeProperties for this task.

As a side effect, this fixes a bug in ReduceJSCreateArray, where
has_initial_map could get called when it wasn't permissible to do so.

Notes: For simplicity, in one or two places where we used to get the
target/newtarget constants from the types we now get them from
HeapConstant nodes.

Cosmetic change: rename "receiver_map" to the more accurate
"root_map" in JSNativeContextSpecialization::ExtractReceiverMaps.

Bug: chromium:939316
Change-Id: I8fd9eb50993be3d839ab9b18eeea28184c53eabf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528435
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60301}
2019-03-18 15:26:26 +00:00
Mike Stanton
6f2b87b883 Fix arm/arm64 simulator test timeouts
Caused by CL:
"[TurboFan] Array.prototype.map wrong ElementsKind for output array."

NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true

Change-Id: Ibaedc9f91e3fbac4900eda6277c98a094daf90b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528532
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60300}
2019-03-18 15:19:18 +00:00
Frederik Gossen
6cb9d5b560 [wasm-hints] Decode Wasm Compilation Hint Section
Implements decoding of compilation hints section in
{ModuleDecoderImpl}. The {wasm-module-builder.js} supports
the creation of that section. The feature can be enabled
with {--experimental-wasm-compilation-hints}.

Bug: v8:9003

Change-Id: Ic87e19d916f2ce316de453ea8c7c48c236a6d673
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521115
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Frederik Gossen <frgossen@google.com>
Cr-Commit-Position: refs/heads/master@{#60299}
2019-03-18 15:07:52 +00:00
Simon Zünd
027c26779d [js-perf] Improve end of serialize StackTrace benchmark
The serialize set of microbenchmarks serializes Error.stack of a
prepared set of error objects. When all objects have been serialized,
the benchmark then wrapped around and only accessed the resulting
string properties. This, of course, is a lot faster and benchmark
results are heavily fluctuating when the end is reached.

This CL fixes this by introducing a payload that should be similiar
to the specific workload, which is executed after the end is reached.

R=petermarshall@chromium.org

Bug: v8:8742
Change-Id: I7183d04e7c06af0c16fe3412e902f0d33605bc25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524485
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60297}
2019-03-18 14:43:42 +00:00
Jaroslav Sevcik
d62cd2f745 [turbofan] Do not call JSFunction::has_initial_map without has_prototype_slot
Bug: chromium:939316
Change-Id: I2a132b6cce208e110fe30de8d75743ac7534fc94
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1525942
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60291}
2019-03-18 13:00:06 +00:00
Michael Lippautz
f4b860d9b8 [heap,api] Remove deprecated APIs
Bug: chromium:923361, v8:8834
Change-Id: I6ec42aeb74bea5c0629fcdc3f95c125f5de534a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526195
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60289}
2019-03-18 12:51:22 +00:00
Matheus Marchini
1c1545401f [masm] make LoadCodeObjectEntry compatible with duplicated IET
On LoadCodeObjectEntry check for IsOffHeapTrampoline instead of
BuiltinIndexOffset so LoadCodeObjectEntry can correctly jump to the
on-heap trampoline when we use --interpreted-frames-native-stack.

R=jgruber@chromium.org, yangguo@google.com

Bug: v8:8911
Change-Id: I172d4735671726d32328de246990b513106e3a7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1516692
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60288}
2019-03-18 12:49:32 +00:00
Mike Stanton
96de5eeba9 [TurboFan] Array.prototype.map wrong ElementsKind for output array.
Bug: chromium:941743
Change-Id: Ic8f72bb39be43096373407ef0ec99391bbee217f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526018
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60282}
2019-03-18 12:30:42 +00:00
Andreas Haas
d7cd9051ad [wasm][anyref] Introduce anyfunc globals
Anyfunc globals are very similar to anyref globals. This CL is mostly
about extending the conditions which guard the anyref globals code.

R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: Ia92ac4560102cc3ed0060342f92758db28f415ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526004
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60281}
2019-03-18 12:01:52 +00:00
Andreas Haas
644556e6ed [wasm][anyref] Implement table.[get|set] wasm instructions
R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: Ica85ba80c29d6d5c5b9163df8cf743c0f1da7f4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1520715
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60280}
2019-03-18 11:04:07 +00:00
Sigurd Schneider
790acd7cb0 Revert "[turbofan] add fast path for String.p.startsWith"
This reverts commit acadb20271.

Reason for revert: chromium:941952

Original change's description:
> [turbofan] add fast path for String.p.startsWith
> 
> Add a fast path for String.p.startsWith(str) when length of str is 1.
> 
> Bug: v8:8400
> Change-Id: I65e657549902dc3ad064a213d815dd098ce6455f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1491872
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60091}

TBR=sigurds@chromium.org,bmeurer@chromium.org,usharma1998@gmail.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:8400
Change-Id: Iabd66b8db0d6958686ea15a042d8567955700c9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524205
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60279}
2019-03-18 10:57:03 +00:00
Sigurd Schneider
3a6ecfecba Revert "[turbofan] add CheckSmi call to String.p.startsWith"
This reverts commit 6d209c9b61.

Reason for revert: chromium:941952

Original change's description:
> [turbofan] add CheckSmi call to String.p.startsWith
> 
> Add a CheckSmi call to the value of the position argument to
> String.prototype.startsWith(search, [position]).
> 
> Bug: v8:8400, chromium:939746
> Change-Id: I7462bebe0d3fde605a4c27a34c0d9bb3f0cc1c20
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1514198
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60216}

TBR=sigurds@chromium.org,bmeurer@chromium.org,usharma1998@gmail.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:8400, chromium:939746
Change-Id: Ifee58b9e57313bbf93bca293e92d88af279a0261
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524204
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60277}
2019-03-18 10:40:32 +00:00
Alexei Filippov
aaf3eb25f0 Reland "[inspector] Allow limiting the total size of collected scripts."
This is a reland of 5a61630d1d

Original change's description:
> [inspector] Allow limiting the total size of collected scripts.
>
> Introduces the setMaxCollectedScriptsSize Debugger protocol method.
> If the max size is set, the debugger will hold collected (not referenced by other v8 heap objects)
> scripts up to the specified total size of their sources.
>
> BUG=v8:8988
>
> Change-Id: I94d52866494102add91ca2d569a2044b08c9c593
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1518556
> Commit-Queue: Alexei Filippov <alph@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60227}

TBR=dgozman@chromium.org

Bug: v8:8988
Change-Id: I9b1db01856a43636c1eb8ad2ec36e3727353228d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524668
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60271}
2019-03-16 06:08:17 +00:00
Matt Gardner
1e2aa7820b [turbofan] Fix HasProperty for OOB access on polymorphic ICs
The existing has property handling did not account for the fact an IC can have LOAD_IGNORE_OUT_OF_BOUNDS while some of the maps in the IC do not allow out of bounds loads.

bug: chromium:942068
Change-Id: I935402d9d72e9c0228510ef69154ea130d1c71f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1525876
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60269}
2019-03-15 22:09:16 +00:00
Clemens Hammacher
2270c0eaaa [wasm][fuzzer] Run micro tasks after each fuzzer execution
This asserts that we run e.g. GC finalization tasks. Without that, we
might run ouf of memory.

R=ahaas@chromium.org

Bug: chromium:938739
Change-Id: Ic80074f877183bcabb3353fbeff94842a534efab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526007
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60266}
2019-03-15 14:23:45 +00:00
Maya Lekova
fb701a9a2f Revert "Reland: [inspector] Allow limiting the total size of collected scripts."
This reverts commit ba00d8b776.

Reason for revert: Breaks arm64 bots (native & simulator) - https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim/17252

Original change's description:
> Reland: [inspector] Allow limiting the total size of collected scripts.
> 
> Introduces the setMaxCollectedScriptsSize Debugger protocol method.
> If the max size is set, the debugger will hold collected (not referenced by other v8 heap objects)
> scripts up to the specified total size of their sources.
> 
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1518556
> > Commit-Queue: Alexei Filippov <alph@chromium.org>
> > Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> 
> BUG=v8:8988
> TBR=dgozman@chromium.org
> 
> Change-Id: I6f7da07c4c9ae35b5252aabddb98b693ec77b4e8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524662
> Reviewed-by: Alexei Filippov <alph@chromium.org>
> Commit-Queue: Alexei Filippov <alph@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60255}

TBR=dgozman@chromium.org,alph@chromium.org

Change-Id: I04e3616d46620f33d0ec349fb7b0c393f276dc0c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8988
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524484
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60257}
2019-03-15 07:43:50 +00:00
Aseem Garg
07f94555fb [wasm] Add minimum to MemoryDescriptor and TableDescriptor
This CL allows for either of 'minimum' or 'initial' for MemoryDescriptor
and TableDescriptor. It also adds a flag for the reflection features.

R=binji@chromium.org,adamk@chromium.org
Bug=v8:7742

Change-Id: Icfd4825f63e1eb784a39d10f740d55e81489eba7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1485243
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60256}
2019-03-15 06:14:39 +00:00
Alexei Filippov
ba00d8b776 Reland: [inspector] Allow limiting the total size of collected scripts.
Introduces the setMaxCollectedScriptsSize Debugger protocol method.
If the max size is set, the debugger will hold collected (not referenced by other v8 heap objects)
scripts up to the specified total size of their sources.

> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1518556
> Commit-Queue: Alexei Filippov <alph@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>

BUG=v8:8988
TBR=dgozman@chromium.org

Change-Id: I6f7da07c4c9ae35b5252aabddb98b693ec77b4e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524662
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60255}
2019-03-15 05:45:29 +00:00
Ben Smith
94f22de62e [wasm] Implement bulk memory in interpreter
This CL only provides the implementation of memory.{init,copy,fill} and
data.drop.

Bug: v8:8965
Change-Id: I439f2520bfee8f147e4b0d1d31f954aaad2e14ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1510575
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60253}
2019-03-15 05:29:59 +00:00
Aseem Garg
74714df2cc [wasm] Add type function to WebAssembly.Global
R=binji@chromium.org,adamk@chromium.org
Bug=v8:7742

Change-Id: I5b9a614dd0c8b028d756cbd401c803de4cb9437f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1513159
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60252}
2019-03-15 05:16:29 +00:00
Aseem Garg
a0bdda2495 [wasm] Add type function to WebAssembly.Table
This CL also changes the constructor for WasmTableObject so that the
maximum_length is set to undefined instead of a default value if there's
no maximum provided.

R=binji@chromium.org,adamk@chromium.org
Bug=v8:7742

Change-Id: I6310224e9997464bf69c198e2694a6cd76e01e8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1513156
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60250}
2019-03-15 04:22:29 +00:00
Caitlin Potter
6487ad7a33 [esnext] allow hashbang in eval() and unskip hashbang test262 tests
Fix original imlpementation to support occurrence in eval(), and unskip
tests.

BUG=v8:8523
r=gsathya@chromium.org, mathias@chromium.org, littledan@chromium.org

Change-Id: I80a3e8623357947c564a6cdf865eeff435b8e640
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1510792
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#60246}
2019-03-14 18:16:49 +00:00
Clemens Hammacher
eb1d2d7098 [wasm] Make error messages deterministic
Compilation only stores whether an error has been found, but not the
exact error or it's location. This is generated by running a validation
pass once all wire bytes have been received.
This unifies error messages by removing one more location where we
generate compilation error messages, and makes it deterministic because
a) we always report the error in the first failing function, and
b) if names are present, the error message will always contain the
   function name.

R=titzer@chromium.org

Bug: chromium:926311, v8:8814
Change-Id: I79551b8bb73dcee503484de343a3ada60a6add4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521112
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60242}
2019-03-14 15:05:18 +00:00
Andreas Haas
e8af602dd2 [wasm] Add test for element section with non-zero table indices
R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: Id8b9c3596eb6caf5ee7048a87a676a85dba0c5dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1520711
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60239}
2019-03-14 14:28:06 +00:00
Leszek Swirski
d82c9afb8c [api] Add unique_ptr constructor for StreamedSource
Since StreamedSource takes ownership of the ExternalSourceStream
passed into it, it should take it by unique_ptr rather than raw
pointer to signal this transfer of ownership. The old constructor
is now deprecated.

Change-Id: I24681926c2f3141f7dd3664f72019a4c6deabfd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1520713
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60232}
2019-03-14 09:42:26 +00:00
Maya Lekova
71206891a4 Revert "[inspector] Allow limiting the total size of collected scripts."
This reverts commit 5a61630d1d.

Reason for revert: Breaking gc stress bot - https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/21477

Original change's description:
> [inspector] Allow limiting the total size of collected scripts.
> 
> Introduces the setMaxCollectedScriptsSize Debugger protocol method.
> If the max size is set, the debugger will hold collected (not referenced by other v8 heap objects)
> scripts up to the specified total size of their sources.
> 
> BUG=v8:8988
> 
> Change-Id: I94d52866494102add91ca2d569a2044b08c9c593
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1518556
> Commit-Queue: Alexei Filippov <alph@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60227}

TBR=dgozman@chromium.org,alph@chromium.org,kozyatinskiy@chromium.org

Change-Id: I26de645e425f0f7d5aa8212eeefda76dad695b78
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8988
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1522988
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60229}
2019-03-14 08:23:17 +00:00