Commit Graph

45149 Commits

Author SHA1 Message Date
Andreas Haas
0c28bfb054 [arm][turbofan] Pass the slot index for the peek instruction by operand
This is the implementation of crrev.com/c/866721 for arm.

Drive-by change: I simplified the slot index calculation.

Original description:

At the moment the slot index is encoded in the opcode. This, however,
sets an upper limit the slot index which is lower than what we want to
have (i.e. < 512). With this change we pass the slot index as an
immediate operand, which does not impose limits on the value it
contains.

R=v8-arm-ports@googlegroups.com

Change-Id: Ic448872aa1da63f421d569ab5ec9160f36e6652b
Reviewed-on: https://chromium-review.googlesource.com/866745
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50607}
2018-01-16 09:28:08 +00:00
Clemens Hammacher
1d48b7bf4f [Liftoff] Add f32.load and f32.store support
There is not much missing to support loading and storing f32 values.
This CL adds that.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: If4a21490bfcb9cccec1ba62986a23549b3c857fa
Reviewed-on: https://chromium-review.googlesource.com/866711
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50606}
2018-01-16 09:27:03 +00:00
Clemens Hammacher
ce7ad569d9 [wasm] Move UpdateDispatchTables to wasm-objects.h
Make this a member method of WasmTableObject, because it is pretty
coupled with that object anyways, and is always being called together
with WasmTableObject::Set or WasmTableObject::AddDispatchTable.
It also simplifies another refactoring: https://crrev.com/c/866733

R=titzer@chromium.org

Change-Id: I53392fb9cf21f2e45c2a144d180e9b3614657094
Reviewed-on: https://chromium-review.googlesource.com/866933
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50605}
2018-01-16 09:25:53 +00:00
Michal Majewski
e447ee2259 [test] Run test262 on fyi bots.
Bug: v8:6917
Change-Id: I45ef97a2756f438f03f5d961381624e477680dee
Reviewed-on: https://chromium-review.googlesource.com/866497
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#50604}
2018-01-16 09:04:52 +00:00
Clemens Hammacher
4418b48691 [cleanup] Refactor codegen-tester
The implementation can be greatly simplified by using variadic
templates.

R=mstarzinger@chromium.org

Change-Id: Ifbda09bc536c9660a83d1888b395e92367c9b03e
Reviewed-on: https://chromium-review.googlesource.com/860458
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50603}
2018-01-16 09:01:22 +00:00
Michal Majewski
3bcc6b3e0e [test] Filter tests based on cmd line processor
Bug: v8:6917
Change-Id: I7fa8f1857f338551dd7acd1b25eb7e9feb376576
Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/866720
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#50602}
2018-01-16 08:50:57 +00:00
Michal Majewski
767deb504a [test] Move loading test suites to the base runner
Bug: v8:6917
Change-Id: I5ad7f9f28be5eb0d8cdc424c0ed5cb41623212e5
Reviewed-on: https://chromium-review.googlesource.com/866505
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50601}
2018-01-16 08:47:52 +00:00
Michael Achenbach
fa9489e12f [foozzie] Raise experiment percentage for gc fuzzing
NOTRY=true
TBR=hpayer@chromium.org

Bug: v8:7012
Change-Id: I4f1a2468ef60e383480f8ea04d069a43296b30b0
Reviewed-on: https://chromium-review.googlesource.com/866837
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50600}
2018-01-16 08:21:12 +00:00
Sigurd Schneider
508750180d Reland "[turbofan] Add simplified operator for String.prototype.codePointAt"
This is a reland of 22d894c83e
Original change's description:
> [turbofan] Add simplified operator for String.prototype.codePointAt
> 
> This CL adds the simplified operators
>   StringCodePointAt
>   SeqStringCodePointAt
> and associated lowering.
> 
> Bug: v8:7270
> Change-Id: I5aeefddeec39c3119b2d225e92a3116f802e7b45
> Reviewed-on: https://chromium-review.googlesource.com/861789
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50547}

Bug: v8:7270
Change-Id: Ia08d18543fc165fc2312cd393ed51f4ec98d7a58
Reviewed-on: https://chromium-review.googlesource.com/866311
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50599}
2018-01-16 08:09:02 +00:00
Michael Achenbach
83df2d84ce [test] Fix typo in test config
TBR=yangguo@chromium.org
NOTRY=true

