Commit Graph

41641 Commits

Author SHA1 Message Date
Tobias Tebbi
0caf1d2029 [csa] Add C++ compile time type checks to CSA.
Bug: 
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I2e1b36303f8b9ad4a3dc4e488123e6e4ce8b02ec
Reviewed-on: https://chromium-review.googlesource.com/533033
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47149}
2017-08-04 01:09:24 +00:00
Deepti Gandluri
9735d7f109 [wasm] Fix link error messages to be more indicative of the actual error
R=mtrofin@chromium.org

Change-Id: I665065b7e1161bcef6315a03083437410c574755
Reviewed-on: https://chromium-review.googlesource.com/601174
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47148}
2017-08-03 22:49:32 +00:00
Karl Schimpf
8b865c8db4 Make sure function size UMA stat is collected.
This fixes the collection of function sizes (see comment #1 of
v8:6361).  This was done by adding a wrapper function around
VerifyWasmCode() that updates UMA stats for function size (as well as
decode time when validating).

Bug: v8:6361
Change-Id: Ia2597db22cbed5b0429d9c8514e96cdea5d7323a
Reviewed-on: https://chromium-review.googlesource.com/600530
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47147}
2017-08-03 19:57:36 +00:00
Karl Schimpf
c6b8b4b56c Subdivide compile time for asm/wasm functions.
Collect compile time separately for asm.js and Wasm functions.

Note: Dependent on CL https://chromium-review.googlesource.com/c/598542

Bug: v8:6361
Change-Id: I77c43b663cb66261f17bca73db03ab1a4af5e11d
Reviewed-on: https://chromium-review.googlesource.com/598930
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47146}
2017-08-03 19:56:31 +00:00
Anisha Rohra
2fd5e70a03 PPC: Split frame-constants.h out of frames.h to reduce transitive includes.
Port 4b0099a477

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com
BUG=
LOG=N

Change-Id: I4be5357b265ca970a8d1a0db41ddc73ff47bffdc
Reviewed-on: https://chromium-review.googlesource.com/600512
Reviewed-by: Jaideep Bajwa <bjaideep@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47145}
2017-08-03 19:36:02 +00:00
Ulan Degenbaev
01113cb18b [heap] Remove unused GC idle time histograms.
This patch removes tracking of
- V8.GCIdleTimeAllottedInMS
- V8.GCIdleTimeLimit.Overshot
- V8.GCIdleTimeLimit.Undershot

BUG=chromium:751045

Change-Id: Iccaa0fff609d3caa4cf38ebcc8aca7cdca33c442
Reviewed-on: https://chromium-review.googlesource.com/595588
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47144}
2017-08-03 19:14:41 +00:00
Adam Klein
b097fdf462 Fix runtime-interpreter.cc build after 7d38ee30
Change-Id: Ic9da54513d92736899ce8ad67a5e588011314640
Reviewed-on: https://chromium-review.googlesource.com/600988
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47143}
2017-08-03 19:08:21 +00:00
Ulan Degenbaev
e625f4b66d [heap] Fix InvalidatedSlotsFilter.
On advancing the iterator we need to reset the current object,
so that it can be lazily reloaded later on.

TBR=mlippautz@chromium.org

Bug: chromium:694255
Change-Id: If7ddd8670df9d11837f491503312919b55b451fe
Reviewed-on: https://chromium-review.googlesource.com/600687
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47142}
2017-08-03 18:27:42 +00:00
Ben Smith
adc4704ce9 [d8] Fix PrepareTransfer call w/ non-ArrayBuffer
Make sure to fail PrepareTransfer when the transferables array contains
a non-ArrayBuffer, otherwise the function leaks a scheduled_exception.

Bug: chromium:736565
Change-Id: I64c2e09eb92720519c7bda2dca41749ff5ac9c8d
Reviewed-on: https://chromium-review.googlesource.com/599357
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47141}
2017-08-03 17:56:03 +00:00
Andreas Rossberg
a3bc098e74 [wasm] Turn instance exports into an accessor
R=titzer@chromium.org

Bug: 
Change-Id: I2710aa5605bf2a26b6f86db98338dd54b6b87d2a
Reviewed-on: https://chromium-review.googlesource.com/600235
Commit-Queue: Andreas Rossberg <rossberg@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47140}
2017-08-03 16:49:21 +00:00
Andreas Rossberg
5614747680 [wasm] Fix index range checking in table accessors
R=titzer@chromium.org

