Commit Graph

40698 Commits

Author SHA1 Message Date
Alexey Kozyatinskiy
f6bc208864 [debugger] removed BreakPositionAlignment.STATEMENT_ALIGNED
Inspector uses only BREAK_POSITION_ALIGNED, no tests pass STATEMENT_ALIGNED. It's exposed only with debugger API but I'm pretty sure that nobody actually uses it and as far as mirrors API is deprecated - it's time to remove it.

R=jgruber@chromium.org

Bug: none
Change-Id: I28d62e145811d3eb6f4d64007c47c51b2ecbaf0f
Reviewed-on: https://chromium-review.googlesource.com/536934
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46056}
2017-06-20 15:01:47 +00:00
Dusan Simicic
932fd3ba90 MIPS: Fix CallSize call from MacroAssembler
Remove ast_id parameter from CallSize() which is not removed in

https: //codereview.chromium.org/2944013002
Bug: 
Change-Id: I40c9460bf105c9a91f614a9ab2360eee70ab9b78
Reviewed-on: https://chromium-review.googlesource.com/541437
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#46055}
2017-06-20 14:40:47 +00:00
Ulan Degenbaev
502ce7e234 [heap] Fix markbit data races with concurrent marker.
BUG=chromium:694255

Change-Id: I65b4ecc7630ece32e351c1c6acea3960f7b6778b
Reviewed-on: https://chromium-review.googlesource.com/541380
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46054}
2017-06-20 14:32:04 +00:00
Dusan Simicic
b772ef4b57 MIPS[64]: Implement Shuffle SIMD operations
Add support for S32x4Shuffle, S16x8Shuffle, S8x16Shuffle for mips and
mips64 architectures.

Bug: 
Change-Id: I2c062525ed94edfcb38a53f4bbef02131e313ba3
Reviewed-on: https://chromium-review.googlesource.com/531007
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46053}
2017-06-20 14:29:15 +00:00
Michael Lippautz
87d9f75716 [heap] MinorMC: Avoid unecessarily updating allocation sites
AllocationSite objects survive if a page moves within new space. The
intended behavior was to update the count only when they are visited by
the Scavenger the first time, as they would die afterwards.

This fixes that case where we would move a page within new space where
most objects survive. We would unnecessarily update the AllocationSite
in this case.

Bug: chromium:651354
Change-Id: Ife4dd3e7f60320e0050e7c83dfc5457f66e2287c
Reviewed-on: https://chromium-review.googlesource.com/541302
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46052}
2017-06-20 14:26:54 +00:00
Michael Starzinger
21cbc91443 [asm.js] Ensure coercion of imports is non-observable.
This makes sure that the coercion of global import values to numbers
remains non-observable to JavaScript. It allows instantiation failures
to fall back to JavaScript proper without accidentally causing some
side-effect to happen twice. Also coercions might invalidate previous
checks done during linking or throw exceptions.

R=clemensh@chromium.org
TEST=mjsunit/regress/regress-6431
BUG=v8:6431

Change-Id: Ibe2f7a336bc0fb25532d526746ecc802e04bbd5c
Reviewed-on: https://chromium-review.googlesource.com/512544
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46051}
2017-06-20 13:55:35 +00:00
Clemens Hammacher
6269b2be1e [wasm] Avoid constructing overflowing WireBytesRefs
The constructor of WireBytesRef checks that offset+length is still in
the uint32_t range. This CL avoids triggering this check on illegally
size strings.

R=ahaas@chromium.org
BUG=chromium:734246

Change-Id: Iab5c7013aa3e0ac5060bc4733e712a1652679b1a
Reviewed-on: https://chromium-review.googlesource.com/539402
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46050}
2017-06-20 13:48:44 +00:00
Loo Rong Jie
0e4046ac0d Remove ~MaybeHandle and statically assert that handles are trivially copyable
https://codereview.chromium.org/2632713003 with workaround for old GCC.

Drive-by: fix unused variable in src/wasm/wasm-js.cc

Bug:chromium:457078

