Commit Graph

9836 Commits

Author SHA1 Message Date
Tobias Tebbi
36bb2e000b [csa] type and separate {Load,Store}{Fixed,Property}ArrayElement
This enables fast bounds checks on FixedArray's.

Change-Id: I0ae57b2c6981d8e1b2c7017ba658fd9c890d2bad
Reviewed-on: https://chromium-review.googlesource.com/1163614
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54946}
2018-08-07 14:15:51 +00:00
Sigurd Schneider
7f99d292e2 [cleanup] Unify naming of instruction size constant
The instruction size in bytes is now kInstrSize on all platforms.

Bug: v8:6666
Change-Id: I2f9880a6a74199a439c8327a4117efb74240aa22
Reviewed-on: https://chromium-review.googlesource.com/1164955
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54944}
2018-08-07 12:18:13 +00:00
Yang Guo
ff7915421d Change test-log test to not use regex.
R=machenbach@chromium.org

Bug: v8:7855
Change-Id: Ifcd28d0aa24e07f0db70305d64b20361530069b0
Reviewed-on: https://chromium-review.googlesource.com/1163677
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54943}
2018-08-07 11:21:13 +00:00
Michael Starzinger
7579b1e3c8 [wasm] Support concurrent patching of jump table.
This adds initial support for concurrently patching jump table slots. It
is needed once different Isolates share code (for the --wasm-shared-code
feature). We need to ensure that instructions holding the target address
within a jump table slot do not cross cache-line boundaries. To do this,
the jump table has been split into consecutive pages.

Note that this also adds a stress test for multiple threads hammering at
a single slot concurrently. The test is currently limited to the ia32
and the x64 architecture, but will be extended to cover others. The test
reliably triggers tearing of the target address on almost every run of
the test and hence serves to prevent regressions.

R=clemensh@chromium.org
TEST=cctest/test-jump-table-assembler
BUG=v8:8018

Change-Id: Ife56bbb61ffcae5d8906ca7b8c604b195603707c
Reviewed-on: https://chromium-review.googlesource.com/1163664
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54942}
2018-08-07 11:20:09 +00:00
Camillo Bruni
e9bdcc0d22 [test] Improve test coverage for Object::GetPropertyNames
- Cover array-indices corner cases around 2**32

Bug: v8:8019
Change-Id: Ic5d81a6944b10067b64ffc596472c076adc49c75
Reviewed-on: https://chromium-review.googlesource.com/1163786
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54936}
2018-08-07 07:47:06 +00:00
Marja Hölttä
c38f52f1a3 Reland [in-place weak refs] Use WeakArrayList in wasm
Now we can remove FixedArrayOfWeakCells (this was the last user).

Previous try: https://chromium-review.googlesource.com/1150170

BUG=v8:7308

Change-Id: Ie924e379ea8bbd797430e3ca591019fe001e78ad
Reviewed-on: https://chromium-review.googlesource.com/1154909
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54928}
2018-08-06 15:02:34 +00:00
Marja Hölttä
a12cbd3499 Revert "Revert (partially) "Reland [in-place weak refs] Use WeakArrayList in Heap::noscript_list.""
This reverts commit a5efd5076b.

Reason for revert: was a GC bug, unrelated to this CL.

Original change's description:
> Revert (partially) "Reland [in-place weak refs] Use WeakArrayList in Heap::noscript_list."
> 
> Reason: flaky wasm crashes.
> 
> This leaves WeakArrayList::RemoveOne (+ tests for it) in place.
> 
> BUG=v8:7308, v8:8014
> 
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
> Change-Id: I1195d061ae7d3c82f921f94f50df3f09a55de5ca
> Reviewed-on: https://chromium-review.googlesource.com/1161904
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54891}

TBR=marja@chromium.org,mlippautz@chromium.org

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

