Commit Graph

46686 Commits

Author SHA1 Message Date
Eric Holk
c660791186 [wasm] do not reuse externalized backing stores when growing
Bug: chromium:813876
Change-Id: Ib85d4759c4e1d1c6771edb26e56202dc559854ce
Reviewed-on: https://chromium-review.googlesource.com/974706
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52194}
2018-03-23 19:23:11 +00:00
Michael Achenbach
d1e029795c Revert "[runtime] introduced instrance type for each context type"
This reverts commit 6da438fda1.

Reason for revert:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/18287

Original change's description:
> [runtime] introduced instrance type for each context type
> 
> Each context type get own instance type:
> - we can make CSA checks more strict in couple places,
> - it is requires step for advanced evaluation without side effects.
> 
> R=​yangguo@chromium.org
> 
> Bug: v8:7588
> Change-Id: I585e8b55a280a909fc3c6069ed30e34b7040d0c7
> Reviewed-on: https://chromium-review.googlesource.com/977041
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52191}

TBR=yangguo@chromium.org,mstarzinger@chromium.org,kozyatinskiy@chromium.org

Change-Id: I17a24b5b99552941d7a8ec54ebf6d11d6d1a66d8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7588
Reviewed-on: https://chromium-review.googlesource.com/977974
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52193}
2018-03-23 19:17:21 +00:00
Michael Achenbach
c2837f5be7 Revert "[heap] Ensure that OOM callback is called before OOM."
This reverts commit ed3636e21b.

Reason for revert: Seems to lead to several timeouts in debug mode:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/19780

And on windows.

Original change's description:
> [heap] Ensure that OOM callback is called before OOM.
> 
> This patch also fixes MaxReserved() to accound for page headers and
> adds two tests for heap size and memory allocator size near OOM.
> 
> Bug: chromium:824214
> Change-Id: I5bbe00a9d6a5798cdf4481861a10dca842244a63
> Reviewed-on: https://chromium-review.googlesource.com/973614
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52184}

TBR=ulan@chromium.org,hpayer@chromium.org

Change-Id: I1a98c070cee4039a1ef7851fcabd32d56d0629fe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:824214
Reviewed-on: https://chromium-review.googlesource.com/977973
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52192}
2018-03-23 19:16:14 +00:00
Alexey Kozyatinskiy
6da438fda1 [runtime] introduced instrance type for each context type
Each context type get own instance type:
- we can make CSA checks more strict in couple places,
- it is requires step for advanced evaluation without side effects.

R=yangguo@chromium.org

Bug: v8:7588
Change-Id: I585e8b55a280a909fc3c6069ed30e34b7040d0c7
Reviewed-on: https://chromium-review.googlesource.com/977041
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52191}
2018-03-23 17:33:21 +00:00
Andreas Haas
dba6f74b2d [wasm] Remove dead code
Background task restarting happens now in the CompilationState and not
in the AsyncCompileJob. The code in the AsyncCompileJob is dead, so I
remove it.

R=titzer@chromium.org

Change-Id: Ife52522a00ec43aa0f9ad50f8e0114c1e4da5db7
Reviewed-on: https://chromium-review.googlesource.com/978322
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52190}
2018-03-23 16:45:32 +00:00
sreten.kovacevic
650cc48159 [Liftoff][mips] Implement eqz operations
Optimize initial implementation of i32_eqz and implement i64_eqz.

Bug: v8:6600
Change-Id: I695454a160fc57dc9981725583ed2f27c2c537db
Reviewed-on: https://chromium-review.googlesource.com/978207
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52189}
2018-03-23 16:34:11 +00:00
Daniel Clifford
c69b03baec Fix support for Builtin names for --gdbjit-full
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ib76185e7b6bc893460b97b43cc385412485da20c
Reviewed-on: https://chromium-review.googlesource.com/956464
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52188}
2018-03-23 16:26:01 +00:00
Igor Sheludko
78c6bbd930 [ic] Use Map as transition handlers instead of StoreHandler objects.
This eases transition handlers caching and avoids memory overhead of
respective StoreHandler objects. In addition, it allows to use such
transition handlers on runtime side to make Object.assign implementation
a bit faster.

