Commit Graph

49375 Commits

Author SHA1 Message Date
Michael Lippautz
5d411aef29 [api] Make dtor of v8::EmbedderHeapTracer public
This enables direct uses in e.g.
  unique_ptr<v8::EmbedderHeapTracer>

Bug: chromium:843903
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I11f86c916dca5c31413866d9972178fccda7df9c
Reviewed-on: https://chromium-review.googlesource.com/1160538
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54883}
2018-08-03 07:56:40 +00:00
Clemens Hammacher
42a8e59a43 Do not deprecate Memory methods yet
There is a proposal to make this defined behaviour, so remove the
deprecation comment for now.

R=jkummerow@chromium.org

Bug: v8:3770
Change-Id: Iff50ec544473bed844c586ed242bd062e8d530d8
Reviewed-on: https://chromium-review.googlesource.com/1160238
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54882}
2018-08-03 07:50:31 +00:00
Michael Achenbach
e3da9d1de5 [test] Skip slow tests in TSAN
This skips two tests in TSAN with stress mode only. The tests are
particularly slow with isolates testing, but they're also the two
lowest hanging fruits in normal TSAN testing.

TBR=sergiyb@chromium.org
NOTRY=true

Bug: v8:8009
Change-Id: Ic262fc39dee8ee0d8d1fdad10beced0e8f9c87a0
Reviewed-on: https://chromium-review.googlesource.com/1160860
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54881}
2018-08-03 07:10:28 +00:00
v8-ci-autoroll-builder
40f9cd71fd Update V8 DEPS.
Rolling v8/build: cc35cac..641e460

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2acd8e0..eae13a4

Rolling v8/third_party/depot_tools: 6f812e1..29b7b99

Rolling v8/third_party/fuchsia-sdk: e4f38ff..c8d8248

Rolling v8/tools/clang: bb4cc1a..2175972

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: Ifce98c452f5b852a19a967b98620a0d07d6032b1
Reviewed-on: https://chromium-review.googlesource.com/1161611
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#54880}
2018-08-03 03:39:26 +00:00
Jungshik Shin
4343e1a976 Accept Etc/GMT* as a valid time zone id.
Etc/GMT* time zones are  listed in the INAN time zone database and
they should be accepted as valid.

This CL will be followed by a CL for moving time zone name checks to C++
that will accept all the time zone names (e.g. EST5EDT, Hongkong, ROK, Zulu).

Bug: chromium:364374
Test: intl/date-format/timezone.js
Test: mjsunit/regress/regress-crbug-364374
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If0e5327d7e980504a9cb3d2b641e907ebce61180
Reviewed-on: https://chromium-review.googlesource.com/1159546
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54879}
2018-08-02 23:23:56 +00:00
Vlad Tsyrklevich
7a75d5828b Refactor unreliable Proxy tests
While working on crrev.com/c/1141045 I caused 3 assertThrows() tests
under the 'Deeply nested target' tests to fail. The tests for
defineProperty, isExtensible, and preventExtensions began to fail under
a couple build configurations because my change modified the stack check
code such that it no longer inhibited tail call optimization. Under some
build configurations the methods responsible for causing a stack oveflow
for those 3 methods were tail call optimized and the tests no longer
threw an exception.

Other built-in implementations of proxy handler methods could also fail
in the future due to refactors moving variables off the stack. Change
the test to ensure v8 doesn't crash but don't rely on stack overflow
exceptions being thrown for the 'deeply nested target' test.

BUG=chromium:864705

Change-Id: Iefeaa1d5402986c1831d0f259f83025452756387
Reviewed-on: https://chromium-review.googlesource.com/1159356
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54878}
2018-08-02 21:20:59 +00:00
Toon Verwaest
928e7b2973 [scanner] Decode utf8 as chunks come in to utf16, allowing unbuffered streaming
Change-Id: Iaad8bc94e9222d309749491df9a500544b5b37da
Reviewed-on: https://chromium-review.googlesource.com/1158687
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54877}
2018-08-02 19:00:09 +00:00
Adam Klein
f57273ae1a [builtins] Widen fast path for IterableToList
When TypedArray builtin code was still in JS, we used to completely
elide IterableToList when passed an array. This meant that it was
possible for the builtins to observe side-effects which mutated the
array when that should have been impossible.

