Commit Graph

9808 Commits

Author SHA1 Message Date
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
Ross McIlroy
69b8273bb5 Revert "[in-place weak refs] Use WeakArrayList in Heap::noscript_list."
This reverts commit 6755b95631.

Reason for revert: Causing test failures on gc-stress bot:

https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8940015537308234128/+/steps/Mjsunit_-_slow_path/0/logs/array-multiple-receiv../0

Original change's description:
> [in-place weak refs] Use WeakArrayList in Heap::noscript_list.
> 
> BUG=v8:7308
> 
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
> Change-Id: Ia53233a3a0ba13b8019f2fda4bc4876ebf4feb76
> Reviewed-on: https://chromium-review.googlesource.com/1149367
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54700}

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

Change-Id: I5e9b916a910b812c3cb50be18416c9e9e8ac7b24
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7308
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1150125
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54701}
2018-07-25 18:01:29 +00:00
Marja Hölttä
6755b95631 [in-place weak refs] Use WeakArrayList in Heap::noscript_list.
BUG=v8:7308

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ia53233a3a0ba13b8019f2fda4bc4876ebf4feb76
Reviewed-on: https://chromium-review.googlesource.com/1149367
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54700}
2018-07-25 15:43:07 +00:00
Marja Hölttä
cd5fbf635c Reland: [iwyu] Remove sfi-inl.h -> wasm include
This significantly reduces the build time when modifying wasm
files: before touching all wasm headers required 684 steps to
rebuild, now it's 216.

BUG=v8:7754,v8:7490
TBR=clemensh@chromium.org, ulan@chromium.org, tebbi@chromium.org, verwaest@chromium.org, jgruber@chromium.org

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I9003b5b73ac568a29688c5f97ec718c9de8aaaef
Reviewed-on: https://chromium-review.googlesource.com/1150163
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54699}
2018-07-25 14:54:37 +00:00
Leszek Swirski
d850f7ea68 Revert "[iwyu] Remove sfi-inl.h -> wasm include"
This reverts commit 9d18a7fd55.

Reason for revert: Breaks build https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20noi18n%20-%20debug/21856

Original change's description:
> [iwyu] Remove sfi-inl.h -> wasm include
> 
> This significantly reduces the build time when modifying wasm
> files: before touching all wasm headers required 684 steps to
> rebuild, now it's 216.
> 
> BUG=v8:7754,v8:7490
> 
> Change-Id: Id7ff6f9063168556daad4840ee614cf68144cdb2
> Reviewed-on: https://chromium-review.googlesource.com/1145264
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54681}

TBR=ulan@chromium.org,marja@chromium.org,titzer@chromium.org,jgruber@chromium.org,clemensh@chromium.org,tebbi@chromium.org,bmeurer@chromium.org,verwaest@chromium.org

Change-Id: I3b4087916f65b16db75974dba58914c8ea377a08
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7754, v8:7490
Reviewed-on: https://chromium-review.googlesource.com/1149920
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54683}
2018-07-25 09:23:26 +00:00
Marja Hölttä
9d18a7fd55 [iwyu] Remove sfi-inl.h -> wasm include
This significantly reduces the build time when modifying wasm
files: before touching all wasm headers required 684 steps to
rebuild, now it's 216.

BUG=v8:7754,v8:7490

Change-Id: Id7ff6f9063168556daad4840ee614cf68144cdb2
Reviewed-on: https://chromium-review.googlesource.com/1145264
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54681}
2018-07-25 09:07:14 +00:00
Sathya Gunasekaran
0af7b0d6ea [Intl] Clean up error handling
- Return empty handles instead of exceptions.
- Handlify functions instead of returning raw pointers.

Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I28b018e5bdcaa375748eb04e9a6fed8cf64a5b05
Reviewed-on: https://chromium-review.googlesource.com/1148301
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54675}
2018-07-25 07:45:04 +00:00
Sigurd Schneider
021d814021 [cleanup] Remove uses of deprecated StackTrace::GetFrame
Change-Id: I75877bbdefab35c54b6293835e26222b78c69684
Reviewed-on: https://chromium-review.googlesource.com/1148447
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54674}
2018-07-25 06:36:25 +00:00
Ross Mcilroy
38fbddbf39 [cleanup] Disable deprecation warnings on calls to Mark/IsIndependent.
Mark/IsIndependent is marked V8_DEPRECATE_SOON, but is still needed in some
places. In order to allow us to warn on V8_DEPRECATE_SOON within V8, explicity
disable deprecation warnings on these calls temporarily.

