Commit Graph

45626 Commits

Author SHA1 Message Date
Eric Holk
6525dd389c [wasm] Report out of memory conditions correctly for NewNativeModule
We are seeing rare crashes due to dereferencing a null pointer shortly after
calling NewNativeModule. The most likely cause is that we failed the allocation
and returned a null pointer. Now we will use V8::FatalProcessOutOfMemory so that
this gets handled correctly.

Bug: chromium:809002
Change-Id: I7e11897c4b93a1fb9eab3b5f16fb42c27e719f87
Reviewed-on: https://chromium-review.googlesource.com/905685
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51134}
2018-02-07 00:04:32 +00:00
Gabriel Charette
384a5223b7 [v8::ItemParallelJob] Add an instant trace event to log num_tasks/num_items for ease of trace diagnosis.
R=mlippautz@chromium.org

Bug: chromium:651354
Change-Id: I5762813f6bd7b3c549f22ee8e43c59ca9edbe915
Reviewed-on: https://chromium-review.googlesource.com/904523
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51133}
2018-02-06 22:02:19 +00:00
Gabriel Charette
7d58b3c46c Isolate ItemParallelJob implementation in CC file.
This CL is a pure code move based on top of
https://chromium-review.googlesource.com/c/v8/v8/+/899365

Having it all in the header was becoming more and more tedious:
requiring large rebuilds for impl changes and
requiring exporting unrelated symbols merely so that unittests
could link
@ https://chromium-review.googlesource.com/c/v8/v8/+/899365
and https://chromium-review.googlesource.com/c/v8/v8/+/904523/2

R=mlippautz@chromium.org

Bug: chromium:651354
Change-Id: Ib34043d061dd3b1221cd06799eddc888090fe1c1
Reviewed-on: https://chromium-review.googlesource.com/904167
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51132}
2018-02-06 21:55:49 +00:00
Gabriel Charette
85b8daed63 Add V8.GC.ParallelTaskLatencyMicroSeconds metric.
It will record the time-to-schedule-after-job-start for different
task types to try to highlight use cases where contention might
be a problem (and show improvements to it later).

Also introducing AsyncTimedHistogram to support this use case whose
reported timings go beyond a single scope (i.e. the async version of
ScopedTimedHistogram).

Bug: chromium:807606
Change-Id: Ib4d581fa8b001723dfe8c91102280e9608b4fabb
Reviewed-on: https://chromium-review.googlesource.com/899365
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51131}
2018-02-06 21:53:49 +00:00
Gabriel Charette
f7758dfa02 Log error instead of DCHECK in absence of high resolution ticks clock.
Turns out this path is used in the wild for logs and counters.

We may eventually want to split TimedHistograms based on low resolution
clocks to avoid polluting metrics but for now just make it a warning
to raise awereness when debugging in such an environment.

R=hpayer@chromium.org

Bug: chromium:809016
Change-Id: I5f2dd511d5fce730256979d58212468f08a2d680
Reviewed-on: https://chromium-review.googlesource.com/904045
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51130}
2018-02-06 21:23:59 +00:00
kschimpf
5eca0acc0a [wasm] Clean up float to integer conversions
Cleans up the implementation of trapping/saturating operations to
use existing models of types, instead of defining new ones. That is,
it uses MachineType to represent the kind of integer/float value the
conversion is operating on.

It also removes the need to define NumericImplementation by using
the actual opcodes to determine if the instruction is trapping or
saturating.

Finally, it now defines a single method to implement the truncating
(that doesn't use a ccall) conversions. The previous code had two
methods, one for I32 and one for I64.

Bug: v8:7226
Change-Id: Ia869416c8bd1abe76d0583c28a3105102d130b46
Reviewed-on: https://chromium-review.googlesource.com/900558
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51129}
2018-02-06 20:53:57 +00:00
Sathya Gunasekaran
ec434d6767 [class] Ban #constructor as a private field name
Bug: v8:5368
Change-Id: Idcb13e039614167da8b5be879e5644dbcb9df271
Reviewed-on: https://chromium-review.googlesource.com/899881
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51128}
2018-02-06 18:58:37 +00:00
Joakim Bengtsson
134cd88243 Wait on the semaphore for all finished unmapper tasks.
The task count was reset after handling the first task, so the wait
loop would end after one iteration. As a result unmapping tasks might
have been left running even after waiting for the tasks to be
completed.