When IterableToList was ported to CSA, it changed to clone the passed-in
array instead of passing it through. This means that there's now no
need to guard against side-effects due to ToNumber conversions, so we
can simply return the result of Object::IterationHasObservableEffects.

Though no test changes are included here, this code is covered
by the regression tests added previously when this runtime function
was added (and later modified).

This still leaves a future TODO to port IterationHasObservableEffects
to CSA.

Change-Id: If913c035b124ecb59a5f647344b653429a162a2b
Reviewed-on: https://chromium-review.googlesource.com/1159733
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54876}
2018-08-02 16:07:29 +00:00
Marja Hölttä
3745c625c0 [in-place weak refs] Make WeakArrayList::RemoveOne more efficient
Previously, removing an element in the middle made it consume space
forever. This fixes that, without changing the complexity of removal /
addition. The trade-off is that RemoveOne will shuffle indices (which should be
OK for the current users).

BUG=v8:7308

Change-Id: I0373e30f2d9d1ffb93a78d383d41b500dbbf3429
Reviewed-on: https://chromium-review.googlesource.com/1159371
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54875}
2018-08-02 15:15:38 +00:00
Sigurd Schneider
832c69d3f0 [turbo-assembler] Add code comment for inlined trampolines
Trampolines to off-heap targets may get inlined. In this case, it is hard
to tell where the trampoline is going to; this CL adds code comments which
identify the target builtin by name.

Bug: v8:6666
Change-Id: Ib085ad118ad64551af2522f9187b4faaad6ce315
Reviewed-on: https://chromium-review.googlesource.com/1160536
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54874}
2018-08-02 15:11:24 +00:00
Sathya Gunasekaran
c1832b02b9 [intl] undef macros after use
Bug: v8:5751
Change-Id: Iabf1310f98d675f86ee7923715cb3fc754da7c8f
Reviewed-on: https://chromium-review.googlesource.com/1160650
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54873}
2018-08-02 15:10:04 +00:00
Andreas Haas
fea9300d9f Revert "[wasm] Implement the new API for WebAssembly.instantiateStreaming"
This reverts commit b556c9eaa6.

Reason for revert: Flakes in layout tests: https://crbug.com/870187

Original change's description:
> [wasm] Implement the new API for WebAssembly.instantiateStreaming
> 
> This is the second V8 CL to refactor WebAssembly.instantiateStreaming to
> make it spec compliant again. The design doc where the whole change is
> discussed is available in the tracking bug. The tracking bug also
> references prototype implementations of the whole change, which includes
> the changes in this CL.
> 
> R=​mstarzinger@chromium.org
> 
> Bug: chromium:860637
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
> Change-Id: I776c0f24959ab5663727d3dfee0248a9b0642a42
> Reviewed-on: https://chromium-review.googlesource.com/1143187
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54834}

TBR=mstarzinger@chromium.org,ahaas@chromium.org

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

Bug: chromium:860637
Change-Id: Icbf2603143068a49c61de162aa7185a753703e5d
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1160261
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54872}
2018-08-02 13:29:47 +00:00
Michael Starzinger
05c8d57a72 Reland "[wasm] Enable --wasm-shared-engine by default."
This is a reland of c5c447d449

Original change's description:
> [wasm] Enable --wasm-shared-engine by default.
> 
> R=titzer@chromium.org
> BUG=v8:7424
> 
> Change-Id: I3bb3be92b6c1bf855904cf0bf334ad98dce74dd4
> Reviewed-on: https://chromium-review.googlesource.com/1156310
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54855}