BUG=v8:7754

Change-Id: I0a7f3aedc04412c120217ba83d2cf91aafff568d
Reviewed-on: https://chromium-review.googlesource.com/1147751
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54670}
2018-07-24 23:27:43 +00:00
Bill Budge
381fc4fe78 [arm] Eliminate old form of core-scalar vmov instructions.
- Eliminates less general forms of vmov between core and scalar
  FP registers.

Bug: v8:7754
Change-Id: I3224c57e03dfd64ea6552b215017dacc357dda26
Reviewed-on: https://chromium-review.googlesource.com/1144126
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54663}
2018-07-24 17:39:24 +00:00
Ross Mcilroy
02c47fb8b0 [cleanup] Replace calls to deprecated String::Concat and ToInt32 from tests.
BUG=v8:7754

Change-Id: Id04fddb65c7943e9cb394c700eda45c6c6f7ebfd
Reviewed-on: https://chromium-review.googlesource.com/1147746
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54660}
2018-07-24 17:30:14 +00:00
Clemens Hammacher
d324382e1c Reland "[turboassembler] Introduce hard-abort mode"
This is a reland of a462a7854a

Original change's description:
> [turboassembler] Introduce hard-abort mode
> 
> For checks and assertions (mostly for debug code, like stack alignment
> or zero extension), we had two modes: Emit a call to the {Abort}
> runtime function (the default), and emit a debug break (used for
> testing, enabled via --trap-on-abort).
> In wasm, where we cannot just call a runtime function because code must
> be isolate independent, we always used the trap-on-abort behaviour.
> This causes problems for our fuzzers, which do not catch SIGTRAP, and
> hence do not detect debug code failures.
> 
> This CL introduces a third mode ("hard abort"), which calls a C
> function via {ExternalReference}. The C function still outputs the
> abort reason, but does not print the stack trace. It then aborts via
> "OS::Abort", just like the runtime function.
> This will allow fuzzers to detect the crash and even find a nice error
> message.
> 
> Even though this looks like a lot of code churn, it is actually not.
> Most added lines are new tests, and other changes are minimal.
> 
> R=mstarzinger@chromium.org
> 
> Bug: chromium:863799
> Change-Id: I77c58ff72db552d49014614436259ccfb49ba87b
> Reviewed-on: https://chromium-review.googlesource.com/1142163
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54592}

Bug: chromium:863799
Change-Id: I7729a47b4823a982a8e201df36520aa2b6ef5326
Reviewed-on: https://chromium-review.googlesource.com/1146100
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54656}
2018-07-24 15:58:46 +00:00
Dominik Inführ
956ac1bd15 [heap-profiler] Names for JSGeneratorObject-fields
Add names for fields in JSGeneratorObjects in Heap Snapshot
Generator.

Bug: chromium:854097
Change-Id: I075acf0821c9d002535b4fdc4ce4ddbb2fc9627c
Reviewed-on: https://chromium-review.googlesource.com/1148387
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54652}
2018-07-24 14:49:03 +00:00
Sigurd Schneider
743de156fb [test-api] Remove deprecated uses of String::Concat
Change-Id: I090258338b1ac5e50bfd8c2195fb740ffa1386c2
Reviewed-on: https://chromium-review.googlesource.com/1148398
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54651}
2018-07-24 14:44:58 +00:00
Dan Elphick
e0670b22fe [ReadOnlyRoots] Fix detection of initially RO mutable roots
TestHeapRootsNotReadOnly was mistakenly checking for exceptions to the
rule by comparing the value of the root rather than the address. Since
several roots point to UndefinedValue, this meant that only one of the
matching roots had to be in the list.

This fixes it by instead getting a Handle from Factory and using the
address() method to check whether the roots match the exception list.

Also adds detached_contexts, feedback_vectors_for_profiling_tools,
microtask_queue, serialized_global_proxy_sizes and serialized_objects to
the exception list now that the test is working properly.

