Commit Graph

48409 Commits

Author SHA1 Message Date
Aseem Garg
2338a2fd63 [wasm] Add simd mem and shift ops to interpreter
R=clemensh@chromium.org
BUG=v8:6020

Change-Id: I5d95e4c23240ae4e174d896d31e1b9b1d89d9418
Reviewed-on: https://chromium-review.googlesource.com/1096493
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53717}
2018-06-13 19:42:03 +00:00
jgruber
9b0b3ab0a8 [build] Tweak default value of v8_enable_embedded_builtins
Embedded builtins are currently unsupported in no-snapshot builds.
This lets BUILD.gn reflect that (both in the default value and an added
assertion).

Bug: v8:6666,v8:7837
Change-Id: I5c56f655733505e481017408f8a1a14d857f0b4a
Reviewed-on: https://chromium-review.googlesource.com/1096758
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53716}
2018-06-13 19:36:23 +00:00
Michael Achenbach
874d5ba132 [CQ] Remove obsolete sign-cla check
The check moved to gerrit.

NOTRY=true
TBR=sergiyb@chromium.org

Bug: chromium:851737
Change-Id: I1db1f320bb1c71c8abbce29ef545cbd70ff4d168
Reviewed-on: https://chromium-review.googlesource.com/1099382
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53715}
2018-06-13 19:28:42 +00:00
Junliang Yan
35a94c2677 PPC/s390: Remove CodeAssembler::LookupExternalReference
Port faf64532d5

Original Commit Message:

    Indirections for external references are now handled completely in
    macro assemblers, which can produce more efficient code.

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

Change-Id: Ic94019affc7418e2d69944f5d8932502f7912684
Reviewed-on: https://chromium-review.googlesource.com/1099421
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53714}
2018-06-13 18:45:42 +00:00
Sigurd Schneider
0b4552c737 [turbolizer] Display instruction ranges in turbolizer
Bug: v8:7327
Change-Id: I8cd57abf612393852532a695663175dff8e3a199
Reviewed-on: https://chromium-review.googlesource.com/1098955
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53713}
2018-06-13 18:06:32 +00:00
Sigurd Schneider
e5e15e579e [turbofan] Add instruction ranges to --trace-turbo
Bug: v8:7327
Change-Id: I6f378f0d36444e8413dfe7ad3e097091e3b86df1
Reviewed-on: https://chromium-review.googlesource.com/1098919
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53712}
2018-06-13 16:34:42 +00:00
Junliang Yan
0fe56b84d5 s390: skip slow tests on s390
Change-Id: Iefcee48e44b6eb6c00923500be03056e723d8550
Reviewed-on: https://chromium-review.googlesource.com/1095841
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53711}
2018-06-13 16:20:12 +00:00
Michael Starzinger
d3e65b5094 [wasm] Remove obsolete import wrapper validation.
The validation in {ValidateImportWrapperReferencesImmovables} is by now
subsumed by the stricter {WasmCode::Validate}, which is applied to all
WebAssembly code, not just import wrappers.

R=titzer@chromium.org

Change-Id: I8a8cf6e0f07cb289f33b641fe8f674e9698e7f44
Reviewed-on: https://chromium-review.googlesource.com/1099067
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53710}
2018-06-13 16:10:22 +00:00
Ben L. Titzer
d9d88f5dc6 [disassembler] Gracefully handle null Isolate
R=mstarzinger@chromium.org

Change-Id: Ie7ad0277378af59860dd92482f90981bbdc216c8
Reviewed-on: https://chromium-review.googlesource.com/1099056
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53709}
2018-06-13 16:04:02 +00:00
Ben L. Titzer
37bc035896 [assembler] Factor up list of heap allocation requests
Lift the declaration of the heap allocation request list and the method
which adds to the list up to AssemblerBase.