Bug: v8:7424
Change-Id: I58153f05bd1eb764f5e58968de1daaaed79215dc
Reviewed-on: https://chromium-review.googlesource.com/1160361
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54871}
2018-08-02 12:54:02 +00:00
Michael Achenbach
640f77e76b [build] Remove obsolete builders from MB config
TBR=sergiyb@chromium.org
NOTRY=true

Bug: v8:8009
Change-Id: I044fffd027f76ad8d76b6546af508e7df7486a61
Reviewed-on: https://chromium-review.googlesource.com/1160522
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54870}
2018-08-02 12:41:10 +00:00
Sigurd Schneider
636d05a97e [cctest] Improve test coverage for calls to embedded builtins
This adds two tests that generate calls to embedded builtins, one test
inlines the trampoline, and the other uses an indirect load from the
roots array.

Bug: v8:6666, v8:7997
Change-Id: I077f4e9ed311021edb8ee74db625ebb048fdf66b
Reviewed-on: https://chromium-review.googlesource.com/1160237
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54869}
2018-08-02 12:38:46 +00:00
Michael Starzinger
0fda189d7d [wasm] Add test case for tier-up with shared engine.
R=clemensh@chromium.org

Change-Id: I3453dbc7aa8be25730672a11b818d7fff01a987b
Reviewed-on: https://chromium-review.googlesource.com/1156695
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54868}
2018-08-02 12:37:35 +00:00
Georg Neis
3c555d2d6f [turbofan] Turn a Handle parameter into a MaybeHandle.
R=sigurds@chromium.org

Change-Id: I9d07847ef92ff7a512c1624b492b37b6991e3c56
Reviewed-on: https://chromium-review.googlesource.com/1160304
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54867}
2018-08-02 12:19:20 +00:00
Michael Starzinger
be91e8b18d [d8] Fix race when setting {script_executed} option.
R=yangguo@chromium.org
BUG=v8:8009

Change-Id: I20f911efc1ec1ee229e827d88d78cecc168c82f3
Reviewed-on: https://chromium-review.googlesource.com/1160231
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54866}
2018-08-02 12:18:15 +00:00
Michael Achenbach
2461bb834f [build] Fix tsan builder name
TBR=sergiyb@chromium.org
NOTRY=true
NOTREECHECKS=true

Bug: v8:8009
Change-Id: Ie779b21a488d8a542faa78ffaa625c90058adc35
Reviewed-on: https://chromium-review.googlesource.com/1160489
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54865}
2018-08-02 12:10:54 +00:00
Michael Achenbach
656fe43e72 [build] Prepare MB config for splitting tsan builder
The TSAN builder will be split into builder and tester. This adds the config
for the builder, but keeps the configs for the testers to be removed after
the infra side switch.

This also cleans up redundant concurrent-marking configs, since concurrent
marking is on by default. This also removes a config of a builder that no
longer exists.

TBR=sergiyb@chromium.org
NOTRY=true

Bug: v8:8009
Change-Id: Ic7b146505b5059a2508da94d01d156d5e5e2b997
Reviewed-on: https://chromium-review.googlesource.com/1160308
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54864}
2018-08-02 11:29:13 +00:00
Florian Sattler
e2201a4458 Reland "Applied noexcept to all mctors and massigns"
This is a reland of baa055c7a6