Bug: v8:7302
Change-Id: Ica0f28fc8ce8184ffe8f51d940a77710e98b5d5a
Reviewed-on: https://chromium-review.googlesource.com/867039
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50598}
2018-01-16 07:56:32 +00:00
Michael Achenbach
4905830e3f [test] Migrate testing code serializer
This adds testing configs to the V8 side, so that they can be deleted on the
infra side in a follow up.

TBR=yangguo@chromium.org
NOTRY=true

Bug: v8:7302
Change-Id: I93e65576b9799675ea0a8beca188c84a30695de3
Reviewed-on: https://chromium-review.googlesource.com/867037
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50597}
2018-01-16 07:48:42 +00:00
v8-autoroll
1b5265e010 Update V8 DEPS.
Rolling v8/build: 9e6dcff..cd91c99

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/bac35f5..7854862

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

Change-Id: I33f454829dc255215cd9e3063d586c93c2f122af
Reviewed-on: https://chromium-review.googlesource.com/867534
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50596}
2018-01-16 04:56:57 +00:00
Tobias Tebbi
7a3dec45df [x64 ia32] add SpeculationFence instruction, lowered to lfence
Bug: 
Change-Id: Icf0c43ef5bd3b3d3055d9606f22d3126b31016e3
Reviewed-on: https://chromium-review.googlesource.com/866930
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50595}
2018-01-15 23:15:40 +00:00
Michael Lippautz
96de054c96 [object-stats] Fix heap visualizer
R: hpayer@chromium.org
No-try: true
Bug: v8:7266
Change-Id: Icc8f254d4f4e7c220cc322b3c98749da5e5ea3e6
Reviewed-on: https://chromium-review.googlesource.com/866831
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50594}
2018-01-15 20:30:07 +00:00
Junliang Yan
27629cbab5 PPC/s390: fix WasmCodeManager for s390 and ppc
R=joransiu@ca.ibm.com, mtrofin@chromium.org, jbarboza@ca.ibm.com

Bug: 
Change-Id: I89fc3ef038310fa98e957407b44ed524b4f313bd
Reviewed-on: https://chromium-review.googlesource.com/818155
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#50593}
2018-01-15 19:21:47 +00:00
Camillo Bruni
7b9ea02a70 [object-stats] Support boilerplate objects and arrays
Record seperate virtual instance types for boilerplates and their properties
and elements. This CL adds:
- BOILERPLATE_PROPERTY_ARRAY_TYPE
- BOILERPLATE_NAME_DICTIONARY_TYPE
- BOILERPLATE_ELEMENTS_TYPE


Bug: v8:7266
Change-Id: I2e6643d4bf067aa52eb1950a696b6535b020b097
Reviewed-on: https://chromium-review.googlesource.com/867059
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50592}
2018-01-15 18:40:46 +00:00
Michael Lippautz
85c6c8ce46 [object-stats] Enable ungrouping in visualizer
No-try: true
Bug: v8:7266
Change-Id: I981ac5b4be6117bcc46383d033d639cc3b30b617
Reviewed-on: https://chromium-review.googlesource.com/867371
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50591}
2018-01-15 18:15:26 +00:00
Mike Stanton
a0ab7d4527 [JSPerfTests] Refactoring in Array 2nd-order builtin tests
The (numbing) repetition in these tests were leading to errors when
writing new tests. Now a function DefineHigherOrderTests() can be
used to succinctly describe a test on (mostly) a single line.

Change-Id: I70d65ffd784a17bbf0b9ca2de477135c5d901794
Reviewed-on: https://chromium-review.googlesource.com/864144
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50590}
2018-01-15 16:32:27 +00:00
Camillo Bruni
c505962352 [runtime] Fix class literal boilerplates
Bug: chromium:802040
Change-Id: I887a6e9d06bd1e66e0e8175a7bbb830f693e55ed
Reviewed-on: https://chromium-review.googlesource.com/866854
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50589}
2018-01-15 16:30:57 +00:00
Tobias Tebbi
e02f561177 [turbofan] trim effect chain nodes when they have no side-effect
Bug: 
Change-Id: Ic1b6dc6fcd8bfc4f0c3dbb101a38106aa3596a12
Reviewed-on: https://chromium-review.googlesource.com/863886
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50588}
2018-01-15 16:05:07 +00:00
Michael Lippautz
b80a698d72 [tools] V8 heap stats visualizer
Visualizes --trace-gc-object-stats output.