Change-Id: I6c1b65076bae783c31869552bc87d05c28550e26
Reviewed-on: https://chromium-review.googlesource.com/538463
Commit-Queue: Loo Rong Jie <loorongjie@gmail.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46049}
2017-06-20 13:37:22 +00:00
Camillo Bruni
f38f9dcd7e [cleanup] Use AllocationSite::ShouldTrack instead of GetMode
Change-Id: Ie91d29f2e2ec7dc6dc4f824212c17d70a57d8b08
Reviewed-on: https://chromium-review.googlesource.com/541316
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46048}
2017-06-20 13:32:52 +00:00
mvstanton
b2b38f00c0 Remove enum RelocInfo::CODE_TARGET_WITH_ID.
RelocInfo no longer needs CODE_TARGET_WITH_ID thanks to the removal
of Crankshaft.

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

Review-Url: https://codereview.chromium.org/2951473002
Cr-Commit-Position: refs/heads/master@{#46047}
2017-06-20 13:30:17 +00:00
bakkot
b102540e44 [parser] Forbid \08 in strict strings and in untagged templates
This was never legal; the spec only allows '\0' in strict-mode strings or templates
when not followed by a decimal digit. Previously we were only enforcing that it
not be followed by an _octal_ digit.

This was already fixed for numeric literals, but not for escape sequences in strings.

BUG=v8:6504

Review-Url: https://codereview.chromium.org/2950633002
Cr-Commit-Position: refs/heads/master@{#46046}
2017-06-20 13:28:17 +00:00
Michaël Zasso
c0f1ff2451 Fix GCC 7 build errors
BUG=chromium:691681
R=franzih@chromium.org

Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9
Reviewed-on: https://chromium-review.googlesource.com/530227
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46045}
2017-06-20 13:18:51 +00:00
Clemens Hammacher
e9d728d020 [compiler] Allow for interfaces without context
Especially in wasm, many builtins don't actually need a context
parameter. We currently pass Smi::kZero instead. This CL allows to
generate a CallDescriptor for calling stubs without passing a context,
resulting in reduced compile time and code size, and increased
performance when executing these builtins.

We were calling the ThrowWasm* functions without passing a context
anyway (directly from code-generator-<arch>.h). With this change, we
will also call the StackCheck builtin without passing a (null) context.
This saves two bytes of code in each function plus each loop, and also
slightly reduces compile time (very noisy, but statistically
significant).

Drive-by: Use NoContextConstant instead of SmiConstant(Smi::kZero).

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

Change-Id: If794cc4c262a9cca8d29a68010803c01a2eef4a3
Reviewed-on: https://chromium-review.googlesource.com/541423
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46044}
2017-06-20 12:58:57 +00:00
Toon Verwaest
839cbfc75e [runtime] Inline Dictionary::AddEntry into Dictionary::Add
Bug: 
Change-Id: I491709b44337e6329c9e1d1f273cb596d25b13a8
Reviewed-on: https://chromium-review.googlesource.com/541216
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46043}
2017-06-20 12:51:38 +00:00
Michael Lippautz
7b7af4111e [heap] Refactor TypedSlotSet atomics
A follow up will allow inserting slots during GC without emiting fences

Bug: chromium:651354
Change-Id: Ia1d0f88e3658bca31933bdb013db15a5c2ecd849
Reviewed-on: https://chromium-review.googlesource.com/541400
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46042}
2017-06-20 12:44:18 +00:00
bmeurer
767ce78871 [turbofan] Introduce new JSCallWithArrayLike operator.
Add a new JSCallWithArrayLike operator that is backed by the
CallWithArrayLike builtin, and use that operator for both
Function.prototype.apply and Reflect.apply inlining. Also unify
the handling of JSCallWithArrayLike and JSCallWithSpread in
the JSCallReducer to reduce the copy&paste overhead.

Drive-by-fix: Add a lot of test coverage for Reflect.apply and
Function.prototype.apply in optimized code, especially for some
corner cases, which was missing so far.

BUG=v8:4587,v8:5269
R=petermarshall@chromium.org

Review-Url: https://codereview.chromium.org/2950773002
Cr-Commit-Position: refs/heads/master@{#46041}
2017-06-20 12:36:43 +00:00
Toon Verwaest
d00b37fb19 [runtime] Use Dictionary::Add in Dictionary::AtPut
Bug: 
Change-Id: Ib0090647de77510ce5f3bda67e45c7d7474ac779
Reviewed-on: https://chromium-review.googlesource.com/541337
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46040}
2017-06-20 12:17:48 +00:00
Ross McIlroy
b38795f372 [Interpreter] Increase allowed expression depth for logical test expressions
Changes the handling of TestResultScopes to allow them to be reused by
logical tests by rewiring instead of using a new TestResultScope. 
Also does the following:
 - moves some fields about in TestResultScope to reduce it's size
 - moves RegisterListFreeEvent to the end of ReleaseRegisters to enable
   it to be tail-called.