Original change's description:
> Applied noexcept to all mctors and massigns
> 
> Refactoring the code base to use noexcept for their move constructors and move
> assignment operators.
> 
> Bug: v8:7999
> 
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I13d24eddba3bfa601cff26fd680a040cf4e71426
> Reviewed-on: https://chromium-review.googlesource.com/1152817
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Florian Sattler <sattlerf@google.com>
> Cr-Commit-Position: refs/heads/master@{#54841}

Bug: v8:7999
Change-Id: I72394e326a4f8da462ee6285511d721440ceb21d
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1158646
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#54863}
2018-08-02 10:37:09 +00:00
Ben L. Titzer
99de47f155 [cleanup] Remove redundant wasm:: namespace prefixes
The wasm/ directory is inconsistent in many places, often within the
same file. For all code that exists in a v8::internal::wasm namespace,
this CL removes any wasm:: qualifiers, which is especially helpful
since most types are already Wasm-named, such as WasmCode, WasmModule,
etc. Namespace qualifiers are redundant inside the wasm:: namespace and
thus go against the main point of using namespaces. Removing the
qualifiers for non Wasm-named classes also makes the code somewhat more
future-proof, should we move some things that are not really WASM-specific
(such as ErrorThrower and Decoder) into a higher namespace.

R=clemensh@chromium.org,mstarzinger@chromium.org

Change-Id: Ibff3e1e93c64c12dcb53c46c03d1bfb2fb0b7586
Reviewed-on: https://chromium-review.googlesource.com/1160232
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54862}
2018-08-02 10:36:00 +00:00
Clemens Hammacher
0cd263ac09 [iwyu] Add missing include in deoptimizer.h
R=titzer@chromium.org

Bug: v8:7754, v8:7965
Change-Id: I810f362f57a690f890d962a88f80df14c7de65db
Reviewed-on: https://chromium-review.googlesource.com/1160226
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54861}
2018-08-02 09:57:55 +00:00
Clemens Hammacher
3782b834ae [iwyu] Add missing include in graph-visualizer.h
R=titzer@chromium.org

Bug: v8:7754, v8:7965
Change-Id: Ie7eb8243186238e71e8c51d133d2c334f946727f
Reviewed-on: https://chromium-review.googlesource.com/1160223
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54860}
2018-08-02 09:56:50 +00:00
Michael Starzinger
11d01041b4 [wasm] Fix race in LookupNativeModule method.
R=clemensh@chromium.org
TEST=mjsunit/wasm/data-segments
BUG=v8:7424,v8:8009

Change-Id: I6578b77f69d0d56d7f824486acd4c150e4d20ad0
Reviewed-on: https://chromium-review.googlesource.com/1160224
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54859}
2018-08-02 09:41:46 +00:00
Clemens Hammacher
c2ee9c6af7 [iwyu] Avoid overwriting source file with same content
The generate-header-include-checks.py script generates the cc files to
check that headers can be included in isolation. It currently always
writes to all the cc files. This means that after "gclient runhooks",
all these files have to be recompiled.
This CL fixes this by not touching the file if it already contains the
expected content. This avoids hundreds of recompilations after running
the hook.

R=machenbach@chromium.org

Bug: v8:7965
Change-Id: I93a0abb936863f6c21ed22ba1b7d900b96725fa3
Reviewed-on: https://chromium-review.googlesource.com/1156514
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54858}
2018-08-02 09:19:32 +00:00
Creddy
92220026b2 [runtime] Setup Constructor for proxy_map
Bug: chromium:868473
Change-Id: I6a2f9be15cdc05cfa793650436c7ec3dd583bef4
Reviewed-on: https://chromium-review.googlesource.com/1158833
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Cr-Commit-Position: refs/heads/master@{#54857}
2018-08-02 09:15:43 +00:00
Sigurd Schneider
37dfedea6f Revert "[wasm] Enable --wasm-shared-engine by default."
This reverts commit c5c447d449.

Reason for revert: Race condition
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux/26284

Original change's description:
> [wasm] Enable --wasm-shared-engine by default.
> 
> R=​titzer@chromium.org
> BUG=v8:7424
> 
> Change-Id: I3bb3be92b6c1bf855904cf0bf334ad98dce74dd4
> Reviewed-on: https://chromium-review.googlesource.com/1156310
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54855}

TBR=mstarzinger@chromium.org,titzer@chromium.org

