Commit Graph

46919 Commits

Author SHA1 Message Date
Simon Zünd
028d4d8107 Removes messages.js
Inlines nameOrSourceURL and locationFromPosition of the Script object
at call sites.

R=jgruber@chromium.org

Bug: v8:7624
Change-Id: If217d4c1412fa22aaa856a017f73be4c803e70ac
Reviewed-on: https://chromium-review.googlesource.com/997741
Commit-Queue: Simon Zünd <szuend@google.com>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52427}
2018-04-06 09:24:23 +00:00
Michael Lippautz
3e3606e744 [heap] Fix ArrayBufferTracker teardown ordering
The byte_length of ArrayBuffers may be a heap number. This length is
needed for freeing a buffer during tear down, implying that ArrayBuffers
need to be freed before regular space tear down can remove actual pages.

Bug: v8:7623
Change-Id: Iab91843e48c50276a2e110915f69cf9e6c24ef8f
Reviewed-on: https://chromium-review.googlesource.com/997776
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52426}
2018-04-06 09:23:18 +00:00
Vlad Tsyrklevich
cfd7df1bb6 Reland "Enable cfi-icall on the v8 CFI bots"
This is a reland of 9a7e9cf2a7

Original change's description:
> Enable cfi-icall on the v8 CFI bots
> 
> BUG=v8:7164
> 
> Change-Id: I7522ba6ac2bde89c84bcd49bc116a432091a2938
> Reviewed-on: https://chromium-review.googlesource.com/990802
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52343}

Bug: v8:7164
Change-Id: Ia883adedf9d54e4a2518d66c85799354d930990e
Reviewed-on: https://chromium-review.googlesource.com/996133
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52425}
2018-04-06 09:22:14 +00:00
Mythri
9cf5e47bfa Fix --cache=code option to work with interactive shell.
--cache=code produces and consume cache in different isolates. Earlier
we created a new isolate for the run consuming the code cache. This cl
changes to create a new isolate when producing the code cache so that
RunShell works as expected.

Change-Id: I1c73aab2bee429aafdcc52a68ddcf742edfcd652
Reviewed-on: https://chromium-review.googlesource.com/997694
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52424}
2018-04-06 09:03:43 +00:00
Vlad Tsyrklevich
fee762f9a9 [CFI] Add chromium cfi-icall blacklist entries
BUG=v8:7164

Change-Id: I00f5fc6452901538a04315b93550be9bf03a9dd2
Reviewed-on: https://chromium-review.googlesource.com/996406
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52423}
2018-04-06 08:12:53 +00:00
Sigurd Schneider
3c2a259db9 Revert "[turbofan] Enable Promise constructor inlining by default"
This reverts commit 370d95dc36.

Reason for revert: Unexpected performance regressions

Original change's description:
> [turbofan] Enable Promise constructor inlining by default
> 
> Bug: v8:7584
> Change-Id: I7443c28c74676ee1f27550674c8f712594e21cc7
> Reviewed-on: https://chromium-review.googlesource.com/992314
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52341}

TBR=mstarzinger@chromium.org,jarin@chromium.org,sigurds@chromium.org

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

Bug: v8:7584
Change-Id: I821d73475d3e62d0e1ee1233d8e18c1f854e26bc
Reviewed-on: https://chromium-review.googlesource.com/999413
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52422}
2018-04-06 07:46:33 +00:00
Myles Borins
536bd76ad0 [tools] update node fetch_deps.py for gn
Various fixes necessary to get the script working with V8 6.6

Upstreamed from https://github.com/nodejs/node/pull/19201

Change-Id: Ic7819eb17cf4be8380b8c1811e569236244e7400
Reviewed-on: https://chromium-review.googlesource.com/996858
Commit-Queue: Myles Borins <mborins@google.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52421}
2018-04-06 07:35:33 +00:00
Michael Achenbach
503e07c3ef Revert "[cleanup] Refactor the Factory"
This reverts commit f9a2e24bbc.

Reason for revert: gc stress failures not all fixed by follow up.