Bug: v8:7308, v8:8014
Change-Id: Id8002e2178ac89378b047dd0acd1bf4e3c272918
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1162124
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54921}
2018-08-06 12:37:18 +00:00
Ben Newman
a8f6869177 [debug] Fully implement Debug::ArchiveDebug and Debug::RestoreDebug.
I have a project that embeds V8 and uses a single `Isolate` from multiple
threads. The program runs just fine, but sometimes the inspector doesn't
stop on the correct line after stepping over a statement that switches
threads behind the scenes, even though the original thread is restored by
the time the next statement is executed.

After some digging, I discovered that the `Debug::ArchiveDebug` and
`Debug::RestoreDebug` methods, which should be responsible for
saving/restoring this `ThreadLocal` information when switching threads,
currently don't do anything.

This commit implements those methods using MemCopy, in the style of other
Archive/Restore methods in the V8 codebase.

Related: https://groups.google.com/forum/#!topic/v8-users/_Qf2rwljRk8

Note: I believe my employer, Meteor Development Group, has previously
signed the CLA using the group email address google-contrib@meteor.com.

R=yangguo@chromium.org,jgruber@chromium.org
CC=info@bnoordhuis.nl

Bug: v8:7230
Change-Id: Id517c873eb81cd53f7216c7efd441b956cf7f943
Reviewed-on: https://chromium-review.googlesource.com/833260
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54902}
2018-08-03 20:45:09 +00:00
Sigurd Schneider
0aed2067e4 [arm,ppc] Consolidate kPCReadOffset to kPcLoadDelta
We have two constants for the PC load delta; this CL
consolidates them into one. The CL does not change MIPS
as the two constants are defined to different values there.

Bug: v8:6666
Change-Id: If207a59dea3ef33756a5d7330217ab8a176bdf63
Reviewed-on: https://chromium-review.googlesource.com/1161926
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54898}
2018-08-03 13:06:56 +00:00
Marja Hölttä
a5efd5076b Revert (partially) "Reland [in-place weak refs] Use WeakArrayList in Heap::noscript_list."
Reason: flaky wasm crashes.

This leaves WeakArrayList::RemoveOne (+ tests for it) in place.

BUG=v8:7308, v8:8014

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I1195d061ae7d3c82f921f94f50df3f09a55de5ca
Reviewed-on: https://chromium-review.googlesource.com/1161904
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54891}
2018-08-03 10:07:19 +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
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
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
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
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
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
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
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
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
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
Georg Neis
64290afcd0 [turbofan] Disable broker in JSContextSpecialization test.
The test uses an incomplete native context, so the broker fails during
serialization.

Bug: v8:7790
Change-Id: I33e9e37df4e4acce62829123a8d16087d4fdc76d
Reviewed-on: https://chromium-review.googlesource.com/1156693
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54825}
2018-07-31 18:34:35 +00:00
Georg Neis
bb9cf1cb03 [turbofan] Put some tests under a canonical handle scope.
The heap broker expects that handles get canonicalized.

R=jarin@chromium.org

Bug: v8:7790
Change-Id: If6162316bb2a256e783a8175ac7d4172d040b28b
Reviewed-on: https://chromium-review.googlesource.com/1155123
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54823}
2018-07-31 18:20:53 +00:00
Georgia Kouveli
c26c333819 [test] Remove superflous FlushICache calls.
MakeAssemblerBufferExecutable now flushes the i-cache, so we do
not need to do that again.

Change-Id: I46f5619167114cdb84064ef363106bee64282d1f
Reviewed-on: https://chromium-review.googlesource.com/1152813
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#54822}
2018-07-31 18:19:42 +00:00
Camillo Bruni
c608122b85 [api][keys] Allow skipping indices for Proxies with GetPropertyNames
Bug: v8:7942
Change-Id: I7b3740b04cbcaa56dc809150900ab8d821b054ce
Reviewed-on: https://chromium-review.googlesource.com/1156544
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54821}
2018-07-31 16:16:08 +00:00
Georg Neis
6034d2f88f Remove unnecessary 'size' argument from TYPED_ARRAYS macro.
Use sizeof of the C type instead.

