Commit Graph

43761 Commits

Author SHA1 Message Date
jgruber
51554eb126 [builtins] Check we don't directly call lazy TFJ builtins
Lazy TFJ builtins rely on a mechanism that uses the SharedFunctionInfo
to determine the builtin to deserialize. That obviously doesn't work if
we call the lazy builtin directly, so make sure this does not happen (at
least not through (Tail)CallBuiltin).

Bug: v8:6624
Change-Id: Iea95d83379a5a0e47324e1fef83c005350f2f02a
Reviewed-on: https://chromium-review.googlesource.com/754684
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49169}
2017-11-07 08:30:49 +00:00
cjihrig
14ddbc1899 Update postmortem metadata jobs
This commit updates the jobs for generating postmortem
metadata. I96a8a7cdded6f7c37b6f1da659d63df9e3a5de2b moved
the Code class to a new file without updating the postmortem
jobs. This resulted in some constants used by Node.js to
disappear, leading to build failures on SmartOS.

See: https://github.com/nodejs/node-v8/issues/21
Bug: 
Change-Id: Icf5f59fe464d933c4f5a3f622b08c01bc43c6a80
Reviewed-on: https://chromium-review.googlesource.com/741919
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49168}
2017-11-07 08:07:29 +00:00
Yang Guo
656c640ca9 Reland: Snapshot: support rehashing property and element dictionaries.
This change
- adds new maps for elements, global, and named dictionaries.
- adds support to embed these dictionaries in the startup snapshot.
- adds support to embed these dictionaries in the code cache.
- refactors the rehashing logic.

TBR=mstarzinger@chromium.org, ishell@chromium.org, jgruber@chromium.org

Bug: v8:6593
Change-Id: I2455fe2a9cc6e93247940de99de5f124c2ada137
Reviewed-on: https://chromium-review.googlesource.com/756693
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49167}
2017-11-07 07:22:19 +00:00
v8-autoroll
9394fe0c4e Update V8 DEPS.
Rolling v8/build: be72997..b5d1311

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/11a6764..af046c5

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

Change-Id: I0fb9023e899edb09572c3c103a6f37dd8bb8aa5c
Reviewed-on: https://chromium-review.googlesource.com/756574
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49166}
2017-11-07 04:45:00 +00:00
Eric Holk
0c3910f815 Revert "[platform] check return values from memory operations"
This reverts commit 32f30f6338.

Reason for revert: broken Fuchsia build, https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.v8%2FV8_Fuchsia%2F460%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout

Original change's description:
> [platform] check return values from memory operations
> 
> This change adds DCHECKs for calls such as mprotect, as well as marking some of
> the memory allocation and deallocation routines as V8_MUST_USE_RESULT. This
> additional checking gives us more useful information for failure in the presence
> of, for example, address space exhaustion.
> 
> Bug: 
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
> Change-Id: I5bc76c1da6160262d3d556fea49d284ddd4e02c5
> Reviewed-on: https://chromium-review.googlesource.com/721267
> Commit-Queue: Eric Holk <eholk@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49164}

TBR=hpayer@chromium.org,mlippautz@google.com,eholk@chromium.org

Change-Id: Ie4b57b45c801dcce7884645f50ff74f833de6dc4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/756137
Reviewed-by: Eric Holk <eholk@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49165}
2017-11-07 00:44:52 +00:00
Eric Holk
32f30f6338 [platform] check return values from memory operations
This change adds DCHECKs for calls such as mprotect, as well as marking some of
the memory allocation and deallocation routines as V8_MUST_USE_RESULT. This
additional checking gives us more useful information for failure in the presence
of, for example, address space exhaustion.

Bug: 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I5bc76c1da6160262d3d556fea49d284ddd4e02c5
Reviewed-on: https://chromium-review.googlesource.com/721267
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49164}
2017-11-07 00:35:35 +00:00
Junliang Yan
2e0a5bb5f5 PPC/s390: [heap] Remove the old write barrier.
Port ef6c175c59

R=ulan@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

Change-Id: I045c22ac71d6ac18e10429e7ba1a7a5ef107529e
Reviewed-on: https://chromium-review.googlesource.com/755894
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#49163}
2017-11-06 23:08:26 +00:00
Michael Lippautz
da5a8e3dd2 [heap] Introduce separate pass for reseting phantom handles on Scavenge
Resetting phantom handles while keeping finalizers alive leads to the
problem of eagerly resetting a handle although another finalizer keeps
it (transitively) alive.

