Commit Graph

44360 Commits

Author SHA1 Message Date
Georgia Kouveli
b28af35c50 [arm64] Pair some pushes and don't use jssp as scratch
Also remove some unused code.

Bug: v8:6644
Change-Id: Id0021b397f366d2f26e990750c4b8c33f0c1cd81
Reviewed-on: https://chromium-review.googlesource.com/806836
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#49868}
2017-12-05 14:20:01 +00:00
Georg Neis
7ffc331d64 [compiler] Add regression test exhibiting int64 deopt literals.
R=jarin@chromium.org

Bug: chromium:791958
Change-Id: I483558270f4dfa845dff4ff88076be27bb15cc8e
Reviewed-on: https://chromium-review.googlesource.com/808804
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49867}
2017-12-05 14:04:41 +00:00
Martyn Capewell
b6c334d568 [arm64] Fix cctests that require unaligned sp
Fix cctests to maintain an aligned stack pointer, and delete a couple
that don't make sense if only an aligned stack pointer is allowed.

Bug: v8:6644
Change-Id: Ib825df0f93515ec408169018eb97ab587f1f14b6
Reviewed-on: https://chromium-review.googlesource.com/808386
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/master@{#49866}
2017-12-05 14:00:51 +00:00
Michal Majewski
453a9f1b95 [test] Create commands after sharding.
Bug: v8:6917
Change-Id: I3a79a7f273df566035cee6a0e22be2e02d67d946
Reviewed-on: https://chromium-review.googlesource.com/808505
Commit-Queue: Michał Majewski <majeski@google.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49865}
2017-12-05 13:48:42 +00:00
peterwmwong
e0e1a5e564 [js-perf-test] Add Array.p.find microbenchmarks
Bug: chromium:791045, v8:1956, v8:7165
Change-Id: I5c5cf74376f61f71591a8c67fbc9d1584a2b9128
Reviewed-on: https://chromium-review.googlesource.com/807748
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49864}
2017-12-05 13:43:51 +00:00
Michael Achenbach
19d040eaa7 [test] Add more documentation about test-specifications
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true

Bug: chromium:788104
Change-Id: I1918d4ba69b2c00151ac51ee9426d980e24ab871
Reviewed-on: https://chromium-review.googlesource.com/808389
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49863}
2017-12-05 13:41:33 +00:00
Sergiy Byelozyorov
2520c33642 Whitespace CL
TBR=machenbach@chromium.org

Bug: 
Change-Id: I89a2be9f7e74172d355e5c773cf47e71d4bea460
Reviewed-on: https://chromium-review.googlesource.com/806194
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49862}
2017-12-05 13:26:21 +00:00
Franziska Hinkelmann
c999da3292 [profiler] Log code-source-info for each function
We were returning too early. Don't double-log the script, but log all
source-code-infos within it.

Bug: v8:7018
Change-Id: Icd29905ee1ae3444e30760cae0b0a18b55440335
Reviewed-on: https://chromium-review.googlesource.com/808165
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49861}
2017-12-05 10:39:55 +00:00
Ross McIlroy
4048f5ffe5 [Flags] Enable background_compiler on --future.
Also remove preparser_scope_analysis from future implications since it
is already enabled by default.

BUG=v8:5203

Change-Id: I70eb392d6ec1ff904eae8b5ddb238774b75005f3
Reviewed-on: https://chromium-review.googlesource.com/806164
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49860}
2017-12-05 10:38:30 +00:00
Martyn Capewell
7dfd8c6c8f [arm64] Use Neon for float construct/extract
Use Neon for floating point number insertion and extraction in
TurboFan code generator.

Bug: 
Change-Id: Ic955ff0bc5ddaadfe560ea9cfdd82f6b40815be3
Reviewed-on: https://chromium-review.googlesource.com/806172
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/master@{#49859}
2017-12-05 10:37:25 +00:00
Sergiy Byelozyorov
2d347a1a99 [tools] Migrate v8_node_linux64_rel to LUCI
9 additional bots has been added to the LUCI pool, which should be sufficient to
handle the additional load from this builder.

R=machenbach@chromium.org

No-Try: true
Bug: chromium:748124
Change-Id: I1aba2be502298ce9e3d76adb25addfe7cfe2ff9f
Reviewed-on: https://chromium-review.googlesource.com/806163
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49858}
2017-12-05 10:36:05 +00:00
Marja Hölttä
85230f7b8a [ic] Prototype-only dictionaries, step 0.
- When a dictionary mode prototype changes, invalidate the validity cell.
- The dictionary mode prototypes don't need to be gathered into an array in InitPrototypeChecks.