Also fix a few #undef's that got reported after my changes.

R=jarin@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I30a43b3d93e6df04fb9fb33050b52988edd7fdb1
Reviewed-on: https://chromium-review.googlesource.com/1155108
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54817}
2018-07-31 12:29:13 +00:00
Dan Elphick
85cef38d2a Add v8::String::StringEquals to API
This new method only compares Strings and so doesn't need a Context. It
also can't throw so it returns bool. Can be used in place of the
deprecated Equals method and many Equals call currently taking a
Context.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I4cfe7747aa140e5a55d9513681ee4704414e1545
Reviewed-on: https://chromium-review.googlesource.com/1151321
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54812}
2018-07-31 11:22:57 +00:00
Michael Starzinger
8b450f5950 [wasm] Add test for async compilation with shared WasmEngine.
R=ahaas@chromium.org
TEST=cctest/test-wasm-shared-engine
BUG=v8:7424

Change-Id: Idad7bcfe2734df7395c62ec56fb737e180035c76
Reviewed-on: https://chromium-review.googlesource.com/1152918
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54808}
2018-07-31 10:30:20 +00:00
Michael Starzinger
30ce1ba660 [wasm] Avoid serializing {TransferrableModule} if possible.
This avoids serializing and deserializing the sharable part of a module
when it is transferred via {TransferrableModule}, which is possible when
all Isolates run off the same engine via the --wasm-shared-engine flag.

This adds a new --wasm-shared-code flag to enable this feature.

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

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I099d581d7ccc4d058a4646f545a011745fd84eb4
Reviewed-on: https://chromium-review.googlesource.com/1142144
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54806}
2018-07-31 09:17:39 +00:00
Sigurd Schneider
ec06732236 [utils] Change ReadFile interface
ReadFile returned a Vector with ownership transfer, i.e. the client
needed to call Dispose to free the memory. This CL changes the interface
to return a std::string instead, which manages ownership. As it turns
out, there is only one user of ReadString that sometimes calls an API
function which expects to take ownership of its Vector argument.

Bug: v8:7932
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie624a7a65cf5814fddce7a57bc557e4b9876bc53
Reviewed-on: https://chromium-review.googlesource.com/1155115
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54805}
2018-07-31 08:59:00 +00:00
Deepti Gandluri
6f23c89e4f Add I64Atomic binary operations for ia32
Bug:v8:6532

Change-Id: Ie983fa561654f86597b8f45c5ce11f993846bfe6
Reviewed-on: https://chromium-review.googlesource.com/1145893
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54796}
2018-07-30 22:02:49 +00:00
Vasili Skurydzin
2a624852d6 s390: Corrections to brxh / brxhg cctests in test-assembler-s390.cc
Change-Id: I991686d6890909510d2a3e7101230995ff521063
Reviewed-on: https://chromium-review.googlesource.com/1152081
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#54792}
2018-07-30 20:40:21 +00:00
Rodrigo Bruno
0640fd58dd [heap] Fix ThinString promotion counters.
From the promotion code point of view, a ThinString being forwarded to
an ExternalString is exactly the same as an actual ExternalString being
forwarded to its promoted copy. These changes provide a way to disambiguate
both scenarios since they are different for external memory accounting.

Bug: chromium:867902
Change-Id: I6fd56ee5e0f8900318466108273ab26e936eb439
Reviewed-on: https://chromium-review.googlesource.com/1152975
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54790}
2018-07-30 19:08:57 +00:00
Michael Starzinger
c47e612806 [wasm] Avoid race with native module protection scope.
R=ahaas@chromium.org
TEST=cctest/test-wasm-shared-engine

Change-Id: I1f1b643089206805bc88e8898db6bf94093291b5
Reviewed-on: https://chromium-review.googlesource.com/1154916
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54789}
2018-07-30 14:58:21 +00:00
Marja Hölttä
72ab46bd6f [in-place weak refs] Add test for WeakArrayList::RemoveOne.
BUG=v8:7308