No-try: true
Bug: v8:7266
Change-Id: I5beb15d63e645484f07fe5f2341105c4cfe0b550
Reviewed-on: https://chromium-review.googlesource.com/860580
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50587}
2018-01-15 15:27:17 +00:00
Andreas Haas
cd43f56eb1 [x64][turbofan] Pass the slot index for the peek instruction by operand
At the moment the slot index is encoded in the opcode. This, however,
sets an upper limit the slot index which is lower than what we want to
have (i.e. < 512). With this change we pass the slot index as an
immediate operand, which does not impose limits on the value it
contains.

R=titzer@chromium.org

Change-Id: Iab676186f41b8174bcc6c5a6053e6b0d5640ed3c
Reviewed-on: https://chromium-review.googlesource.com/866721
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50586}
2018-01-15 15:22:27 +00:00
Andreas Haas
c710e6584c [arm64][turbofan] Implement on-stack returns.
This is the implementation of crrev.com/c/766371 for arm64.

Original description:

Add the ability to return (multiple) return values on the stack:

- Extend stack frames with a new buffer region for return slots.
  This region is located at the end of a caller's frame such that
  its slots can be indexed as caller frame slots in a callee
  (located beyond its parameters) and assigned return values.
- Adjust stack frame constructon and deconstruction accordingly.
- Extend linkage computation to support register plus stack returns.
- Reserve return slots in caller frame when respective calls occur.
- Introduce and generate architecture instructions ('peek') for
  reading back results from return slots in the caller.
- Aggressive tests.
- Some minor clean-up.

R=v8-arm-ports@googlegroups.com

Change-Id: I6e344a23f359861c9a1ff5a6511651c2176ce9a8
Reviewed-on: https://chromium-review.googlesource.com/842545
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50585}
2018-01-15 15:18:47 +00:00
Michael Achenbach
997d5a6a5c [test] Add code_serializer testing variant
Also sort all variants in configuration mapping.

Bug: v8:7285
Change-Id: I2d3032b911e48c34557e47e50345fb29da7bbe85
Reviewed-on: https://chromium-review.googlesource.com/866502
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50584}
2018-01-15 15:04:07 +00:00
Pierre Langlois
f774f81343 [arm64][perf-prof] Fix detection of the stack pointer register.
On Arm64, the 31 encoding refers to either the zero register or the stack
pointer depending on the instruction. However, in order to distinguish them in
the assembler, the stack pointer has an internal code which isn't 31.

As a result, we need to use the internal code when converting a Register to a
DWARF code.

Bug: v8:6644
Change-Id: If8a6b6c94badd7d10c22664c7081733258b07a31
Reviewed-on: https://chromium-review.googlesource.com/866870
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#50583}
2018-01-15 14:58:57 +00:00
Michael Achenbach
56fa0a535b [test] Remove deprecated FAST_VARIANTS modifier
Bug: v8:7264
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I0c07c92955c0b6c145c7b72e5014f828eaf59c9a
Reviewed-on: https://chromium-review.googlesource.com/865903
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50582}
2018-01-15 14:30:47 +00:00
Michael Starzinger
0465c7607a [wasm] Fix serialization of empty modules.
This fixes a corner-case in the {NativeModuleSerializer} with modules
that do not contain any functions in the code table.

R=ahaas@chromium.org
TEST=mjsunit/regress/wasm/regress-801850
BUG=chromium:801850