Bug: v8:7159
Change-Id: I1c7bbaf4b20556f44df18be1463d38fa4fbabe05
Reviewed-on: https://chromium-review.googlesource.com/793732
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49857}
2017-12-05 10:20:25 +00:00
Benedikt Meurer
3ef6e45ee3 [turbofan] Properly type the OrderedHashTableHealIndex builtin result.
This unblocks the checks in the SimplifiedLowering that whenever we
store something as TaggedSigned, the input type should at least be
Type::SignedSmall.

Bug: chromium:791245
Change-Id: Ice6e55c2c6584c0ff60c1e033ba755c8863af32a
Reviewed-on: https://chromium-review.googlesource.com/808104
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49856}
2017-12-05 09:51:15 +00:00
Michael Lippautz
e5a1993bff [heap] Remove delayed chunks in Unmapper
The dependency between restoring iterability and the Scavenger is
explicit. Delayed chunks are thus not needed anymore.

Bug: chromium:791043
Change-Id: I9f2c95c1856f53299af2737f922a3cb4cc578aa5
Reviewed-on: https://chromium-review.googlesource.com/805816
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49855}
2017-12-05 09:45:55 +00:00
v8-autoroll
faad1c19d9 Update V8 DEPS.
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/218a522..3337fb6

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

Change-Id: Ie243a01a3a1571f3dff1a07b5f31dddd20271fe2
Reviewed-on: https://chromium-review.googlesource.com/808066
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49854}
2017-12-05 09:11:43 +00:00
Michael Achenbach
897416af7f Revert "[turbofan] Make sure TruncatingUseInfoFromRepresentation respects Smi representation."
This reverts commit cc07ac73a4.

Reason for revert: Breaks benchmarks:
http://shortn/_POjH6zA7tp

Original change's description:
> [turbofan] Make sure TruncatingUseInfoFromRepresentation respects Smi representation.
> 
> Eventually, we want to fix this also for tagged pointers (tracking bug: https://crbug.com/v8/7162).
> 
> Bug: chromium:791245
> Change-Id: I93d6deff36cedcc9a4665fab0abe6fffdae9b61b
> Reviewed-on: https://chromium-review.googlesource.com/806457
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49850}

TBR=jarin@chromium.org,bmeurer@chromium.org

Change-Id: I0ff571b161ec40ba1f32ee048f8255c42414d8d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:791245
Reviewed-on: https://chromium-review.googlesource.com/807985
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49853}
2017-12-05 08:27:35 +00:00
Michael Achenbach
b501bf936e Revert "[compiler] Remove dead code in CodeGenerator::BuildTranslation."
This reverts commit 8d9de7ffeb.

Reason for revert: Breaks roll:
https://chromium-review.googlesource.com/c/chromium/src/+/806714

  # Fatal error in ../../v8/src/compiler/code-generator.cc, line 1032
  # unreachable code

  #3 v8::internal::compiler::CodeGenerator::AddTranslationForOperand()
  #4 v8::internal::compiler::CodeGenerator::TranslateFrameStateDescriptorOperands()
  #5 v8::internal::compiler::CodeGenerator::BuildTranslation()
  #6 v8::internal::compiler::CodeGenerator::AssembleInstruction()
  #7 v8::internal::compiler::CodeGenerator::AssembleCode()
  #8 v8::internal::compiler::PipelineImpl::AssembleCode()

Original change's description:
> [compiler] Remove dead code in CodeGenerator::BuildTranslation.
> 
> R=​jarin@chromium.org
> 
> Bug: 
> Change-Id: Id219fb91c4c4f40677edea6f9c04763284e14373
> Reviewed-on: https://chromium-review.googlesource.com/800934
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49831}