Bug: v8:5988
Change-Id: Iba660a11d4b300cd5f80615fb7e2608e53da8fee
Reviewed-on: https://chromium-review.googlesource.com/931701
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52187}
2018-03-23 15:37:40 +00:00
Ulan Degenbaev
69040ced45 [api] Disable in_process_stack_dumping in DefaultPlatform by default.
This flips the default value of in_process_stack_dumping from enabled
to disabled. For many embedders the V8 signal handler produces worse
stack trace than the defaul signal handler.

Change-Id: Idb5ec30dc4b3cefe243be7304d10a02f1dcda167
Reviewed-on: https://chromium-review.googlesource.com/977903
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52186}
2018-03-23 15:26:30 +00:00
Peter Marshall
d663614591 [runtime] Don't set ConstructedNonConstructable as a construct_stub
Part of ongoing work to remove the construct_stub.

For non-constructable functions, don't use the non-constructable stub,
instead handle non-constructables explicitly in ConstructFunction.

Bug: v8:7503
Change-Id: I24aa7c2d5e934d5e80cd96afaf005342773d57af
Reviewed-on: https://chromium-review.googlesource.com/975961
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52185}
2018-03-23 15:02:40 +00:00
Ulan Degenbaev
ed3636e21b [heap] Ensure that OOM callback is called before OOM.
This patch also fixes MaxReserved() to accound for page headers and
adds two tests for heap size and memory allocator size near OOM.

Bug: chromium:824214
Change-Id: I5bbe00a9d6a5798cdf4481861a10dca842244a63
Reviewed-on: https://chromium-review.googlesource.com/973614
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52184}
2018-03-23 14:47:50 +00:00
Sigurd Schneider
b6ddadd042 [turbofan] Rename StringFromCodePoint to StringFromSingleCodePoint
Also add a new fast-path for String.fromCodePoint.

R=neis@chromium.org

Bug: v8:7570, v8:7340
Change-Id: I6cd6e6fc98943588ecd646f24fcda043d4033ab0
Reviewed-on: https://chromium-review.googlesource.com/978244
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52183}
2018-03-23 14:28:38 +00:00
Sigurd Schneider
3f7b6a0f7e [turbofan] Rename StringFromCharCode to StringFromSingleCharCode
This CL also cleans up some related naming in typed-optimization.

R=neis@chromium.org

Bug: v8:7531, v8:7570
Change-Id: If80e0e9642aaf6c58b164db2e1e0632cd5b0d051
Reviewed-on: https://chromium-review.googlesource.com/978066
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52182}
2018-03-23 13:56:58 +00:00
Dan Elphick
5667173aff [builtins] Remove invalid assert
Removing the iterator from an array does not stop it being a fast array
(at least as far as BranchIfJSFastArray is concerned). The rest of the
code is not affected by whether the assert is false so this only
affected debug builds.

Change-Id: Iff78b8b21f3cc76a43d4251b4ba6ab078467db61
Reviewed-on: https://chromium-review.googlesource.com/976122
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52181}
2018-03-23 13:31:49 +00:00
Mike Stanton
6251593674 [bugfix] MkSnapshot Windows build errors should redirect to stdout
This is something we already do for d8, and in general, any process
we run as part of the build.

Bug: chromium:819237
Change-Id: I8b90505a5c447c0a0311e45c4056cd2b84da4284
Reviewed-on: https://chromium-review.googlesource.com/968244
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52180}
2018-03-23 13:28:48 +00:00
Benedikt Meurer
ee98ee583f [builtins] Limit slow Promise.all tests to x64.
Bug: v8:7253
Change-Id: I1724fdac3668bcc05ff581113ac843ab5ef1def2
Reviewed-on: https://chromium-review.googlesource.com/977971
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52179}
2018-03-23 13:15:38 +00:00
Michael Starzinger
e5e19bf764 [wasm] Move source position tables off-heap.
This moves source position tables associated with WasmCode objects to be
located outside the garbage-collected heap. There now is a clear link to
the source position table from code, making the one-to-one relationship
and its lifetime explicit.

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