Bug: v8:7412
Change-Id: I869848477946589d0370ab038d135393e816a7c0
Reviewed-on: https://chromium-review.googlesource.com/903166
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51127}
2018-02-06 18:02:58 +00:00
Jaroslav Sevcik
03cf107078 [turbofan] Properly undef macros in machine-operator.cc
Change-Id: I1bf57ab030e738f0b4320fb3b74fc8600cd34e4d
Reviewed-on: https://chromium-review.googlesource.com/904482
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51126}
2018-02-06 17:58:28 +00:00
Benedikt Meurer
7632da067b [builtins] Save one word in contexts for Promise.all.
In the contexts for the resolver closures used in Promise.all we can
save the "already visited" cell, by just setting the index slot to a
negative value, which then indicates that this element was already
done.

Bug: v8:7253
Change-Id: I1296a2216eac3b51368c1e7795dbcd2c80cc430a
Reviewed-on: https://chromium-review.googlesource.com/903928
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51125}
2018-02-06 17:53:48 +00:00
Junliang Yan
d468ff4e1f s390: Reland "Reland "[builtins] Add .incbin cctest""
Port 47e272b206

Original Commit Message:

    This is a reland of ef06feded6.

    Original change's description:
    > Reland "[builtins] Add .incbin cctest"
    >
    > This is a reland of b012816155.
    >
    > Original change's description:
    > > [builtins] Add .incbin cctest
    > >
    > > Just to ensure this is portable across all platforms.
    > >
    > > Credits go to https://github.com/graphitemaster/incbin, bits of the
    > > .incbin code were taken from there. Thanks!
    > >
    > > Reland of https://crrev.com/c/881181
    > >
    > > Bug: v8:6666
    > > Change-Id: I5c0dbf56b1c987fd88607dca69b39d65b59cdefc
    > > Reviewed-on: https://chromium-review.googlesource.com/895597
    > > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    > > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    > > Cr-Commit-Position: refs/heads/master@{#51042}
    >
    > Cq-Include-Trybots: luci.v8.try:v8_win64_msvc_compile_rel
    > Bug: v8:6666
    > Change-Id: I8fc0963e28996a84ed56c2e740d895e26611abf0
    > Reviewed-on: https://chromium-review.googlesource.com/897630
    > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#51054}

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

Change-Id: I863d01a4a7d91f9f2128e4598f417efe49c43e7b
Reviewed-on: https://chromium-review.googlesource.com/902431
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51124}
2018-02-06 17:41:12 +00:00
Deepti Gandluri
3363e51958 [wasm] Add F32x4{Abs, Neg, AddHoriz}
- Remove redundant instruction from I16x8Splat
 - Force F32x4Splat to use movss, as using MacroAssembler can mix SSE/AVX
 instructions

Bug: v8:6020
Change-Id: I781c22adecf892a79b6a38c3d83fc4022f9067de
Reviewed-on: https://chromium-review.googlesource.com/898429
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51123}
2018-02-06 17:31:42 +00:00
Peter Marshall
cf9b487355 [typedarray] Port ConstructByIterable by CSA.
This is the last piece of the TypedArray constructors that was still
written in JS.

Bug: v8:7102
Change-Id: I7c4dc867b09408caa4eec2873ea7185b6c61a525
Reviewed-on: https://chromium-review.googlesource.com/888751
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51122}
2018-02-06 17:06:43 +00:00
Gabriel Charette
cdecc37500 [v8::heap] Include main thread in num_tasks computations.
The num_tasks computation has long been based on NumberOfAvailableBackgroundThreads()

We used to have one background worker per core, stealing cycles from
the main thread. I fixed that @ crrev.com/534414. But now this
computation is wrong and generates one less task than it should (one
per worker but the main thread takes task #0 in practice).

Other usage of NumberOfAvailableBackgroundThreads() in V8 seem correct
already so this is the only tweak required.

R=mlippautz@chromium.org

Bug: chromium:808028
Change-Id: I784ed9b764017f146931547d30be4a3b180b5a2c
Reviewed-on: https://chromium-review.googlesource.com/904662
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51121}
2018-02-06 16:22:17 +00:00
Gabriel Charette
3d11bf7711 Highlight individual work items in tracing of parallel GC.
This merely re-uses the same ScopeId as the task. Tracing shows these
as a nested layer with the same name. This is not the cleanest way to
do this but it makes the trace clearer for a minimal diff.