Bug: 
Change-Id: Ib1a13b5131ec1b5a155c893de3c5ceb376bd33a3
Reviewed-on: https://chromium-review.googlesource.com/600227
Commit-Queue: Andreas Rossberg <rossberg@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47139}
2017-08-03 16:11:42 +00:00
Clemens Hammacher
292cc3365a [wasm] Make WasmModule* in ModuleEnv non-const
We need to modify that module, e.g. to add signatures to the signature
maps. Hence it cannot be const.

R=titzer@chromium.org
CC=mtrofin@chromium.org

Change-Id: I261af5b4233a0b2ec8031a9cbe0cf9f826316ae0
Reviewed-on: https://chromium-review.googlesource.com/600428
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47138}
2017-08-03 16:09:41 +00:00
Adam Klein
9dd9419c38 Add test coverage for do-expressions in ReparentExpressionScope()
Change-Id: I42f51fd00b1a21a1ff7ef2379fbf81a42266a737
Reviewed-on: https://chromium-review.googlesource.com/599111
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47137}
2017-08-03 16:07:41 +00:00
Karl Schimpf
9cb567bb2d Fix UMA stat for collecting function decoding time.
This fixes collection of function decoding time (See comment #20 of
v8:6361). Updated other path for decoding to also update UMA stat.

Bug: v8:6361
Change-Id: I8e6cb398aebd7847e064d3b9a979586ded118513
Reviewed-on: https://chromium-review.googlesource.com/598458
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47136}
2017-08-03 15:53:21 +00:00
Ben L. Titzer
f8b7267477 Naming consistency and further small cleanups to frames.h
R=mstarzinger@chromium.org

Bug: 
Change-Id: Ia416acd8c12a3c8e3fdfabc56a4cd31cb946c88c
Reviewed-on: https://chromium-review.googlesource.com/599949
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47135}
2017-08-03 15:35:11 +00:00
Miran.Karic
2751ca4930 MIPS64: Fix optimizations to li macro.
An optimization in li checks if a value has all their "n" LSBs set to
one, and their "64-n" MSBs set to zero. This is done by checking
base::bits::IsPowerOfTwo(value + 1), but this doesn't cover the case
when only MSB is zero, and other bits are one. Added another check that
covers the missing case, this also fixes Dsubu test.

BUG=
TEST=cctest/test-assembler-mips/Dsubu

Change-Id: I97b8fb4984af3b7f974ba901e3a1a9c89e925805
Reviewed-on: https://chromium-review.googlesource.com/598228
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Commit-Queue: Miran Karić <Miran.Karic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#47134}
2017-08-03 15:08:31 +00:00
Andreas Rossberg
439f1f6f80 [wasm] Fix string conversion of customSections name
R=titzer@chromium.org

Bug: v8:5815
Change-Id: Ied267a431ed294f022628169e811069f2a4851b1
Reviewed-on: https://chromium-review.googlesource.com/599875
Commit-Queue: Andreas Rossberg <rossberg@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47133}
2017-08-03 14:40:59 +00:00
Ulan Degenbaev
b77115a0af Reland^3 "[heap] Add mechanism for tracking invalidated slots per memory chunk."
This reverts commit b9acf4eded.

Bug: chromium:694255
Change-Id: I62766e8b32cfa16af39a28ad07fecd72441ad8cd
Reviewed-on: https://chromium-review.googlesource.com/598468
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47132}
2017-08-03 14:38:19 +00:00
Ulan Degenbaev
d27e449e82 Reland "[heap] Add support for atomic access to page flags."
This is a reland of 35c923cc10
Original change's description:
> [heap] Add support for atomic access to page flags.
> 
> This patch renames AsAtomicWord to AsAtomicPointer and
> adds new AsAtomicWord that works with intptr_t.
> 
> Slot recording uses atomic page flag accessors.
> 
> BUG=chromium:694255
> 
> Change-Id: I1c692813244b41320182e9eea50462d1802fcd98
> Reviewed-on: https://chromium-review.googlesource.com/597688
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47086}

Bug: chromium:694255
Change-Id: I36780ff4001e068815d4be1e16cd06f1a4f98d13
Reviewed-on: https://chromium-review.googlesource.com/599909
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47131}
2017-08-03 14:11:09 +00:00
Maya Lekova
c453190982 [heap] Delete wrong DCHECK.
This DCHECK is incorrect in no-snapshot builds because we can run 
garbage collection while deserializing the snapshot.