This becomes a problem with internal pointers to Blink as without
global handle a Blink GC is free to collect wrappables.

This CL untangles finalizers handling from phantom handle resets by
introducing a separate path for resetting.

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Bug: chromium:781728
Change-Id: Ica138b72942698fd996c6e9fe0bdc19cc432c010
Reviewed-on: https://chromium-review.googlesource.com/753724
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49162}
2017-11-06 22:25:14 +00:00
Ulan Degenbaev
330cba00c0 [heap] Skip regress/regress-678917 in TSAN configuration.
This test uses a lot of memory and is causing OOM crashes on bots.

Bug: v8:7042
Change-Id: I63ff4d44ca8e26b65875df53ebd235976183c558
Reviewed-on: https://chromium-review.googlesource.com/755593
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49161}
2017-11-06 22:24:09 +00:00
Alexei Filippov
3989b5c84a [heap-profiler] Allow intermediate sampling heap profile retrieval during recording.
The sampling heap profiles can now be retrieved without stopping
the profiler.

BUG=v8:6887

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I491206d0bafd7d4e198622117c12aab0057e6bc6
Reviewed-on: https://chromium-review.googlesource.com/749700
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49160}
2017-11-06 22:22:55 +00:00
Toon Verwaest
c82cd31325 Drop custom accessor deoptimization support
Previously StaNamedProperty and StaKeyedProperty were in a weird state where
they claimed to not touch the accumulator, but actually did in case they were
deopted in the middle. A frame was added in the middle to overwrite the 
accumulator again with the right value before returning from the setter, using
a lot of complexity in the deoptimizer.

This changes those instructions to be marked as writing to the accumulator
(e.g., the result of the setter), and uses to manually store and reload into
the accumulator the value being stored.

If we want to avoid the additional bytecodes, we could make sure that bytecodes
that claim to leave the accumulator alone don't deopt back to Advance/Dispatch
but LoadAccumulatorWithValue/Advance/Dispatch. That's in a way similar to what
happened before this CL, but I believe could be implemented much simpler.


Bug: 
Change-Id: I4850a690ef5a30976701d0e050951faa46fd1c18
Reviewed-on: https://chromium-review.googlesource.com/753487
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49159}
2017-11-06 20:20:58 +00:00
Leszek Swirski
5b0a753d2a [code-cache] Keep track of extensions not caching
Bug: chromium:769203
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Iffb7e92fb9c08c42f03ad28c8defb516454a2d3d
Reviewed-on: https://chromium-review.googlesource.com/753740
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49158}
2017-11-06 20:07:38 +00:00
Michael Achenbach
3f67c13844 [build] Update V8 DEPS.
Rolling v8/build: 53fa255..be72997

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/7208715..11a6764

Rolling v8/third_party/icu: 21d33b1..4b5a724

Rolling v8/tools/clang: 9f0284f..723b259

Rolling v8/tools/swarming_client: 5da404c..6fd3c7b

This also ports a fix for gyp from:
https://chromium-review.googlesource.com/c/chromium/src/+/752143

TBR=sergiyb@chromium.org

Change-Id: I2f6d183094b1d4dd398cc38ca2dfe1df83b38f4b
Reviewed-on: https://chromium-review.googlesource.com/753587
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49157}
2017-11-06 19:30:57 +00:00
Adam Klein
03260ce48a Revert "Snapshot: support rehashing property and element dictionaries."
This reverts commit 3877bf6f4b.

Reason for revert: failed compilation on Win64/clang:

https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20clang/builds/9015

Original change's description:
> Snapshot: support rehashing property and element dictionaries.
> 
> This change
> - adds new maps for elements, global, and named dictionaries.
> - adds support to embed these dictionaries in the startup snapshot.
> - adds support to embed these dictionaries in the code cache.
> - refactors the rehashing logic.
> 
> R=​ishell@chromium.org, jgruber@chromium.org, mstarzinger@chromium.org
> 
> Bug: v8:6593
> Change-Id: I8d9a7ba7145f1af4e6e15301a4d5611f07c77f33
> Reviewed-on: https://chromium-review.googlesource.com/753323
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49155}

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