R=mlippautz@chromium.org

Bug: chromium:651354
Change-Id: Ib30ec7d04a30657a63a49aba9698cacd9af950d3
Reviewed-on: https://chromium-review.googlesource.com/904164
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51120}
2018-02-06 15:42:17 +00:00
peterwmwong
74e754a3d8 [typedarray] Fix perf of TA.set with different type
Removes the overhead of Zone allocating temporary space
that only slightly improved performance of the overlap
(less common) case.

Bug: chromium:808360
Change-Id: Ic92f20f15decb12b916ee23267debd9adc785ee0
Reviewed-on: https://chromium-review.googlesource.com/904462
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#51119}
2018-02-06 15:04:37 +00:00
Pierre Langlois
9d43ee8022 [perf-prof] Ignore source position entries with no source script.
The perf jit support assumes that if a code object has source position entries,
then it has a source file associated with them. However, the WasmToJS wrapper
stubs are exceptions to this rule which causes a crash when using `--perf-prof`
with asm.js or WASM code.

Change-Id: I047e229477844bf5357c8553ee50e22c089ab1c2
Reviewed-on: https://chromium-review.googlesource.com/897643
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#51118}
2018-02-06 13:41:34 +00:00
Yang Guo
41a9dea3c7 [debug] do not check break points against undefined.
Break points are cleared to empty fixed array, not undefined.

R=jgruber@chromium.org

Change-Id: Id8dcd08ed0aebc5c4f7745982cde48d562af9772
Reviewed-on: https://chromium-review.googlesource.com/904202
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51117}
2018-02-06 13:36:54 +00:00
Benedikt Meurer
d4f072ced3 [builtins] Also use the Promise#then protector for Promise#finally().
Add a fast-path to Promise#finally, which skips the "then" lookup of the
Promise#then lookup chain is intact, similar to what we already do for
Promise#catch.

Drive-by-fix: Also use the @@species protector to speed up the lookup
of the SpeciesConstructor in Promise#finally.

Bug: v8:7253
Change-Id: If77e779a0188904effc4528beffc8f0bdd7c2efe
Reviewed-on: https://chromium-review.googlesource.com/902283
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51116}
2018-02-06 11:41:12 +00:00
Benedikt Meurer
6703dacdd6 [builtins] Don't mess with entered context for MicrotaskCallbacks.
Blink get's highly confused when we change the "entered or
microtask context" for MicrotaskCallbacks.

Bug: chromium:808911, v8:7253
Change-Id: Iee1e872b81a7cddd7138d22d10fa12aa71935dbf
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/903769
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51115}
2018-02-06 10:38:22 +00:00
Yang Guo
d17b4bfb27 Reland "[regexp] fix Latin1 ignore-case bug."
Bug: v8:6703
Change-Id: I225cd78bedf2c0c123aedd3deeb1cd6d442f7697
Reviewed-on: https://chromium-review.googlesource.com/901522
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51114}
2018-02-06 10:34:12 +00:00
Franziska Hinkelmann
8f96f66f66 [cpu-profiler] Use unique pointers for clearer ownership
Use unique pointers in vectors of current and finished profiles.

Change-Id: Ifb78f7d3804e9883062741fd4e4e31109965d501
Reviewed-on: https://chromium-review.googlesource.com/898984
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51113}
2018-02-06 10:17:32 +00:00
Georg Neis
18a07e11e3 [compiler] Refactor checking for uninitialized IC.
Move the nexus.IsUninitialized() check into ExtractReceiverMaps so that
we don't need to duplicate the bailout.

Change-Id: I55bdb9baca22f25f681a7a32f4ec56d599c748c6
Reviewed-on: https://chromium-review.googlesource.com/903169
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51112}
2018-02-06 10:13:02 +00:00
jgruber
a04d2a3624 Remove code for deprecated stack-overflow-boilerplate
The stack overflow boilerplate has been removed since the Error
refactoring in 2016. These explicit stack space checks can now be
removed in favor of standard Throw semantics.