Original change's description:
> [cleanup] Refactor the Factory
> 
> There is no good reason to have the meat of most objects' initialization
> logic in heap.cc, all wrapped by the CALL_HEAP_FUNCTION macro. Instead,
> this CL changes the protocol between Heap and Factory to be AllocateRaw,
> and all object initialization work after (possibly retried) successful
> raw allocation happens in the Factory.
> 
> This saves about 20KB of binary size on x64.
> 
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Icbfdc4266d7be8b48d2fe085f03411743dc6a0ca
> Reviewed-on: https://chromium-review.googlesource.com/959533
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52416}

TBR=jkummerow@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,hpayer@chromium.org

Change-Id: Idbbc53478742f3e9525eee83342afc6aedae122f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/999414
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52420}
2018-04-06 07:23:19 +00:00
Michael Achenbach
61ba646d03 Revert "Fix GC stress after r52416"
This reverts commit 8be6842c12.

Reason for revert: gc stress still broken:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/18635
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20gc%20stress/builds/15893

Original change's description:
> Fix GC stress after r52416
> 
> Allocating elements and/or property backing stores can, due to retrying,
> cause a JSObject that has just been allocated in new space to be promoted
> to old space, so skipping the write barrier is now an invalid optimization.
> 
> Tbr: hpayer@chromium.org
> Change-Id: I4a1eacbd59912dd4aa9069b0636f683fb4674231
> Reviewed-on: https://chromium-review.googlesource.com/998799
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52417}

TBR=jkummerow@chromium.org,hpayer@chromium.org

Change-Id: I2c29f34ea8ae950985c1638c21003e1025db06be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/999512
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52419}
2018-04-06 07:22:14 +00:00
Michael Achenbach
ab572da29e Revert "[wasm] Always enable guard regions on 64-bit platforms"
This reverts commit ad221d144a.

Reason for revert: Layout test failures:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/22780

Original change's description:
> [wasm] Always enable guard regions on 64-bit platforms
> 
> This change makes full 8 GiB guard regions always enabled on 64-bit
> platforms.
> 
> Additionally, since all Wasm memory allocation paths have some form of
> guard regions, this removes and simplifies most of the logic around
> whether to enable guard regions.
> 
> This is a reland of https://crrev.com/c/985142.
> 
> Bug: v8:7619
> Change-Id: I8bf1f86d6f89fd0bb2144431c7628f15a6b00ba0
> Reviewed-on: https://chromium-review.googlesource.com/996466
> Reviewed-by: Brad Nelson <bradnelson@chromium.org>
> Commit-Queue: Eric Holk <eholk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52412}

TBR=bradnelson@chromium.org,eholk@chromium.org

Change-Id: Ic15d14c6fa69300bc0fdc036b9fee8ecf65fd397
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7619
Reviewed-on: https://chromium-review.googlesource.com/999412
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52418}
2018-04-06 06:30:03 +00:00
Jakob Kummerow
8be6842c12 Fix GC stress after r52416
Allocating elements and/or property backing stores can, due to retrying,
cause a JSObject that has just been allocated in new space to be promoted
to old space, so skipping the write barrier is now an invalid optimization.

Tbr: hpayer@chromium.org
Change-Id: I4a1eacbd59912dd4aa9069b0636f683fb4674231
Reviewed-on: https://chromium-review.googlesource.com/998799
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52417}
2018-04-06 04:43:02 +00:00
Jakob Kummerow
f9a2e24bbc [cleanup] Refactor the Factory
There is no good reason to have the meat of most objects' initialization
logic in heap.cc, all wrapped by the CALL_HEAP_FUNCTION macro. Instead,
this CL changes the protocol between Heap and Factory to be AllocateRaw,
and all object initialization work after (possibly retried) successful
raw allocation happens in the Factory.

This saves about 20KB of binary size on x64.

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Icbfdc4266d7be8b48d2fe085f03411743dc6a0ca
Reviewed-on: https://chromium-review.googlesource.com/959533
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52416}
2018-04-06 00:23:46 +00:00
Camillo Bruni
54f2aac554 [runtime][parser] Store the inferred function name on the ScopeInfo
This is another small step towards detaching the JSFunction from Contexts.
In order to not break the debugger protocol we need the inferred name on the
ScopeInfo chain. This CL might increase memory usage slightly, given that the
inferred name field is duplicated on the ScopeInfo.