Change-Id: I099260425af8cb579144998c71c538f19ba00e65
Reviewed-on: https://chromium-review.googlesource.com/1098959
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53708}
2018-06-13 15:52:12 +00:00
Camillo Bruni
9718d079e9 [CSA] Fix Array.prototype.reduceRight CAS_ASSERT
- Add typed IsHeapNumberPositive, IsNumberNonNegativeSafeInteger, IsInteger,
  IsSafeInteger and IsHeapNumberUint32 helpers on CodeStubAssembler
- Type NumberIsInteger and NumberIsSafeInteger builtin

Bug: chromium:847204, v8:6949
Change-Id: I27d3ab79bd17312c223209ed0b221c174024126e
Reviewed-on: https://chromium-review.googlesource.com/1087961
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53707}
2018-06-13 15:38:01 +00:00
Dominik Inführ
2aa166a633 [heap] Clear ephemeron worklist when tearing down
Bug: chromium:852308, chromium:844008
Change-Id: I99551c1f75d5916edfb780998963140b8282a570
Reviewed-on: https://chromium-review.googlesource.com/1099065
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53706}
2018-06-13 15:28:21 +00:00
Kanghua Yu
418bf412fe [ia32] Bugfix for jump optimization
The jump optimization maybe run Turbofan pipeline twice for each TF/CS builtins,
and relies on the fact that the number of j/jmp instruction generated is always
the same.
The behavior of {AddMatcher::SwapInputs} should be aware the two times code
generation, and prevents the flipping of child nodes.

For example:

1: Int32Add(2, 3)   --- We shouldn't swap the input #2 and #3 in this situation
2: Int32Sub(4, 5)
3: Int32Add(6, 7)
4: ...
5: ...
6: ...
7: ...

R=danno@chromium.org

Bug: v8:7839
Change-Id: Ia97de3ab28294e595ac27b5898c099c0d782e9f9
Reviewed-on: https://chromium-review.googlesource.com/1098678
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Kanghua Yu <kanghua.yu@intel.com>
Cr-Commit-Position: refs/heads/master@{#53705}
2018-06-13 15:08:19 +00:00
Michael Starzinger
19171311ef [wasm] Remove uses of deprecated {NativeModule::module_object}.
R=clemensh@chromium.org

Change-Id: Ib85efebbfc18861709186f5257b9f85f145bb6b4
Reviewed-on: https://chromium-review.googlesource.com/1097324
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53704}
2018-06-13 14:47:39 +00:00
Daniel Clifford
2506963a4e [torque] Correctly generate one .h/.cc file pair per module
In the process and as a test case of the module/file-handling, separate
Array.p.forEach into its own Torque file.

Bug: v8:7793
Change-Id: If45103a9df3bf8fade34e7bcf7c7c9c060e25966
Reviewed-on: https://chromium-review.googlesource.com/1097755
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53703}
2018-06-13 14:28:50 +00:00
Michael Starzinger
98d7b23e59 [wasm] Use the modules runtime stub for {DoubleToI}.
This uses a WebAssembly runtime stub for the out-of-line {DoubleToI}
computation instead of a builtin specific to a certain Isolate. It is
another step towards making {WasmCode} independent of the Isolate.

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

Change-Id: Ifdaa8e2511b67468d75e0e4aaf70010ced04a11a
Reviewed-on: https://chromium-review.googlesource.com/1098672
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53702}
2018-06-13 14:15:59 +00:00
Simon Zünd
696e8ea9f1 [torque] Fix multi-line AssertStatements
R=tebbi@chromium.org

Bug: v8:7793
Change-Id: I691b3682aec3269350ee02c29b48ce1d46a1ffcb
Reviewed-on: https://chromium-review.googlesource.com/1098656
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53701}
2018-06-13 14:01:59 +00:00
Ben L. Titzer
e3d957e34b [wasm] "fix" critical memory pressure notification
Previously, we sent a critical low memory pressure notification when
attempting to commit WASM code when the code manager was near the
limit for total amount of code allocated.
https://chromium-review.googlesource.com/c/v8/v8/+/1073412 "fixed" that,
but it causes OOMs on Windows.