Change-Id: I0b45d2d07da97b9a7953abf4ad24eec4ea944306
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6593
Reviewed-on: https://chromium-review.googlesource.com/755493
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49156}
2017-11-06 19:09:30 +00:00
Yang Guo
3877bf6f4b Snapshot: support rehashing property and element dictionaries.
This change
- adds new maps for elements, global, and named dictionaries.
- adds support to embed these dictionaries in the startup snapshot.
- adds support to embed these dictionaries in the code cache.
- refactors the rehashing logic.

R=ishell@chromium.org, jgruber@chromium.org, mstarzinger@chromium.org

Bug: v8:6593
Change-Id: I8d9a7ba7145f1af4e6e15301a4d5611f07c77f33
Reviewed-on: https://chromium-review.googlesource.com/753323
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49155}
2017-11-06 18:56:48 +00:00
Clemens Hammacher
0afe2524c0 [wasm] Add fuzzing for Liftoff
Each valid memory module generated by one of the wasm fuzzers will now
also be executed in Liftoff, and the result of the execution will be
compared against the interpreted result.

R=ahaas@chromium.org

Bug: v8:6600
Change-Id: I6a437faae4230ce4dfc7924dd1418da20ea92356
Reviewed-on: https://chromium-review.googlesource.com/753328
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49154}
2017-11-06 18:54:09 +00:00
Sathya Gunasekaran
7621d487d9 [class] Remove needs_home_object from InitializeClassFieldsStatement
Initialize the home object when we create the initializer function
keeping this in line with other functions that initialize home object.

Bug: v8:5367
Change-Id: I1c5e32ae0cb496740341e6c99c9359f6c5e00875
Reviewed-on: https://chromium-review.googlesource.com/754163
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49153}
2017-11-06 17:48:46 +00:00
Alexey Kozyatinskiy
ea04c6671a [inspector] do not call native accessor in Rumtime.getProperties
In current implementation Object.getOwnPropertyDescriptor calls native
getter. It can produce side effects. We can avoid calling it.
DevTools frontend will show clickable dots and on click returns value.
This CL does not affect Blink and only affect several Node.js
properties, e.g. process.title.

R=yangguo@chromium.org

Bug: v8:6945
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I5764c779ceed4d50832edf68b2b4c6ee2c2dd65c
Reviewed-on: https://chromium-review.googlesource.com/754223
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49152}
2017-11-06 17:45:46 +00:00
Toon Verwaest
460652c978 [ic] Migrate API getters to data handlers
Bug: v8:5561
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I47b7df39e80a66449a1ebe98e30052ced2ef2bd3
Reviewed-on: https://chromium-review.googlesource.com/753326
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49151}
2017-11-06 17:43:26 +00:00
Clemens Hammacher
c7ad5652d3 [Liftoff] Fix register reuse in merge init
When initializing the cache state for a merge, we should never use
registers multiple times. Other code paths leading to the same merge
point might provide different values for the different slots there.

R=ahaas@chromium.org

Bug: v8:7035, v8:6600
Change-Id: I8e409b494af0fdc1a5045ec04571611b97fcaf86
Reviewed-on: https://chromium-review.googlesource.com/754816
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49150}
2017-11-06 17:35:07 +00:00
Ulan Degenbaev
ef6c175c59 [heap] Remove the old write barrier.
Bug: chromium:749486
Change-Id: I2fd8b8efe5bea15e48b31945736659495a009c9f
Reviewed-on: https://chromium-review.googlesource.com/739322
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49149}
2017-11-06 17:33:47 +00:00
Clemens Hammacher
dfd029b45e Reland "[wasm] Test binary operations for more inputs"
This is a reland of 2769a7c44b.
The failing test is fixed now.

Original change's description:
> [wasm] Test binary operations for more inputs
> 
> Instead of hard-coding one or two inputs per binary operation, use all
> inputs provided by FOR_INT32_INPUTS.
> 
> R=ahaas@chromium.org
> 
> Change-Id: I534227f93068f52d69ea0ff0fcf686a9af034bad
> Reviewed-on: https://chromium-review.googlesource.com/753484
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49136}