This increases the allowed depth of logical expressions which the
compiler can handle without overflowing the stack by about 2x on x64.

BUG=chromium:731861

Change-Id: I7733797bec5e52d07eec6332c07e2a886f2bbde1
Reviewed-on: https://chromium-review.googlesource.com/539521
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46039}
2017-06-20 11:46:52 +00:00
Peter Marshall
a971a64d1c [runtime] Port SpreadCall code to CSA.
We can remove a lot of native code and rely on CallOrConstructVarargs
to do the stack manipulation for us.

This will also take advantage of the fast-path for double arrays in
CallOrConstructDoubleVarargs.

We can also remove Runtime_SpreadIterableFixed because it isn't used
anymore. We just call directly into spread_iterable from CSA.

Bug: v8:6488, chromium:704966
Change-Id: I81a18281f062619851134fff7ce88471566ee3b5
Reviewed-on: https://chromium-review.googlesource.com/535615
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46038}
2017-06-20 11:44:02 +00:00
Daniel Ehrenberg
2854ea7b77 [builtins] Make Date toString functions conform to new spec
Previously, Date.toString() and friends were completely
implementation-defined. However, they actually seemed to match
each other's behavior with the exception of how years less than
1000 are formatted. The rough consensus among browsers seemed
to be %04d, so this was standardized at TC39 [1]. V8 previously
used %4d (it was the only one to do so); this patch adopts
the new standard.

[1] 5d4acf3377

Bug: v8:6076
Change-Id: I8c795a4e1b71187ad7c24a1aee8d7d66719a2586
Reviewed-on: https://chromium-review.googlesource.com/536733
Commit-Queue: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46037}
2017-06-20 11:30:02 +00:00
Clemens Hammacher
f244f0c5ef Implement managed objects with phantom handles
For each Managed<T> (which is a Foreign), we create a weak global handle
with a finalizer which deletes the referenced C++ object once the
Foreign is dead.
Before calling this finalizer, the garbage collector needs to mark the
referenced object black (i.e. live), because the finalizer might
resurrect it.
Since this is never done for managed objects, we can use the more
lightweight phantom handle semantics, which allows the referenced
object to be garbage collected right away.

However, we can't access the global handle via the WeakCallbackInfo,
because the global handle will already be garbage collected. So we need
to store it explicitly. This is solved by storing the global handle
together with the finalizer.
In order to implement this, ownership of the ManagedObjectFinalizer
is moved from the isolate to the managed object.

R=ulan@chromium.org, mtrofin@chromium.org
BUG=v8:6505, chromium:734345

Change-Id: I94a245df601f70e19355d82439d30099e159231b
Reviewed-on: https://chromium-review.googlesource.com/539578
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46036}
2017-06-20 10:58:45 +00:00
Alexey Kozyatinskiy
fade4a46ae [inspector] added simple js-perf-test for inspector
This test checks how much time we spent for generating Debugger.paused notification.

R=machenbach@chromium.org

Bug: chromium:688036
Change-Id: Ie8a52aafe6c8d93401b0b2a90a202ddff7de78ef
Reviewed-on: https://chromium-review.googlesource.com/538584
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46035}
2017-06-20 10:32:05 +00:00
Sathya Gunasekaran
4cf144dc2e [Collections] Implement SmallOrderedHashMap
Bug: v8:6443
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I20b1006a5c5ff24a730f15286cf0f340ba047b78
Reviewed-on: https://chromium-review.googlesource.com/526001
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46034}
2017-06-20 10:25:15 +00:00
Camillo Bruni
7dcd046699 [literals] Perform a deep boilerplate copy for MutableHeapNumber fields
Bug: chromium:734162, chromium:734051, v8:6211
Change-Id: I5c3e7578e9278b8f19ff16ad4d963f490dcc6c8c
Reviewed-on: https://chromium-review.googlesource.com/541415
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46033}
2017-06-20 10:24:00 +00:00
Michael Lippautz
c0c7b0c36e [heap] Fix benign race in DCHECKs for mark bits
During minor MC new space evacuation we could have two adjacent LABs
sharing a mark bit cell. The DCHECK when observing and changing markbits
of the target needs to reflect that.