Since we no longer have the isolate on the code manager, and thus cannot
send this notification on commit, send the notification upon the next
module creation.

This is still not optimal, but should fix OOM issues for lots of
small modules on Windows.

BUG=v8:7845
R=mstarzinger@chromium.org
CC=clemensh@chromium.org

Change-Id: I6e20d0c1ee9bc6926a83e0c2fbdc9e9e453588ec
Reviewed-on: https://chromium-review.googlesource.com/1098921
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53700}
2018-06-13 13:52:19 +00:00
Clemens Hammacher
4d867c7af1 [wasm] Use standard way of defining builtins
No need to have a separately defined CallDescriptor.

R=titzer@chromium.org

Change-Id: Ic7c0ee87d458fa8e55bef4d750aa7f61a763237f
Reviewed-on: https://chromium-review.googlesource.com/1098927
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53699}
2018-06-13 13:12:49 +00:00
Clemens Hammacher
b9b4b8798f [wasm] Merge {WasmSharedModuleData} with {WasmModuleObject}
The {WasmSharedModuleData} struct was introduced to hold data common to
all wasm instances belonging to the same module. The idea was to keep
"internal state" separate from the JS-facing {WasmModuleObject}. Since
this objective has no real value, and we already store some internal
data on the {WasmModuleObject}, this CL merges these two objects.

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

Bug: v8:7754
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I04f6d07bf5d812bc4717af26f0f64231345861f9
Reviewed-on: https://chromium-review.googlesource.com/1097491
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53698}
2018-06-13 13:10:19 +00:00
Creddy
1fe33e266f [CSA] Typify UpdateWord, TrapAllocationMemento, PageFromAddress
and CreateAllocationSiteInFeedbackVector

Change-Id: I935083f1244e62cfe9e4049c9b725db48ce4ce8f
Reviewed-on: https://chromium-review.googlesource.com/1090830
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53697}
2018-06-13 12:06:58 +00:00
Creddy
6030d0b9ce [runtime] Create different maps for AllocationSites.
Use DEFINE_FIELD_OFFSET_CONSTANTS to describe AllocationSite fields

Change-Id: I03ae84e1f4720da9da7e2a8a784f56fe6f155e18
Reviewed-on: https://chromium-review.googlesource.com/1095308
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53696}
2018-06-13 11:51:48 +00:00
Georgia Kouveli
652a3e1337 Merge deoptimization type enums
Replace all uses of Deoptimizer::BailoutType and CodeEventListener::DeoptKind
with DeoptimizeKind from src/globals.h.

Change-Id: I5b9002583a69bc43d995cacc7619b018e5a70727
Reviewed-on: https://chromium-review.googlesource.com/1097331
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53695}
2018-06-13 11:32:58 +00:00
Dominik Inführ
249d0ea4df [heap] Parallel marking for ephemerons
After marking ephemerons process the worklist in parallel.

Bug: chromium:844008
Change-Id: Id750c19d0f564675f051cc4f9933d41fa0afb42b
Reviewed-on: https://chromium-review.googlesource.com/1097490
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53694}
2018-06-13 11:04:18 +00:00
Igor Sheludko
7745c73a82 [csa][builtin] Port ArrayConstructor builtin to CSA.
Bug: v8:5269, v8:7703
Change-Id: If80923b767b6bf3533b4d53039b1b5125c670cf1
Reviewed-on: https://chromium-review.googlesource.com/1097486
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53693}
2018-06-13 10:33:58 +00:00
Clemens Hammacher
0909dbe3d6 Introduce StdoutStream which prints to Android log or stdout
The often used construct {OFStream(stdout)} does not work on Android.
This CL introduces an {StdoutStream} which behaves exactly like
{OFStream(stdout)} on non-android platforms, and redirects to the
Android log on appropriate systems and configurations.

R=mstarzinger@chromium.org