Change-Id: Ied9d4e5977b13b3d0f644e6586b1b14bd412de26
Reviewed-on: https://chromium-review.googlesource.com/753389
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49148}
2017-11-06 16:48:46 +00:00
Michael Starzinger
0e15a7a477 Annotate all sites that still mutate {Code} objects.
This adds code-space modification scopes to all sites that still rely on
mutation of {Code} objects after allocation. Currently some scopes also
potentially are in performance-critical places that might regress if the
protection would be enabled in its current form.

R=clemensh@chromium.org
BUG=v8:6792

Change-Id: I8d511e0e452324dae027e50a9da8e6f77224b86f
Reviewed-on: https://chromium-review.googlesource.com/751521
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49147}
2017-11-06 16:35:46 +00:00
Clemens Hammacher
0dbc81307b [wasm] Clean up and speed up compile fuzzer
Instead of calling a number of member functions which return lambdas
which are then wrapped in std::functions, just use the member functions
directly. This allows to make the arrays with the alternatives constexpr
instead of dynamically filling it on each call.

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

Change-Id: Id1256f442f411eb291941911b25de24a985a9b34
Reviewed-on: https://chromium-review.googlesource.com/753722
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49146}
2017-11-06 16:14:15 +00:00
Junliang Yan
2d12bc5bae PPC: Add whitespaces and grow-memory to slow test
Bug: 
Change-Id: I957e96129d9194eaae406383454f7cd09f53c97f
Reviewed-on: https://chromium-review.googlesource.com/753514
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49145}
2017-11-06 15:57:45 +00:00
Eric Holk
d1d48cce66 [wasm fuzzers] Add memory ops
This CL adds support for memory operations to the AST-based Wasm compile
fuzzer. We've had several bugs in this area, so additional fuzz coverage should
help detect these sooner.

Change-Id: I28b5b95f1fc28939db764efe78de6d56bc61263c
Reviewed-on: https://chromium-review.googlesource.com/742383
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49144}
2017-11-06 15:34:06 +00:00
Hannes Payer
34d3fbaaa3 [heap] Sweeper sets code memory to rwx to allow concurrent sweeping while executing code.
Bug: chromium:774108,v8:6792
Change-Id: Ibdb00bee4dc563663ef2151b489600a2b100f146
Reviewed-on: https://chromium-review.googlesource.com/739601
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49143}
2017-11-06 14:59:26 +00:00
Peter Marshall
f155445f37 [regexp] Fix incorrect string length check on arm64.
The maximum length of the chars in bytes was hardcoded and was not
updated with the increase in string length on 64-bit platforms.
The other platforms don't do this debug check so they don't need
updating.

Bug: chromium:779407
Change-Id: I94fd946f9e67b39075c1f7eed14a20e9db126a72
Reviewed-on: https://chromium-review.googlesource.com/753584
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49142}
2017-11-06 13:03:45 +00:00
Clemens Hammacher
9a3856cd5d [wasm] Fix arguments in SyncCompileAndInstantiate
The function receives imports and memory, but always calls
SyncInstantiate with null handles. This CL fixes this by passing on the
received values.

R=ahaas@chromium.org

Change-Id: I1ddb617b3d4847db341d97737043cc667f879734
Reviewed-on: https://chromium-review.googlesource.com/753727
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49141}
2017-11-06 12:58:15 +00:00
Michael Achenbach
a9bd69f3f9 [build] Switch win-clang to msvs after default has changed
This ports:
https://chromium-review.googlesource.com/c/chromium/src/+/732997

NOTRY=true

Bug: chromium:781724
Change-Id: Ib57e94bfa66f7898c10b14ce0c07a12b0c3d25b8
Reviewed-on: https://chromium-review.googlesource.com/753725
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49140}
2017-11-06 12:56:25 +00:00
Michael Achenbach
3bb36a28d9 Revert "[wasm] Test binary operations for more inputs"
This reverts commit 2769a7c44b.

Reason for revert:
https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm/builds/5195

Original change's description:
> [wasm] Test binary operations for more inputs
> 
> Instead of hard-coding one or two inputs per binary operation, use all
> inputs provided by FOR_INT32_INPUTS.
> 
> R=​ahaas@chromium.org
> 
> Change-Id: I534227f93068f52d69ea0ff0fcf686a9af034bad
> Reviewed-on: https://chromium-review.googlesource.com/753484
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49136}

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