Change-Id: I599d584f94797a256d1c8c24c0fa2848ca1ca1df
Reviewed-on: https://chromium-review.googlesource.com/1148331
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54647}
2018-07-24 13:56:47 +00:00
Michael Starzinger
131fb7248a [wasm] Remove Isolate from module decoder entry points.
R=ahaas@chromium.org

Change-Id: I7c6fd17f36d33451ce7605e74002515295c7ad1c
Reviewed-on: https://chromium-review.googlesource.com/1145195
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54629}
2018-07-24 08:59:32 +00:00
Deepti Gandluri
f25848800f [ia32] Add cmpxchg8b instruction
Bug: v8:6532
Change-Id: I0871aaafff2385758449ddde923178d1c9e1ff8a
Reviewed-on: https://chromium-review.googlesource.com/1146998
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54620}
2018-07-23 19:21:40 +00:00
Georg Neis
8994347c35 [turbofan] Prepare broker for serialization.
We'll soon start collecting data from the JS heap prior to the typed
lowering pass, and then refrain from reading the heap in that pass.
This CL prepares the broker machinery by introducing a hash table that
maps an object (handle) to the corresponding cached data. For the time
being, that cached data is essentially just the handle itself.

Bug: v8:7790
Change-Id: I830e9c72faafb7ae1d10e8a111636b3a3762bbc6
Reviewed-on: https://chromium-review.googlesource.com/1143405
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54618}
2018-07-23 17:20:49 +00:00
Stephan Herhut
6d25cab2c8 [cleanup] Split off api-inl.h from api.h to make latter self contained
api.h had an implicit dependency on objects-inl.h.

Bug: v8:7490
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I56ef7abefed7205bdbff2aa5f451f1a843bef9f9
Reviewed-on: https://chromium-review.googlesource.com/1145191
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54616}
2018-07-23 16:03:49 +00:00
Sigurd Schneider
a2d61597ca Reland "[turbofan] Inline Number constructor in certain cases"
This is a reland of 9eca23e9ed

Adds a deopt continuation, which fixes JavaScript stack traces
to contain the number constructor after inlining.

Original change's description:
> [turbofan] Inline Number constructor in certain cases
>
> This CL adds inlining for the Number constructor if new.target is not
> present. The lowering is BigInt compatible, i.e. it converts BigInts to
> numbers.
>
> Bug: v8:7904
> Change-Id: If03b9f872d82e50b6ded7709069181c33dc44e82
> Reviewed-on: https://chromium-review.googlesource.com/1118557
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54454}

Bug: v8:7904
Change-Id: Ic416e5ba81fa3a0f59ae4afa80df83c46a759487
Reviewed-on: https://chromium-review.googlesource.com/1146581
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54609}
2018-07-23 13:17:19 +00:00
Ross Mcilroy
7e5905fd9c [cleanup] Replace deprecated calls to PrimitiveArray.Get/Set.
Replace with isolate versions

BUG=v8:7754

Change-Id: I69cf1e0d4cba6d68a3983c0dba346bfc1bfc9619
Reviewed-on: https://chromium-review.googlesource.com/1146182
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54607}
2018-07-23 09:45:19 +00:00
Ross Mcilroy
64e3912f10 [cleanup] Remove deprecated calls to Write[OneByte/Utf8].
Replace with isolate version.

BUG=v8:7754

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iac7091b983960d22b892074c5fd0a97dee9025c9
Reviewed-on: https://chromium-review.googlesource.com/1146332
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54604}
2018-07-23 09:01:08 +00:00
Sigurd Schneider
039c18e19a Speculatively revert "[turboassembler] Introduce hard-abort mode"
This reverts commit a462a7854a.

Reason for revert: Breaks a TurboAssembler test:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Arm/7726

Original change's description:
> [turboassembler] Introduce hard-abort mode
> 
> For checks and assertions (mostly for debug code, like stack alignment
> or zero extension), we had two modes: Emit a call to the {Abort}
> runtime function (the default), and emit a debug break (used for
> testing, enabled via --trap-on-abort).
> In wasm, where we cannot just call a runtime function because code must
> be isolate independent, we always used the trap-on-abort behaviour.
> This causes problems for our fuzzers, which do not catch SIGTRAP, and
> hence do not detect debug code failures.
> 
> This CL introduces a third mode ("hard abort"), which calls a C
> function via {ExternalReference}. The C function still outputs the
> abort reason, but does not print the stack trace. It then aborts via
> "OS::Abort", just like the runtime function.
> This will allow fuzzers to detect the crash and even find a nice error
> message.
> 
> Even though this looks like a lot of code churn, it is actually not.
> Most added lines are new tests, and other changes are minimal.
> 
> R=​mstarzinger@chromium.org
> 
> Bug: chromium:863799
> Change-Id: I77c58ff72db552d49014614436259ccfb49ba87b
> Reviewed-on: https://chromium-review.googlesource.com/1142163
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54592}

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