Bug: v8:7066, chromium:818642
Change-Id: I0dd9f18ae69791f774cf835669afa50491f7433b
Reviewed-on: https://chromium-review.googlesource.com/995792
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52415}
2018-04-05 21:18:52 +00:00
Hannes Payer
e32c5946d2 [heap] Add foreground/background UMA measurements for for main GC events.
Bug: chromium:814144
Change-Id: Idd729757608a714921254874af98a4a201340870
Reviewed-on: https://chromium-review.googlesource.com/981146
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52414}
2018-04-05 21:08:03 +00:00
Junliang Yan
8aefac355a PPC: fix debug build error
R=joransiu@ca.ibm.com

Change-Id: I28c7f3d018a03adb843b0426510c2ba669324b76
Reviewed-on: https://chromium-review.googlesource.com/996593
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#52413}
2018-04-05 21:03:42 +00:00
Eric Holk
ad221d144a [wasm] Always enable guard regions on 64-bit platforms
This change makes full 8 GiB guard regions always enabled on 64-bit
platforms.

Additionally, since all Wasm memory allocation paths have some form of
guard regions, this removes and simplifies most of the logic around
whether to enable guard regions.

This is a reland of https://crrev.com/c/985142.

Bug: v8:7619
Change-Id: I8bf1f86d6f89fd0bb2144431c7628f15a6b00ba0
Reviewed-on: https://chromium-review.googlesource.com/996466
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52412}
2018-04-05 19:57:13 +00:00
Junliang Yan
8cb01d3d90 PPC/s390: Reland "[debug] introduced runtime side effect check"
Port 7101881269

Original Commit Message:

    This is a reland of 7a2c371383

    Original change's description:
    > [debug] introduced runtime side effect check
    >
    > This CL demonstrates minimum valuable addition to existing debug evaluate
    > without side effects mechanism.
    > With this CL user can evaluate expressions like:
    > [a,b] // create any kind of temporary array literals
    > [a,b].reduce((x,y) => x + y, 0); // use reduce method
    > [1,2,3].fill(2); // change temporary arrays
    >
    > The core idea: any change of the object created during evaluation without
    > side effects is side effect free. As soon as we try to store this temporary
    > object to object existed before evaluation we will terminate execution.
    >
    > Implementation:
    > - track all objects allocated during evaluation and mark them as temporary,
    > - patch all bytecodes which change objects.
    >
    > A little more details (including performance analysis): [1].
    >
    > [1] https://docs.google.com/document/d/10qqAtZADspPnpYa6SEdYRxrddfKIZJIzbLtGpsZQkRo/edit#
    >
    > Bug: v8:7588
    > Change-Id: I69f7b96e1ebd7ad0022219e8213211c7be72a111
    > Reviewed-on: https://chromium-review.googlesource.com/972615
    > Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    > Reviewed-by: Yang Guo <yangguo@chromium.org>
    > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#52370}

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

Change-Id: I8706efa53d0bbf7d12e48f4f0c4ac387b5faa97b
Reviewed-on: https://chromium-review.googlesource.com/998180
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#52411}
2018-04-05 19:16:43 +00:00
Clemens Hammacher
4bc00abfd1 [Liftoff] Fix emit_ptrsize_add
Use 64-bit addition if the pointer size is 8, use 32-bit addition
otherwise.

R=titzer@chromium.org
CC=​sreten.kovacevic@mips.com

Change-Id: I129cc29454726b7be45ecea13484212cc4f72eea
Reviewed-on: https://chromium-review.googlesource.com/998552
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52410}
2018-04-05 19:12:23 +00:00
Eric Holk
ccde64615c [wasm] Add regression test for chromium:827806
The bug was fixed in https://crrev.com/c/995796, but this CL adds a
regression test to make sure it stays fixed.