Change-Id: I46b00693b087af0076c634480c15ab109dcbbcce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7424
Reviewed-on: https://chromium-review.googlesource.com/1160241
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54856}
2018-08-02 08:46:37 +00:00
Michael Starzinger
c5c447d449 [wasm] Enable --wasm-shared-engine by default.
R=titzer@chromium.org
BUG=v8:7424

Change-Id: I3bb3be92b6c1bf855904cf0bf334ad98dce74dd4
Reviewed-on: https://chromium-review.googlesource.com/1156310
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54855}
2018-08-02 07:46:31 +00:00
Rodrigo Bruno
d623c25a84 [heap] Refactoring HeapController. Created new ExternalMemoryController.
This CL introduces a new MemoryController that will be used to control
the size of external memory (array buffers and external string for now).

Bug: chromium:845409
Change-Id: I119506ce0243ac33cec2b783b888b53ee11225a9
Reviewed-on: https://chromium-review.googlesource.com/1156393
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54854}
2018-08-02 06:52:26 +00:00
v8-ci-autoroll-builder
cc67e69681 Update V8 DEPS.
Rolling v8/build: e9eade2..cc35cac

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5c2d9e7..2acd8e0

Rolling v8/third_party/proguard: 63f6c0b..d901b76

Rolling v8/tools/clang: af36d66..bb4cc1a

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: Ib6fa819faf6a542c60bd4ef51d362abe133ef9ad
Reviewed-on: https://chromium-review.googlesource.com/1159847
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#54853}
2018-08-02 06:01:07 +00:00
Deepti Gandluri
8301530dbb Add I64Atomic {Exchg, CmpExchg} operations for ia32
Bug: v8:6532
Change-Id: Ib486a1c0d80a14b778dde5ef6655e11d326b4c73
Reviewed-on: https://chromium-review.googlesource.com/1157068
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54852}
2018-08-02 01:09:19 +00:00
Sergiy Byelozyorov
8dc41a581c [tools] Refactor run_perf.py to use logging module for all status messages
All status messages will be printed into STDERR and only the results will
continue to be written to STDOUT as documentation suggests. Additionally the
following changes are made:
 - on Buildbot each log entry will have a timestamp to make it easy to measure
   time between status messages printed by test runner, users will continue to
   see just the message itself
 - when devil (or any other module) logs error, they will not be interleaved
   with our own output since logging module is thread-safe
 - critical logs replaced with warning since they do not immediately stop
   the test runner
 - logging.exception is used for all exceptions to get formatted stack trace

TBR=machenbach@chromium.org

No-Try: true
Bug: chromium:838864
Change-Id: I197fcc3bc5890130ce8b35c3e21237f9614fc468
Reviewed-on: https://chromium-review.googlesource.com/1159361
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54851}
2018-08-01 23:12:15 +00:00
Wez
262c6c3bf6 Migrate to the zx_task_suspend_token() API.
This is a temporary rename of zx_task_suspend(), to allow the API
signature to be updated. It will be followed by a rename back to the
old name, with the new signature.

Change-Id: I896d714e556dad2e0740891ff99cb0b51c6c1943
Reviewed-on: https://chromium-review.googlesource.com/1158998
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54850}
2018-08-01 18:31:18 +00:00
Clemens Hammacher
94087c8038 [cleanup] Inline one-line CancelAndWait method
Very minor cleanup to reduce code complexity.

R=mstarzinger@chromium.org

Bug: chromium:869420
Change-Id: I53d1776792b3918d489fe002e2cb17b7a3e0ff73
Reviewed-on: https://chromium-review.googlesource.com/1158686
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54849}
2018-08-01 15:47:46 +00:00
Toon Verwaest
2d40e2f445 [scanner] Prepare CharacterStreams for specializing scanner and parser by character type
This templatizes CharacterStream by char type, and makes them subclass ScannerStream.
Methods that are widely used by tests are marked virtual on ScannerStream and final on
CharacterStream<T> so the specialized scanner will know what to call. ParseInfo passes
around ScannerStream, but the scanner requires the explicit CharacterStream<T>. Since
AdvanceUntil is templatized by FunctionType, I couldn't mark that virtual; so instead
I adjusted those tests to operate directly on ucs2 (not utf8 since we'll drop that in
the future).