Change-Id: I8b02b9641ebd01e12d12b8da2454d2d04b65df3d
Reviewed-on: https://chromium-review.googlesource.com/903168
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51111}
2018-02-06 09:57:42 +00:00
Ivica Bogosavljevic
6ca56bbdcc MIPS64: Fix random address format at GetRandomMmapAddr
MIPS64 requires that each allocated page is aligned to 256 MB.
This is so because we use J instruction for long branches
that are withing a 256 MB block of code.

Change-Id: I1222842a5b8ecfacc0397a744ab464e9a747f8b7
Reviewed-on: https://chromium-review.googlesource.com/901611
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51110}
2018-02-06 09:47:33 +00:00
jgruber
7c14a408f9 [builtins] Add tests for embedding with .byte directive
It turns out that .incbin can be problematic for build systems, in
that the included binary file is not detected as a build-time
dependency.

The alternative is .byte inclusion, which we test here.

Cq-Include-Trybots: luci.v8.try:v8_win64_msvc_compile_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Bug: v8:6666
Change-Id: Ie24f4191db17c920c617987d1bee730208776b91
Reviewed-on: https://chromium-review.googlesource.com/901352
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51109}
2018-02-06 09:42:52 +00:00
Mathias Bynens
fefee7dc1b [v8-extras] Remove simpleBind
The `simpleBind` function exposed by V8 Extras was initially added to
work around the terrible performance of `Function.prototype.bind` at
the time. Nowadays `Function.prototype.bind` is significantly faster
and fully optimized by TurboFan, however, so there’s no need for the
`simpleBind` helper anymore.

Bug: chromium:807522
Change-Id: I1a0456e2aa34f92a3c9a0234a812b660f969d016
Reviewed-on: https://chromium-review.googlesource.com/903164
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51108}
2018-02-06 09:17:58 +00:00
Peter Marshall
71ea148ec3 [csa] Move the GrowableFixedArray into its own file.
We want to be able to use this from other builtins as well, so move it
to somewhere common.

Also adds typing and cleans up the coding style to match newer CSA code
a bit more. GrowableFixedArray is now a subclass of CodeStubAssembler
to make things easier and cleaner. The growing strategy has also been
slightly changed so that empty arrays can be produced.

Change-Id: I20cbd1069d489a6875804736d3e5abab80d0f777
Reviewed-on: https://chromium-review.googlesource.com/901324
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51107}
2018-02-06 09:06:55 +00:00
Benedikt Meurer
40dd065823 [debugger] Properly deal with settled promises in catch prediction.
The catch prediction logic got confused when we merged the reactions and
result fields of JSPromise, because for settled promises it would start
to treat the result as reactions list, leading to a crash most likely or
memory corruption in the worst case (only if break on uncaught exception
is enabled). We can only inspect reactions when the promise is still in
"pending" state.

Bug: chromium:808973, v8:7253
Change-Id: I15162c96fce959a052fbc628addd9418da39327c
Reviewed-on: https://chromium-review.googlesource.com/903163
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51106}
2018-02-06 08:42:35 +00:00
Clemens Hammacher
ba330c3e7d [Liftoff] Add support for i64 constants, params and returns
This adds support for the {i64.const} opcode. Since this makes i64
values show up on the wasm stack, quite some code paths need to handle
them. The {CheckSupportedType} method still returns false for kWasmI64,
which will be changed in a follow-up CL. That requires more changes
since it unlocks more uses of i64, e.g. in loads and stores.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: Ie012d0cd3db001f8693573fd16a3cfafe187009b
Reviewed-on: https://chromium-review.googlesource.com/893319
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51105}
2018-02-06 08:31:16 +00:00
v8-autoroll
f5ee2ccfae Update V8 DEPS.
Rolling v8/build: 508a6cd..ac54aef

Rolling v8/buildtools: f115f47..2637e7e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/f601e51..6d0f862

Rolling v8/third_party/icu: c8ca296..d888fd2

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

Change-Id: I3fa181e44ee42eeb562570b33035cde5e0d29dbe
Reviewed-on: https://chromium-review.googlesource.com/902847
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51104}
2018-02-06 04:47:03 +00:00
Michael Starzinger
61391f366b [wasm] Ensure WasmCode always has protected instructions.
R=clemensh@chromium.org
TEST=mjsunit/regress/wasm/regress-808012
BUG=chromium:808012