Change-Id: I30cc3a26f30d8653fba2d7b99715830d12300ac2
Reviewed-on: https://chromium-review.googlesource.com/866773
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50581}
2018-01-15 14:25:18 +00:00
Sigurd Schneider
4a0800048c [turbofan] Fix inlining of A.p.reduce[Right] for packed case
Change-Id: Idae3ceb3f8de79ab94ccaa1961d025242a51714d
Reviewed-on: https://chromium-review.googlesource.com/866715
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50580}
2018-01-15 14:20:47 +00:00
sreten.kovacevic
1bcc4903c8 MIPS64: Add missing call position as safepoint
Change-Id: Ic434384f1f7d14c7117db2f5f42be36a1e861ef4
Reviewed-on: https://chromium-review.googlesource.com/866744
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#50579}
2018-01-15 13:58:34 +00:00
peterwmwong
8e6c0bb02a [typedarray] Speed up and simplify TypedArray#set overlap cases
- Remove CSA fallback to runtime for overlap cases
- Move overlap handling from runtime into elements.cc

Depending on typed array size (and overlap size), quick measurements
show a 4.3x - 8x improvement.  This fixes large >5x performance
cliff between overlap and non-overlap cases.
https://github.com/peterwmwong/v8-perf/blob/master/typedarray-set-overlap-fast-c-call/README.md

Bug: v8:5929
Change-Id: I47758d2ee603bc26f38dd9112567113cf887f5d5
Reviewed-on: https://chromium-review.googlesource.com/846378
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#50578}
2018-01-15 13:43:24 +00:00
Michael Achenbach
74a2a8f611 [foozzie] Add flag experiments for gc fuzzing
This will add three gc fuzzing flags with 5% likelihood each to the second
correctness fuzzing config. The random checks are determined by the
top-level random-seed passed to the script.

This change depends on setting the fuzzer random seed as default to the
standard random seed, since the former isn't explicitly passed by
clusterfuzz.

NOTRY=true
TBR=hpayer@chromium.org

Bug: v8:7012
Change-Id: I794dc48bb953b6a95bbc4fc4305ad561bc13b6ee
Reviewed-on: https://chromium-review.googlesource.com/865912
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50577}
2018-01-15 13:03:54 +00:00
Michal Majewski
bddfee9822 [test] Add special result for rerun and json indicator.
Bug: v8:6917
Change-Id: I5136f183bd1728a1ab90a9ebb2560d978e17ef28
Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/863623
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50576}
2018-01-15 12:54:23 +00:00
Yang Guo
43ac9d5151 Fix TransitionArray::Sort.
R=ulan@chromium.org

Bug: v8:7303
Change-Id: Ica6db623fbb5a4c4dd3ccf1dcbd6f796bb4406fc
Reviewed-on: https://chromium-review.googlesource.com/865907
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50575}
2018-01-15 12:52:03 +00:00
Andreas Haas
8491ca602c [fuzzer][arm64] Consider alignment in the multi-return fuzzer
On arm64, the stack pointer has to be aligned all the time. This
alignment was not considered in the creation of the CallDescriptor in
the fuzzer and thereby caused a mismatch between the CallDescriptor and
code generator. In other words, a callee put return values in a stack
slot which was different than the stack slot where the caller expected
the return value.

With this CL we consider this alignment in the fuzzer.

R=clemensh@chromium.org

Change-Id: I8c78c24c682b7b8678c0d4d112bae99cf405b184
Reviewed-on: https://chromium-review.googlesource.com/864682
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50574}
2018-01-15 12:41:52 +00:00
Michal Majewski
df008d4b84 [test] Set fuzzer seed to random seed by default
Bug: v8:6917
Change-Id: Iab4e9d7a8f8a4313a6722610fb6a2cfcff703d81
Reviewed-on: https://chromium-review.googlesource.com/866710
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#50573}
2018-01-15 12:12:12 +00:00
Clemens Hammacher
608437b4fe [Liftoff] Use AVX instructions if available
Mixing SSE and AVX instructions can cause severe slowdowns, so always
use AVX instructions if available.
The {Movss} method of {TurboAssembler} automatically does this,
emitting either {vmovss} or {movss}.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: I45124944964e5a970814c7b50dfbfca333137dc1
Reviewed-on: https://chromium-review.googlesource.com/865910
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50572}
2018-01-15 11:36:51 +00:00
Martyn Capewell
153f6705c2 [arm64] Remove SetStackPointer
Remove SetStackPointer function and update assembler tests.