Bug: v8:6559, v8:6557
Change-Id: I0b8456ee19443f796889656952b236ff40b1e2fb
Reviewed-on: https://chromium-review.googlesource.com/600367
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Maya Lekova <mslekova@google.com>
Cr-Commit-Position: refs/heads/master@{#47130}
2017-08-03 13:54:08 +00:00
Ross McIlroy
37e601c340 [Compiler] Cleanup and remove some unused flags in CompilationInfo.
BUG=v8:5203

Change-Id: I2c4854096bda35fbfb50820e9fb2ece2cb029e55
Reviewed-on: https://chromium-review.googlesource.com/597927
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47129}
2017-08-03 12:45:28 +00:00
Andreas Rossberg
fa53a0dae7 [wasm] Fix API prototype chains
R=titzer@chromium.org

Bug: v8:6647
Change-Id: I73f19111b5c40988d57e9086852da902ba36acb2
Reviewed-on: https://chromium-review.googlesource.com/599872
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Rossberg <rossberg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47128}
2017-08-03 12:35:48 +00:00
Ben L. Titzer
4754b211f6 [wasm][test] Avoid stack overflow that can happen with spread call to Array.push.
R=rossberg@chromium.org

Bug: 
Change-Id: I2401709b42106c7e325144b53be3c3b3d1ed16c7
Reviewed-on: https://chromium-review.googlesource.com/599874
Reviewed-by: Andreas Rossberg <rossberg@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47127}
2017-08-03 12:33:28 +00:00
Michael Lippautz
f9c4b7a293 [heap] Move UnmapFreeMemoryTask to CancelableTask
This mitigates the problem of blocking on the main thread when the
platform is unable to execute background tasks in a timely manner.

Bug: v8:6671
Change-Id: I741d4b7594e8d62721dad32cbfb19551ffacd0c3
Reviewed-on: https://chromium-review.googlesource.com/599528
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47126}
2017-08-03 12:28:59 +00:00
Michael Starzinger
c8febe2096 [turbofan] Remove obsolete Code::is_crankshafted bit.
The predicate in question used to report true on both, Crankshaft and
TurboFan code. It has hence become obsolete and can be replaced by the
existing {Code::is_turbofanned} predicate. This also frees up a bit in
the second kind-specific bit field.

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

Change-Id: I204d7dd78a639c752c9749fd305c7006c6b6aca3
Reviewed-on: https://chromium-review.googlesource.com/599868
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47125}
2017-08-03 12:25:39 +00:00
Michael Starzinger
7eb91175e9 [flags] Remove deprecated Hydrogen specific flags.
R=tebbi@chromium.org

Change-Id: I9d22e0731da3e170fe40aa34667ff8948e11bb5c
Reviewed-on: https://chromium-review.googlesource.com/595972
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47124}
2017-08-03 12:14:49 +00:00
Clemens Hammacher
4711e6d614 [compiler] Replace some MachineType by MachineRepresentation
For determining whether unaligned memory accessed is allowed, it is
actually sufficient to pass the MachineRepresentation instead of the
MachineType.
As the MachineRepresentation is an enum, this allows to store the set
of unsupported types as an EnumSet instead of std::vector.

R=mstarzinger@chromium.org

Change-Id: Ibe44717bae3a6034bae683057e80bd40d92e70ae
Reviewed-on: https://chromium-review.googlesource.com/598790
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47123}
2017-08-03 12:12:38 +00:00
Albert Mingkun Yang
744b901d41 [heap] Implement write barrier in code stub assembly
Bug: 749486

The feature is off by default, and could be turned on via
`v8_enable_csa_write_barrier = true`. With this CL, only x64 uses this
feature

Change-Id: Ie024f08b7d796a4cc4d55285dc9fe796780f0e53
Reviewed-on: https://chromium-review.googlesource.com/588891
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Albert Mingkun Yang <albertnetymk@google.com>
Cr-Commit-Position: refs/heads/master@{#47122}
2017-08-03 12:08:30 +00:00
Tobias Tebbi
40a9eabc44 Reland "[turbofan] enable new implementation of escape analysis"
This is a reland of a6c3f14374
Original change's description:
> [turbofan] enable new implementation of escape analysis
> 
> Bug: 
> Change-Id: I0218ab67bf391deb8f1b1b78811643eb84745b7c
> Reviewed-on: https://chromium-review.googlesource.com/595508
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47032}