TBR=jarin@chromium.org,neis@chromium.org

Change-Id: I6f5e13e70dc816a4e0c4a362bd3a30091c14c637
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/807944
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49852}
2017-12-05 07:28:25 +00:00
peterwmwong
99b5f699ab [builtins] Port Array.p.{find,findIndex} to CSA
- Removes JS implementation and InnerArrayFind/InnerArrayFindIndex
- Adds TFJ, with TFS for slow continuation path

Some quick benchmarks show ~2x improvement for unoptimized code
and up to 16% improvement against optimized code (diminishes with
larger arrays as iterating dominates).

https://github.com/peterwmwong/v8-perf/blob/master/array-find-findIndex/README.md

Bug: chromium:791045, v8:1956, v8:5049, v8:7165
Change-Id: Ie16252ed495bbd91fe548b16d5ef6764de791a50
Reviewed-on: https://chromium-review.googlesource.com/804704
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49851}
2017-12-05 07:23:13 +00:00
Jaroslav Sevcik
cc07ac73a4 [turbofan] Make sure TruncatingUseInfoFromRepresentation respects Smi representation.
Eventually, we want to fix this also for tagged pointers (tracking bug: https://crbug.com/v8/7162).

Bug: chromium:791245
Change-Id: I93d6deff36cedcc9a4665fab0abe6fffdae9b61b
Reviewed-on: https://chromium-review.googlesource.com/806457
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49850}
2017-12-05 06:00:57 +00:00
v8-autoroll
c865f3ed7d Update V8 DEPS.
Rolling v8/build: 19d97ed..3320fde

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/c796cbc..218a522

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

Change-Id: Ifec197d4158ca8c05e32954656fff4da17864ff9
Reviewed-on: https://chromium-review.googlesource.com/807705
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49849}
2017-12-05 04:49:40 +00:00
Eric Holk
5fb4b176fa [wasm] Move wasm objects from Isolate to new WasmEngine object
This is a small refactoring that moves the WasmCodeManager and
CompilationManager from being a part of the Isolate directly to living in a new
WasmEngine object. This makes it easier to change Wasm components without
rebuilding so much of V8, and also enables future changes to Wasm without
affecting unrelated parts of V8.

Bug: v8:7109
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ic89bfc3974483aa909d12556d1386e18785a1d71
Reviewed-on: https://chromium-review.googlesource.com/804824
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49848}
2017-12-05 01:32:21 +00:00
Michael Achenbach
cb9e7af4e5 Revert "[bigint] Fix early-return in asIntN"
This reverts commit e110b59cc7.

Reason for revert: Breaks arm debug on chromebook hardware:
https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm%20-%20debug/builds/5335

Original change's description:
> [bigint] Fix early-return in asIntN
> 
> For "top digit" (of the result) comparison to be applicable, we must
> also check that there are no further digits in the source.
> 
> Bug: v8:7150
> Change-Id: I6ad317f6f600e11fef59b9907da1055e5586a3a8
> Reviewed-on: https://chromium-review.googlesource.com/804639
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49846}

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

Change-Id: I5dae82696d3ecb9602f73a2ff4760ed7bbcef1c5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7150
Reviewed-on: https://chromium-review.googlesource.com/806838
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49847}
2017-12-04 22:07:17 +00:00
Jakob Kummerow
e110b59cc7 [bigint] Fix early-return in asIntN
For "top digit" (of the result) comparison to be applicable, we must
also check that there are no further digits in the source.

Bug: v8:7150
Change-Id: I6ad317f6f600e11fef59b9907da1055e5586a3a8
Reviewed-on: https://chromium-review.googlesource.com/804639
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49846}
2017-12-04 20:31:19 +00:00
Junliang Yan
aaa7c4c9fa PPC/s390: remove dead code and fix compilation
R=joransiu@ca.ibm.com

Bug: 
Change-Id: I50f5ad99dc8bdd80c3fd9cce27db7bb728c24497
Reviewed-on: https://chromium-review.googlesource.com/806934
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#49845}
2017-12-04 19:47:19 +00:00
Jakob Kummerow
faf8aae9f8 [bigint] Flatten strings in StringToBigInt
Turns out that all callers might need this, so instead of burdening them
with checking, make the helper more robust.