Change-Id: I9d0b332732508c302ba525059ef02559f45aa2f6
Reviewed-on: https://chromium-review.googlesource.com/975565
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52178}
2018-03-23 12:33:53 +00:00
Dan Elphick
32d0e02639 [heap] Move RO_SPACE to beginning of AllocationSpace
Moves RO_SPACE to the front of the AllocationSpace enum, so the space
pre-allocation iterations don't miss it. Being at the start of the enum
means that it continues to not be iterated over by any sweeper code,
which iterates from FIRST_GROWABLE_PAGED_SPACE to
LAST_GROWABLE_PAGED_SPACE (renamed from FIRST_PAGED_SPACE and
LAST_PAGED_SPACE).

Bug: v8:7464
Change-Id: I480ba784afbd878552d1cb7f9f5fa57c3b55e004
Reviewed-on: https://chromium-review.googlesource.com/973604
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52177}
2018-03-23 12:32:48 +00:00
Andreas Haas
68b4026c20 [wasm][anyref] Implement decoding of new instructions
R=titzer@chromium.org

Bug: v8:7581
Change-Id: I66bf50bc1243cb5e4b9f2693febf91f74077a2f4
Reviewed-on: https://chromium-review.googlesource.com/978002
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52176}
2018-03-23 12:21:58 +00:00
Michael Achenbach
52ee1aab52 [CQ] Let CQ block on jumbo trybot
NOTRY=true
TBR=sergiyb@chromium.org

Bug: v8:7339
Change-Id: I803bd6e8cff252698db079dd2f2952ad9d01f19f
Reviewed-on: https://chromium-review.googlesource.com/978123
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52175}
2018-03-23 11:54:52 +00:00
Ivo Markovic
5dca2bd7ee Force proper code aligment in wasm serializer.
Change-Id: Iace7040f7327cbc76e75a0cd7229221c93a9456e
Reviewed-on: https://chromium-review.googlesource.com/975547
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52174}
2018-03-23 10:59:12 +00:00
Georg Neis
32ea56621f [ic] Improve COW array support in KeyedStoreIC transition handler.
See the referenced issue for details.

Bug: v8:7559
Change-Id: I16b5d22b484407d277fa55868429f5f11078b56d
Reviewed-on: https://chromium-review.googlesource.com/970361
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52173}
2018-03-23 10:37:32 +00:00
Michael Achenbach
c8e9cd655c [build] Fix typo in MB config
NOTRY=true
TBR=sergiyb@chromium.org

Bug: v8:7339
Change-Id: Iae0323d8f52fbd2db79c7362d074d758a7e1fa35
Reviewed-on: https://chromium-review.googlesource.com/977721
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@{#52172}
2018-03-23 08:40:57 +00:00
Sergiy Byelozyorov
6f1a7870b1 Whitespace CL
TBR=sergiyb@chromium.org

No-Try: true
No-Presubmit: true
Change-Id: Icc71c1da5f0dfd6a041046e8a50ef29e270b2443
Reviewed-on: https://chromium-review.googlesource.com/977662
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52171}
2018-03-23 08:38:08 +00:00
Victor Costan
539e907258 Roll googletest to 1.8.0+.
This is the V8 equivalent to https://crrev.com/2779193002 and must be landed
before //build/secondary/{gtest,gmock} are removed from Chromium. This started
out as https://crrev.com/2847693002

The changes in tools/ were authored by yangguo@chromium.org and
initially shared in http://crrev.com/2849783003.