Change-Id: Ibf87a807202d8f1e0e7c095bf6b3790b0f0954bf
Reviewed-on: https://chromium-review.googlesource.com/1154907
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54784}
2018-07-30 12:36:01 +00:00
Florian Sattler
b45fdb342a [scanner] Adding AdvanceUntil to Utf16CharacterStream
AdvanceUntil allows the Utf16CharacterStream to advance until a charater is found
that passes the check.

Bug: v8:7926
Change-Id: Iae39fb24194aa0ee2f544a55a7847956aa324b64
Reviewed-on: https://chromium-review.googlesource.com/1151303
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54783}
2018-07-30 12:13:31 +00:00
Marja Hölttä
0ad5dda14c Revert "[in-place weak refs] Use WeakArrayList in wasm"
This reverts commit 13401d2beb.

Reason for revert: gc stress breakage

Original change's description:
> [in-place weak refs] Use WeakArrayList in wasm
> 
> Now we can remove FixedArrayOfWeakCells (this was the last user).
> 
> BUG=v8:7308
> 
> Change-Id: I7b74f7833288b20d8f4d098a4afce640ea6db823
> Reviewed-on: https://chromium-review.googlesource.com/1150170
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54776}

TBR=marja@chromium.org,mlippautz@chromium.org,ahaas@chromium.org

Change-Id: I1bc1ad7e27813aeaaf191efdf74b865d676475f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7308
Reviewed-on: https://chromium-review.googlesource.com/1154787
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54778}
2018-07-30 08:02:38 +00:00
Marja Hölttä
13401d2beb [in-place weak refs] Use WeakArrayList in wasm
Now we can remove FixedArrayOfWeakCells (this was the last user).

BUG=v8:7308

Change-Id: I7b74f7833288b20d8f4d098a4afce640ea6db823
Reviewed-on: https://chromium-review.googlesource.com/1150170
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54776}
2018-07-30 07:29:27 +00:00
Simon Zünd
72d5ad3e82 [torque] Make 'test' and 'action' expression optional in for loop
This CL changes the for-loop so all parts are optional, allowing
loops like:

for (;;) {}
for (;; ++i) {}
...

R=danno@chromium.org, tebbi@chromium.org

Bug: v8:7793
Change-Id: I7bf9ef9e59d55eb9ae9f38904a1c1106ae50df5a
Reviewed-on: https://chromium-review.googlesource.com/1152727
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54752}
2018-07-27 11:19:00 +00:00
Peter Marshall
ba752ea4c5 [cpu-profiler] Use instruction start as the key for the CodeMap
Previously we used the start address of the AbstractCode object. This
doesn't make sense for off-heap builtins, where the code isn't contained
in the object itself. It also hides other potential problems - sometimes
the sample.pc is inside the AbstractCode object header - this is
never valid.

There were a few changes necessary to make this happen:
  - Change the interface of CodeMoveEvent. Now 'to' and 'from' are both
    AbstractCode objects, which is nice because many users were taking
    'to' and adding the header offset to it to try and find the
    instruction start address. This isn't valid for off-heap builtins.
  - Fix a bug in CodeMap::MoveCode where we didn't update the CodeEntry
    object to reflect the new instruction_start.
  - Rename the 'start' field in all of the CodeEventRecord sub-classes
    to make it clear that this is the address of the first instruction.
  - Fix the confusion in RecordTickSample between 'tos' and 'pc' which
    caused pc_offset to be calculated incorrectly.

Bug: v8:7983
Change-Id: I3e9dddf74e4b2e96a5f031d216ef7008d6f184d1
Reviewed-on: https://chromium-review.googlesource.com/1148457
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54749}
2018-07-27 09:53:00 +00:00
Michael Starzinger
fddcf5a675 [wasm] Temporary disable one shared-engine test case.
R=titzer@chromium.org
TEST=cctest/test-wasm-shared-engine/SharedEngineRunThreadedExecution

