Commit Graph

44067 Commits

Author SHA1 Message Date
Peter Marshall
9a9fc07661 [tests] Skip regress-748069 for sanitzier builds.
The test is flaky due to huge string allocation.

Bug: v8:7093
Change-Id: I2f17eb8b96b569d84a1f5c9549753fd0ab7fee89
Reviewed-on: https://chromium-review.googlesource.com/785351
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49575}
2017-11-22 14:03:58 +00:00
Michael Starzinger
884a2b25da [test] Reenable test for "future" that no longer fails.
R=machenbach@chromium.org
BUG=v8:7106

Change-Id: I4064368a3452cc9b6b0ce219e67a9825b1092926
Reviewed-on: https://chromium-review.googlesource.com/785391
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49574}
2017-11-22 13:51:15 +00:00
jgruber
368a621e34 [mjsunit] Split up long RegExp tests
These tests can take up to 10 minutes on bots. Split them up to
increase parallelism.

Bug: v8:7093
Change-Id: Iabfd34a7f2476d4add51da807f2e987e8d1153c9
Reviewed-on: https://chromium-review.googlesource.com/785411
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49573}
2017-11-22 13:38:52 +00:00
Clemens Hammacher
09bf6c1c2f [Liftoff] Only allocate Labels on the heap on arm64
Arm64 is the only platform where Labels cannot be moved, because the
assembler keeps track of pointers to Labels. On all other platforms,
there is no need to heap-allocate the Labels.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: I4e98203890a8c426afa8a1db21e31f30bab892fa
Reviewed-on: https://chromium-review.googlesource.com/783210
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49572}
2017-11-22 13:31:12 +00:00
Daniel Clifford
4d70aa02fd Fix hole handling in fast arguments slice
Bug: chromium:784080
Change-Id: I38c539435d867f6abb80218457e5b5a982e34817
Reviewed-on: https://chromium-review.googlesource.com/785210
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49571}
2017-11-22 12:32:37 +00:00
Clemens Hammacher
eeb3222441 Allow move semantics on Labels
The Label class currently allows to be copied on all platforms except
for arm64, where it can not be copied or moved.
This allows too much though:
Copying a label even on another platform than arm64 might fail if the
label was linked already, because only one of the copies will be bound
later, and the other will fire a DCHECK error in its destructor.

This CL changes the restriction to never allow to copy construct or
assign a Label, but allow move construction and move assignment on all
platforms except arm64.
This will allow to place Labels in containers, as will be done in
Liftoff (except for arm64, where it still needs to be allocated on the
heap).

R=mstarzinger@chromium.org

Bug: v8:6600
Change-Id: Ic1234c2d233317eed6a3d537c13faed2c701fe13
Reviewed-on: https://chromium-review.googlesource.com/783190
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49570}
2017-11-22 11:45:02 +00:00
Ulan Degenbaev
0d7a870b27 [heap] Fix V8::AddGCPrologueCallback and V8::AddGCEpilogueCallback
Bug: v8:7113
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I64d41ac2344d1974867647b8c32a9fae384b724a
Reviewed-on: https://chromium-review.googlesource.com/784833
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49569}
2017-11-22 11:43:32 +00:00
Michael Lippautz
0944553ee8 Global handles: Remove independent handle infrastructure
Bug: chromium:780749
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I4c993e2147494795402f141049eed30801dfb913
Reviewed-on: https://chromium-review.googlesource.com/782519
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49568}
2017-11-22 11:40:32 +00:00
Andreas Haas
cede838f98 [wasm] Update spec tests
R=titzer@chromium.org

Change-Id: I18a4bcdb002d63c0d5476ce4ff3edd466489b518
Reviewed-on: https://chromium-review.googlesource.com/785092
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49567}
2017-11-22 10:39:01 +00:00
Michael Lippautz
ffa30ced17 [api] Remove long-deprecated static APIs to iterate persistent handles
Users should migrate to using the versions on Isolate.