Bug: v8:7820
Change-Id: Ia682fdf6d064e37c605c19b032f5a10b96ac825b
Reviewed-on: https://chromium-review.googlesource.com/1088911
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53692}
2018-06-13 09:57:29 +00:00
Dominik Inführ
d47a6fe05c [heap] GCTracer for visiting/marking ephemerons
Bug: chromium:844008
Change-Id: Ic736bb91c13da5d52baa53cd3630978b9819f66b
Reviewed-on: https://chromium-review.googlesource.com/1097488
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#53691}
2018-06-13 09:50:24 +00:00
Dominik Inführ
0d66b129ca [heap] EphemeronHashTable in Incremental Marking
Mark values if their corresponding key was already marked. Also
take into account the size for backing store.

Bug: chromium:844008
Change-Id: I58570f935c69fb39b686fd22dc93caba309f83b2
Reviewed-on: https://chromium-review.googlesource.com/1097400
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#53690}
2018-06-13 09:49:18 +00:00
Hannes Payer
3f84955bc6 [heap] Add accounting for committed memory of the Unmapper.
Change-Id: I26c2ba8d22aecac0e1d6a406eb90521ff52e1ec4
Reviewed-on: https://chromium-review.googlesource.com/1097119
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53689}
2018-06-13 09:19:18 +00:00
Igor Sheludko
7ebbda48bb [csa][builtins] Port ArrayNArgumentsConstructor builtin to CSA.
Bug: v8:5269, v8:7703
Change-Id: Ib9934e1c3685f731ba588f12e253fce24c03b151
Reviewed-on: https://chromium-review.googlesource.com/1097485
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53688}
2018-06-13 09:07:18 +00:00
Clemens Hammacher
e0dc3d2962 [wasm] Reject an exception in the start function on the promise
We assumed that if the ErrorThrower is empty after instantiation, then
instantiation succeeded and an instance exists which we can return.
However, if the start function throws, no instance exists, which caused
a crash. With this CL we handle execeptions thrown by the start
function correctly.


R=clemensh@chromium.org

Bug: chromium:848966
Change-Id: I51dc94e6bc563aa4a4b88c44a14e831af913fbd8
Reviewed-on: https://chromium-review.googlesource.com/1092234
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53687}
2018-06-13 09:01:48 +00:00
Clemens Hammacher
fcfc85195e [wasm] Define serialization API in terms of NativeModule
For serialization, we do not need the {WasmCompiledModule}. All we need
is the {NativeModule}.

R=mstarzinger@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Iff7dc9cde3b1ab777028dbafcc1c870e45e28a93
Reviewed-on: https://chromium-review.googlesource.com/1097480
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53686}
2018-06-13 08:44:48 +00:00
Michael Starzinger
59c396a678 [wasm] Simplify call to {AllocateHeapNumber} builtin.
R=clemensh@chromium.org

Change-Id: Iddce87713b09450bf069a12f0aa7aa55c7f131e1
Reviewed-on: https://chromium-review.googlesource.com/1097120
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53685}
2018-06-13 08:10:28 +00:00
v8-ci-autoroll-builder
78c2e1a57b Update V8 DEPS.
Rolling v8/build: 41d1fdd..169887d

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/09b82f4..fdacd16

Rolling v8/third_party/depot_tools: 8e6f58c..e09b684

Rolling v8/third_party/fuchsia-sdk: 5131d44..8c08316

Rolling v8/third_party/googletest/src: 145d057..9077ec7

Rolling v8/tools/clang: 7e986fd..37fc68b

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

Change-Id: I97b4f431dcbf67ace6dc2f1c32bafaa6b886c487
Reviewed-on: https://chromium-review.googlesource.com/1098522
Reviewed-by: <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#53684}
2018-06-13 03:53:58 +00:00
Ben Smith
7ce76fbc34 [wasm] Enable mutable-global by default
Mutable globals are now included in the wasm v1 spec.

Bug: v8:7625
Change-Id: Ib9b92d8348102f99a3b92820d0057b2c11a1e49a
Reviewed-on: https://chromium-review.googlesource.com/1095650
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53683}
2018-06-12 23:08:48 +00:00
Joyee Cheung
f892a76f4c Reland "[builtins] set DataView.length to 1"
This is a reland of a229e12101