Bug: chromium:651354
Change-Id: I737d0f9e3d37dfb1cda3f126d37ed5e7123bedc9
Reviewed-on: https://chromium-review.googlesource.com/541296
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46032}
2017-06-20 10:18:28 +00:00
Michael Lippautz
cd2cc62e8c [heap] Avoid fences during pointer updating
With the exception for map space we can avoid atomic access at all since
pages are locked.

Map space is different since it contains old to new poitners to
LayoutDescriptors that are concurrently used by other tasks for
iterating objects.

Bug: chromium:651354
Change-Id: If7ed99d21676bad8d2944132fb9696ff4123624d
Reviewed-on: https://chromium-review.googlesource.com/539642
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46031}
2017-06-20 10:11:49 +00:00
georgia.kouveli
dc2f3c1def [arm64] Make ArgumentsAdaptorTrampoline maintain 16-byte stack alignment.
This is to help the transition to using CSP as the stack pointer.
It does not make JSSP aligned yet, just makes sure that we only modify
JSSP by a multiple of 16 bytes. To do this, we might need to add a padding
slot above the receiver.

BUG=

Review-Url: https://codereview.chromium.org/2938603002
Cr-Commit-Position: refs/heads/master@{#46030}
2017-06-20 09:51:11 +00:00
Mircea Trofin
7009015181 [wasm] Throttle the amount of unfinished work to avoid OOM (non-blocking)
It is possible that the foreground task is unable to clear the
scheduled unfinished work, eventually leading to an OOM.

We use either code_range on 64 bit, or the capacity of the code space,
as a heuristic for how much memory to use for compilation.

The change avoids blocking the background threads while we're over
the memory threshold. This is to avoid starving the GC.

Bug: v8:6492, chromium:732010
Change-Id: Ic2647d9fa71af4f8cdd2149a434b107cbed3a6c3
Reviewed-on: https://chromium-review.googlesource.com/540763
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46029}
2017-06-20 09:48:05 +00:00
Ross McIlroy
05ffcdc909 [Infra] Add android.arm options to v8gen.py
Change-Id: Icac68bc8fe1ae3b8f70003e001b45b3f22dac511
Reviewed-on: https://chromium-review.googlesource.com/541338
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46028}
2017-06-20 09:41:55 +00:00
Loo Rong Jie
a36d1252f3 Fix python syntax in tools/presubmit.py
Python List Comprehension does not need join() (alias of os.path.join).

Change-Id: I9d5a8610d88c35fd4e3cb101bc10b25c3d1dd7cf
Reviewed-on: https://chromium-review.googlesource.com/538453
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Loo Rong Jie <loorongjie@gmail.com>
Cr-Commit-Position: refs/heads/master@{#46027}
2017-06-20 09:36:24 +00:00
Igor Sheludko
328afeebda [parser] Improve propagation of SharedFunctionInfo::has_shared_name().
The initial implementation did not work in certain cases.
For example, in the following case 'f' didn't have a shared name while
it should have had an empty shared name:
  var f = (function() { return function() { return 42; } }();

The new implementation ensures that all anonymous functions have empty
shared name and if any of them happen to be an object literal property
value or an accessor function or a concise method then such a function
is marked as having no shared name.

Bug: v8:6459
Change-Id: I0f936afce0c152d91b2b41c1dc475a5ed841eca0
Reviewed-on: https://chromium-review.googlesource.com/538666
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46026}
2017-06-20 09:27:49 +00:00
Michael Lippautz
0a67fdf63a [heap] Avoid concurrent accessors when releasing slot sets
Those sets are to be released on the main thread without concurrent
accesses. Making this explicit will give TSAN a chance to help us once
the surrounding code changes.

Bug: 
Change-Id: Ia73754caafbeec385d4c922fb8140e3e64f7378c
Reviewed-on: https://chromium-review.googlesource.com/541375
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46025}
2017-06-20 09:24:49 +00:00
mvstanton
a42473abb7 Remove TypeFeedbackId parameters from assembler and full-code.
These are no longer being used.