Change-Id: Ide3d11f4b25eae2bbcaca9fc3cdb983d73ba846c
Reviewed-on: https://chromium-review.googlesource.com/599827
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47121}
2017-08-03 11:46:00 +00:00
Clemens Hammacher
a07c2de29f [utils] Prepare EnumSet for scoped enums
Currently, EnumSet cannot be used with scoped enums (declared as "enum
class" or "enum struct"), as these cannot be implicitly casted to their
underlying integral type. This CL changes this by adding a static cast.
Plus drive-by fixes.

R=mstarzinger@chromium.org

Change-Id: I3aa2ef78e896b2734f1e5695237efc8a1130703c
Reviewed-on: https://chromium-review.googlesource.com/598789
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47120}
2017-08-03 11:42:05 +00:00
Ross McIlroy
b4e55e9443 [Compiler] Decouple CompilationInfo and ParseInfo.
Don't hold a pointer to parse_info in compilation_info, and instead explicitly
add the fields needed in compiation_info. The intention is to make ParseInfo
only actually needed for parsing, and eventually make it possible to compile
with only a CompileInfo.

BUG=v8:5203

Change-Id: Iecd39245e44c218874401c3991eeaf3ceef2816f
Reviewed-on: https://chromium-review.googlesource.com/595738
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47119}
2017-08-03 11:40:57 +00:00
Tobias Tebbi
e44c2af0c0 [turbofan] new escape analysis reducer: remove duplicate line and add a DCHECK
Bug: 
Change-Id: Ifd233c9b592c784d6326d3663c491e5e32e9ddeb
Reviewed-on: https://chromium-review.googlesource.com/600047
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47118}
2017-08-03 11:39:52 +00:00
Michael Achenbach
c560d2e7d3 Revert "[builtins] Port getting property from Proxy to CSA"
This reverts commit 47a97aa53b.

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

Original change's description:
> [builtins] Port getting property from Proxy to CSA
> 
> Bug: v8:6559, v8:6557
> Change-Id: If6c51f5483adb73ddd2495cede5d85e887a3c298
> Reviewed-on: https://chromium-review.googlesource.com/589212
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Maya Lekova <mslekova@google.com>
> Cr-Commit-Position: refs/heads/master@{#47113}

TBR=jkummerow@chromium.org,mstarzinger@chromium.org,franzih@chromium.org,ishell@chromium.org,bmeurer@chromium.org,mslekova@google.com

Change-Id: Id28e529d1d88f7589d4d66ef23b8b510a33a817b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6559, v8:6557
Reviewed-on: https://chromium-review.googlesource.com/600049
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47117}
2017-08-03 11:32:38 +00:00
Ben L. Titzer
4b0099a477 [iwyu] Split frame-constants.h out of frames.h to reduce transitive includes.
R=mstarzinger@chromium.org

Bug: 
Change-Id: I95acea7b33a6e5799399d0891b2a52103f5e4964
Reviewed-on: https://chromium-review.googlesource.com/598072
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47116}
2017-08-03 10:12:12 +00:00
Clemens Hammacher
c2ef5fa95c [compiler] Remove unused parameter
The {alignment} parameter in {UnalignedLoadSupported} and
{UnalignedStoreSupported} is never being used.
This CL removes it from several interfaces and users.

R=mstarzinger@chromium.org

Change-Id: Iad5a638b7ed358beeed42f0ea7308dc04f1ed23e
Reviewed-on: https://chromium-review.googlesource.com/598788
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47115}
2017-08-03 09:50:33 +00:00
Ben L. Titzer
7d38ee3011 [iwyu] Do not include frames.h in macro assemblers.
Since frames.h no longer defines basic register types like RegList, it
is no longer necessary to include it in the macro assemblers.

Next step: split out frame-constants.h from frames.h so that it will be
possible to get frame constants without include the stackwalking logic,
which needs objects.h.

R=mstarzinger@chromium.org

Bug: 
Change-Id: Ia12d3c8a8d46a73106c3c90bcb4b470c85f1eaa7
Reviewed-on: https://chromium-review.googlesource.com/597788
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47114}
2017-08-03 09:23:33 +00:00
Maya Lekova
47a97aa53b [builtins] Port getting property from Proxy to CSA
Bug: v8:6559, v8:6557
Change-Id: If6c51f5483adb73ddd2495cede5d85e887a3c298
Reviewed-on: https://chromium-review.googlesource.com/589212
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Maya Lekova <mslekova@google.com>
Cr-Commit-Position: refs/heads/master@{#47113}
2017-08-03 09:04:30 +00:00
Andreas Haas
859ee8443d [wasm] Move ScheduledErrorThrower to wasm-api.h
The ScheduledErrorThrower is also needed in the wasm-async fuzzer so I
moved the implementation from wasm-js.cc to wasm-api.[h|cc].

R=clemensh@chromium.org

Bug: chromium:749838
Change-Id: I49d7438d1ec0281285ce0c64ba462c22001be08e
Reviewed-on: https://chromium-review.googlesource.com/591447
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47112}
2017-08-03 08:45:58 +00:00
Clemens Hammacher
808e90a9ea [wasm] Clean up accessor definitions
Rename OPTIONAL_ACCESSOR to OPTIONAL_ACCESSORS (to be in line with
ACCESSORS and DECL_OPTIONAL_ACCESSORS), and make OPTIONAL_ACCESSORS also
define the ACCESSORS (to be in line with DECL_OPTIONAL_ACCESSORS).