GoogleTest (gtest) and GoogleMock (gmock) are now hosted into the same
googletest repository. In order to cope with this, the googletest
repository is now sourced at third_party/googletest.

The file/directory layout of Google Test is not yet considered stable.
To minimize disruption while Google Test stabilizes, Chromium code will
be insulated from third_party/googletest.

* testing/gtest/include/gtest/ and testing/gmock/include/gmock have
  been populated with headers that forward into the appropriate
  locations of third_party/googletest

* testing/BUILD.gn has been populated with the targets
  //testing/gtest(:gtest_main) and //testing/gmock(:gmock_main),
  which depend on the appropriate //third_party/googletest targets.

All Chromium code should keep depending on the targets and
headers in testing/{gtest,gmock} for now.

BUG=chromium:630705

Change-Id: I12b07ae78c8039aeff6ada7a3335e4e2b5d308ab
Reviewed-on: https://chromium-review.googlesource.com/639953
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52170}
2018-03-23 07:54:27 +00:00
Michael Lippautz
447d384802 [global-handles] Improve documentation on assertion
First pass callbacks are required to reset the handle before entering
the second callback.

Make this a CHECK and properly document what is required to fix when
hitting this assertion.

Change-Id: I13c6b0342fca16544cec01620ac74a87c290b87d
Reviewed-on: https://chromium-review.googlesource.com/975609
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52169}
2018-03-23 07:46:46 +00:00
Kim-Anh Tran
efca73ea1a [wasm] Extract a CloneCodeHelper class for cloning and patching code
The refactoring extracts code responsible for cloning and patching
code when creating a NativeModule clone. This extraction makes it easier
to reuse the code.

Change-Id: Id4543ee07ed85c1b44472723b0bce983a97da03e
Reviewed-on: https://chromium-review.googlesource.com/975302
Commit-Queue: Kim-Anh Tran <kimanh@google.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52168}
2018-03-23 06:48:56 +00:00
v8-autoroll
4a0c50b0a4 Update V8 DEPS.
Rolling v8/build: 30bf2a3..d873086

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

Change-Id: I52816e40275461b012d218ae024261158db07dcb
Reviewed-on: https://chromium-review.googlesource.com/977262
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52167}
2018-03-23 03:59:44 +00:00
Kanghua Yu
342b5b7e60 [wasm][ia32] Add S8x16Shuffle
Change-Id: I9a78e0a8f673f311414f72055958c52d3c2cb0cd
Reviewed-on: https://chromium-review.googlesource.com/908256
Commit-Queue: Kanghua Yu <kanghua.yu@intel.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52166}
2018-03-23 02:20:03 +00:00
Junliang Yan
a29de090c9 PPC/s390: Reland^2: Remove SFI code field
Port 51ded9d3c0