BUG=v8:6408

Review-Url: https://codereview.chromium.org/2944013002
Cr-Commit-Position: refs/heads/master@{#46024}
2017-06-20 08:02:49 +00:00
Mircea Trofin
3a0704f7cd Revert "Revert "Revert "[wasm] Throttle the amount of unfinished work to avoid OOM"""
This reverts commit 1835b4b177.

Reason for revert: This has a perf regression, wasn't ready just yet.

Original change's description:
> Revert "Revert "[wasm] Throttle the amount of unfinished work to avoid OOM""
> 
> This reverts commit 4ee4918195.
> 
> Reason for revert: Fix: in d8, blocking all the bg threads starves the GC.
> 
> Original change's description:
> > Revert "[wasm] Throttle the amount of unfinished work to avoid OOM"
> > 
> > This reverts commit 1280954d3a.
> > 
> > Reason for revert: Speculative, GC stress bots started taking much longer after this change.
> > 
> > Original change's description:
> > > [wasm] Throttle the amount of unfinished work to avoid OOM
> > > 
> > > It is possible that the foreground task is unable to clear the
> > > scheduled unfinished work, eventually leading to an OOM.
> > > 
> > > We use either code_range on 64 bit, or the capacity of the code space,
> > > as a heuristic for how much memory to use for compilation.
> > > 
> > > Bug: v8:6492, chromium:732010
> > > Change-Id: I1e4c0825351a42fa0b8369ccc41800ac3445563d
> > > Reviewed-on: https://chromium-review.googlesource.com/535017
> > > Commit-Queue: Brad Nelson <bradnelson@chromium.org>
> > > Reviewed-by: Brad Nelson <bradnelson@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#46017}
> > 
> > TBR=bradnelson@chromium.org,mtrofin@chromium.org,ahaas@chromium.org
> > 
> > Change-Id: I8883cee7f77667530bc50f91bfb468c485e6f7f2
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: v8:6492, chromium:732010
> > Reviewed-on: https://chromium-review.googlesource.com/540270
> > Reviewed-by: Bill Budge <bbudge@chromium.org>
> > Commit-Queue: Bill Budge <bbudge@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#46020}
> 
> TBR=bradnelson@chromium.org,bbudge@chromium.org,mtrofin@chromium.org,ahaas@chromium.org
> 
> Change-Id: I1e7a1d0202c3161f9a7139e8895eebf472473ad3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:6492, chromium:732010
> Reviewed-on: https://chromium-review.googlesource.com/540841
> Reviewed-by: Brad Nelson <bradnelson@chromium.org>
> Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
> Commit-Queue: Brad Nelson <bradnelson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46022}

TBR=bradnelson@chromium.org,bbudge@chromium.org,mtrofin@chromium.org,mtrofin@google.com,ahaas@chromium.org

Change-Id: Ic1351325173b233be3972ff3c159c035838fa963
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6492, chromium:732010
Reviewed-on: https://chromium-review.googlesource.com/540842
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46023}
2017-06-20 06:23:37 +00:00
Mircea Trofin
1835b4b177 Revert "Revert "[wasm] Throttle the amount of unfinished work to avoid OOM""
This reverts commit 4ee4918195.

Reason for revert: Fix: in d8, blocking all the bg threads starves the GC.

Original change's description:
> Revert "[wasm] Throttle the amount of unfinished work to avoid OOM"
> 
> This reverts commit 1280954d3a.
> 
> Reason for revert: Speculative, GC stress bots started taking much longer after this change.
> 
> Original change's description:
> > [wasm] Throttle the amount of unfinished work to avoid OOM
> > 
> > It is possible that the foreground task is unable to clear the
> > scheduled unfinished work, eventually leading to an OOM.
> > 
> > We use either code_range on 64 bit, or the capacity of the code space,
> > as a heuristic for how much memory to use for compilation.
> > 
> > Bug: v8:6492, chromium:732010
> > Change-Id: I1e4c0825351a42fa0b8369ccc41800ac3445563d
> > Reviewed-on: https://chromium-review.googlesource.com/535017
> > Commit-Queue: Brad Nelson <bradnelson@chromium.org>
> > Reviewed-by: Brad Nelson <bradnelson@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#46017}
> 
> TBR=bradnelson@chromium.org,mtrofin@chromium.org,ahaas@chromium.org
> 
> Change-Id: I8883cee7f77667530bc50f91bfb468c485e6f7f2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:6492, chromium:732010
> Reviewed-on: https://chromium-review.googlesource.com/540270
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46020}