In the end no functionality was changed. Some calls became virtual in tests. This is
mainly just preparation.

Change-Id: I0b4def65d3eb8fa5c806027c7e9123a590ebbdb5
Reviewed-on: https://chromium-review.googlesource.com/1156690
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54848}
2018-08-01 15:11:50 +00:00
Clemens Hammacher
65e3cea37f [wasm] Remove dead {NumberOfBackgroundTasks} method
The background compilation logic moved to the {CompilationState}, so
the {NumberOfBackgroundTasks} is now always 1.

R=mstarzinger@chromium.org

Bug: chromium:869420
Change-Id: I5860f46db953778890c842af4507e8d989e34784
Reviewed-on: https://chromium-review.googlesource.com/1158581
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54847}
2018-08-01 15:01:04 +00:00
Clemens Hammacher
269ea5aec2 [wasm] Remove AsyncCompileJob even if a foreground task is pending
We have complicated logic in place to ensure that an {AsyncCompileJob}
is not removed as long as a foreground task is still pending.
This CL changes that to just cancel the pending foreground task and
remove the {AsyncCompileJob} immediately.

R=mstarzinger@chromium.org

Bug: chromium:869420
Change-Id: Ia064dae4a0e31416675e5d77c46879254fc817c4
Reviewed-on: https://chromium-review.googlesource.com/1158578
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54846}
2018-08-01 14:58:07 +00:00
Sigurd Schneider
2f6966939f [cleanup] Clean up uses of IsShareableRelocMode
uses of the function where that was assumed to not be the case.

RelocInfo: :NONE satisfies IsShareableRelocMode; this cleans up some
Change-Id: Iafd7262496edc389131966f07f4e5b4fa8b5c1e6
Reviewed-on: https://chromium-review.googlesource.com/1158574
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54845}
2018-08-01 14:03:17 +00:00
Michael Starzinger
a05410336d [wasm] Fix inconsistency in HasRunningCompileJob predicate.
This changes the predicate in question to only check for async compile
jobs belonging to a given Isolate, having an engine-wide predicate is
not desirable for draining message queues.

R=clemensh@chromium.org
BUG=v8:7424

Change-Id: If990378400cc4484d413c4d7771ec6deb6bfd244
Reviewed-on: https://chromium-review.googlesource.com/1158565
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54844}
2018-08-01 13:22:08 +00:00
Clemens Hammacher
8332c0ff11 Revert "Applied noexcept to all mctors and massigns"
This reverts commit baa055c7a6.

Reason for revert: mips compile failure: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Mips%20-%20builder/18458

Original change's description:
> Applied noexcept to all mctors and massigns
> 
> Refactoring the code base to use noexcept for their move constructors and move
> assignment operators.
> 
> Bug: v8:7999
> 
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I13d24eddba3bfa601cff26fd680a040cf4e71426
> Reviewed-on: https://chromium-review.googlesource.com/1152817
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Florian Sattler <sattlerf@google.com>
> Cr-Commit-Position: refs/heads/master@{#54841}

TBR=marja@chromium.org,yangguo@chromium.org,ahaas@chromium.org,jgruber@chromium.org,sattlerf@google.com

Change-Id: I49757025daac368a647887a63164e927f0106803
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7999
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1158644
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54843}
2018-08-01 13:19:09 +00:00
Ben L. Titzer
98728e581d [wasm] Inline VerifyWasmCodeWithStats
This removes the need to pass Counters into the function body decoder
by making timing happen in the callers.

R=mstarzinger@chromium.org