Bug: v8:7151
Change-Id: I54270e2b1f5c03b503e2cf202bcbc09fe91aef14
Reviewed-on: https://chromium-review.googlesource.com/804956
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49844}
2017-12-04 19:30:09 +00:00
Jaroslav Sevcik
9a6f4422c6 [deoptimizer] Fix materialization of iterators.
Bug: chromium:787301
Change-Id: If32310f9f2f3f04daa5bdaa9779302f4a012d397
Reviewed-on: https://chromium-review.googlesource.com/806223
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49843}
2017-12-04 17:57:45 +00:00
Caitlin Potter
52ff3ae48b [builtins] implement RunMicrotasks pump as a code stub
- Implement RunMicrotasks in CSA to prevent a potentially large number
  of jumps between C++ and JS code while consuming te queue. Appears to
  provide a ~60% speedup in microtask-heavy code, which from limited
  testing appears to scale linearly.

  The code-stub microtask pump bails out to the old C++ microtask pump
  if it encounters a CallHandlerInfo microtask, and remains in C++ for
  the remainder of the queue (returning to the JS/stub implementation
  after the bailed out queue is exhausted).

- Add a variation of JSEntryStub which enters the new RunMicrotasks code
  stub.

- Add a new RunMicrotasks helper to Execution, which uses the
  RunMicrotasks entry stub.

Bug: 
Change-Id: I4667d4dd633d24455ea5d7cef239da0af1a7365e
Reviewed-on: https://chromium-review.googlesource.com/650486
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49842}
2017-12-04 17:55:29 +00:00
Ulan Degenbaev
fd554885a8 [heap] Add background GC tracing infrastructure.
A background task can now use GCTracer::BackgroundScope to
trace the time spent in the task. The time shows up in
--trace-gc-nvp output and in the runtime call stats for GC.

The destructor of GCTracer::BackgroundScope increments the
corresponding counter in heap()->tracer()->background_counter_,
which is protected by a mutex.

The GCTracer::Stop function fetches background_counter_ items
into the global scope and into the runtime call stats.

Bug: chromium:758183
Change-Id: Id7bcd5089ba6c027fe9a57eb3f7db1cb5092aec5
Reviewed-on: https://chromium-review.googlesource.com/801694
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49841}
2017-12-04 17:28:41 +00:00
Mircea Trofin
e4c97c8249 [wasm] W^X mechanism for WasmCodeManager.
This enables the invariant that a NativeModule's code may either be
executable or writable, but never both at the same time.

Bug: v8:7105
Change-Id: If2abfce6796a365bb675a82140f32e8f45bb923f
Reviewed-on: https://chromium-review.googlesource.com/804208
Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49840}
2017-12-04 17:22:31 +00:00
Clemens Hammacher
3731c8967d [cleanup] Remove more dead flags
Remove flags that are not used any more.

R=mstarzinger@chromium.org

Bug: v8:7109
Change-Id: I2c456f0e250688bd4cf57ccb3f0f8237fdc2ec58
Reviewed-on: https://chromium-review.googlesource.com/805954
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49839}
2017-12-04 17:02:05 +00:00
Ulan Degenbaev
e4866b94e1 [base] Fix undefined behaviour in LazyInstanceImpl.
Patch from Thomas Köppe <tkoeppe@google.com>.

Change-Id: I7ae2e001b6bd72ad67baad64d35e7c17d4ed4716
Reviewed-on: https://chromium-review.googlesource.com/806221
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49838}
2017-12-04 16:37:32 +00:00
Mythri
03b4d39133 Fix a race condition when accessing code_cache_map_ in d8
code_cache_map_ is used to store the serialized code that could
be consumed in the subsequent runs. This is a std::map which is not
thread safe. So protect this with mutex to avoid any race conditions
when executing in multiple isolates in parallel.