TBR=bradnelson@chromium.org,bbudge@chromium.org,mtrofin@chromium.org,ahaas@chromium.org

Change-Id: I1e7a1d0202c3161f9a7139e8895eebf472473ad3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6492, chromium:732010
Reviewed-on: https://chromium-review.googlesource.com/540841
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46022}
2017-06-20 06:20:07 +00:00
v8-autoroll
ca52989d78 Update V8 DEPS.
Rolling v8/build: bf51d56..97e4bb9

Rolling v8/buildtools: ee9c3a7..9a65473

Rolling v8/third_party/catapult: 57e600c..c2d7f3a

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

Change-Id: I07f5b7705651eec34733919182793ee6981b067c
Reviewed-on: https://chromium-review.googlesource.com/541056
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46021}
2017-06-20 03:31:49 +00:00
Bill Budge
4ee4918195 Revert "[wasm] Throttle the amount of unfinished work to avoid OOM"
This reverts commit 1280954d3a.

Reason for revert: Speculative, GC stress bots started taking much longer after this change.

Original change's description:
> [wasm] Throttle the amount of unfinished work to avoid OOM
> 
> It is possible that the foreground task is unable to clear the
> scheduled unfinished work, eventually leading to an OOM.
> 
> We use either code_range on 64 bit, or the capacity of the code space,
> as a heuristic for how much memory to use for compilation.
> 
> Bug: v8:6492, chromium:732010
> Change-Id: I1e4c0825351a42fa0b8369ccc41800ac3445563d
> Reviewed-on: https://chromium-review.googlesource.com/535017
> Commit-Queue: Brad Nelson <bradnelson@chromium.org>
> Reviewed-by: Brad Nelson <bradnelson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46017}

TBR=bradnelson@chromium.org,mtrofin@chromium.org,ahaas@chromium.org

Change-Id: I8883cee7f77667530bc50f91bfb468c485e6f7f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6492, chromium:732010
Reviewed-on: https://chromium-review.googlesource.com/540270
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46020}
2017-06-19 23:06:43 +00:00
Ross McIlroy
40f9cf49d7 [Perf] Add ExpressionDepth test.
Adds a 'performance' test which tracks the number of expressions
which can be nested before the compiler runs out of stack space.
This isn't really a performance test, but is created as a js-perf-test
to enable regression tracking in the dashboards.

Change-Id: Iee0c00df53b38b083e2dde09676ac9b13e439461
Reviewed-on: https://chromium-review.googlesource.com/539419
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46019}
2017-06-19 20:50:00 +00:00
Bill Budge
22aad80e0b [ARM64] Implement WebAssembly SIMD opcodes for ARM64.
BUG: v8:6020
Change-Id: I7280827aa9a493677253cc2fbd42be8173b55b7a
Reviewed-on: https://chromium-review.googlesource.com/534956
Reviewed-by: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46018}
2017-06-19 19:55:06 +00:00
Mircea Trofin
1280954d3a [wasm] Throttle the amount of unfinished work to avoid OOM
It is possible that the foreground task is unable to clear the
scheduled unfinished work, eventually leading to an OOM.

We use either code_range on 64 bit, or the capacity of the code space,
as a heuristic for how much memory to use for compilation.

Bug: v8:6492, chromium:732010
Change-Id: I1e4c0825351a42fa0b8369ccc41800ac3445563d
Reviewed-on: https://chromium-review.googlesource.com/535017
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46017}
2017-06-19 19:29:57 +00:00
gdeepti
631c429f9a [wasm] SIMD/Atomics ops update to use the right prefix opcodes
- Use correct prefixes for SIMD/Atomics ops
 - S128 LoadMem/StoreMem should not use 0xc0/0xc1 opcodes, these are now
 being used for sign extension
 - S128 LoadMem/StoreMem should use prefixed opcodes

BUG=v8:6020