Drive-by: Remove DECL_OPTIONAL_GETTER; just define the setter too.

R=titzer@chromium.org

Change-Id: Id41a652153d7a1e2a15a5f69c6f52b96298f9dc1
Reviewed-on: https://chromium-review.googlesource.com/598868
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47111}
2017-08-03 07:57:36 +00:00
Maya Lekova
c772d8d983 Add micro-benchmark for Proxy has property
Bug: v8:6664, v8:6557
Change-Id: Ib0f9b258d49f96bee041cbcfc589f3ec91e013ed
Reviewed-on: https://chromium-review.googlesource.com/597859
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Maya Lekova <mslekova@google.com>
Cr-Commit-Position: refs/heads/master@{#47110}
2017-08-03 07:50:27 +00:00
Michael Starzinger
3bccb99557 Remove compiler distinction from RegisterConfiguration.
This removes the obsolete {Crankshaft} factory method as it returns the
same configuration as the {Turbofan} factory by now. We now consistently
use {RegisterConfiguration::Default} everywhere.

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

Change-Id: I6be25774aa6714ef4dc1ef6856bb6dbc95593a29
Reviewed-on: https://chromium-review.googlesource.com/597858
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47109}
2017-08-03 07:47:36 +00:00
Michael Starzinger
c8ee3fb405 [deoptimizer] Fix bogus DCHECK in OptimizedFrame::Summarize.
R=jarin@chromium.org
TEST=mjsunit/regress/regress-crbug-751715
BUG=chromium:751715

Change-Id: Ibc5d2ce958b6f0c94b41926eb215e81d70833a9d
Reviewed-on: https://chromium-review.googlesource.com/598227
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47108}
2017-08-03 07:34:42 +00:00
jgruber
b68b63fc82 [snapshot] Begin splitting up Deserializer
This begins splitting up the Deserializer class into
{Object,Partial,Startup}Deserializer.  For now, all functionality remains in
the Deserializer base clase, to be refactored in future CLs.  Empty .cc files
are added here to avoid having to touch build files again.

Bug: v8:6624
Change-Id: If563e03492991bd55c91cd2e09312c0a26aaab2c
Reviewed-on: https://chromium-review.googlesource.com/598067
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47107}
2017-08-03 06:41:32 +00:00
Jakob Gruber
5a8a7ed83c Revert "[regexp] Limit ATOM regexps to single-character patterns"
This reverts commit 062bb7d487.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [regexp] Limit ATOM regexps to single-character patterns
> 
> There's an inherent trade-off when deciding between ATOM and IRREGEXP
> regexps: IRREGEXP is faster at runtime for all but trivial single-character
> patterns, while ATOM regexps have a lower memory overhead.
> 
> This CL is intended to help investigate impact on benchmarks and real-world
> code - if something tanks, it's easy to revert, otherwise it can be a first
> step towards a possible removal of ATOM regexps.
> 
> Bug: v8:6633
> Change-Id: Ia41d8eb28d33952735562d3d4127202746a6ac4e
> Reviewed-on: https://chromium-review.googlesource.com/589435
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47081}

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

Change-Id: I8655bc4055af5d593f507e16918b434ff45f5379
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6633
Reviewed-on: https://chromium-review.googlesource.com/599547
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47106}
2017-08-03 06:33:45 +00:00
Benedikt Meurer
426ae4265e [csa] Extend TryToName to also implicitly convert Oddball keys.
Previously TryToName bailed out for Oddball keys (i.e. when passing true
or false as the key), which meant that for example the generic
KeyedLoadIC would always bail out to the %KeyedGetProperty runtime
function. But handling Oddball keys is fairly easy, since every oddball
value carries it's unique string representation. Adding just this case
to the CodeStubAssembler::TryToName method boosts this simple
micro-benchmark by a factor of 4x:

  const n = 1e7;
  const obj = {};
  const key = true;

  console.time('foo');
  for (let i = 0; i < n; ++i) {
    if (obj[key] === undefined) {
      obj[key] = key;
    }
  }
  console.timeEnd('foo');