Original Commit Message:

    This is a reland of d8f564eac6

    Original change's description:
    > Reland: Remove SFI code field
    >
    > Remove the SharedFunctionInfo code field, inferring the code object
    > from the function_data field instead. In some cases, the function_data
    > field can now hold a Code object (e.g. some WASM cases).
    >
    > (Reland of https://chromium-review.googlesource.com/952452)
    >
    > TBR=mstarzinger@chromium.org
    >
    > Bug: chromium:783853
    > Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    > Change-Id: I10ea5be7ceed1b51362a2fad9be7397624d69343
    > Reviewed-on: https://chromium-review.googlesource.com/970649
    > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    > Reviewed-by: Yang Guo <yangguo@chromium.org>
    > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#52136}

R=leszeks@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I86c5a46a866830a2150ff9366be12a09f111240f
Reviewed-on: https://chromium-review.googlesource.com/976624
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#52165}
2018-03-22 22:38:27 +00:00
Junliang Yan
e46772eaa4 s390: [heap] Pass isolate to the OOM handler and add an OOM test.
Port 28190980c1

Original Commit Message:

    This patch also moves Shell::Exit to base::OS::ExitProcess.

R=ulan@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I0a7dc051ed5a21ad9641d1d05182ea4240bc666a
Reviewed-on: https://chromium-review.googlesource.com/976332
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#52164}
2018-03-22 19:45:22 +00:00
Eric Holk
d31dff841e [wasm] always allocate memory when guard regions are needed
When using trap handlers, memory references do not get any checks inserted. This
means there is no check for a null memory as happens when the memory size is
0. Normally this would be correctly caught as an out of bounds access, since the
low memory addresses are not normally mapped. However, if they were mapped for
some reason, we would not catch the out of bounds access.

The fix is to ensure WebAssembly instances always have a guard region even if
the memory is size 0.

This is a rewrite of 5e76ff5a4a

Note that this can lead to a large amount of unnecessary address space usage,
so we share a single reservation for empty array buffers.

Bug: chromium:769637

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ia8e84be6d595e347d3d342959f2c374db1a3f683
Reviewed-on: https://chromium-review.googlesource.com/702657
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52163}
2018-03-22 19:44:17 +00:00
Clemens Hammacher
2589ea08e3 [Liftoff] Fix conditional spilling
On float comparisons, we need a scratch byte register for the setcc
instruction, and if none is available, we spill. But this spilling code
is skipped if one of the operands is NaN. The cache state is updated
however, so following code assumes that the spill happened.
This CL fixes this by spilling before checking for NaN, such that the
spilling code is always executed.

R=titzer@chromium.org

Bug: v8:7582, v8:6600
Change-Id: I768d8de14e494d3ebea181c1f9f3129a4b005396
Reviewed-on: https://chromium-review.googlesource.com/973961
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52162}
2018-03-22 18:45:17 +00:00
Victor Costan
f6bf3ce92e Add testing/{gtest,gmock}/dummy to facilitate rolling googletest.
googletest's directory structure has completely changed, and trybots
have trouble with the roll CL https://crrev.com/c/639953 because of
https://crbug.com/823586.

This CL works aroud the bug above, using the same method as
https://pdfium-review.googlesource.com/c/pdfium/+/29011 which helped
land https://pdfium-review.googlesource.com/c/pdfium/+/28791.

Bug: chromium:823586
Change-Id: Iffce1277c6b73b5cea96465a6035380cba0d103c
Reviewed-on: https://chromium-review.googlesource.com/974917
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52161}
2018-03-22 18:23:01 +00:00
Michael Achenbach
85432a2381 Revert "Reland "[d8][wasm] Test wasm compilation completion""
This reverts commit 4d1c2907d3.

Reason for revert: Still often hangs:
https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/23898

Original change's description:
> Reland "[d8][wasm] Test wasm compilation completion"
> 
> This is a reland of ed2605f040
> 
> Original change's description:
> > [d8][wasm] Test wasm compilation completion
> > 
> > d8 was recently changed to keep running until wasm compilation has
> > completed. This adds a message test to test that.
> > 
> > R=ahaas@chromium.org
> > 
> > Change-Id: I73af53b6df4ee5f9a6afd26cf2d71a269140465f
> > Reviewed-on: https://chromium-review.googlesource.com/966184
> > Reviewed-by: Andreas Haas <ahaas@chromium.org>
> > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#52008}
> 
> Change-Id: Iadbd5056dfa58da454956c4e89369af8b0455b35
> Reviewed-on: https://chromium-review.googlesource.com/975242
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52154}

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

Change-Id: I4c2f3f69d6a2e749ce7c5379a3949d098c5946c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/975835
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52160}
2018-03-22 17:43:29 +00:00
Leszek Swirski
51ded9d3c0 Reland^2: Remove SFI code field
This is a reland of d8f564eac6

TBR=mstarzinger@chromium.org,yangguo@chromium.org,jgruber@chromium.org