Bug: 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I4fe956a4210308701f343a3a681d9d6f1b1f2d2b
Reviewed-on: https://chromium-review.googlesource.com/784832
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49566}
2017-11-22 09:45:10 +00:00
Michael Achenbach
e93cb0e2b8 Revert "[heap] Removed keep-one-unused-page concept in sweeper."
This reverts commit 9cbb2ed4c3.

Reason for revert: Causes flakiness, see http://shortn/_FEVutYBGP7

Original change's description:
> [heap] Removed keep-one-unused-page concept in sweeper.
> 
> This works because we pool regular non-executable pages on a lower level. Executable pages are currently not supported by the pooling mechanism. If this regresses we should fix it.
> 
> Change-Id: Ief3484d59f1f1f4bc63f8e718482e4174bedc012
> Reviewed-on: https://chromium-review.googlesource.com/778939
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49536}

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

Change-Id: If46fe713f1b1440246803e110838a3958f21dcdf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/785090
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49565}
2017-11-22 09:42:03 +00:00
Marja Hölttä
25a753383e [csa|interpreter] Remove unnecessary SMI tagging.
Bug: 
Change-Id: Ic872ea78511f0ef3e8cea67b971162b71790a039
Reviewed-on: https://chromium-review.googlesource.com/781690
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49564}
2017-11-22 09:26:41 +00:00
Clemens Hammacher
97becc1bab [iwyu] Fix includes of trap-handler.h
R=eholk@chromium.org

Change-Id: Iad3d1f0859c482c566cf86a32cf95a84c89b96e6
Reviewed-on: https://chromium-review.googlesource.com/782721
Reviewed-by: Eric Holk <eholk@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49563}
2017-11-22 09:18:11 +00:00
jgruber
f8b2bfaa61 [regexp] Fix confusion around uint32_t/int types
TBR=yangguo@chromium.org

Bug: v8:6741
Change-Id: Iefab0451514d95d718ebb0489cc681a82b5ef789
Reviewed-on: https://chromium-review.googlesource.com/778863
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49562}
2017-11-22 08:45:20 +00:00
Sergiy Byelozyorov
3e188ad3fa Remove v8_linux64_haswell_cm_perf
R=machenbach@chromium.org

Change-Id: Ic9566af4475901e87a26d2d4b62e0cb32a1b773c
Reviewed-on: https://chromium-review.googlesource.com/784890
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49561}
2017-11-22 08:31:30 +00:00
Sergiy Byelozyorov
d5d6229be3 [tools] Refactor patch/no-patch terminology in run_perf.py
The runs are now called as primary (no suffix) and secondary. This is in
preparation to adding secondary builds on CI, which will run tests on the latest
released stable V8 binary (aka as ref builds).

R=machenbach@chromium.org

Bug: chromium:783763
Change-Id: Ie6560012887bd5bb0d948bc8d34a9256d922137c
Reviewed-on: https://chromium-review.googlesource.com/781941
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49560}
2017-11-22 07:19:50 +00:00
v8-autoroll
bfccccaa5b Update V8 DEPS.
Rolling v8/build: 6167734..9c1e28b

Rolling v8/tools/clang: bd3b137..8427dae

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

Change-Id: Id8b75c73794c8d13dce3322a49d9259d02529ee4
Reviewed-on: https://chromium-review.googlesource.com/784472
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49559}
2017-11-22 04:54:25 +00:00
Clemens Hammacher
b972f7c695 [wasm] [cleanup] Use trap_handler::UseTrapHandler()
Instead of repeating the condition for using trap handlers everywhere
in the compiler, just use the existing function
{trap_handler::UseTrapHandler()}.
Note that the trap-handler.h was already included transitively, I just
add it to comply to IWYU.

R=eholk@chromium.org

Change-Id: Id61910c7ac5b134b07cb266664e87a2f39a896d4
Reviewed-on: https://chromium-review.googlesource.com/782562
Reviewed-by: Eric Holk <eholk@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49558}
2017-11-21 19:39:11 +00:00
Michael Lippautz
65cd9669ed [api] Remove long-deprecated getters on WeakCallbackInfo
Bug: 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I986e3d3a54a07b5082a52e2bc7b5505e12589d98
Reviewed-on: https://chromium-review.googlesource.com/782324
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49557}
2017-11-21 19:18:42 +00:00
Mircea Trofin
b977881999 [liftoff] API for exposing frame slot count
Factor out slot count calculation, and expose it so it may later be
consumed when JIT-ing to the WasmCodeManager.