Bug: v8:6644
Change-Id: I5ea26e57b848d56433c84d8eea22d7e9b761e6bb
Reviewed-on: https://chromium-review.googlesource.com/864147
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/master@{#50571}
2018-01-15 11:35:31 +00:00
Pierre Langlois
e3ae8a318c [arm64][turbofan] Optimize bailout check.
Every JS function has a bailout check at the beginning which makes sure it was
not lazily deoptimized. We can improve the check slightly:

- Load the code data container directly with a pc-relative load instead of
  ADR+LDR.
- Check the deoptimization bit with TBZ directly, saving us a TST instruction.
- Use one of the macro-assembler's dedicated scratch registers instead of x2.

Bug: 
Change-Id: Iea4824c74ed5a01b18595d5e980788f9745bbb6e
Reviewed-on: https://chromium-review.googlesource.com/864446
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#50570}
2018-01-15 11:12:31 +00:00
Pierre Langlois
7ac10da795 [turbofan] Lower NumberConstant nodes to IntPtrConstant.
If a NumberConstant can be represented as a Smi, then lower it to a
IntPtrConstant node during simplified lowering. Thanks to this, all backends can
match Smi values that can also be encoded as immediates in the instruction
selector. Additionally, we can apply the same lowering to the CodeAssembler for
the snapshot.

As a result, we can remove `mov` instructions generated because Int32Matcher and
Int64Matcher didn't not recognize Smis:

For 32-bit target, it's common for Smis also be immediates: "if (a < 100) {}"
~~~
mov r1, #200 -> cmp r0, #200
cmp r0, r1   -> blt <>
blt <>       ->
~~~

On Arm64 particularly, we lose opportunites to use `cbz`: "if (a == 0) {}"
~~~
movz x0, #0x0 -> cbz x1 <>
cmp x1, x0    ->
b.eq <>       ->
~~~

Overall, we do not see an impact on benchmarks such as webtooling. However, we
do see noteworthy code size reduction, from 0.5% to 1.5%.

Bug: 
Change-Id: I7fbb718ad51b9036c3514fa31c1326bdd6f2b0e6
Reviewed-on: https://chromium-review.googlesource.com/848814
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#50569}
2018-01-15 10:46:01 +00:00
Clemens Hammacher
183204f8ee [wasm] Refactor memory tracing
Instead of passing four arguments to the runtime function, just pass
one pointer to a struct containing all information. This makes it much
easier to implement memory tracing in Liftoff in a follow-up CL.
Also fix a few other minor things like the namespace and the include
guards.

R=titzer@chromium.org

Change-Id: I47d8827cbb896a581585947f594af52f42bdb37c
Reviewed-on: https://chromium-review.googlesource.com/863673
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50568}
2018-01-15 10:13:00 +00:00
sreten.kovacevic
33876ff6cf MIPS64: Fix WASM related failures
Fix wrong MacroAssembler instruction in
kArchCallWasmFunction, which caused over
1000 tests to fail.

Bug: 
Change-Id: I5730f33ec2253d2d5dfaf8a8e6d5414f0668b4bd
Reviewed-on: https://chromium-review.googlesource.com/866498
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#50567}
2018-01-15 09:49:50 +00:00
Michael Achenbach
36ade3d8a5 [test] Replace obsolete FAST_VARIANTS modifier
The fast variants set got the same as no variants after crankshaft
deprecation and there is no plan to extend it again. Hence we remove
the modifier now.

TBR=yangguo@chromium.org

Bug: v8:7264
Change-Id: Ib577542741841b5b9542327b90afea8d5a62c879
Reviewed-on: https://chromium-review.googlesource.com/866496
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50566}
2018-01-15 08:52:45 +00:00
Michal Majewski
60c17bf983 [test] Simplify passing results between test processors.
Bug: v8:6917
Change-Id: Id73e4892a0d1b3b9c5bdd70ccc136e7bd2edf360
Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/863603
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50565}
2018-01-15 08:51:40 +00:00
Michael Achenbach
d557e7d412 [test] Unskip fixed test
TBR=mvstanton@chromium.org