Change-Id: I01fbb13408020145c9d6bd6bbb66ca5136922bd2
Reviewed-on: https://chromium-review.googlesource.com/1151629
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54733}
2018-07-26 17:28:50 +00:00
Ivica Bogosavljevic
5f0c25b1c7 Update MIPS file ownership to @wavecomp.com e-mail addresses
MIPS team has moved to new @wavecomp.com e-mail addresses.
This CL is not actually changing owners, it only renames the
owners to the new email addresses.

No-Presubmit: true
Change-Id: Ic334defa06a36d974de87e99ed6c30bdf021958f
Reviewed-on: https://chromium-review.googlesource.com/1151349
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54732}
2018-07-26 16:28:10 +00:00
Stephan Herhut
ad06f37cda [wasm] Share BasicBlockProfiler instance in process
This is a first step to make basic block profiling work in wasm. More
is needed, including eventually making the profiler thread safe.

Change-Id: Ic216c881a4ab5a633e147e5538bb405c32e687cd
Reviewed-on: https://chromium-review.googlesource.com/1150234
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54728}
2018-07-26 13:54:57 +00:00
Michael Starzinger
c3473dcb10 [wasm] Add threading tests for a shared WasmEngine.
R=clemensh@chromium.org
TEST=cctest/test-wasm-shared-engine
BUG=v8:7424

Change-Id: I32510f33fb88c2f1a79864e6033d3aa53ad9fe48
Reviewed-on: https://chromium-review.googlesource.com/1150149
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54727}
2018-07-26 13:53:21 +00:00
Marja Hölttä
7995eccf74 Reland [in-place weak refs] Use WeakArrayList in Heap::noscript_list.
BUG=v8:7308
TBR=mlippautz@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ic310ebcf0af2f3985cee9872f6e57a05652c4484
Reviewed-on: https://chromium-review.googlesource.com/1151197
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54722}
2018-07-26 13:04:37 +00:00
Toon Verwaest
12a63796f7 [scanner-streams] Add relocatable character stream for on-heap utf16 streams
Change-Id: I388f6a6c937b6897efe9e88b06ba4b56670fea4f
Reviewed-on: https://chromium-review.googlesource.com/1151191
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54720}
2018-07-26 12:35:56 +00:00
Andreas Haas
a2a3817594 [wasm][multi-return][arm64] Pad parameter slots
Stack parameters on arm64 require padding. Since the stack areas for
parameters and returns should not overlap, we have to pad the parameters
already during the construction of the CallDescriptor so that we can set
the correct stack offset for returns.

R=mstarzinger@chromium.org

Bug: chromium:838098
Change-Id: I23389dc35037054b750e61ea6b1bfdfc4c5bc868
Reviewed-on: https://chromium-review.googlesource.com/1150178
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54716}
2018-07-26 11:04:04 +00:00
Rodrigo Bruno
82632ed5e4 Reland^2 "Added External Strings to external memory accounting".
This CL depends on Reland^2 "Avoiding re-externalization of strings"
(Idb1b6d1b29499f66bf8cd704977c40b027f99dbd)..

Previously landed as Ied341ec6268000343d2a577b22f2a483460b01f5 and
I3fe2b294f6e038d77787cf0870d244ba7cc20550

Previously reviewed at https://chromium-review.googlesource.com/1121736 and
https://chromium-review.googlesource.com/1118164

Bug: chromium:845409
Change-Id: Ied50bbcaa22a90ecaf15dca19dbc9aaec1737223
Reviewed-on: https://chromium-review.googlesource.com/1147227
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Cr-Commit-Position: refs/heads/master@{#54712}
2018-07-26 09:25:41 +00:00
Ross Mcilroy
727d82e923 [cleanup] Remove calls to deprecated GetFrame.
Use the isolate version instead.

BUG=v8:7754

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I5239192fe6d31e84028806127d21ac54ee0a8ef6
Reviewed-on: https://chromium-review.googlesource.com/1146181
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54702}
2018-07-25 18:02:32 +00:00