Change-Id: I60c011cfe262ccebbb9abf32699a9fe17e72a3c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:863799
Reviewed-on: https://chromium-review.googlesource.com/1145431
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54597}
2018-07-20 17:28:49 +00:00
Clemens Hammacher
a462a7854a [turboassembler] Introduce hard-abort mode
For checks and assertions (mostly for debug code, like stack alignment
or zero extension), we had two modes: Emit a call to the {Abort}
runtime function (the default), and emit a debug break (used for
testing, enabled via --trap-on-abort).
In wasm, where we cannot just call a runtime function because code must
be isolate independent, we always used the trap-on-abort behaviour.
This causes problems for our fuzzers, which do not catch SIGTRAP, and
hence do not detect debug code failures.

This CL introduces a third mode ("hard abort"), which calls a C
function via {ExternalReference}. The C function still outputs the
abort reason, but does not print the stack trace. It then aborts via
"OS::Abort", just like the runtime function.
This will allow fuzzers to detect the crash and even find a nice error
message.

Even though this looks like a lot of code churn, it is actually not.
Most added lines are new tests, and other changes are minimal.

R=mstarzinger@chromium.org

Bug: chromium:863799
Change-Id: I77c58ff72db552d49014614436259ccfb49ba87b
Reviewed-on: https://chromium-review.googlesource.com/1142163
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54592}
2018-07-20 14:44:29 +00:00
Marja Hölttä
ff5cafd031 [iwyu] api.h iwyu
This reduces the build steps from touching api.h: 269 -> 156

BUG=v8:7754,v8:7490

Change-Id: I75abaeea4cc78027a47304ff9b9f6b12bdb2b75e
Reviewed-on: https://chromium-review.googlesource.com/1144929
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54583}
2018-07-20 11:49:02 +00:00
Michael Starzinger
2471103bbf [wasm] Move {lower_simd} flag into {ModuleEnv} structure.
R=titzer@chromium.org
BUG=v8:7754

Change-Id: Icf17677a3ca3c9be153b68a9a6f939259e7b7b5f
Reviewed-on: https://chromium-review.googlesource.com/1143263
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54582}
2018-07-20 11:47:47 +00:00
Deepti Gandluri
84efdf0249 [wasm] Fix AtomicStores to not clobber the output register
Currently AtomicStores use AtomicExchange to store to memory, but
AtomicExchange produces an output that is ignored by the AtomicStore
visitor, a side effect of this is that a register already in use gets
overwritten by the output of the exchange.

BUG:v8:7602

Change-Id: I4ec3107a0a27503611e349e6f56ca9492d05d9f8
Reviewed-on: https://chromium-review.googlesource.com/1134576
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54565}
2018-07-19 22:16:06 +00:00
Junliang Yan
00b00201f0 [hashtable] Fix SmallOrderedHashTableAllocate test
CHECK is accessing 1 byte across object boundary because
*expect and *actual will return the object address with
tag. And memcmp should return 0 if we expect (expected == actual)

R=cbruni@chromium.org, gsathya@chromium.org, ishell@chromium.org

Bug: v8:6443, v8:7569
Change-Id: I316e450a80400cea4c9394dbe470932a1f30cea5
Reviewed-on: https://chromium-review.googlesource.com/1142351
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#54561}
2018-07-19 16:36:24 +00:00
Michael Starzinger
d67e25e5e6 [wasm] Construct {WasmCompilationUnit} without Isolate.
R=clemensh@chromium.org

Change-Id: Ib4f84d9b0bb2c54d5e1743c34b4034b14cb1152a
Reviewed-on: https://chromium-review.googlesource.com/1143188
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54560}
2018-07-19 15:26:09 +00:00