Bug: 
Change-Id: I21d673b2e3d7fa4a66ae0ab6303d29cf666d743c
Reviewed-on: https://chromium-review.googlesource.com/782701
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49556}
2017-11-21 19:00:21 +00:00
Michael Achenbach
b0305738b4 Add flag that suppresses exception output using load()
Without this flag, the load() function is very chatty when
an exception is thrown out of it, independent if the
surrounding code catches it or not.

Bug: v8:6972
Change-Id: I4ca82689c42c729716b83e420d9c7f7e2b5213d1
Reviewed-on: https://chromium-review.googlesource.com/781688
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49555}
2017-11-21 18:21:40 +00:00
Mircea Trofin
fdb067dc2c [wasm] JIT using WasmCodeManager: codegen components.
This CL introduces those codegen changes necessary for JIT-ing using
the WasmCodeManager.

Bug: v8:6876
Change-Id: I6b463b3e278f5e53f8dfa488f76eeaeb5231dbea
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/782261
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49554}
2017-11-21 17:56:00 +00:00
Alexey Kozyatinskiy
ed9b2072a6 [inspector] reworked async instrumentation for promises
Old instrumentation was designed to collect promise creation stack and
promise scheduled stack together. In DevTools for last 6 months we
show only creation stack for promises. We got strong support from users
for new model. Now we can drop support for scheduled stacks and
simplify implementation.

New promise instrumentation is straightforward:
- we send kDebugPromiseThen when promise is created by .then call,
- we send kDebugPromiseCatch when promise is created by .catch call,
- we send kDebugWillHandle before chained callback and kDebugDidHandle
  after chained callback,
- and we send separate kDebugAsyncFunctionPromiseCreated for internal
  promise inside async await function.

Advantages:
- we reduce amount of captured stacks (we do not capture stack for
  promise that constructed not by .then or .catch),
- we can consider async task related to .then and .catch as one shot
  since chained callback is executed once,
- on V8 side we can implement required instrumentation using only
  promise hooks,

Disadvantage:
- see await-promise test, sometimes scheduled stack was useful since we
  add catch handler in native code,

Implementation details:
- on kInit promise hook we need to figure out why promise was created.
  We analyze builtin functions until first user defined function on
  current stack. If there is kAsyncFunctionPromiseCreate function then
  we send kDebugAsyncFunctionPromiseCreated event. If there is
  kPromiseThen or kPromiseCatch then only if this function is bottom
  builtin function we send corresponded event to inspector. We need it
  because Promise.all internally calls .then and in this case we have
  Promise.all and Promise.then on stack at the same time and we do not
  need to report this internally created promise to inspector.

Bug: chromium:778796
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I53f47ce8c5c4a9897655c3396c249ea59529ae47
Reviewed-on: https://chromium-review.googlesource.com/765208
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49553}
2017-11-21 16:56:00 +00:00
Bill Budge
0481b23e25 [Memory] Rewrite platform OS Commit / Uncommit in terms of permissions.
- Eliminates CommitRegion and UncommitRegion methods, replacing them with
  calls to SetPermissions.
- Makes a similar change to the API of VirtualMemory.
- This changes system calls from mmap to mprotect on most POSIX platforms.

Bug: chromium:756050
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ib10f8293c9398c6c1e729cd7d686b7c97e6a5d75
Reviewed-on: https://chromium-review.googlesource.com/769679
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49552}
2017-11-21 16:48:55 +00:00
Adam Klein
8036c41f1e [binary size] Move PendingCompilationErrorHandler implementation out-of-line
These functions should only be called in case of a parse error, so speed
of calling them should not be a concern.

In local testing, this saves ~16k of binary size on a release mode build.