Bug: chromium:783124
Change-Id: Ie58402b8547cf3e83716b8d97d98a298745e487f
Reviewed-on: https://chromium-review.googlesource.com/806334
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49837}
2017-12-04 16:25:47 +00:00
Andreas Haas
1ce7f0e874 [cleanup][wasm] Set the return type of wasm stores to void
The return type of stores is void according to the WebAssembly spec.
In wasm-opcodes.h, however, the return type of stores was set to the
value type. This CL changes the signature of stores, and fixes some
issues which were caused because now there exist opcodes with a return
count different to 1.

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

Bug: v8:7109
Change-Id: I94d1b049e6d0032868b2ce83f52e16b474de3dea
Reviewed-on: https://chromium-review.googlesource.com/803495
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49836}
2017-12-04 16:24:42 +00:00
Ivica Bogosavljevic
f119c09769 MIPSR6: Load full address to t9 when calling PIC code
PIC code requires that full function address is available in t9
upon function entry. We disabled some optimizations that cause
problems since they do not load t9 with full function address.

Bug: 
Change-Id: Ie7987c5e2413db04c59547c33a69696e19db4b34
Reviewed-on: https://chromium-review.googlesource.com/806494
Reviewed-by: Miran Karić <miran.karic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#49835}
2017-12-04 16:14:59 +00:00
Jaroslav Sevcik
104a2db3c7 Revert "[deoptimizer] Staged materialization of objects."
This reverts commit e71b802279.

Reason for revert: Need to have a back-mergeable fix.

Original change's description:
> [deoptimizer] Staged materialization of objects.
> 
> The existing object materialization in the deoptimizer has the following problems:
> 
> - Objects do not necessarily verify during materialization (because during the
>   depth first walk we might have inconsistent objects).
> 
> - Stack can overflow (because we just materialize using recursive calls).
> 
> - We generalize object fields.
> 
> 
> This CL re-implements the materialization algorithm to solve this problem. The
> new implementation creates the objects in two steps:
> 
> 1. We allocate space for all the objects. In general, we allocate ByteArrays
>    of the right size. For leaf objects that cannot participate in cycles,
>    we build and initialize the materialized objects completely.
> 
>    For JS objects, we insert markers into the byte array at the positions
>    where unboxed doubles are expected.
> 
> 2. We initialize all the objects with the proper field values and change the
>    map from the ByteArray map to the correct map. This requires some sync
>    with the concurrent marker (Heap::NotifyObjectLayoutChange).
> 
>    When initializing the JS object fields, we make sure that we respect
>    the unboxed double marker.
> 
> Bug: chromium:770106, v8:3836
> Change-Id: I1ec466a9d19db9538df4ba915516d4c3ca825632
> Reviewed-on: https://chromium-review.googlesource.com/777559
> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49821}

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

Change-Id: I0657fb75330700dd7883c600dacb25676ebb47f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:770106, v8:3836
Reviewed-on: https://chromium-review.googlesource.com/806160
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49834}
2017-12-04 16:02:21 +00:00
Georgia Kouveli
74d339e1dc [cctest] Small refactoring of code generator tests.
This is to avoid calling AssembleTailCallBeforeGap and AssembleTailCallAfterGap
directly where possible (so making the tests less dependent on the code generator
interface when we're not directly testing it). It also makes sure that the
instruction we pass to AssembleTailCallBeforeGap and AssembleTailCallAfterGap is
indeed a tail call, with the immediate argument that specifies the stack delta.

This is to prepare for padding arguments for arm64 JSSP removal. We will need to
store padding in AssembleTailCallAfterGap, which will need the information from
a TailCall instruction.

Bug: v8:6644
Change-Id: Ia5485412a4244c7b2a133aa0541b9f8285680de4
Reviewed-on: https://chromium-review.googlesource.com/806117
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#49833}
2017-12-04 15:53:38 +00:00
Ulan Degenbaev
d1851bba6e [tools] Update tools/callstats.* with the new background GC group.
Bug: chromium:758183
Change-Id: I6858d9a3294270dde8913b8fb1a3e80008461ff6
Reviewed-on: https://chromium-review.googlesource.com/806118
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49832}
2017-12-04 15:46:28 +00:00
Georg Neis
8d9de7ffeb [compiler] Remove dead code in CodeGenerator::BuildTranslation.
R=jarin@chromium.org