Change-Id: I40a6822679956d872b21d5c01e548d5c49a4250f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/753731
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49139}
2017-11-06 12:45:24 +00:00
Clemens Hammacher
27ffc624ef Reland "[bits] Consolidate Count{Leading,Trailing}Zeros"
This is a reland of 7d231e576a, fixed to
avoid instantiating CountLeadingZeros for bits==0.

Original change's description:
> [bits] Consolidate Count{Leading,Trailing}Zeros
> 
> Instead of having one method for 32 bit integers and one for 64 bit,
> plus a templatized version to choose from those two, just implement one
> version which handles unsigned integers of any size. Also, make them
> constexpr.
> The Count{Leading,Trailing}Zeros{32,64} methods are kept for now in
> order to keep the amount of code changes small. Also, sometimes it
> improves readability by stating exactly the size of the argument,
> especially for leading zeros (where zero-extending would add more
> leading zeros).
> 
> CountLeadingZeros now uses a binary search inspired implementation
> as proposed in Hacker's Delight. It's more than 20% faster on x64 if
> the builtins are disabled.
> CountTrailingZeros falls back to CountPopulation instead of counting in
> a naive loop. This is ~50% faster.
> 
> R=mstarzinger@chromium.org
> 
> Change-Id: I1d8bf1d7295b930724163248150444bd17fbb34e
> Reviewed-on: https://chromium-review.googlesource.com/741231
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49106}

Change-Id: Icdff2510ec66d1c96a1912cef29d77d8550994ee
Reviewed-on: https://chromium-review.googlesource.com/753903
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49138}
2017-11-06 11:55:44 +00:00
Clemens Hammacher
407cfc02eb [Liftoff] Fix binop code generation bug
If the destination register of a binop is the same register as the
right hand side, we would first move the left hand side into that
register (overwriting the value of the rhs), and then use the rhs.
This CL fixes this issue and adds a regression test.

R=ahaas@chromium.org

Bug: v8:6600, v8:7033
Change-Id: Ief90b5bcffc65823037bc57fb00741b2448e6375
Reviewed-on: https://chromium-review.googlesource.com/753462
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49137}
2017-11-06 11:45:44 +00:00
Clemens Hammacher
2769a7c44b [wasm] Test binary operations for more inputs
Instead of hard-coding one or two inputs per binary operation, use all
inputs provided by FOR_INT32_INPUTS.

R=ahaas@chromium.org

Change-Id: I534227f93068f52d69ea0ff0fcf686a9af034bad
Reviewed-on: https://chromium-review.googlesource.com/753484
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49136}
2017-11-06 11:42:14 +00:00
Franziska Hinkelmann
12eb3e975e [cleanup] Fix typos
Bug: 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I9df5beca6444a42aa35c624760265a3cc02182b6
Reviewed-on: https://chromium-review.googlesource.com/753450
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49135}
2017-11-06 11:15:04 +00:00
Clemens Hammacher
dbddb56359 [wasm] Limit recursion depth in compile fuzzer
Fix a stack overflow in the wasm_compile_fuzzer by limiting the
recursion depth to 64. At this depth, we always just generate a
constant expression.

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

Bug: chromium:747348
Change-Id: I236c1e07b8cb2b6c9181c549e850eca34fac6ec6
Reviewed-on: https://chromium-review.googlesource.com/753329
Reviewed-by: Eric Holk <eholk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49134}
2017-11-06 10:27:13 +00:00
Igor Sheludko
ca0c951a7e [runtime] Prepare for turning constant field tracking on.
This CL ensures that elements kind transitions don't cause silent
mutable-to-constant field migrations when the following options
are enabled: --track_constant_fields --modify_map_inplace.

Bug: v8:5495, v8:6980
Change-Id: Ie28daab84f91d424110e71504b025a2e465bfe16
Reviewed-on: https://chromium-review.googlesource.com/753087
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49133}
2017-11-06 10:09:34 +00:00
Georg Neis
6414e17db0 [bigint] Implement Bigint.asUintN.
R=jkummerow@chromium.org