Bug: v8:7090
Change-Id: I433df81c2a5811ed922885dbab3ce003427f3d1c
Reviewed-on: https://chromium-review.googlesource.com/780693
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49551}
2017-11-21 16:42:55 +00:00
Michael Lippautz
a8df8f38a1 [heap] Remove left-over compaction spaces
Bug: 
Change-Id: Idc0bbc55713a6e6dcc88db77477bfddf3bd80a02
Reviewed-on: https://chromium-review.googlesource.com/781769
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49550}
2017-11-21 16:36:54 +00:00
Martyn Capewell
c9e7427534 [arm64] Reduce deoptimization table size
Reduce the deopt table size by reusing the entry address available in a temp
register to compute the entry id. Saves ~200kB.

Bug: 
Change-Id: I3a1baf0e4c8cf19a0aa149da2bea623c1349a9ca
Reviewed-on: https://chromium-review.googlesource.com/774890
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49549}
2017-11-21 15:43:09 +00:00
Clemens Hammacher
082b0d37b0 [wasm] [cleanup] Replace std::unique_ptr by base::Optional
Both can be used to optionally initialize an object, but with
base::Optional it will be stack-allocated.

R=ahaas@chromium.org

Change-Id: I9977e1b2e0532505f8582cc68e27687aaeebd33d
Reviewed-on: https://chromium-review.googlesource.com/781920
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49548}
2017-11-21 15:38:26 +00:00
Michal Majewski
0f2223c894 [test] Refactor getting test outcomes from statusfile.
Filtering by status file split to four parts:
1. Getting outcomes - reads both variant dependent and
independent outcomes, no more need to do it twice.
2. Checking unused rules - has a switch to check only variant
dependent/independent rules.
3. Reading flags - if outcome starts with '--' it is treated as a flag.
4. Actual filtering.

Outcomes removed from the testcase object, can be accessed
by call to its testsuite.

Bug: v8:6917
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I35762f891010ddda926250452b88656047433daa
Reviewed-on: https://chromium-review.googlesource.com/775160
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49547}
2017-11-21 15:00:24 +00:00
Mircea Trofin
bd63de9cc1 [wasm] Ensure serializability of JS_TO_WASM wrappers
On x64, we optimize out EmbeddedReferences, unless we explicitly
indicate serialization is enabled. We serialize js-to-wasm wrappers,
which include such references.

Bug: v8:7083
Change-Id: I976da4af74bf7ee3245e1465b8e47f2c042ec3b4
Reviewed-on: https://chromium-review.googlesource.com/780207
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Eric Holk <eholk@chromium.org>
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49546}
2017-11-21 14:57:44 +00:00
Andreas Haas
09323a6a17 [wasm] Use activations of the interpreter in the fuzzers
Typically the interpreter returns 0xdeadbeef to indicate an exception.
However, for stack overflows a normal exception is used. The interpreter
requires an activation, however, to deal with normal exceptions. With
this CL we start an activation before we execute the fuzzer input in the
interpreter.

R=clemensh@chromium.org

Bug: chromium:781103
Change-Id: I4fc3a18bfc2076aab9ff7d2324a3311fe222954a
Reviewed-on: https://chromium-review.googlesource.com/776835
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49545}
2017-11-21 14:49:55 +00:00
jgruber
136b4edbea [coverage] Trigger deterministic GC in coverage tests
A few coverage tests depend on a GC run that deterministically frees all
dead objects, but Runtime::kCollectGarbage did not explicitly disable
incremental marking. Incremental marking makes liveness detection
timing-dependent and thus should be disabled here.

NOTRY=true
NOPRESUBMIT=true
TBR=mlippautz@chromium.org

Bug: v8:7108
Change-Id: I8bebe612bbc2126b8ad778af15f08442ccc91a35
Reviewed-on: https://chromium-review.googlesource.com/781865
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49544}
2017-11-21 14:32:26 +00:00
Michael Starzinger
2976d14fa2 [test] Reenable test for "future" that no longer fails.
R=machenbach@chromium.org
BUG=v8:7106

Change-Id: I89ff17393848c88ffd885af3fec8b6703c75d073
Reviewed-on: https://chromium-review.googlesource.com/781942
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49543}
2017-11-21 14:30:35 +00:00
Igor Sheludko
d8c355fcac [runtime] Stop using Map::unused_property_fields() byte.
The unused properties fields number is calculatable via used in-object
properties count and we can drop it now.