Bug: chromium:827806
Change-Id: I9f4aed364bbd310af4253da457887a8b8015533a
Reviewed-on: https://chromium-review.googlesource.com/993237
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52409}
2018-04-05 18:49:23 +00:00
Xiaoyin Liu
46dfb572a8 Remove duplicated file listed in BUILD.gn
The v8_base project can't be loaded in Visual Studio 2017 because
"src/zone/zone-allocator.h" is listed twice.

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

Change-Id: Ide2f27a7f8ffd3c57deb7f9ae16c55122d999d06
Reviewed-on: https://chromium-review.googlesource.com/998346
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52408}
2018-04-05 18:31:54 +00:00
Fabrice de Gans-Riberi
3b348b4d88 Prepare for |is_posix| switch in the Fuchsia build
|is_posix| will be switched to false for Fuchsia, this is a preliminary change.

Bug: chromium:812974
Change-Id: I2ae8e5ef4270cd0acbc7c69bb46d1be9ed4a5c5e
Reviewed-on: https://chromium-review.googlesource.com/988253
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52407}
2018-04-05 17:24:24 +00:00
Pierre Langlois
f1e979a9c8 [cctest] Test parallel moves with near and far ranges.
The AssembleMove and AssembleSwap tests would only perform moves on stack
parameters. This limits us to testing with slots that are likely to be in range
of loads and stores. As well as only testing memory accesses with positive
offsets relative to the frame pointer.

This patch addresses these limitations by moving half of the stack parameters
into spill slots, to then perform moves on them. Additionally, to increase
ranges, we create articial space between each spilled slot.

As a drive-by, allow giving custom names to code objects created with the
CodeAssemblerTester. It helps a lot inspecting disassembly.

And finally, this CL uncovered a bug where I had forgotten to initialize
FixedArrays, which would make the incremental marker crash.

Bug: v8:6848
Change-Id: Ic1954c1896130f6c55e09a3068bf341cc4c68670
Reviewed-on: https://chromium-review.googlesource.com/980613
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52406}
2018-04-05 17:11:23 +00:00
Eric Holk
e90a052ef3 [wasm] Crash on out of memory under correctness fuzzer
Bug: chromium:828293
Change-Id: I37002c308738eef1366d82a90b7b29d6e44d6c48
Reviewed-on: https://chromium-review.googlesource.com/996585
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52405}
2018-04-05 17:00:03 +00:00
Marja Hölttä
ceaf02d613 [reland] [in-place weak refs] Replace the WeakCell potentially in Map::raw_transitions_.
Previous: https://chromium-review.googlesource.com/972962

BUG=v8:7308

Change-Id: I6882e36ad9f9360d006937a2f41b07839a73a768
Reviewed-on: https://chromium-review.googlesource.com/995014
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52404}
2018-04-05 16:24:06 +00:00
peterwmwong
3b39fc4dcd [esnext] Implement String.prototype.matchAll
Proposal repo: https://github.com/tc39/proposal-string-matchall

- Add new builtins StringPrototypeMatchAll and RegExpPrototypeMatchAll
- Add new object RegExpStringIterator

Bug: v8:6890
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I9fad71900cf30e8632258c309df1c7a638ea4600
Reviewed-on: https://chromium-review.googlesource.com/981893
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52403}
2018-04-05 15:24:25 +00:00
Michael Starzinger
0872da3773 [wasm] Make {CloneCodeHelper} a private helper class.
R=clemensh@chromium.org

Change-Id: I510c8e771ab1c84d094205e247054d8057d2dc85
Reviewed-on: https://chromium-review.googlesource.com/997845
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52402}
2018-04-05 14:56:54 +00:00
Camillo Bruni
6823c0a496 [runtime] Do some more StringTable shrinking
This CL further lowers the kMaxEmptyFactor constant to more aggressively shrink
the StringTable when it's empty.

Bug: v8:5443, chromium:818642
Change-Id: I1c263a0afd7e6bed8a8bb857db032bf126c3ef4b
Reviewed-on: https://chromium-review.googlesource.com/995473
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52401}
2018-04-05 14:52:40 +00:00
Yang Guo
424461cc9c Make node script's gclient dependency platform-independent.
This is a small step towards making node build on Windows.