Bug: v8:6791
Change-Id: I765790d8b163aff6725900f19e95a914c75a0fe9
Reviewed-on: https://chromium-review.googlesource.com/752521
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49132}
2017-11-06 09:53:14 +00:00
Georg Neis
8cf319fec8 [bigint] Make ToBigInt throw the correct error.
We must throw a SyntaxError only when failing to convert a string. In
the other cases we must throw a TypeError.

R=jkummerow@chromium.org

Bug: v8:6791
Change-Id: I802d8b6830b341f87e46e7de198af74ba95b8658
Reviewed-on: https://chromium-review.googlesource.com/752803
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49131}
2017-11-06 09:04:23 +00:00
Georg Neis
2a971833cd Revert "RegExp: Add the ability to switch flags on and off within the regexp."
This reverts commit e83ee94565.

Reason for revert: Check failure in regress-v8-6940.js

Original change's description:
> RegExp: Add the ability to switch flags on and off within the regexp.
> 
> This is a reland of https://chromium-review.googlesource.com/c/v8/v8/+/752522
> which was itself a reupload of
> https://chromium-review.googlesource.com/c/v8/v8/+/571746 where reviews took
> place.
> 
> R=​yangguo@chromium.org
> 
> Bug: 
> Change-Id: Ia4dbdd6e9a362e272753ff10dc66b7f72d81ee20
> Reviewed-on: https://chromium-review.googlesource.com/753596
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Erik Corry <erikcorry@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49129}

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

Change-Id: I5ee94c47606101d06010c9e6b4b78ca51566b60a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/754682
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49130}
2017-11-06 09:03:16 +00:00
Erik
e83ee94565 RegExp: Add the ability to switch flags on and off within the regexp.
This is a reland of https://chromium-review.googlesource.com/c/v8/v8/+/752522
which was itself a reupload of
https://chromium-review.googlesource.com/c/v8/v8/+/571746 where reviews took
place.

R=yangguo@chromium.org

Bug: 
Change-Id: Ia4dbdd6e9a362e272753ff10dc66b7f72d81ee20
Reviewed-on: https://chromium-review.googlesource.com/753596
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Erik Corry <erikcorry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49129}
2017-11-06 08:37:44 +00:00
Yang Guo
6ebb5641ff [debugger] add comment on bytecode operand scaling.
TBR=mstarzinger@chromium.org

Change-Id: I13447a31518226d0d86365b0c41d40ac2f688275
Reviewed-on: https://chromium-review.googlesource.com/722702
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49128}
2017-11-06 07:05:53 +00:00
Alexey Kozyatinskiy
079c0fd8f6 [inspector] added new way to step into async task
It is preparation step for step-into-worker. There are few changes:
- added breakOnAsyncCall flag for Debugger.stepInto. When flag is set
  and async task is scheduled before step-into finished, we pause
  execution with additional Debugger.paused event. This event contains
  additional scheduledAsyncTaskId field.
- added Debugger.pauseOnAsyncTask. This method will pause execution as
  soon as given async task is started.

This mechanism is replacement for Debugger.scheduleStepIntoAsync which
can not be used between multiple targets.

As result we can split async task scheduling in one target and
requesting break for this async task running in another target.

R=pfeldman@chromium.org

Bug: chromium:778796
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I77be0c880d91253d333c54a23a4c084e7b8549e9
Reviewed-on: https://chromium-review.googlesource.com/750071
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49127}
2017-11-06 06:40:14 +00:00
Deepti Gandluri
70d36f6726 [wasm] Implement atomic BinOps in the interpreter
Implement I32Atomic BinOps, and enable tests to run in the interpreter.

Bug=v8:6532

Change-Id: Ida78d2911cb6973fe053283a9937e7af04e6df01
Reviewed-on: https://chromium-review.googlesource.com/724928
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49126}
2017-11-06 03:57:23 +00:00
Michael Achenbach
dad9e7e610 Whitespace change to trigger bots
Change-Id: I80378f4ea38e1251715614158716a2b1f7bc91b5
Reviewed-on: https://chromium-review.googlesource.com/753594
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49125}
2017-11-04 20:34:31 +00:00
Benedikt Meurer
fd150c7988 [turbofan] Generate the correct bounds when the array protector isn't valid.
The condition for bounds check generation was not in sync with the
condition that was used for the actual access, which lead to invalid
memory accesses when the array protector was invalid.