Bug: chromium:774644
Change-Id: I7388af7772a8e793593fabc46527886cf2e36095
Reviewed-on: https://chromium-review.googlesource.com/781465
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49542}
2017-11-21 14:07:04 +00:00
Toon Verwaest
572210e731 [runtime] Minor cleanup of inferred-name handling
Bug: 
Change-Id: Iccc0241859970ad4e04b9a6e5f206491aa7c442e
Reviewed-on: https://chromium-review.googlesource.com/781939
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49541}
2017-11-21 13:59:44 +00:00
Clemens Hammacher
742b6d1b96 [Liftoff] Add support for globals
The wasm context will always be stored on the stack, and will be loaded
from there whenever needed (for accessing globals or the memory). We
can still improve this later by caching the context address or specific
information loaded from it.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: Idd7fb1ccff28a73beaf545997e3dfdb74757b686
Reviewed-on: https://chromium-review.googlesource.com/779145
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49540}
2017-11-21 13:58:40 +00:00
Georg Neis
fae2361825 [bigint,compiler] Support bigints in bitwise-not (~) operator.
This introduces a JSBitwiseNot operator and lowers it either to a
speculative xor with -1 (when we have Number feedback) or to
a stub call. The stub is also new.

Bug: v8:6791
Change-Id: I362e52de8a741dc5db044c406543878e407eb2ed
Reviewed-on: https://chromium-review.googlesource.com/778839
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49539}
2017-11-21 13:57:34 +00:00
Georg Neis
06b79ee985 [bigint,compiler] Support bigints in negation (-) operator.
This introduces a JSNegate operator and lowers it either to a
speculative multiplication with -1 (when we have Number feedback)
or to a stub call. The stub is also new.

R=jarin@chromium.org

Bug: v8:6791
Change-Id: I8e20333fe49cc6088d2d10777be982e42eed2412
Reviewed-on: https://chromium-review.googlesource.com/774718
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49538}
2017-11-21 13:41:34 +00:00
Toon Verwaest
2993e48463 [compiler] Simplify fetching the shared function info for a native function template.
Bug: 
Change-Id: Ic72ebff8c106ef200875de352972c5b324dcb5a0
Reviewed-on: https://chromium-review.googlesource.com/781466
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49537}
2017-11-21 13:25:24 +00:00
Hannes Payer
9cbb2ed4c3 [heap] Removed keep-one-unused-page concept in sweeper.
This works because we pool regular non-executable pages on a lower level. Executable pages are currently not supported by the pooling mechanism. If this regresses we should fix it.

Change-Id: Ief3484d59f1f1f4bc63f8e718482e4174bedc012
Reviewed-on: https://chromium-review.googlesource.com/778939
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49536}
2017-11-21 13:20:34 +00:00
Michael Starzinger
cc0086532f [heap] Copy value of --write-protect-code-memory.
This introduces {Heap::write_protect_code_memory} as a race-free copy of
the underlying {FLAG_write_protect_code_memory} flag. Since this flag is
checked from the parallel sweeper, subsequent flag implications might be
racing against the read. This ensures race-free reads.

R=hpayer@chromium.org
BUG=v8:6792,chromium:774108,v8:7106

Change-Id: I1a1073f11e91bebd60f8d5da440845452ec67c50
Reviewed-on: https://chromium-review.googlesource.com/781662
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49535}
2017-11-21 12:57:33 +00:00
Clemens Hammacher
d43c6e59fc Decouple SourcePositionTableBuilder from Zone
Currently the SourcePositionTableBuilder requires a Zone because it
holds a ZoneVector<byte> of the encoded entries. Since ZoneVector is a
suboptimal data structure anyway, and for Liftoff we don't even have a
Zone allocated currently, this CL replaces the ZoneVector by
std::vector.

R=mstarzinger@chromium.org