Bug: 
Change-Id: Id219fb91c4c4f40677edea6f9c04763284e14373
Reviewed-on: https://chromium-review.googlesource.com/800934
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49831}
2017-12-04 14:00:54 +00:00
Michal Majewski
68c5d01ad6 Reland "Reland "[test] Creating command before execution phase.""
This is a reland of 3b06511052
Original change's description:
> Reland "[test] Creating command before execution phase."
> 
> This is a reland of 98cc9e862f
> Original change's description:
> > [test] Creating command before execution phase.
> > 
> > Immutable command class with shell, flags and
> > environment.
> > 
> > Command creation moved from worker to the main
> > process. Because of that there is no need to send
> > test cases beyond process boundaries and load test
> > suites in worker processes.
> > 
> > Bug: v8:6917
> > Change-Id: Ib6a44278095b4f7141eb9b96802fe3e8117678a6
> > Reviewed-on: https://chromium-review.googlesource.com/791710
> > Commit-Queue: Michał Majewski <majeski@google.com>
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#49746}
> 
> Bug: v8:6917
> Change-Id: I49c29a8db813c47909f2cc45070ac7721a447c7a
> Reviewed-on: https://chromium-review.googlesource.com/800370
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michał Majewski <majeski@google.com>
> Cr-Commit-Position: refs/heads/master@{#49756}

Bug: v8:6917
Change-Id: Ia39010a0a0f63537ad12490dfab17897d70d4930
Reviewed-on: https://chromium-review.googlesource.com/806034
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#49830}
2017-12-04 13:40:29 +00:00
Georg Neis
fb54e570e1 Enable clang's -Wunreachable-code warning.
The motivation is to avoid bugs such as the one fixed in
https://chromium-review.googlesource.com/c/v8/v8/+/800270.

Bug: v8:7109
Change-Id: I82a55f4a78d289d00ae7bafe78b45d92bab07a6b
Reviewed-on: https://chromium-review.googlesource.com/800291
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49829}
2017-12-04 13:09:25 +00:00
Sergiy Byelozyorov
4b9f4b47fd Whitespace CL
TBR=machenbach@chromium.org

Bug: chromium:747960
Change-Id: I9a45d2eaf08443d18756116d9d3f56458417dc1d
Reviewed-on: https://chromium-review.googlesource.com/805854
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49828}
2017-12-04 11:45:20 +00:00
Michal Majewski
8a6c6f5880 Reland "Reland "[test] Creating command before execution phase.""
This is a reland of 3b06511052
Original change's description:
> Reland "[test] Creating command before execution phase."
>
> This is a reland of 98cc9e862f
> Original change's description:
> > [test] Creating command before execution phase.
> >
> > Immutable command class with shell, flags and
> > environment.
> >
> > Command creation moved from worker to the main
> > process. Because of that there is no need to send
> > test cases beyond process boundaries and load test
> > suites in worker processes.
> >
> > Bug: v8:6917
> > Change-Id: Ib6a44278095b4f7141eb9b96802fe3e8117678a6
> > Reviewed-on: https://chromium-review.googlesource.com/791710
> > Commit-Queue: Michał Majewski <majeski@google.com>
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#49746}
>
> Bug: v8:6917
> Change-Id: I49c29a8db813c47909f2cc45070ac7721a447c7a
> Reviewed-on: https://chromium-review.googlesource.com/800370
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michał Majewski <majeski@google.com>
> Cr-Commit-Position: refs/heads/master@{#49756}

Bug: v8:6917
Change-Id: I981994224e493bee4c9435cb80772b6e2ad8fbb1
Reviewed-on: https://chromium-review.googlesource.com/805336
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#49827}
2017-12-04 11:42:50 +00:00
Michael Lippautz
2e4b4db0ab [heap] Untangle iterability from regular sweeping
Separates restoring iterability from sweeping a page. Since the set
of pages where iterability needs to be restored is small, it is
possible to wait and block for the task to finish if necessary.

A follow up change can now remove the fragile logic for delaying
unmapping of pages since it is guaranteed that no background task
keeps a reference to a page for restoring iterability.

Bug: chromium:791043
Change-Id: Ifba45594cc586df3c99e1bbb20a13b44c18dd9a1
Reviewed-on: https://chromium-review.googlesource.com/796419
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49826}
2017-12-04 11:39:31 +00:00
Michal Majewski
c74b7f3ac3 Remove AllSpaces iterator since it's the same as SpaceIterator.
Bug: v8:6972
Change-Id: I1dff2fac359222cb13ec7f14d59be63ffd910701
Reviewed-on: https://chromium-review.googlesource.com/801734
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#49825}
2017-12-04 11:32:50 +00:00
Camillo Bruni
5275c3c41c [api] Mark SetNamedPropertyHandler as soon to be deprecated
Eventually we should migrate to new new-style callbacks which take Names
instead of Strings as first arguments everywhere. Internally we don't really
handler NamedPropertyCallbackXX differently from the newer
GenericNamedPropertyCallbackXX.