Original change's description:
> Reland: Remove SFI code field
>
> Remove the SharedFunctionInfo code field, inferring the code object
> from the function_data field instead. In some cases, the function_data
> field can now hold a Code object (e.g. some WASM cases).
>
> (Reland of https://chromium-review.googlesource.com/952452)
>
> TBR=mstarzinger@chromium.org
>
> Bug: chromium:783853
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
> Change-Id: I10ea5be7ceed1b51362a2fad9be7397624d69343
> Reviewed-on: https://chromium-review.googlesource.com/970649
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52136}

Bug: chromium:783853
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I5187851b923e9a92f43daf8cb99e662786cbb839
Reviewed-on: https://chromium-review.googlesource.com/975942
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52159}
2018-03-22 17:06:06 +00:00
Sergiy Byelozyorov
111048619d Whitespace CL
TBR=sergiyb@chromium.org

Change-Id: I5def23b438ab6b90c5386ad60b061e1f248d5ee1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/975644
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52158}
2018-03-22 17:02:47 +00:00
Ulan Degenbaev
f738d6fe3c [heap] Restore TSAN exception for page flags (the second try).
This is a follow-up for 8ed81dd.

The TSAN exception has to be in MarkObject because that is called from
two places in concurrent marking.

Bug: v8:7574
Change-Id: If36b564bce0970c9b44c029055114bb6e2a74059
Reviewed-on: https://chromium-review.googlesource.com/973526
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52157}
2018-03-22 16:28:37 +00:00
Sergiy Byelozyorov
f69fb20e96 Whitespace CL
TBR=sergiyb@chromium.org

Bug: chromium:819555
Change-Id: Iad5526b1423f8bdab9c0734ffc2f378d892b5b9d
Reviewed-on: https://chromium-review.googlesource.com/973379
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52156}
2018-03-22 16:14:57 +00:00
Eric Holk
7df495bb5e [heap] track byte_length in ArrayBufferTracker
This changes ArrayBufferTracker to count array buffer byte length instead of
allocation length. Byte length better approximates actual memory pressure
because it refers to how many bytes are actually committed, whereas for
allocation length, these bytes may be reserved but not committed.

Note that we still need to be careful about address space exhaustion. Most
address space is used by WebAssembly's guard regions. These are now managed by
WasmMemoryTracker to ensure we do not consume too much address space.

As a side effect, this CL fixes v8:7576 because byte_length() does not need to
access the is_wasm_memory field whereas allocation_length() does.

Bug: v8:7576
Change-Id: Ib974e86ec61e170930c835f0f0ad03e89dc02854
Reviewed-on: https://chromium-review.googlesource.com/973884
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52155}
2018-03-22 16:12:56 +00:00
Clemens Hammacher
4d1c2907d3 Reland "[d8][wasm] Test wasm compilation completion"
This is a reland of ed2605f040

Original change's description:
> [d8][wasm] Test wasm compilation completion
> 
> d8 was recently changed to keep running until wasm compilation has
> completed. This adds a message test to test that.
> 
> R=ahaas@chromium.org
> 
> Change-Id: I73af53b6df4ee5f9a6afd26cf2d71a269140465f
> Reviewed-on: https://chromium-review.googlesource.com/966184
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52008}

Change-Id: Iadbd5056dfa58da454956c4e89369af8b0455b35
Reviewed-on: https://chromium-review.googlesource.com/975242
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52154}
2018-03-22 15:54:06 +00:00
Sigurd Schneider
543c007ea6 [turbofan] Optimize string comparisons more
Bug: v8:7531, chromium:822170
Change-Id: Ida5b0714a584df3d830f95088db51c1841b63cc2
Reviewed-on: https://chromium-review.googlesource.com/966062
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52153}
2018-03-22 15:05:46 +00:00
Peter Marshall
b8695906f2 [asm] Don't read the construct_stub field in PushArgsThenConstruct
For mode = kArrayFunction, we know that we need to call the array
constructor stub, so we don't need to read it out from the construct_stub
field. We also don't need to set it in the construct_stub field anymore,
so just use the builtins constructor stub like other builtins.