The original commit broke a layout test in Blink. The test in Blink
has been marked to be skipped and will be updated once this patch
lands.

See https://chromium-review.googlesource.com/c/chromium/src/+/1097455

Original change's description:
> [builtins] set DataView.length to 1
>
> Refs: https://github.com/tc39/ecma262/pull/1131
> Test: test262/built-ins/DataView/length
> Bug: v8:7816
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: I66a06734bd32cd2043a8d04728b2185f6093bd69
> Reviewed-on: https://chromium-review.googlesource.com/1094980
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53649}

Bug: v8:7816
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If63be80523a68d3a2b515fe1d55a243d2dd2a9b2
Reviewed-on: https://chromium-review.googlesource.com/1097568
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53682}
2018-06-12 21:54:47 +00:00
Ben Smith
da03262e4c [wasm] Fix for exporting imported mutable globals
Mutable globals are stored in the instance differently, so they must be
exported differently as well.

Also fix a counting bug that occurred when a module contained a global
and an imported mutable global (CalculateGlobalOffsets is called
twice).

Bug: v8:7625
Change-Id: I1cd7ef5d6ff7cb7e09239035f89d7b36d0436063
Reviewed-on: https://chromium-review.googlesource.com/1096673
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53681}
2018-06-12 21:26:27 +00:00
Junliang Yan
918aca7fcc PPC/s390: [masm] Shortcut some indirect external reference loads
Port 13fc4a1b3d

Original Commit Message:

    External references located within the isolate can be loaded as a
    fixed offset from the root register. This avoids one load from memory
    over the default indirect method (which reads from the external
    reference table).

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

Change-Id: I4a02973a0279517ab5247f4f9519b0e26168c444
Reviewed-on: https://chromium-review.googlesource.com/1097628
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53680}
2018-06-12 21:09:02 +00:00
Igor Sheludko
bcf8151385 [csa] Typify [Tail]CallRuntime and [Tail]CallStub.
This CL also introduces TailCallRuntime() with explicit arity
parameter.

Bug: v8:6949
Change-Id: I20266a0d3779e0336d5e9f83d3919ffc91fe0f47
Reviewed-on: https://chromium-review.googlesource.com/1097081
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53679}
2018-06-12 18:13:42 +00:00
Clemens Hammacher
10f590c8d8 [wasm] Skip tests which currently fail on stress variant
TBR=titzer@chromium.org

Bug: v8:7845
Change-Id: I9670e629ffbb430addb579d55a3e07ed3c9ccbda
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1097483
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53678}
2018-06-12 17:36:56 +00:00
Clemens Hammacher
68bec6c3f7 [wasm] Fix serialization of lazily compiled modules
R=mstarzinger@chromium.org

Change-Id: If72df4425633cac8e98f0dd6adb80512e226f251
Reviewed-on: https://chromium-review.googlesource.com/1097323
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53677}
2018-06-12 17:07:36 +00:00
Ben L. Titzer
d775c9561f [wasm] Remove the isolate_ field from WasmCodeManager
The isolate is mainly used for accounting purposes. As such, it
doesn't need a field in the WasmCodeManager, and cannot have one
if it is to be made isolate independent. Instead, pass the isolate
explicitly in the appropriate cases.

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

Change-Id: I539c2b33692e57605a280530bd704ef25269ad0f
Reviewed-on: https://chromium-review.googlesource.com/1073412
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53676}
2018-06-12 16:46:06 +00:00
Ben L. Titzer
26d0d95eb8 [wasm] Add size estimates for managed objects
This CL estimates the sizes of the important managed objects in WASM:
the decoded module {WasmModule}, the native module that contains code
{NativeModule}, and the natively-allocated indirect and import tables
{WasmInstanceNativeAllocations}.

Since Managed<T> updates the isolate's external allocated memory,
it is no longer necessary to do so upon committing or releasing a
native module's memory.