Change-Id: Ia1e4527c6c845ffd01ecf5c7fa13b8b484d6ef6e
Reviewed-on: https://chromium-review.googlesource.com/899122
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51103}
2018-02-05 22:01:56 +00:00
Junliang Yan
84504c2a91 PPC/s390: define VisitS128Select to fix compilation
R=joransiu@ca.ibm.com

Change-Id: Iabba5eb2cbd941ace02951995d727196763d1aca
Reviewed-on: https://chromium-review.googlesource.com/902363
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51102}
2018-02-05 19:54:23 +00:00
Ali Ijaz Sheikh
5918a23a3d [heap] MinorMC: pause observers before toggling gc state
Bug: v8:7407
Change-Id: Icb13921872a9e41dced3ae95ff37ddf72ae30568
Reviewed-on: https://chromium-review.googlesource.com/902009
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com>
Cr-Commit-Position: refs/heads/master@{#51101}
2018-02-05 18:22:13 +00:00
sreten.kovacevic
f62356e0e6 [mips] Fix {AssembleArchLookupSwitch} implementation
Previous implementation used delay slot the wrong way.
Also, trampoline pools were not generated as they should.
MIPS64 changed to be the same as MIPS since there is probably
same problem that is masked.

test=wasm-spec-tests/tests/br_table

Change-Id: I94786233714a4a2f5eb86e74e02b7e7a7328bf2b
Reviewed-on: https://chromium-review.googlesource.com/901883
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51100}
2018-02-05 17:25:30 +00:00
Choongwoo Han
34a8204a1e [wasm] Set wasm_compiled_module for script of deserialized module
Bug: chromium:808980
Change-Id: I7a89c6e30f473821f676fd5771365103072c78f1
Reviewed-on: https://chromium-review.googlesource.com/901306
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51099}
2018-02-05 16:48:00 +00:00
Dan Elphick
544c970534 [js-perf-tests] Create tests for Array.from
Modify "run_perf.py --filter Array/" so that it will let match "Array" but
not "ArrayLiteralSpread". Previously --filter Array/ would match nothing.

Change-Id: I1f9c677e3558fc2256a71306af5fc1a8394ac698
Reviewed-on: https://chromium-review.googlesource.com/895453
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51098}
2018-02-05 16:23:19 +00:00
kschimpf
56088a2659 [wasm] Fix duplicated tests for float to I64 tests
Fixes float to I64 tests to not have duplicated tests.

Also changes the use of macro REQUIRE to only be needed when an opcode
(i.e. operation) is not supported on some architecture.

Bug: v8:7226
Change-Id: I6c18602bd836469077808c0b3c93732af7c8f0d8
Reviewed-on: https://chromium-review.googlesource.com/895408
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51097}
2018-02-05 16:13:58 +00:00
Yang Guo
0391a8c5ae Fix undefined behavior wrt float-cast-overflow in conversions-inl.h.
Patch by Rumeet Dhindsa <rdhindsa@google.com>.

R=jkummerow@chromium.org

Change-Id: Ibff1af58bbdae52c6fb24b3d98d25e52cee0b63c
Reviewed-on: https://chromium-review.googlesource.com/899006
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51096}
2018-02-05 15:17:00 +00:00
Andreas Haas
59e87d645c [wasm] Remove mjsunit/wasm/test-import-export-wrapper
The test required a special runtime function, which did not work in
general but only in the context of that one test. After an offline
discussion we decided that what the test is testing is not worth a
runtime function, since we would also see in other tests if something
goes wrong.

R=clemensh@chromium.org

Bug: v8:7403
Change-Id: I129a189a9df299d409a4a555eae28783e47b97d1
Reviewed-on: https://chromium-review.googlesource.com/901284
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51095}
2018-02-05 13:28:11 +00:00
Georg Neis
b17a167900 [ic] Remove impossible case in FeedbackNexus::StateFromFeedback.
Also slightly restructure if-chain for readability.