Bug: v8:6105

R=machenbach@chromium.org

Change-Id: I8d3a9b1830bb012d846a791fddc8d1d8d830515e
Reviewed-on: https://chromium-review.googlesource.com/980950
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52400}
2018-04-05 14:41:11 +00:00
Michael Starzinger
595f14281f [wasm] Remove obsolete specialization zone.
R=clemensh@chromium.org

Change-Id: Iac827a4fc82f9b810af9d67c4aa5757925edc3c5
Reviewed-on: https://chromium-review.googlesource.com/997742
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52399}
2018-04-05 14:39:44 +00:00
Alexey Kozyatinskiy
0340874be4 [debug] add runtime side effect check for StaCurrentContextSlot
R=yangguo@chromium.org

Bug: v8:7588
Change-Id: If78f6dd460c7423923800a98d44520c1bf71663c
Reviewed-on: https://chromium-review.googlesource.com/996236
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52398}
2018-04-05 14:38:40 +00:00
Michael Starzinger
1b07fffc5c [wasm] Move protected instruction handling to native module.
R=clemensh@chromium.org

Change-Id: Ibe6c203aa3ebdbbd8d3ca1f9f0ddfa7f89d79c71
Reviewed-on: https://chromium-review.googlesource.com/997835
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52397}
2018-04-05 14:28:31 +00:00
Clemens Hammacher
17bb05f54d [Liftoff] Implement 64-bit bitwise operations
This adds support for i64.and, i64.or and i64.xor.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: Ie64e1874f87cd250f3e0641e021f584ecd0aaff9
Reviewed-on: https://chromium-review.googlesource.com/995444
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52396}
2018-04-05 13:58:48 +00:00
Clemens Hammacher
08710f5b0c [wasm][cleanup] Remove useless and wrong comment
The amortized cost of a single invocation is actually O(1), not O(n).
But this whole comment is needless anyway, so just remove it.

R=ahaas@chromium.org
NOTRY=true

Change-Id: Icffaedcd784584b1676cd7ed323555177a62d63e
Reviewed-on: https://chromium-review.googlesource.com/997812
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52395}
2018-04-05 13:12:18 +00:00
Michael Starzinger
c66549528b [wasm] Remove obsolete {GetWasmFunctionForExport} helper.
R=titzer@chromium.org

Change-Id: I2de3bef1753669c7a9f653ece14f168930392180
Reviewed-on: https://chromium-review.googlesource.com/997692
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52394}
2018-04-05 13:07:48 +00:00
Peter Marshall
e863e92643 [test] Enable inlined promise constructor tests on deopt fuzzer.
Bug: v8:7466
Change-Id: Icb47184e3f6e86bf69157fffd2b29a25ad916500
Reviewed-on: https://chromium-review.googlesource.com/997813
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52393}
2018-04-05 13:06:18 +00:00
Igor Sheludko
844b762f53 [ic][runtime] Don't use LookupIterator::ForTransitionHandler() constructor.
It looks like the normal ways of creating lookup iterators work better.

Bug: v8:5988, chromium:828282
Change-Id: Ifd623b2e93708ff8684d056d9292b7779f611a3c
Reviewed-on: https://chromium-review.googlesource.com/997474
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52392}
2018-04-05 12:27:26 +00:00
Andreas Haas
ae958346a0 [wasm][anyref] Decode anyref globals
Add support for decoding anyref globals, and some drive-by cleanups.

R=titzer@chromium.org

Bug: v8:7581
Change-Id: I3527f996a3fa1a890918a5924e951fbafa394cf2
Reviewed-on: https://chromium-review.googlesource.com/997655
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52391}
2018-04-05 12:17:41 +00:00
Clemens Hammacher
7401022460 [Liftoff] Implement f64 comparisons
This implements f64 comparisons analogue to f32 comparisons (f64.eq,
f64.ne, f64.lt, f64.gt, f64.le, f64.ge).

R=titzer@chromium.org