Change-Id: I05c8d2c85b1c315150cbf9e9b3f68efa03114b75
Reviewed-on: https://chromium-review.googlesource.com/1156700
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54842}
2018-08-01 13:01:40 +00:00
Florian Sattler
baa055c7a6 Applied noexcept to all mctors and massigns
Refactoring the code base to use noexcept for their move constructors and move
assignment operators.

Bug: v8:7999

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I13d24eddba3bfa601cff26fd680a040cf4e71426
Reviewed-on: https://chromium-review.googlesource.com/1152817
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#54841}
2018-08-01 13:00:30 +00:00
Clemens Hammacher
e4f595c25e [wasm] Remove redundant cancelling of compile tasks
All compile tasks are already canceled when the {CompilationState}
dies. This happens when the {NativeModule} dies, and all
{NativeModule}s die before the {WasmEngine} dies. Thus, the WasmEngine
does not need to cancel any compile jobs, because there are none anyway.

R=mstarzinger@chromium.org

Bug: chromium:869420
Change-Id: I7e006392a1f9126333733c81c4c19985f626a470
Reviewed-on: https://chromium-review.googlesource.com/1158411
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54840}
2018-08-01 12:21:57 +00:00
Clemens Hammacher
91ab657e36 Enable TurboAssembler tests on native android
We currently don't execute the tests on android, because the error
message is redirected to the android log. What we can still to though
is ensuring that the call aborts the process, but just ignore the error
message.

R=mstarzinger@chromium.org

Bug: chromium:863799
Change-Id: I54b503849358133ffe647be83eae7a964c2ac49e
Reviewed-on: https://chromium-review.googlesource.com/1148444
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54839}
2018-08-01 12:20:17 +00:00
Michael Starzinger
c90dd37eee [wasm] Make native module serialization thread safe.
This changes the WebAssembly serializer to take a full snapshot of the
code table before measuring and serializing the module. It allows other
threads (or other Isolates) to mutate the native module while the main
thread is serializing the module.

R=clemensh@chromium.org
BUG=v8:7424

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I64bc27600452880f37f4fbb2f40c77c79975358f
Reviewed-on: https://chromium-review.googlesource.com/1156596
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54838}
2018-08-01 12:06:32 +00:00
Clemens Hammacher
c3a378ddc9 [cleanup] Move memory-related functions to v8memory.h
This moves the {ReadUnalignedValue} and {WriteUnalignedValue} methods
from utils.h to v8memory.h.

R=titzer@chromium.org

Bug: v8:7754, v8:7490
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I8becfc3ac169427968c11e24b035a90856f51e8e
Reviewed-on: https://chromium-review.googlesource.com/1158405
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54837}
2018-08-01 10:58:36 +00:00
Clemens Hammacher
d065807971 [iwyu] Fix includes in v8memory.h
R=titzer@chromium.org

Bug: v8:7754, v8:7965
Change-Id: I9389bc60eab8283d9b70a49a9a71c6d092146de0
Reviewed-on: https://chromium-review.googlesource.com/1158071
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54836}
2018-08-01 10:30:35 +00:00
Georg Neis
24beac317b Remove misleading "_index" suffix from some native context slots.
R=jarin@chromium.org

Change-Id: I9b54049852696680fb7fde26813638aae727b5d3
Reviewed-on: https://chromium-review.googlesource.com/1158231
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54835}
2018-08-01 09:05:53 +00:00
Andreas Haas
b556c9eaa6 [wasm] Implement the new API for WebAssembly.instantiateStreaming
This is the second V8 CL to refactor WebAssembly.instantiateStreaming to
make it spec compliant again. The design doc where the whole change is
discussed is available in the tracking bug. The tracking bug also
references prototype implementations of the whole change, which includes
the changes in this CL.

R=mstarzinger@chromium.org

Bug: chromium:860637
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I776c0f24959ab5663727d3dfee0248a9b0642a42
Reviewed-on: https://chromium-review.googlesource.com/1143187
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54834}
2018-08-01 08:56:21 +00:00