Bug: 
Change-Id: I1903106f412e559536bac3369610f40fa6b58680
Reviewed-on: https://chromium-review.googlesource.com/901502
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51094}
2018-02-05 12:52:01 +00:00
jgruber
992f7cc9b3 [profiler] Emit code creation events for off-heap builtins
Bug: v8:6666
Change-Id: I8de39b6ce31b59e5a76267cb665d42f758309c2a
Reviewed-on: https://chromium-review.googlesource.com/897530
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51093}
2018-02-05 12:22:51 +00:00
Pierre Langlois
20a83e4ff0 [turbofan] Remove UnsafePointerAdd operation in TypedArray accesses.
A previous CL lowered NumberConstant nodes into IntPtrConstant nodes during
simplified lowering. It inadvertently disabled an optimization in TypeArray
accesses that relied on matching NumberConstant(0).

Bug: chromium:806727
Change-Id: If1938af057be66dea8edc588cc048a01410ca0ad
Reviewed-on: https://chromium-review.googlesource.com/897494
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#51092}
2018-02-05 11:27:21 +00:00
Franziska Hinkelmann
23dd8ef207 [cpu-profiler] Use unique pointer for line info
Change-Id: Ia1289985fa715ce4de66bec91675279c203afa36
Reviewed-on: https://chromium-review.googlesource.com/897811
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51091}
2018-02-05 09:52:00 +00:00
Michael Achenbach
190a896879 Revert "[regexp] fix Latin1 ignore-case bug."
This reverts commit 8e9eba3695.

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

Original change's description:
> [regexp] fix Latin1 ignore-case bug.
> 
> R=​jgruber@chromium.org
> 
> Bug: v8:6703
> Change-Id: I6b251191cc00d9ac8db41b91b528c130d1b23fc6
> Reviewed-on: https://chromium-review.googlesource.com/897523
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51088}

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

Change-Id: I09138cedb2631640709ec717045247362f653cb2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6703
Reviewed-on: https://chromium-review.googlesource.com/901184
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51090}
2018-02-05 09:28:41 +00:00
Andreas Haas
bb253d28f4 [fuzzer] Handle more than 256 parameters of the same type
The multi-return fuzzer was able to generate more than 256 parameters of
the same type. However, the fuzzer itself could not deal with so many
parameters. With this change more than 256 parameters of the same type
can be handled and tested.

R=clemensh@chromium.org

Bug: chromium:807862
Change-Id: I6941eb0ff7e78a8feebc437624fa100adeda4e3d
Reviewed-on: https://chromium-review.googlesource.com/897673
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51089}
2018-02-05 09:04:40 +00:00
Yang Guo
8e9eba3695 [regexp] fix Latin1 ignore-case bug.
R=jgruber@chromium.org

Bug: v8:6703
Change-Id: I6b251191cc00d9ac8db41b91b528c130d1b23fc6
Reviewed-on: https://chromium-review.googlesource.com/897523
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51088}
2018-02-05 09:00:20 +00:00
jing.bao
1a10e7b6b2 [ia32][wasm] Add S128Select
Change-Id: If796c837c621053a61008793c0a51f3138047ebb
Reviewed-on: https://chromium-review.googlesource.com/898568
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jing Bao <jing.bao@intel.com>
Cr-Commit-Position: refs/heads/master@{#51087}
2018-02-05 02:13:33 +00:00
Michael Achenbach
5b1cdba9d0 [test] Backlist harmony flags on endurance fuzzer
TBR=gsathya@chromium.org

Bug: v8:7404
Change-Id: I6833be4480841f2f6f487ba3992d505bdf94a45c
Reviewed-on: https://chromium-review.googlesource.com/900802
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51086}
2018-02-04 15:28:02 +00:00
Benedikt Meurer
db0556b7e8 [builtins] Widen the fast-path for Promise builtins.
This adds a new isolate wide Promise#then protector, which guards the
"then" lookup for all JSPromise instances whose [[Prototype]] is the
initial %PromisePrototype%. Thus arbitrary mutations to the
Promise.prototype (i.e. monkey-patching other methods or installing
new functions) no longer sent you down the slow-path. Use this protector
in Promise.prototype.catch and in Promise.resolve.

Drive-by-fix: Restructure the resolve logic a bit and avoid the
expensive and large SameValue check, which can be turned into a simple
reference equal, as the promise in there is known to be a JSPromise
anyways.

Bug: v8:7253
Change-Id: If68b12c6bc6ca9c4d10552ae84854ebc3b5774f9
Reviewed-on: https://chromium-review.googlesource.com/899302
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51085}
2018-02-04 08:58:02 +00:00