Also cleans up PushArgsThenCall by adding a dcheck that we are never in
mode = kArrayFunction, so we don't even try to generate code for this
case, but fail earlier instead.

We don't need to load the array function in ArrayConstructor because this
is set up for us by the builtins construct stub. We do have to check if
new_target is actually set before overwriting it with target, as we are
handling both call and construct cases in ArrayConstructor now.

Bug: v8:7503
Change-Id: I3622bf6127eebed8b55c9c199fa938a8e03b8baa
Reviewed-on: https://chromium-review.googlesource.com/973364
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52152}
2018-03-22 14:53:05 +00:00
Yang Guo
839f55f50b [inspector] expose breakpoints for builtins and API functions.
R=jgruber@chromium.org, kozyatinskiy@chromium.org

Bug: v8:178
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Idee461c6ff6c8a14b01229ea6448e437f3db6dab
Reviewed-on: https://chromium-review.googlesource.com/973202
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52151}
2018-03-22 14:48:35 +00:00
Ulan Degenbaev
28190980c1 [heap] Pass isolate to the OOM handler and add an OOM test.
This patch also moves Shell::Exit to base::OS::ExitProcess.

Bug: chromium:824214
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I6565eebe9332557bbfb8e67c88890b7099b1db98
Reviewed-on: https://chromium-review.googlesource.com/975403
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52150}
2018-03-22 14:44:50 +00:00
sreten.kovacevic
609d471940 [Liftoff][mips] Implement i64 shiftops
Implement i64 shl, shr and sar instructions in Liftoff for MIPS.

Bug: v8:6600
Change-Id: I195804509242657929ec8c4f0bd6470bbd26f010
Reviewed-on: https://chromium-review.googlesource.com/975131
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52149}
2018-03-22 14:43:46 +00:00
Michael Achenbach
9debc06fbd Revert "[runtime] Decrease StringTable shrink limit"
This reverts commit 868ed8eecc.

Reason for revert:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/19753

Original change's description:
> [runtime] Decrease StringTable shrink limit
> 
> Given that we have not seen any regressions yet we're trying a more aggressive
> limit.
> 
> Bug: chromium:818642, v8:5443
> Change-Id: Ic45001ed6c042fc31cbba0d417d5060d2de8fb3a
> Reviewed-on: https://chromium-review.googlesource.com/975126
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52145}

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

Change-Id: Ic1f3ab2aa7683e5fc9118f196e5a31eb55a9a5a0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:818642, v8:5443
Reviewed-on: https://chromium-review.googlesource.com/975741
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52148}
2018-03-22 14:41:18 +00:00
Leszek Swirski
52e939e9ee [turbofan] Fix accumulator liveness on suspends
SuspendGenerator needs the accumulator to be live so that it can return
it.

Bug: chromium:806723
Change-Id: Iaa88fce96c36876e3e4256324ca650d475480c10
Reviewed-on: https://chromium-review.googlesource.com/975404
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52147}
2018-03-22 13:46:04 +00:00
Stephan Herhut
34022a65b6 [wasm] Log wasm codes on module creation.
Delaying the logging until after module creating ensures that the
module has been fully parsed and hence that all names are available.

Also refactors the code to bring all code logging/disassembling into
one place.

Change-Id: I8219d70876d2ccd3a5ffb8250b46fdf60a46fe6c
Reviewed-on: https://chromium-review.googlesource.com/973443
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52146}
2018-03-22 13:17:39 +00:00
Camillo Bruni
868ed8eecc [runtime] Decrease StringTable shrink limit
Given that we have not seen any regressions yet we're trying a more aggressive
limit.

Bug: chromium:818642, v8:5443
Change-Id: Ic45001ed6c042fc31cbba0d417d5060d2de8fb3a
Reviewed-on: https://chromium-review.googlesource.com/975126
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52145}
2018-03-22 13:03:42 +00:00