Bug: v8:6600
Change-Id: I382d575e4f2c585c2de1313f2c2fd2c8cda54a9d
Reviewed-on: https://chromium-review.googlesource.com/995773
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52390}
2018-04-05 12:16:37 +00:00
Peter Marshall
b158bfdc2f Reland "[runtime] Remove the construct_stub field of the SFI"
This is a reland of 63ecddc814

Original change's description:
> [runtime] Remove the construct_stub field of the SFI
>
> Don't dispatch based on the construct_stub field anymore. Rather than
> read it out and jump to the construct stub, we can switch on the
> builtin_id.
>
> Builtins will always have builtin_id as a Smi, so this signals we need
> to jump to JSBuiltinsConstructStub. The only exception is for uncompiled
> functions, which will have kCompileLazy as the builtin_id, but need to
> jump to the generic stub instead.
>
> API function calls will have a FunctionTemplateInfo in the SFI
> function_data field, and need to go to the builtins stub as well.
>
> The final case is everything else, which should go to the generic stub.
>
> Bug: v8:7503
> Change-Id: I14790a5f9784dc0d940bf10a05f5310026e1d482
> Reviewed-on: https://chromium-review.googlesource.com/980941
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52345}

TBR=bmeurer@chromium.org

Bug: v8:7503
Change-Id: Ie46bfb0af173ad7ac8cbdfeed1865e60f3f413f7
Reviewed-on: https://chromium-review.googlesource.com/997712
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52389}
2018-04-05 12:06:03 +00:00
Peter Marshall
eab5583aa9 [typedarray] Fix GetBuffer for 0-length off-heap typed arrays.
Fixes a crash that happens when calling postMessage on an empty typed
array.

GetBuffer should only call MaterializeArrayBuffer for on-heap buffers,
but the on-heap check is slightly wrong. This CL moves the on-heap check
logic to the JSTypedArray class so that other parts of the codebase
don't need to worry about how that is determined.

Also add some dchecks to materialize itself. It should only receive
on-heap buffers and should always transform them to off-heap buffers.
There is also no reason for it to be static, so change that here too.

Bug: chromium:797588
Change-Id: Icd88a5b68e424d82c9f1f7889ca42a40a72a1bdc
Reviewed-on: https://chromium-review.googlesource.com/995898
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52388}
2018-04-05 11:42:31 +00:00
jgruber
7b29fe434d Rename Code::instruction_{start,end,size} functions
In order to clarify the difference between, e.g., InstructionStart and
instruction_start, rename as follows:

Code::instruction_start -> raw_instruction_start
Code::instruction_end   -> raw_instruction_end
Code::instruction_size  -> raw_instruction_size

The difference between the camel-case and raw_* function families is
in how they handle off-heap-trampoline Code objects. For example, when
called on an off-heap-trampoline: raw_instruction_start returns the
trampoline's entry point, while InstructionStart returns the off-heap
code's entry point (located in the .text section of the binary).

Some callsites were updated to call the camel-case function family as
appropriate.

Bug: v8:6666
Change-Id: I4a572f47c2d161a853599d7c17879e263b0d1a87
Reviewed-on: https://chromium-review.googlesource.com/997532
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52387}
2018-04-05 11:39:32 +00:00
Marja Hölttä
d82e8f37bf [heap] Fix iterating uninitialized TransitionArrays.
This pattern seems to reoccur in the code:

Handle<TransitionArray> array = TransitionArray::Allocate(...);
<something that causes allocation>
// Fill up the array
array->set(...);

If the allocation causes GC, we try to iterate the TransitionArrray
in MarkCompactCollector::ClearFullMapTransitions, and that crashes because it
expects the TransitionArray to contain handlers (not undefined).

This bug is present e.g., in TransitionAccessor::EnsureHasFullTransition.

BUG=v8:7308

Change-Id: I306204fc27d62041801427c466c82d1d9df1bf0c
Reviewed-on: https://chromium-review.googlesource.com/997493
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52386}
2018-04-05 11:36:52 +00:00
Michael Achenbach
a9f5dd30e4 [release] Switch auto-roller to gclient setdep
NOTRY=true