Bug: v8:6600
Change-Id: I8010143e917e2351664e2b53746753b597f4407a
Reviewed-on: https://chromium-review.googlesource.com/779181
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49534}
2017-11-21 12:56:13 +00:00
Camillo Bruni
82ca51467f Harden isolate initialization
In the case of a corrupted snapshot we fall back to initializing the isolate
from scratch. Howver, we don't ship the full SetupIsolateDelegate. This causes
spurious failures during later initialization.

This CL mostly turns the DCHECKs in SetupIsolateDelegate into hard CHECKs making
it easier to spot these kind of failures.


Bug: chromium:767846
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ibe8a5beece27433439b1b09412f6110be703ff86
Reviewed-on: https://chromium-review.googlesource.com/779189
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49533}
2017-11-21 12:55:06 +00:00
Michael Starzinger
ffd36179b9 [heap] Move code mutation scope into {Heap::AllocateCode}.
This makes sure the {CodeSpaceMemoryModificationScope} for the common
allocation path is inside the {Heap} component. This will in turn enable
finer-grained control of the modification scope in the future.

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

Change-Id: I6c3bc457bac641e79b2786cf78557b26aa2027e7
Reviewed-on: https://chromium-review.googlesource.com/779399
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49532}
2017-11-21 12:15:13 +00:00
Clemens Hammacher
412f1568f2 Reland "[test] Add Liftoff variant"
This is a reland of 712fa67554.

Original change's description:
> [test] Add Liftoff variant
>
> Add a variant for testing the current state of the Liftoff
> implementation.
> This variant will only run on a subset of the bots, just like the
> --future variant.
>
> R=machenbach@chromium.org, hablich@chromium.org
>
> Bug: v8:7088, v8:6600
> Change-Id: If49fad3a8ed579356504b821a787326754f24e78
> Reviewed-on: https://chromium-review.googlesource.com/779420
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49504}

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

Bug: v8:7088, v8:6600
Change-Id: Ieb20020f07c70acaa64bb421763a41aa163a261b
Reviewed-on: https://chromium-review.googlesource.com/781499
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49531}
2017-11-21 12:10:53 +00:00
jgruber
71b9018c47 [regexp] Avoid integer overflow in callable @@replace
The integer value denoting the number of captures (and thus the size
of the list of captures created in @@replace [0]) can be controlled by
the user.  This CL ensures we don't overflow and respect
Code::kMaxArguments, but note that it is still possible to trigger
OOMs through large lists.

Bug: chromium:786573
Change-Id: I19c88908c594487818d083b2ba423764ef91eae0
Reviewed-on: https://chromium-review.googlesource.com/779001
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49530}
2017-11-21 12:09:13 +00:00
Sergiy Byelozyorov
da82b257a3 Whitespace CL to test CQ after migrating builders to LUCI
TBR=machenbach@chromium.org

Bug: chromium:748002, chromium:773606, chromium:748003, chromium:748035
Change-Id: Ibe24a76598daa8af1fe5530859a8a657c54c3b9b
Reviewed-on: https://chromium-review.googlesource.com/779434
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49529}
2017-11-21 12:00:04 +00:00
Georg Neis
dbb52a1c21 [bigint,compiler] Fully implement ToNumeric bytecode.
TBR: rmcilroy@chromium.org
Bug: v8:6791
Change-Id: I4ac2bdce353d987a2fe45149d8556b6591569a01
Reviewed-on: https://chromium-review.googlesource.com/771191
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49528}
2017-11-21 11:56:34 +00:00
Mike Stanton
a815265848 [TurboFan] Verify that return statements are 'outside' loops
Bug: 
Change-Id: Ib9ca5458554ed23e94e85e2a9cb42d816649c881
Reviewed-on: https://chromium-review.googlesource.com/781661
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49527}
2017-11-21 11:37:53 +00:00
Jakob Gruber
0645bf3446 [snapshot] Flip --lazy-handler-deserialization
This enables lazy bytecode handler deserialization by default.

Design doc: http://goo.gl/QxZBL2

TBR=hablich@chromium.org

Bug: v8:6624
Change-Id: I89a17e16a4ee18ee1bfca75a1d61f7a11cdc211f
Reviewed-on: https://chromium-review.googlesource.com/776836
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49526}
2017-11-21 11:25:03 +00:00