Tbr: tebbi@chromium.org
Bug: chromium:781506, chromium:781494, chromium:781457, chromium:781285, chromium:781381, chromium:781380, v8:6936, v8:7014, v8:7027
Change-Id: Ia5b2ad02940292572ed9b37abd3f9ffaa6d7a26b
Reviewed-on: https://chromium-review.googlesource.com/753590
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49124}
2017-11-04 12:06:31 +00:00
Michael Achenbach
1a1968feb6 Revert "[bits] Consolidate Count{Leading,Trailing}Zeros"
This reverts commit 7d231e576a.

Reason for revert: Breaks revert for win-clang:
https://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/342755

Original change's description:
> [bits] Consolidate Count{Leading,Trailing}Zeros
> 
> Instead of having one method for 32 bit integers and one for 64 bit,
> plus a templatized version to choose from those two, just implement one
> version which handles unsigned integers of any size. Also, make them
> constexpr.
> The Count{Leading,Trailing}Zeros{32,64} methods are kept for now in
> order to keep the amount of code changes small. Also, sometimes it
> improves readability by stating exactly the size of the argument,
> especially for leading zeros (where zero-extending would add more
> leading zeros).
> 
> CountLeadingZeros now uses a binary search inspired implementation
> as proposed in Hacker's Delight. It's more than 20% faster on x64 if
> the builtins are disabled.
> CountTrailingZeros falls back to CountPopulation instead of counting in
> a naive loop. This is ~50% faster.
> 
> R=​mstarzinger@chromium.org
> 
> Change-Id: I1d8bf1d7295b930724163248150444bd17fbb34e
> Reviewed-on: https://chromium-review.googlesource.com/741231
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49106}

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

Change-Id: Iceeb35bf9c7539a1013c9bdbc47118008611bef2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/753463
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49123}
2017-11-04 09:34:11 +00:00
Alexey Kozyatinskiy
f86b4de272 [inspector] added Debugger.setReturnValue
DebugBreak bytecode fetches current return value from debugger prior
dispatching original handler. So we can change its value on break.

R=leszeks@chromium.org,rmcilroy@chromium.org

Bug: chromium:656150
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I82d0bc82ff49923a748c0084d252d0fd214a2db8
Reviewed-on: https://chromium-review.googlesource.com/731679
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49122}
2017-11-04 00:38:09 +00:00
Daniel Bevenius
b8331cc030 Fix path to v8 include files
I believe the paths to the V8 include headers are incorrect. The paths
to other sources seem to be relative to the parent directory.

When building Node.js I get the following warning on Windows:
Warning: Missing input files:
deps\v8\src\..\..\include\v8-inspector-protocol.h
deps\v8\src\..\..\include\v8-inspector.h

This commit updates the two include paths.

Bug: 
Change-Id: I51a057abba61e294e7811ba69db03e283b0bdc3f
Reviewed-on: https://chromium-review.googlesource.com/743981
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49121}
2017-11-04 00:25:59 +00:00
Ross McIlroy
5dc02ef2b8 Revert "[Ast] Teach Ast Printer to print raw literal values."
This reverts commit c60934e9e4.

Reason for revert: breaks nosnap build


Original change's description:
> [Ast] Teach Ast Printer to print raw literal values.
> 
> Converts the ast prettyprinter to printing literals from the raw values
> rather than internalized on-heap strings. This enables ast printing before
> internalizing, and means we can avoid use of the isolate in the interpreter's
> off-thread phase.
> 
> Also removes --print-builtin-ast and relies on just --print-ast to print
> everything.
> 
> Finally, converts FunctionLiteral's debug_name function to return a
> char[] which is created from the raw name literal where it exists, rather
> than relying on the value having been internalized.
> 
> BUG=v8:5203
> 
> Change-Id: I0e358d6acc9ae4516ed49e7a763e208fea5fcf66
> Reviewed-on: https://chromium-review.googlesource.com/749261
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49119}

TBR=rmcilroy@chromium.org,adamk@chromium.org

Change-Id: Ic9d511f5107666a2f6a2bf59d8e93643c32d4d2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5203
Reviewed-on: https://chromium-review.googlesource.com/753627
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49120}
2017-11-03 23:45:52 +00:00