Bug: chromium:828745
Change-Id: I051f57893937796e01f0b823f1050dd36e0fbfd9
Reviewed-on: https://chromium-review.googlesource.com/997556
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52385}
2018-04-05 10:37:19 +00:00
Marja Hölttä
7a161f6492 [in-place weak refs] Add missing printing functionality.
In addition, remove the default branch from the swtich in HeapObjectPrint, so
that it's no longer possible to leave out printing functionality by accident.

BUG=v8:7308

Change-Id: I2db67549e328aea6228d3a370f9ebb7494ab3730
Reviewed-on: https://chromium-review.googlesource.com/997492
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52384}
2018-04-05 10:14:39 +00:00
Predrag Rudic
0f19068631 [cctest] Remove from skip list test-run-wasm-simd tests
Removing these tests from skip list because corresponding wasm simd
opcodes lowering has been implemented.

Change-Id: I77bbbee573ba65cf27dc9ee39f4d352bafb5849f
Reviewed-on: https://chromium-review.googlesource.com/988032
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52383}
2018-04-05 09:49:06 +00:00
Clemens Hammacher
22fda233bc Reland "[Liftoff] Implement float rounding"
This is a reland of 5ae8420c28

Original change's description:
> [Liftoff] Implement float rounding
> 
> This adds support for the four rounding operations on f32 and f64:
> f32.ceil, f32.floor, f32.trunc, f32.nearest_int, f64.ceil, f64.floor,
> f64.trunc, and f64.nearest_int.
> 
> R=titzer@chromium.org
> 
> Bug: v8:6600
> Change-Id: I16ea91e26c3233af7a33bbb794cd4182f9d7cdb0
> Reviewed-on: https://chromium-review.googlesource.com/995894
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52377}

Bug: v8:6600
Change-Id: I9e69309b71041e411bda9ce1375d2451197a111b
Reviewed-on: https://chromium-review.googlesource.com/997393
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52382}
2018-04-05 09:31:27 +00:00
Predrag Rudic
b9de3af697 [wasm] Add big endian support for S8x16Shuffle
Change-Id: Id661452207cd65445e7390d86f5379b1cc4f1495
Reviewed-on: https://chromium-review.googlesource.com/988012
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52381}
2018-04-05 09:03:36 +00:00
Predrag Rudic
4d595e0241 [builtins] Support BigInt code stubs for BIG ENDIAN platforms
mjsunit/harmony/bigint/typedarray test failure on mips32 big endian
pointed there was a problem.

Change-Id: I016a31d7758e7bd4019210e23c147dc0f8ea893f
Reviewed-on: https://chromium-review.googlesource.com/995455
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52380}
2018-04-05 09:00:24 +00:00
Sigurd Schneider
dbb80b62e2 [turbofan] Move ArrayView/TypedArray to JSCallReducer
This moves ArrayView.isArray and some TypedArray accessors to
the JSCallReducer.

Bug: v8:7340, v8:7250
Change-Id: Ia6ed9dc5eb8f0c84c286c58d757cbc149d811cf7
Reviewed-on: https://chromium-review.googlesource.com/995454
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52379}
2018-04-05 08:22:37 +00:00
Clemens Hammacher
8f20e60f41 Revert "[Liftoff] Implement float rounding"
This reverts commit 5ae8420c28.

Reason for revert: Fails on non-sse machine: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20debug/builds/21480

Original change's description:
> [Liftoff] Implement float rounding
> 
> This adds support for the four rounding operations on f32 and f64:
> f32.ceil, f32.floor, f32.trunc, f32.nearest_int, f64.ceil, f64.floor,
> f64.trunc, and f64.nearest_int.
> 
> R=​titzer@chromium.org
> 
> Bug: v8:6600
> Change-Id: I16ea91e26c3233af7a33bbb794cd4182f9d7cdb0
> Reviewed-on: https://chromium-review.googlesource.com/995894
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52377}

TBR=titzer@chromium.org,clemensh@chromium.org

Change-Id: Iefdeb088b84384f7bc5dc5de6917bc60e9b8292c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6600
Reviewed-on: https://chromium-review.googlesource.com/997392
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52378}
2018-04-05 08:13:05 +00:00