Commit Graph

41255 Commits

Author SHA1 Message Date
Ulan Degenbaev
176a2b24fb [heap] Reland "[heap] Allow a minimum semi-space size of 512K."
This patch changes the semi-space size to 512K.

> Original commit message:
> Revert "[heap] Allow a minimum semi-space size of 512K."
> This reverts commit 0d2ed6c328.
> The CL introduced perf regressions: crbug.com/735649.
> We are going to reland the CL in an isolated V8 roll to ensure
> that perf regressions are attributed correctly.

> Original commit message:
> > [heap] Allow a minimum semi-space size of 512K.
> > This CL also reduces the minimum semi-space size to 512K.
> > BUG=chromium:716032
> BUG=chromium:735649

Change-Id: Iabc377cba2911b28d51b98bb5b85134d4e893632
Reviewed-on: https://chromium-review.googlesource.com/575066
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46763}
2017-07-19 13:04:47 +00:00
Ulan Degenbaev
bb29f9a4d6 [heap] Add API to set heap semi-space limits in KB.
This relands parts of "[heap] Allow a minimum semi-space size of 512K."
excluding the actual semi-space size change.

This partially reverts commit f341bb0f62

> Original commit message:
> Revert "[heap] Allow a minimum semi-space size of 512K."
> This reverts commit 0d2ed6c328.
> The CL introduced perf regressions: crbug.com/735649.
> We are going to reland the CL in an isolated V8 roll to ensure
> that perf regressions are attributed correctly.

> Original commit message:
> > [heap] Allow a minimum semi-space size of 512K.
> > This CL also reduces the minimum semi-space size to 512K.
> > BUG=chromium:716032
> BUG=chromium:735649

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I5ed66b72104aa877d67fcd20bdadc807ea1551c3
Reviewed-on: https://chromium-review.googlesource.com/575065
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46762}
2017-07-19 12:53:27 +00:00
Georgia Kouveli
91c1a81d0e [arm64] Remove dead StoreRegistersState and RestoreRegisterState stubs.
Also remove UnsafeAcquire from UseScratchRegisterScope, which was only used for
these stubs.

Bug: 
Change-Id: Ia8648e53f1165ae489c0475dbb2d10c6978e4e84
Reviewed-on: https://chromium-review.googlesource.com/576181
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#46761}
2017-07-19 12:42:31 +00:00
Michael Achenbach
56ebd492d6 [build] Add ubsan blacklist file
This adds a copy of tools/ubsan/vptr_blacklist.txt to V8, which is
needed for ubsan compilation.

NOTRY=true
TBR=ishell@chromium.org

Bug: chromium:726584
Change-Id: Ie06a031ce501d7f83121d45b04ac34672eb1ca9e
Reviewed-on: https://chromium-review.googlesource.com/575977
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46760}
2017-07-19 11:33:11 +00:00
Igor Sheludko
6e27386d68 Reland "[runtime] Add shortcuts for elements kinds transitions."
This is a reland of b90e83f5da
Original change's description:
> [runtime] Add shortcuts for elements kinds transitions.
>
> The shortcuts ensure that field type generalization is properly
> propagated in the transition graph.
>
> Bug: chromium:738763
> Change-Id: Id701a6f95ed6ea093c707fbe0bac228f1f856e9f
> Reviewed-on: https://chromium-review.googlesource.com/567992
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46622}

Bug: chromium:738763, chromium:742346, chromium:742381, chromium:745844
Change-Id: I93974e3906b2c7710bd525f15037a2dd97f263ad
Reviewed-on: https://chromium-review.googlesource.com/575227
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46759}
2017-07-19 11:31:21 +00:00
Michael Starzinger
e679dd45e6 Remove obsolete CallWrapper from macro assembler.
This makes {NeedsDebugHookCheck} the default for all invocations, as
there is no call-site left that doesn't perform said check. All other
pieces of the {CallWrapper} are dead since Crankshafts removal.

R=jgruber@chromium.org