It also shows on the ARES-6 ML benchmark and on several Speedometer
tests, where objects are being used as dictionaries and the developers
rely on the implicit ToString conversions on the property accesses.
In the ARES-6 ML benchmark, the number of calls to %KeyedGetProperty
is reduced by 137,758.

Bug: v8:6278, v8:6344, v8:6670
Change-Id: Iaa965e30be4c247682a67ec09543655df9b761d2
Reviewed-on: https://chromium-review.googlesource.com/599527
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47105}
2017-08-03 06:13:13 +00:00
v8-autoroll
b27bd825f3 Update V8 DEPS.
Rolling v8/build: c15e746..6a89d4e

Rolling v8/third_party/catapult: 3ec5781..c8c5d6b

Rolling v8/tools/clang: b18e402..ec00334

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

Change-Id: I8897f39489ce90bc0fa99b3e6294f5f262f48427
Reviewed-on: https://chromium-review.googlesource.com/599455
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47104}
2017-08-03 03:40:40 +00:00
Alexey Kozyatinskiy
72ddbca665 [inspector] remove breakpoints when agent is disabled
It's important in multi-session case, each agent should cleanup own breakpoints on disabled.

R=dgozman@chromium.org

Bug: none
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I1b2182aa01e74c7e9f36addf998c779d1d32feef
Reviewed-on: https://chromium-review.googlesource.com/594272
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47103}
2017-08-03 01:54:33 +00:00
Deepti Gandluri
ac774a36a7 [wasm] Implement atomic add/sub operations.
- Decode logic for atomic operations
 - Implementations for I32AtomicAdd, I32AtomicAdd8U, I32AtomicAdd16U,
I32AtomicSub, I32AtomicSub8U, I32AtomicSub16U
 - cctest value helpers for Uint16/Uint8 types

R=binji@chromium.org, bbudge@chromium.org, bradnelson@chromium.org

BUG=v8:6532

Change-Id: I710ee8ef566c5e33866afdf5b47375c2ea6fdbe6
Reviewed-on: https://chromium-review.googlesource.com/595241
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47102}
2017-08-02 22:59:18 +00:00
Ulan Degenbaev
5a506a9a97 Disable mjsunit/wasm/js-api on GC stress bots.
Bug: chromium:751825
No-Tree-Checks: true
Change-Id: I8e9e5c030dca001a8dc881d8fdeefa5c140f3792
Reviewed-on: https://chromium-review.googlesource.com/599047
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47101}
2017-08-02 22:57:24 +00:00
Karl Schimpf
ad49b7b433 Reland "Start migration of try/throw/catch to match proposal."
This is a reland of 470a10015d
Original change's description:
> Start migration of try/throw/catch to match proposal.
> 
> This CL does the first baby steps on moving the current (experimental)
> exception handling to match that of the WebAssembly proposal.
> 
> It does the following:
> 
> 1) Use exception tags instead of integers.
> 
> 2) Only handle empty exception signatures (i.e. no values associated
>    with the exception tag.
> 
> 3) Only handle one catch clause.
> 
> 4) Be sure to rethrow the exception if the exception tag does not match.
> 
> Note: There are many things that need to be fixed, and are too
> numerous to list here. However, the code should have TODO's on each
> missing parts of the implementation.
> 
> Also note that the code currently doesn't handle nested catch blocks,
> nor does it change the throw value being an integer. Rather, the
> integer value is still being thrown, and currently is the exception
> tag. Therefore, we don't build an exception object. This is the reason
> why this CL doesn't handle exceptions that pass values.
> 
> Also, the current implementation still can't handle multiple modules
> because tag resolution (between) modules has not be implemented yet.
> 
> Bug: v8:6577
> Change-Id: Id6d08b641b3c42d1eec7d4db582f2dab35406114
> Reviewed-on: https://chromium-review.googlesource.com/591910
> Reviewed-by: Brad Nelson <bradnelson@chromium.org>
> Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47087}

Bug: v8:6577
Change-Id: I41c3309827c292cb787681a95aaef7cf9b931835
Reviewed-on: https://chromium-review.googlesource.com/598968
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47100}
2017-08-02 22:35:07 +00:00