Bug: v8:4495
Change-Id: I8a8beb85ec7e28ca98504d811542dff1fced25dc
Reviewed-on: https://chromium-review.googlesource.com/865897
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50564}
2018-01-15 08:38:30 +00:00
Benedikt Meurer
e272a2f722 [turbofan] Fix type confusion in NodeProperties::InferReceiverMaps.
For JSCreate nodes with constant inputs we cannot simply assume that the
new.target input is a JSFunction, since it can essentially be any
JSReceiver that is a constructor, i.e. it can also be a JSBoundFunction.

Bug: chromium:801627
Change-Id: Ia37bf9c0a751e4665e1167a3771fbe166473c979
Reviewed-on: https://chromium-review.googlesource.com/866493
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50563}
2018-01-15 06:56:47 +00:00
Jaroslav Sevcik
969fe7a393 [turbofan] Refactor the pipeline to separate scheduling from instruction selection.
This moves the funky conditional code in ScheduleAndSelectInstructions to
the caller (the caller mostly knows statically what it wants).

My hidden agenda is to prepare the pipeline for post-scheduling passes.

Change-Id: Ia6009a6b2472d7211ef213eb4eb551957ae9709c
Bug: v8:5267
Reviewed-on: https://chromium-review.googlesource.com/863663
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50562}
2018-01-14 09:15:18 +00:00
Michael Achenbach
bb7138f67a Revert "Simplify FunctionKind, saving 4 bits in SharedFunctionInfo"
This reverts commit 42667bab5b.

Reason for revert: Breaks msvc compile:
https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/908

Original change's description:
> Simplify FunctionKind, saving 4 bits in SharedFunctionInfo
> 
> Since we only need to store 18 different function kinds,
> the bitfield approach was wasting space (requiring 11 bits).
> 
> This patch replaces the bitfield with a regular enum, and
> updates all the FunctionKind predicates to use comparisons
> instead of bitwise ops.
> 
> For the small amount of builtin code that depended upon being
> able to do masking to determine whether something is a class
> constructor, we still store two extra bits on FunctionKind,
> which are computed when the SFI is initialized.
> 
> If this approach causes performance regressions (i.e., if it
> turns out that other code was implicitly depending on masking
> for fast checks), we can revert this or address it in
> other ways (e.g., by doing similar caching of repeated checks
> in the caller).
> 
> Change-Id: Iebb3214f564ea8bd7b21e78fda33517d63247124
> Reviewed-on: https://chromium-review.googlesource.com/860896
> Commit-Queue: Adam Klein <adamk@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50559}

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

Change-Id: I8e1faa0ca6213d1e70a00fcb417b1bfa35ebd643
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/866310
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50561}
2018-01-13 11:16:28 +00:00
v8-autoroll
292ef57c9b Update V8 DEPS.
Rolling v8/build: 28d46dd..9e6dcff

Rolling v8/buildtools: d3ad6b3..6fe4a32

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/30e5a9f..bac35f5

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

Change-Id: Ia978edcec12aab14d330afad6c811047cf622260
Reviewed-on: https://chromium-review.googlesource.com/866171
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50560}
2018-01-13 05:02:17 +00:00
Adam Klein
42667bab5b Simplify FunctionKind, saving 4 bits in SharedFunctionInfo
Since we only need to store 18 different function kinds,
the bitfield approach was wasting space (requiring 11 bits).

This patch replaces the bitfield with a regular enum, and
updates all the FunctionKind predicates to use comparisons
instead of bitwise ops.

For the small amount of builtin code that depended upon being
able to do masking to determine whether something is a class
constructor, we still store two extra bits on FunctionKind,
which are computed when the SFI is initialized.

If this approach causes performance regressions (i.e., if it
turns out that other code was implicitly depending on masking
for fast checks), we can revert this or address it in
other ways (e.g., by doing similar caching of repeated checks
in the caller).

Change-Id: Iebb3214f564ea8bd7b21e78fda33517d63247124
Reviewed-on: https://chromium-review.googlesource.com/860896
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50559}
2018-01-12 23:55:06 +00:00
Adam Klein
49898aad76 Remove always-true --harmony-async-iteration runtime flag
It was shipped in Chrome 63.

Bug: v8:5855
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Icc00b8300622d1c7b5662be8ac5e425b9781f666
Reviewed-on: https://chromium-review.googlesource.com/858381
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50558}
2018-01-12 20:14:34 +00:00