R=mstarzinger@chromium.org
CC=ulan@chromium.org

Bug: v8:7424
Change-Id: Iff4e07d0d328383a925febd654ccbfc95f0930e9
Reviewed-on: https://chromium-review.googlesource.com/1079067
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53675}
2018-06-12 16:38:36 +00:00
Clemens Hammacher
dffc2a5a68 [wasm] Fix and verify size of serialized modules
R=mstarzinger@chromium.org

Change-Id: I5b062da2b4717f7247ea61d1118f0466c7b0474c
Reviewed-on: https://chromium-review.googlesource.com/1097322
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53674}
2018-06-12 16:24:36 +00:00
Anna Henningsen
4da05e97ad [SAB] Fix flake in Atomics.wait
As specified in https://tc39.github.io/ecma262/#sec-atomics-wait, the
critical section must occur before the load and comparison.

This slightly changes the `AtomicsWaitCallback` API, but in a
direction that arguably makes it more consistent.

As a drive-by fix, reset `node->waiting_` in case there
was an exception from the first callback.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/1095814
Bug: v8:7836
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I577cdf76cedfe39bc61f783203b543c7c68fc238
Reviewed-on: https://chromium-review.googlesource.com/1096236
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53673}
2018-06-12 15:46:37 +00:00
Sigurd Schneider
a062708467 [turbofan] Change handling of empty basic blocks
This CL inserts NOP instructions a little bit earlier into empty
blocks; this ensures that instructions keep their initial position.

Bug: v8:7327
Change-Id: Idee5269f4fd7fc15c44bda83a2be74e8cff62df8
Reviewed-on: https://chromium-review.googlesource.com/1097078
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53672}
2018-06-12 15:10:26 +00:00
Igor Sheludko
fb450de770 [builtins] Cleanup Array[No,Single,N]ArgumentsConstructorDescriptor.
This is a necessary cleanup before porting Array[No,Single,N]ArgumentsConstructor
builtins to CSA.

Bug: v8:5269, v8:7703
Change-Id: I40a2dd83faab1f8c3c180d461ef62fa4d8578f5e
Reviewed-on: https://chromium-review.googlesource.com/1097079
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53671}
2018-06-12 15:09:16 +00:00
Igor Sheludko
af52611784 Introduce --print-builtin-code-filter for filtering of --print-builtin-code output.
Bug: v8:7754
Change-Id: I11845f84c5e837d3d7323c4a932c36af08b61a8e
Reviewed-on: https://chromium-review.googlesource.com/1096940
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53670}
2018-06-12 14:42:16 +00:00
Michael Achenbach
9dd58b05e1 Revert "[builtins] set DataView.length to 1"
This reverts commit a229e12101.

Reason for revert: Breaks a layout test:
https://ci.chromium.org/buildbot/client.v8.fyi/V8-Blink%20Linux%2064/24021
fast/js/constructor-length.html

See also:
https://github.com/v8/v8/wiki/Blink-layout-tests

Original change's description:
> [builtins] set DataView.length to 1
> 
> Refs: https://github.com/tc39/ecma262/pull/1131
> Test: test262/built-ins/DataView/length
> Bug: v8:7816
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: I66a06734bd32cd2043a8d04728b2185f6093bd69
> Reviewed-on: https://chromium-review.googlesource.com/1094980
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53649}

TBR=gsathya@chromium.org,joyee@igalia.com

Change-Id: Iaa602a40bd09dec6884f5f56b1f010b59c19b32a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7816
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1097275
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53669}
2018-06-12 14:01:47 +00:00
jgruber
686c7769ef Skip further serializer tests for crbug/v8/7718
These tests are also affected by duplicate builtin copies (on- and
off-heap).

TBR=yangguo@chromium.org

Bug: v8:6666, v8:7718
Change-Id: I8adfe8b8b63fb5f539cdff5e709e9358a47dfc7e
Reviewed-on: https://chromium-review.googlesource.com/1097088
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53668}
2018-06-12 13:30:37 +00:00