Change-Id: I158b816c089ede42972e8a7bdfc6ef0c02053a6b
Reviewed-on: https://chromium-review.googlesource.com/577531
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46758}
2017-07-19 11:29:32 +00:00
Maya Lekova
2f991819f9 Add micro-benchmark for Proxy get property
Bug: v8:6559, v8:6557
Change-Id: Ide0114a5cdcce3cf948a070465460662c56bad8d
Reviewed-on: https://chromium-review.googlesource.com/577527
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Commit-Queue: Maya Lekova <mslekova@google.com>
Cr-Commit-Position: refs/heads/master@{#46757}
2017-07-19 10:04:06 +00:00
Mythri
ae9a2d38f3 Remove SetForceInlineFlag from src/js/*
Remove SetForceInlineFlag from the js builtins. 

Bug: 
Change-Id: I962982509c82e4baba8dc32a0f163147c47daf34
Reviewed-on: https://chromium-review.googlesource.com/571803
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46756}
2017-07-19 09:54:00 +00:00
Michael Starzinger
6ab0241d70 [turbofan] Handle exceptional edges in ReduceArrayMap.
This adds handling for exceptional control projections when lowering
calls to {Array.prototype.map} in the call reducer.

R=mvstanton@chromium.org
TEST=mjsunit/optimized-map
BUG=v8:1956

Change-Id: If39ee836bbc3406a7fca4bad0d2c9321130cae2a
Reviewed-on: https://chromium-review.googlesource.com/575928
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46755}
2017-07-19 09:52:53 +00:00
Pierre Langlois
79bcb45447 Reland "[arm] Restrict grouping pushes before a TailCall to registers only"
This is a reland of a72b2f88a8
Original change's description:
> [arm] Restrict grouping pushes before a TailCall to registers only
>
> We optimize parallel moves performed before a TailCall by grouping adjacent
> pushes. This way, we may use a single instruction to push multiple registers at
> once. However, we also have support for pushing immediates and stack slots for
> which the benefit is questionnable therefore this patch removes support for
> them.
>
> Concerning immediate pushes, it looks like a mistake since we do not have
> support for this case in `AssembleMove` so this patch removes it. Furthermore,
> if we add a test for this case, we see that a `push ip` instruction is
> generated, effectively pushing whatever was in `ip` at the time instead of
> pushing a constant.
>
> Concerning stack slot pushes, we generate a more or less equivalent sequence of
> instructions.
>
> Finally, grouping floating point pushes is not used anywhere so this patch
> removes support for this also.
>
> Bug: v8:6553
> Change-Id: I9b820d33361fc442dd813f66e1f96cda41009110
> Reviewed-on: https://chromium-review.googlesource.com/567191
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> Cr-Commit-Position: refs/heads/master@{#46718}

Bug: v8:6553
Change-Id: Ib9a55dae7cc5db6185d163c56088ff23426d04bb
Reviewed-on: https://chromium-review.googlesource.com/576087
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#46754}
2017-07-19 08:52:53 +00:00
Tom Anderson
0c12d88e52 Don't disable the sysroot on GCC
BUG=chromium:575778
R=machenbach@chromium.org

Change-Id: Iac37a6a2f2ccf46467e4ecdbaefcc4e532491393
Reviewed-on: https://chromium-review.googlesource.com/576853
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46753}
2017-07-19 08:48:13 +00:00
Camillo Bruni
4851745fe3 [literals] Introduce CreateEmptyArrayLiteral Bytecode
Empty Array literals are amongst the most commonly used literal types on our
top25 page list. Using a custom bytecode we can drop the boilerplate for empty
Array literals alltogether. However, we still need a proper AllocationSite to
track ElementsKind transitions.

Bug: v8:6211
Change-Id: Id5dbdac0ea8e24dd474e679c902c6e4a2957af1d
Reviewed-on: https://chromium-review.googlesource.com/567079
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46752}
2017-07-19 08:03:34 +00:00
Maya Lekova
fe046627db [builtins] Introduce ConstructProxy builtin based on CSA
Bug: v8:6558, v8:6557
Change-Id: If090be375bafc7c7c6b21ad0eef820e324c7b01c
Reviewed-on: https://chromium-review.googlesource.com/574494
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Maya Lekova <mslekova@google.com>
Cr-Commit-Position: refs/heads/master@{#46751}
2017-07-19 05:21:13 +00:00
v8-autoroll
4c3fbb8719 Update V8 DEPS.
Rolling v8/build: 1808a90..543ec6e

Rolling v8/third_party/catapult: 44b022b..a4770ef

Rolling v8/third_party/icu: dfa798f..1fec0c8

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

Change-Id: If59abb9362c8f5136dcbf0351d172125d5fd057e
Reviewed-on: https://chromium-review.googlesource.com/577187
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46750}
2017-07-19 03:48:13 +00:00
Mircea Trofin
0c6e06ae07 [wasm] Verify references are immovable.
Temporary check ensuring no regression while we get the wasm code off the GC heap, and
and until we de-contextualize wasm code.

We expect the only embedded objects to be: CEntryStub, undefined, and
the various builtins for throwing exceptions like OOB. These are all immovable
because they are snapshotted. Additionally, we embed references to the FixedArray
that backs WebAssembly.Table. That will be replaced separately with a native data
structure.

Once the Table is native, we can generate Wasm code off the GC heap, as long as the
embedded objects are immutable, which is the property we check for here. 

That greatly simplifies a subsequent step, which is to replace those dependencies 
with a isolate-independent solution. The source of simplification is that we don't 
have to worry about moving pointers.

Bug: 
Change-Id: Id1e41863a2619c2afc50f48416f422012f0c9a24
Reviewed-on: https://chromium-review.googlesource.com/574938
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46749}
2017-07-19 01:24:00 +00:00
Michael Lippautz
34cac45ccf [heap] Scavenger: Itemize work
- Create items for each page containing OLD_TO_NEW references.
- Introduce the flags for parallel scavenge since this forces
  us to introduce Tasks.

Bug: chromium:738865
Change-Id: Idad63f4318bdb3786117441e5413eb5e8594b7fb
Reviewed-on: https://chromium-review.googlesource.com/575052
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46748}
2017-07-18 20:14:20 +00:00
Clemens Hammacher
043f4cd51d [wasm] Make more central data structure move-only
This makes all data structures containing non-trivially-copyable fields
move-only, to prevent security and performance bugs.

Drive-by: Fix smaller performance bugs found by this refactoring.

R=titzer@chromium.org

Change-Id: I6802ac3591534c2ab5cacb2ca42b737f3b7fa801
Reviewed-on: https://chromium-review.googlesource.com/576170
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46747}
2017-07-18 18:30:50 +00:00
Jakob Kummerow
e825c4318e Remove x87 port
Bug: v8:6550
Change-Id: I888f91db1fd842d1fef8a5fb749da229dfb6ab97
Reviewed-on: https://chromium-review.googlesource.com/575756
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46746}
2017-07-18 18:20:40 +00:00
Ulan Degenbaev
973314f2e1 Revert "[runtime] Copy descriptors on prototype map transition."
This reverts commit 5d8840e24e.

Reason for revert: performance regressions.

BUG=chromium:737472,chromium:736640

Original change's description:
> [runtime] Copy descriptors on prototype map transition.
> 
> Currently the descriptors are moved from the old map to the new map,
> which is unsafe for the concurrent marker. This patch removes the map
> mutation.
> 
> Change-Id: I3f7ce455c7344148a122c7443cf32a4eef0307be
> Reviewed-on: https://chromium-review.googlesource.com/535480
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46131}

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I2525a8101a01f39ccad1a6e49aae1e3f28da5b5d
Reviewed-on: https://chromium-review.googlesource.com/555551
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46745}
2017-07-18 18:03:19 +00:00
Sathya Gunasekaran
21a66b11d3 [runtime] Rename properties to properties_or_hash
Add SetProperties as the generic interface to set properties. In the
future, this will switch based on the input properties type and
correctly store the hash code.

This patch also updates tests to check against empty_property_array
instead of empty_fixed_array.

Bug: v8:6404
Change-Id: I39d324ea3ab3cc2c2223b6f4be64139bb88edd94
Reviewed-on: https://chromium-review.googlesource.com/574761
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46744}
2017-07-18 17:38:50 +00:00
Benedikt Meurer
e1e35df329 [turbofan] Fix CanTreatHoleAsUndefined check.
The test for CanTreatHoleAsUndefined on keyed element access was
checking for stability of Object.prototype and Array.prototype and
even adding stability dependencies on both, which is too restrictive
and leads to unnecessary deoptimizations (and might disable further
optimization of the keyed access depending on the state of the
prototype objects during optimization). This was not intended and
is considered a (performance) bug.

Instead use the correct approach of checking whether the receiver's
prototype is one of the current Object.prototype or Array.prototype
objects (since the Array protector works isolate-wide), and then
check the Array protector and install an appropriate code dependency
on the protector only.

Bug: v8:6607
Change-Id: I0bcfe32813ca3693e7b22de31b03edb3509d0a27
Reviewed-on: https://chromium-review.googlesource.com/574849
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46743}
2017-07-18 16:29:29 +00:00
Alexey Kozyatinskiy
a8176a530c [ignition] removed nop bytecode
Nop bytecodes are required only for break locations in debugger. Since nop bytecode doesn't change program state we can remove all of them.

There are at least two changes which this CL produce:
- we don't provide break position when we load local variable (still provide when load variable from global),
- we don't provide break position for statements without actual break positions (e.g. "a;") - these expressions should be super rare and user always can set breakpoint before or after this statement.

More details in one pager: https://docs.google.com/a/google.com/document/d/1JXlQpfMa9vRojbE272b6GMBbrfh6m_00135iAUOJEz8/edit?usp=sharing

Bug: v8:6425
Change-Id: I4aee73d497a84f7b5d89caa6dda6d3060567dfda
Reviewed-on: https://chromium-review.googlesource.com/543161
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46742}
2017-07-18 16:14:29 +00:00
Ross McIlroy
7bcec7ae79 [Interpreter] Fix expression position on keyed property loads.
BUG=v8:6609

Change-Id: If4c3520fba0653e23e6d34bf344fb00cdbfc6082
Reviewed-on: https://chromium-review.googlesource.com/575049
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46741}
2017-07-18 15:32:29 +00:00
Alexey Kozyatinskiy
f249c06927 [inspector] automatically add linux_trusty_blink_rel for any inspector CL
R=dgozman@chromium.org,machenbach@chromium.org

Bug: none
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iccbcd55defe4f8c3ad68519ead300197e15d5d6f
Reviewed-on: https://chromium-review.googlesource.com/574635
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46740}
2017-07-18 15:22:39 +00:00
clemensh
395ca78744 Revert of [api] Fix compilation error for UNIMPLEMENTED() method (patchset #1 id:1 of https://codereview.chromium.org/2929993003/ )
Reason for revert:
not needed any more, and contradicts our cleanup efforts: https://chromium-review.googlesource.com/c/507287/

Original issue's description:
> [api] Fix compilation error for `UNIMPLEMENTED()` method
>
> Return `nullptr` from `ArrayBuffer::Allocator::Reserve` because
> apparently not doing so results in compile errors for some people.
>
> BUG=
>
> Ref: https://github.com/nodejs/node/issues/13392
> Review-Url: https://codereview.chromium.org/2929993003
> Cr-Commit-Position: refs/heads/master@{#45886}
> Committed: f14d1b6231

R=franzih@chromium.org,addaleax@gmail.com

Review-Url: https://codereview.chromium.org/2946933002
Cr-Commit-Position: refs/heads/master@{#46739}
2017-07-18 14:25:27 +00:00
Camillo Bruni
a29516bcce [cleanup] Add templatized FunctionTester::CallChecked(...) helpers
- use asm_tester instead of data variable name
- directly expose Variable and Label for convenience

Change-Id: I211fe07e236f96067037ca00c1435c1491121e6b
Reviewed-on: https://chromium-review.googlesource.com/574914
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46738}
2017-07-18 14:25:21 +00:00
Michael Lippautz
beb4037aed [heap] Introduce separate pass for pre-freeing empty buckets in SlotSet
This will allow us to concurrently allocate buckets during iteration.

Bug: chromium:738865
Change-Id: I88bd1ac152d1ef8b40395f0ba3e55a7c3e82f75d
Reviewed-on: https://chromium-review.googlesource.com/575990
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46737}
2017-07-18 14:18:49 +00:00
Michael Achenbach
cd7380bb0b [build] Add MB configs for ubsan bots
TBR=ishell@chromium.org
NOTRY=true
NOTREECHECKS=true

Bug: chromium:726584
Change-Id: I204cf0e8cff403af98b2a7f156f242d67dbdaf35
Reviewed-on: https://chromium-review.googlesource.com/575929
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46736}
2017-07-18 14:08:09 +00:00
Clemens Hammacher
1bf5ac8cd9 [wasm] Extract WasmVal to own header and rename to WasmValue
This allows to reuse the class e.g. in the baseline compiler.

R=titzer@chromium.org

Change-Id: I7251af16e8c74f267834a9cefb676edf3c9f3a07
Reviewed-on: https://chromium-review.googlesource.com/570020
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46735}
2017-07-18 13:12:56 +00:00
Camillo Bruni
10c6fb566f [mjsunit] Harden prepareStackTrace against Array.prototype corruption
Change-Id: I50ae9d96545f63bdb5ca27a23ea3a04c8764678a
Reviewed-on: https://chromium-review.googlesource.com/574533
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46734}
2017-07-18 12:14:14 +00:00
Clemens Hammacher
afcc8bb200 [wasm] [cleanup] Use MaybeHandle more often
This CL replaces some Handles which can be empty by MaybeHandle. This
documents that they can be empty, and forces a check before using them.

R=ahaas@chromium.org

Change-Id: Iefb9ae76617c45d2304b0a620dc082ab9c7b0585
Reviewed-on: https://chromium-review.googlesource.com/574593
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46733}
2017-07-18 12:05:05 +00:00
Yang Guo
a2ab1353f6 [snapshot] Rehash strings after deserialization.
See https://goo.gl/6aN8xA

Bug: v8:6593
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ic8b0b57195d01d41591397d5d45de3f0f3ebc3d9
Reviewed-on: https://chromium-review.googlesource.com/574527
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46732}
2017-07-18 10:48:43 +00:00
Ross McIlroy
3e19d72377 [Compiler] Move creation of SharedFunctionInfo later in compile.
Moves the creation of shared function infos and the scripts shared function
info array (for top-level code) to be in the FinalizeUnoptimizedCompilation
step when not compiling with Full-codegen. This is needed in order to 
avoid accessing the heap between parse and compile.

BUG=v8:5203

Change-Id: I4063bb91608fa5a0c3d3564767786776a0e4dd03
Reviewed-on: https://chromium-review.googlesource.com/571812
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46731}
2017-07-18 09:43:19 +00:00
Ben Noordhuis
2b5a36d571 [intl] translate locale en_US_POSIX to en-US
en_US_POSIX is ICU's fallback locale on POSIX platforms for when it
cannot detect a default locale.  Consider it equivalent to en-US.

I won't claim this is the best possible fix but it makes the following
tests pass again for me locally:

    intl/break-iterator/default-locale
    intl/break-iterator/wellformed-unsupported-locale
    intl/collator/default-locale
    intl/collator/wellformed-unsupported-locale
    intl/date-format/default-locale
    intl/date-format/wellformed-unsupported-locale
    intl/number-format/default-locale
    intl/number-format/wellformed-unsupported-locale

R=jgruber@chromium.org

Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I0e8029f4ffaf5fd3ca72a1cc5db2878891744864
Reviewed-on: https://chromium-review.googlesource.com/567981
Commit-Queue: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46730}
2017-07-18 08:44:20 +00:00
Clemens Hammacher
19cfe6971f [wasm] Fix signature of simd builders
This refactoring makes some parameters const, and does not rely on the
fact that inputs are passed via NodeVector. Both changes are needed for
an upcoming refactoring of the wasm decoder.

R=bbudge@chromium.org

Change-Id: Ifbd6185ae9ea5a0ef526c2fd695e13e3f14475f4
Reviewed-on: https://chromium-review.googlesource.com/571004
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46729}
2017-07-18 07:48:19 +00:00
Clemens Hammacher
0725ff15e7 [wasm] Make signature map move-only
Signature maps should only be updated, but never copied. We had a bug
because we accidentally updated a copy of the map. This refactoring
prevents any such bugs in the future, and fixes more occurences where
we accidentally copied structs containing a signature map (the move-only
constraint also extends to all structs containing a signature map).

Drive-by: Make InstanceBuilder::NeedsWrappers const.

R=titzer@chromium.org

Bug: chromium:741750
Change-Id: Id919203d8c4078e608a1163e5c790c97d06a9753
Reviewed-on: https://chromium-review.googlesource.com/571791
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46728}
2017-07-18 07:20:19 +00:00
jgruber
989d7b96f8 [error] Lazy stack trace formatting for Error.captureStackTrace
This reinstates the old behavior of Error.captureStackTrace prior to
4feafee9d9.  Like the builtin Error constructors, captureStackTrace now formats
the stack trace lazily once it is accessed.

Bug: v8:5962
Change-Id: I03821b73d26b7b40809a1fea98f9c820bfa05d6b
Reviewed-on: https://chromium-review.googlesource.com/574530
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46727}
2017-07-18 06:40:39 +00:00
v8-autoroll
a8d94c6626 Update V8 DEPS.
Rolling v8/build: 63efa35..1808a90

Rolling v8/third_party/catapult: af47a93..44b022b

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

Change-Id: Icf22a76859f0897d97ca68de61850cef1a607f26
Reviewed-on: https://chromium-review.googlesource.com/575868
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46726}
2017-07-18 03:46:49 +00:00
Adam Klein
6e94ecbb24 [ast/cleanup] Remove unused FunctionLiteral::SourceSize method
Change-Id: I091a1f4a1f2292b37a56520d0a5c46ac5781b459
Reviewed-on: https://chromium-review.googlesource.com/575515
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46725}
2017-07-18 00:20:15 +00:00
Sathya Gunasekaran
2580f56342 [runtime] Initialize value before calling CallPrinter
NOTREECHECKS=true

Bug: 
Change-Id: I6c4d76be9f032d1149a5128c90995b7302c9d9b5
Reviewed-on: https://chromium-review.googlesource.com/574697
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46724}
2017-07-17 23:39:08 +00:00
Sathya Gunasekaran
94ce16b704 Fix error message while array destructuring undefined
Previously,
  ➜  v8 (master) ✔ ./out.gn/x64.optdebug/d8
  V8 version 6.1.0 (candidate)
  d8> var x = undefined
  undefined
  d8> var [a] = x
  (d8):1: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
  var [a] = x
            ^
  TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
      at (d8):1:11

Now,
  ➜  v8 (fix-iterator) ✔ ./out.gn/x64.optdebug/d8
  V8 version 6.1.0 (candidate)
  d8> var x = undefined
  undefined
  d8> var [a] = x
  (d8):1: TypeError: x is not iterable
  var [a] = x
            ^
  TypeError: x is not iterable
      at (d8):1:11


Bug: v8:6599, v8:6513
Change-Id: I71287a19166af0289e8f7708b8f41ad003ae87ae
Reviewed-on: https://chromium-review.googlesource.com/571175
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46723}
2017-07-17 22:18:19 +00:00
Sathya Gunasekaran
c45b2291a7 [modules] Propogate scheduled exception on ToString failure
Also, add a couple of macros to handle error cases.

R=adamk@chromium.org

Bug: chromium:744292
Change-Id: I5dcb19ce67ec1aa4318d68d973d304cb07a65b80
Reviewed-on: https://chromium-review.googlesource.com/575394
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46722}
2017-07-17 22:07:41 +00:00
Sathya Gunasekaran
fbc681d370 [Promise] Move IsPromise to CPP
This was previously used by our js builtins but they no longer
exist. This has been exposed to API which means we can't remove it
just yet. Moving to CPP for now to save binary size.

Bug: v8:5343
Change-Id: I2a3e5a4169310b2ba13ce13f0386336e9733d71f
Reviewed-on: https://chromium-review.googlesource.com/575024
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46721}
2017-07-17 19:55:28 +00:00
Ulan Degenbaev
f7f2d2a493 [heap] Fix handling of AllocationSites in concurrent marking.
Now the concurrent marker skips the weak fields of AllocationSites.

BUG=chromium:694255

Change-Id: If920b6a14fa12c3a90ab0d283e22988ccbd48c0e
Reviewed-on: https://chromium-review.googlesource.com/574907
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46720}
2017-07-17 18:41:15 +00:00
Benedikt Meurer
42a648c586 Revert "[arm] Restrict grouping pushes before a TailCall to registers only"
This reverts commit a72b2f88a8.

Reason for revert: Breaks https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20debug/builds/7093

Original change's description:
> [arm] Restrict grouping pushes before a TailCall to registers only
> 
> We optimize parallel moves performed before a TailCall by grouping adjacent
> pushes. This way, we may use a single instruction to push multiple registers at
> once. However, we also have support for pushing immediates and stack slots for
> which the benefit is questionnable therefore this patch removes support for
> them.
> 
> Concerning immediate pushes, it looks like a mistake since we do not have
> support for this case in `AssembleMove` so this patch removes it. Furthermore,
> if we add a test for this case, we see that a `push ip` instruction is
> generated, effectively pushing whatever was in `ip` at the time instead of
> pushing a constant.
> 
> Concerning stack slot pushes, we generate a more or less equivalent sequence of
> instructions.
> 
> Finally, grouping floating point pushes is not used anywhere so this patch
> removes support for this also.
> 
> Bug: v8:6553
> Change-Id: I9b820d33361fc442dd813f66e1f96cda41009110
> Reviewed-on: https://chromium-review.googlesource.com/567191
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> Cr-Commit-Position: refs/heads/master@{#46718}

TBR=danno@chromium.org,jarin@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org

Change-Id: Ib9db9e6e4f033aeea32741e04b1b884429acc800
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6553
Reviewed-on: https://chromium-review.googlesource.com/574908
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46719}
2017-07-17 18:12:09 +00:00
Pierre Langlois
a72b2f88a8 [arm] Restrict grouping pushes before a TailCall to registers only
We optimize parallel moves performed before a TailCall by grouping adjacent
pushes. This way, we may use a single instruction to push multiple registers at
once. However, we also have support for pushing immediates and stack slots for
which the benefit is questionnable therefore this patch removes support for
them.

Concerning immediate pushes, it looks like a mistake since we do not have
support for this case in `AssembleMove` so this patch removes it. Furthermore,
if we add a test for this case, we see that a `push ip` instruction is
generated, effectively pushing whatever was in `ip` at the time instead of
pushing a constant.

Concerning stack slot pushes, we generate a more or less equivalent sequence of
instructions.

Finally, grouping floating point pushes is not used anywhere so this patch
removes support for this also.

Bug: v8:6553
Change-Id: I9b820d33361fc442dd813f66e1f96cda41009110
Reviewed-on: https://chromium-review.googlesource.com/567191
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#46718}
2017-07-17 17:21:36 +00:00
Michael Lippautz
93a1a16dbd [heap] Scavenger: Move code entry slot recording to promoted visitor
Bug: chromium:738865
Change-Id: Ic30a3e1012771d2e37b0e10aa59ab348a40bac10
Reviewed-on: https://chromium-review.googlesource.com/574714
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46717}
2017-07-17 17:10:05 +00:00
Ulan Degenbaev
1cfb4f6237 [heap] Fix handling of JSApiObjects in concurrent marking thread.
Now the concurrent marker pushes these objects in the bailout worklist
so that the main thread can perform wrapper tracing.

BUG=chromium:694255

Change-Id: I64f194334458fbabf16a63a8ae570456cb5fee19
Reviewed-on: https://chromium-review.googlesource.com/574603
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46716}
2017-07-17 16:50:49 +00:00
Michael Lippautz
b52ad07b4c [heap] Allow concurrent insertion in slot set
Bug: chromium:738865
Change-Id: I4c8aa8c90ba401200222d95d6395c022fc023a71
Reviewed-on: https://chromium-review.googlesource.com/574535
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46715}
2017-07-17 16:49:38 +00:00
Ross McIlroy
259bf74df0 [Compiler] Fix setting shared function info flags from literal for asm_wasm.
BUG=chromium:743622

Change-Id: Ic29a39d5976425eda2358c7e5ace0efa1b78a718
Reviewed-on: https://chromium-review.googlesource.com/574604
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46714}
2017-07-17 16:08:17 +00:00