Review-Url: https://codereview.chromium.org/2943773002
Cr-Commit-Position: refs/heads/master@{#46016}
2017-06-19 19:23:11 +00:00
Sathya Gunasekaran
ea241630ae [parser] Better error msg for destructuring non iterable
This patch updates the error positition and the error msg.

Previously,

  → ./out.gn/x64.release/d8 test.js
  test.js:1: TypeError: undefined is not a function
  var [a] = {};
  ^
  TypeError: undefined is not a function
      at test.js:1:1


With this patch,

  → ./out.gn/x64.release/d8 test.js
  test.js:1: TypeError: [Symbol.iterator] is not a function
  var [a] = {};
            ^
  TypeError: [Symbol.iterator] is not a function
      at test.js:1:11

Bug: v8:5532
Change-Id: Ib066e8ec8a53fdf06cce491bde4b1d0c6d564cbc
Reviewed-on: https://chromium-review.googlesource.com/539024
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46015}
2017-06-19 17:44:21 +00:00
Michael Lippautz
0fed926bf4 [heap] Merge remembered set updating
Merge OLD_TO_OLD and OLD_TO_NEW per page. This enables removing atomic
operations for the slot updates, effectively removing the need for
fences.

Bug: chromium:651354
Change-Id: I9e318bef06c403b135d638cf94fda9569dcf0e36
Reviewed-on: https://chromium-review.googlesource.com/539338
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46014}
2017-06-19 17:34:01 +00:00
Clemens Hammacher
13f0ef5b1b [wasm] Only emit StackCheck if function might call
For functions without any calls, there is no value in executing a stack
check. The current frame is materialized at that point anyway.
Note that for loops, we still emit additional stack checks in the loop
header.

For unity, the reduction in code size is moderate (0.53%), as only 4000
of the 34000 functions are leaf functions (no calls). However, we also
save some compile time and gain performance, so this is still worth
doing it.

Drive-by: Fix the effect chain generated in {StackCheck()}.

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

Change-Id: Ia6ec58d0ea46de02634c923cdf8e6e08d8902c59
Reviewed-on: https://chromium-review.googlesource.com/533333
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46013}
2017-06-19 16:44:30 +00:00
Peter Marshall
71582719c1 [cleanup] Audit uses of InstallWithIntrinsicDefaultProto.
We only need to use this for certain Intrinsics defined in the spec.
This CL removes unnecessary uses.

Bug: v8:6474
Change-Id: I13a9f0c57d877dd65a883a38f9683d55623030d3
Reviewed-on: https://chromium-review.googlesource.com/529224
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46012}
2017-06-19 15:58:43 +00:00
Michael Lippautz
658609c92a [heap] Avoid fences when inserting into slot sets within the GC
This avoids emitting the costly barriers on arm.

Bug: chromium:651354
Change-Id: Ibb29e58f7c41aab37ed5c4971b2a754b4ecd7155
Reviewed-on: https://chromium-review.googlesource.com/533337
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46011}
2017-06-19 15:01:04 +00:00
Ulan Degenbaev
02a80f0d24 [heap] Refactor markbits atomics.
Change-Id: If0f80ceac9582f5bd0f9177db67b2a833fa8c8cd
Reviewed-on: https://chromium-review.googlesource.com/539418
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46010}
2017-06-19 14:31:59 +00:00
Michael Starzinger
bbdf4b964e [compiler] Simplify {Compiler::EnsureBaselineCode} a bit.
R=rmcilroy@chromium.org
BUG=v8:6408

Change-Id: I724a14e4f3b9395eed5d56ec3b5f7be835e9390a
Reviewed-on: https://chromium-review.googlesource.com/539595
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46009}
2017-06-19 14:10:30 +00:00
Camillo Bruni
83625051b3 [runtime] Remove unused CreateArrayLiteralStubBailout runtime function
Change-Id: I0aa40ce54833c81a15a6dd0010b2eeb46799a984
Reviewed-on: https://chromium-review.googlesource.com/539519
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46008}
2017-06-19 13:51:04 +00:00
Michael Lippautz
13869d7920 [heap] Avoid some inline definitions in Heap
Move obvious candidates to the cc file.

Bug: 
Change-Id: I9b2bca0ed1f2836a4873760d6677a9c0dff9c064
Reviewed-on: https://chromium-review.googlesource.com/538664
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46007}
2017-06-19 13:49:59 +00:00