Bug: v8:7109
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I827182f447427c222d5144f1a3e27bf543226e51
Reviewed-on: https://chromium-review.googlesource.com/803340
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49824}
2017-12-04 11:06:50 +00:00
Michal Majewski
adcd4a69f9 Function to add allocation observers to all spaces.
Bug: v8:6972
Change-Id: I3f5f2d5ebba3eaddd9e5390b7f299cdbc192ba6e
Reviewed-on: https://chromium-review.googlesource.com/801714
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#49823}
2017-12-04 10:55:33 +00:00
Pierre Langlois
77021584fe [arm64] Generate TBNZ for 32-bit '(x & (1 << N)) == (1 << N)'
Add support for matching '(x & mask) == mask' when mask has a single bit set,
and translate this into a tbnz instruction. This patch only does this for 32-bit
operations, we can port it to 64-bit operations as a follow-up if we find
matches.

This transformation mostly touches the snapshot where we get ~120 hits. This pattern can
also show up in JavaScript when introduced by the EffectControlLinearizer pass.

Bug: 
Change-Id: Ib37c6e0bd3831b7c17709357b00ca53735621605
Reviewed-on: https://chromium-review.googlesource.com/803272
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#49822}
2017-12-04 10:23:25 +00:00
Jaroslav Sevcik
e71b802279 [deoptimizer] Staged materialization of objects.
The existing object materialization in the deoptimizer has the following problems:

- Objects do not necessarily verify during materialization (because during the
  depth first walk we might have inconsistent objects).

- Stack can overflow (because we just materialize using recursive calls).

- We generalize object fields.


This CL re-implements the materialization algorithm to solve this problem. The
new implementation creates the objects in two steps:

1. We allocate space for all the objects. In general, we allocate ByteArrays
   of the right size. For leaf objects that cannot participate in cycles,
   we build and initialize the materialized objects completely.

   For JS objects, we insert markers into the byte array at the positions
   where unboxed doubles are expected.

2. We initialize all the objects with the proper field values and change the
   map from the ByteArray map to the correct map. This requires some sync
   with the concurrent marker (Heap::NotifyObjectLayoutChange).

   When initializing the JS object fields, we make sure that we respect
   the unboxed double marker.

Bug: chromium:770106, v8:3836
Change-Id: I1ec466a9d19db9538df4ba915516d4c3ca825632
Reviewed-on: https://chromium-review.googlesource.com/777559
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49821}
2017-12-04 09:23:03 +00:00
Clemens Hammacher
ba0a34a124 [wasm] [cleanup] Pass unique_ptr by value
According to the style guide, we pass unique_ptr by value, or by
reference in rare cases, but never by rvalue reference.

R=ahaas@chromium.org

Bug: v8:7109
Change-Id: I6cfdb8b61fada532ce334e2da419598085a2b408
Reviewed-on: https://chromium-review.googlesource.com/803716
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49820}
2017-12-04 09:18:43 +00:00
Andreas Haas
d3dc8b32cd [wasm] Update spec tests
R=bradnelson@chromium.org

Change-Id: I100f33a7c0da2f86aea78cf645b7a784a920596b
Reviewed-on: https://chromium-review.googlesource.com/805241
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49819}
2017-12-04 09:09:54 +00:00