Commit Graph

60382 Commits

Author SHA1 Message Date
Clemens Backes
8e2cfc894c [Liftoff] Use {int} for stack offsets
To follow the style guide, and potentially improve performance, we
switch to {int} for all stack offsets. The size of the stack cannot grow
anywhere near {kMaxInt} anyway, and we have limits in place (for number
of locals, number of parameters, and function body size) which also
prevent this number from ever growing near that limit.

R=jkummerow@chromium.org

Change-Id: I05ca9124d2def79edd212464739bc12315f7b813
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997445
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65740}
2020-01-13 19:31:16 +00:00
Ng Zhi An
e6f147605e [wasm-simd] Implement v128.andnot for arm64
Bug: v8:10082
Change-Id: I68e540c5b68c62fd6d43075e5244a9794d6d3eda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1980908
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65739}
2020-01-13 19:25:56 +00:00
Ng Zhi An
650ca8b509 [wasm-simd] Implement v128.andnot for x64 and interpreter
Note the tricky part in instruction-selector-x64, where we flip the
inputs given to the code generator. This is because the semantics we
want is: v128.andnot a b = a & !b, but the x64 instruction performs
andnps a b = !a & b. Therefore we flip the inputs, and combined with
g.DefineSameAsFirst, the output register will be the same as b, and we
can use andnps without any modifications in both SSE and AVX cases.

Bug: v8:10082
Change-Id: Iff98dc1dd944fbc642875f6306c6633d5d646615
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1980894
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65738}
2020-01-13 18:01:06 +00:00
Mythri A
e869518f5a [turbofan] Set runtimestats table in piplinedata for PrepareJobs
For measuring the time spent in each phase of TurboFan we use
PipelineRunScope that adds a RuntimeCallStats scope with the correct counter.
PipelineRunScope uses the runtimestats table set on the PipelineData to
initialize the RuntimeCallStats scope. We correctly set the runtimestats on
the pipelineData when starting ExecuteJobs but don't set it on PrepareJobs.
This cl fixes it to also set runtimestats table on PrepareJobs. PrepareJobs
always run on main thread, so it should be safe to use the runtimestats table
on the isolate.

Change-Id: Ied211158a10197aabb94373967146089a48c2db0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995386
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65737}
2020-01-13 17:05:06 +00:00
Ulan Degenbaev
37ccf35bea [heap] More accurate native context inference
This adds inference for general JSObjects to NativeContextInferrer in
the case when the object is going to be attributed to the shard context.

Bug: chromium:973627
Change-Id: I393e8dd16a1f8b615fb2f8dceb52f543bae33554
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997133
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65736}
2020-01-13 16:55:06 +00:00
Santiago Aboy Solanes
ae00aa9e4e [cleanup][CSA] TNodify methods regarding loads from dictionaries
TNodified:
 * LoadValueByKeyIndex
 * LoadPropertyFromGlobalDictionary
 * LoadDetailsByKeyIndex

Bug: v8:10021
Change-Id: Ie992982d0b03962658f4ef30351f1f84e8ce027e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995394
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65735}
2020-01-13 16:25:06 +00:00
Pierre Langlois
d0650ae18c [arm64][builtins] Allow simulator instructions in builtins.
Simulator-specific instructions are very useful, we can:

  - Place breakpoints that enable the simulator's interactive debugger, allowing
    us to see registers, the stack and print JS objects.

  - Enable and disable simulator tracing dynamically.

  - Call printf() directly, as the simulator cannot easily support its calling
    convention.

However these tools are not available when generating builtins. The reason is
that when cross-compiling, builtins are generated for real hardware but may
still run inside the simulator on the host if we have a custom snapshot. Using
the `v8_embed_script` GN option will do that for example but embedders may also
do this with the V8 API.

mksnapshot cannot tell the difference between generating code for a simulator
build and a cross-build. If we change this, we can allow us to use
simulator-specific features in builtins in simulator builds.

So in this patch we:

  - Introduce a --target_is_simulator mksnapshot flag to drive the
    enable_simulator_code Assembler option.

  - Make sure the assembler respect the option instead of the USE_SIMULATOR
    macro.


Change-Id: I7a7249f514427c1a2518a1af3679679596a72c7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1991497
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#65734}
2020-01-13 15:50:55 +00:00
Santiago Aboy Solanes
a374cc97cc [cleanup][CSA] TNodify StoreObjectField methods
TNodified:
 * StoreObjectField
 * StoreObjectFieldNoWriteBarrier

Bug: v8:10021
Change-Id: I74b34af410c560a1b005c0b93c71468ef57087fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993296
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65733}
2020-01-13 15:30:07 +00:00
Leszek Swirski
304e97d334 [parser] Fix caching dynamic vars on wrong scope
When looking up a variable in a deserialized WITH scope, we were
unconditionally passing in the cache scope to the lookup, even if the
with was inside the cache scope. This would lead to and outer scope of
the with holding the generated dynamic variable. If the cache scope was
the SCRIPT scope, the dynamic variable would be interpreted as a global
object property.

Now, we only store the WITH scope dynamic variables in the cache scope
if it is an inner scope of the WITH scope, same as we do for 'normal'
scope lookups.

Fixed: chromium:1041210
Change-Id: I4e8eb25bbb8ea58311355d13a9c7c97bf2fa3ec7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997135
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65732}
2020-01-13 15:06:15 +00:00
Santiago Aboy Solanes
998ff283c5 [cleanup][CSA] TNodify LoadPropertyFromGlobalDictionary
Bug: v8:10021
Change-Id: I2e27fbc52f9a42f1e52733e46a41227fbcaa8874
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995393
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65731}
2020-01-13 14:43:56 +00:00
Santiago Aboy Solanes
3b2b242459 [cleanup][CSA] TNodify InitializeAllocationMemento
Bug: v8:10021
Change-Id: I78948e93ca61116a6a1a45ccbc1dfa7c27988c30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995391
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65730}
2020-01-13 13:52:45 +00:00
Ross McIlroy
10d6024dc4 [Cleanup][CSA] TNodify Print and MakeTypeError.
BUG=v8:10021

Change-Id: Ife3bdb70968c90813ea96e3eaacaa78712ba5540
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995396
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65729}
2020-01-13 13:46:35 +00:00
Toon Verwaest
75c11b8659 [runtime] Derive is_eval from Script::CompilationType in DeclareGlobals
Change-Id: I34aff1cef476a1237e59e8151b82bdb09819664f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997126
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65728}
2020-01-13 13:20:55 +00:00
Sigurd Schneider
8b7113bf3c [coverage] Change time format in recently added protocol messages
The time was reported in milliseconds, but should be reported in seconds
instead.

TBR=ulan@chromium.org, szuend@chromium.org

Change-Id: I171cdb0107cd522b0d62ac6ed4edfacf7599da0b
Bug: chromium:1022031
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997137
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65727}
2020-01-13 13:02:55 +00:00
Milad Farazmand
8ec2a71ad7 PPC/s390: [liftoff] skip wasm-scope-info-liftoff test
Due to the changes introduced int this CL:
https://chromium-review.googlesource.com/c/v8/v8/+/1991498

wasm-scope-info-liftoff needs to be skipped until
lifoff is enabled. Details can be found in the comment
section of the above link.

Change-Id: I1f61d1685a6ec2e81dab84b003f984a706d45737
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993906
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#65726}
2020-01-13 12:54:05 +00:00
Toon Verwaest
3113535ecf [interpreter/runtime] Simplify how global declarations are processed
This makes the code a little more specific to what's happening: There is only 1
global scope, and if there is one, we know its declarations are
info->scope()->declarations(). That means we don't need multiple
GlobalDeclarationsBuilders, and we don't need to cache partially serialized
versions of the declarations. One builder is enough, and we can simply walk
those declarations if there are any.

Additionally this CL drops unnecessary information passed into DeclareGlobals:
- Global functions always have the name on the shared function info, so we can
  drop the name.
- Due to lazy feedback vectors there's no point in trying to preinitialize
  global loads. Also this was only preinitializing global loads at the script
  level, not sub functions; without even checking whether the global load was
  used. It may actually have caused us to do more work and allocate more global
  load feedback slots than neccessary.

Change-Id: Ibbdd029abe5a39ba27f7fc9be84670c5d444d98d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997123
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65725}
2020-01-13 12:43:36 +00:00
Dominik Inführ
69fda08a80 [objects] Add ArrayBufferExtension class
This CL adds the ArrayBufferExtension class, which is used to track
JSArrayBuffers in a linked list. The ArrayBufferExtension is going to
replace the ArrayBufferTracker in the future but is currently behind
the v8_enable_array_buffer_extension feature flag.

When enabled, each JSArrayBuffer has a corresponding native-heap
allocated ArrayBufferExtension object. All extensions are currently
tracked in a single linked list. During marking the GC not only
marks the JSArrayBuffer but also its extension object. At the end of
mark-compact the GC iterates all extensions and removes unmarked ones.

Change-Id: I88298be255944d5ae1327c91b0d7f0fdbcd486d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1969791
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65724}
2020-01-13 12:26:35 +00:00
Clemens Backes
e83a46115d [wasm] Clean up wasm-scope-info test
This brings the test back in sync with the wasm-scope-info-liftoff test
after the comments on https://crrev.com/c/1975754.

R=jkummerow@chromium.org

Bug: v8:10021
Change-Id: I8e3751fdb11fb32a0112c0706559a6d26e2e7594
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1977860
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65723}
2020-01-13 12:19:50 +00:00
Tobias Tebbi
69b195c935 [turbofan] fix type widening bug in RedundancyElimination, completely
This is an improved version of
https://chromium-review.googlesource.com/c/v8/v8/+/1981507

Bug: chromium:1031909
Change-Id: I552f49bf87340eee3c85fa02893b8e63a77a3608
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997129
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65722}
2020-01-13 12:18:45 +00:00
Simon Zünd
a05e2b4a3f Remove stack frame cache from inspector
After the V8 internal stack frame cache was removed in
https://crrev.com/c/1954392, the frames in stack traces will always
have unique frame IDs. This renders the inspector side frame cache
obsolete and this CL removes that cache.

Change-Id: Icb72eec396e96b378ace09bc20fda03b09998c64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997127
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65721}
2020-01-13 11:40:05 +00:00
Jakob Kummerow
943fe5912f [test] Update mjsunit.status to reflect reality
Bug: v8:10120
Change-Id: Ida81a4a4806bd2b4c19432412144b5e6f9c896e9
No-Try: true
Tbr: clemensb@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997134
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65720}
2020-01-13 11:34:45 +00:00
legendecas
52f88e1b93 [parser] add support for BigInt literal as property names
Fixed: v8:10083
Change-Id: I50e01022b1d1219ad8b31dd71f58f5bc9c9d10bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1987845
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65719}
2020-01-13 10:51:45 +00:00
Jakob Kummerow
ee04007976 [test] Clean up "ALWAYS" section of mjsunit.status
This patch contains real changes affecting the following tests:
- regress-1119: Bogus test, was failing justifiedly. Dropped.
- regress-crbug-9161: Was accidentally disabled everywhere. Re-enabled
                      for ASan (as the comment promised).
- regress-crbug-160010: Throws "invalid string length" on all platforms.
                        Was disabled everywhere. Dropped.
- regress-crbug-514081: Test was previously changed to use 2MB instead
                        of 2GB. Re-enabled variants.

Additionally, it reorders a bunch of definitions:
- Introduced separate sections for "mode == debug" and "no_i18n" to make
  the "ALWAYS" section cleaner.
- Sorted various "slow tests", "open bugs", and "no_variants" definitions
  into groups.
- Simplified long "arch == x or arch == y" sequences to "arch in (x, y)".

Bug: v8:10021
Change-Id: Ibe404ae400011196473cf082a4706ddbef7c8349
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995390
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65718}
2020-01-13 10:30:15 +00:00
arthursonzogni
1e7e3e9b8a Deprecate SetAllowCodeGenerationFromStringsCallback.
It has been superseeded by SetModifyCodeGenerationFromStringsCallback.

The new method has been introduced in M77 [1], in current form since M80
[2], default-used by Blink since M80 [3].

[1] https://crrev.com/b9342b7b5ff2e5588eceb503dd52bb1e3fbfb21c
[2] https://crrev.com/6c0825aaa73ca3163f089ca161c1f6e15633f306
[3] https://crrev.com/bfd0621af3f09557e9713d5c76108c7dddaa49a6

Bug: v8:10096
Change-Id: If5475aaff9cfee29b42529cd158372b191d34f32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1987252
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65717}
2020-01-13 10:02:45 +00:00
Zhao Jiazhong
82f52fa9e1 [mips][liftoff][wasm-simd] Specify alignment requirements
port 5716863 https://crrev.com/c/1974961

Original Commit Message:

  Declare an inline method for the various backends to define based on
  alignment requirements. That way backends that might take a performance
  hit when data is not naturally aligned can specify the requirements.

  With this requirement defined, we can then specify that SIMD values
  require 16 bytes on the stack.

  This also opens up the possibility of storing 32-bit values in 32-bits,
  rather than the fixed kStackSlotSize.

Change-Id: I928fb74ccdd31393dd76bda1dc76c5dc0e32975e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1994368
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65716}
2020-01-13 08:33:35 +00:00
Jakob Kummerow
b9439f7a81 [cleanup][test] Drop outdated regression test
The regression test for crbug.com/976627 was:
(1) silently failing on all platforms,
(2) very brittle, baking in several internal limits,
(3) highly specific for one particular place in the code,
(4) when fixed, very slow: 6 seconds on x64.release.

For all these reasons, it is herewith dropped.

Bug: v8:10021
Change-Id: Ic144f6bfcca0c301f3aca7840edbdc43f34a77fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993975
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65715}
2020-01-13 07:14:05 +00:00
v8-ci-autoroll-builder
ba01d9336c Update V8 DEPS.
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/32c9791..71813e2

Rolling v8/third_party/depot_tools: fc132e6..7a8bf94

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: Iee78bad75a9cda8044427f3907e119e773e8d258
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1994126
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#65714}
2020-01-12 03:46:54 +00:00
v8-ci-autoroll-builder
226ea92346 Update V8 DEPS.
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1f6ff4c..32c9791

Rolling v8/third_party/depot_tools: 13928b7..fc132e6

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: Ibd3353dfa64f8167197f6aa864ed4b736b150f80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1994124
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#65713}
2020-01-11 03:43:32 +00:00
Milad Farazmand
17298faacd s390: [wasm-simd] Implementing simd comparisons
Change-Id: I60e839b0272a7dc13852549f543c9fa724f7fd36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1994821
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#65712}
2020-01-10 23:18:42 +00:00
Shu-yu Guo
1069eb3ca7 [d8] Use message listener to print exceptions
Using the message listener is more in line with what Chromium does, and
would allow d8 to report exceptions of JS tasks posted internally by V8
(e.g. FinalizationGroup cleanups).

Bug: v8:8179
Change-Id: Ie058e1104818b77b2e8ca5e18173a7e68837c9e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1986390
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65711}
2020-01-10 21:35:17 +00:00
Ng Zhi An
b76d561ebc [wasm-simd][liftoff] Push/pop SIMD registers
On most architectures, FP registers overlap with SIMD registers. A FP
register holding a double can later be used to hold a 128-bit SIMD
value. So, when pushing or popping used registers, we need to push the
full width of the SIMD register.

In ia32 and x64, we change the
instruction from movsd to movdqu, and increment the offset by
kSimd128Size.

For arm64, we change the size of register when building
the CPURegList.

For arm, no change is needed, due to the way FP registers are paired up
to form a single SIMD register (rather than overlap).

Note for ports: PushRegisters and PopRegisters needs to be modified
similarly for mips/mips64. ppc and s390 does not implement these
methods, no change needed.

Bug: v8:9909
Change-Id: If29f1b30d7eface305a0d07a4bc551c151a77a01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1994383
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65710}
2020-01-10 21:34:12 +00:00
Ross McIlroy
7ab3fff72f [Cleanup][CSA] TNodify ThrowRange/TypeError.
BUG=v8:10021

Change-Id: I4057928dcac9cbca58fe329dc7c65d6c11699de9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995389
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65709}
2020-01-10 18:28:32 +00:00
Thibaud Michaud
8b5596bad0 [regalloc] Remove unnecessary ForwardStateTo
This call to {ForwardStateTo} seems unnecessary, as suggested by the
comment.

R=sigurds@chromium.org

Bug: v8:10021
Change-Id: I2ec3b54eda0cf5c53c2b5d3ad481a4581e024320
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993979
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65708}
2020-01-10 15:35:07 +00:00
Nico Hartmann
f2503feeb6 Removes premature constant folding in CodeAssembler
Many binary operations defiend in CodeAssembler check for constants
in the inputs and apply simplification if applicable. This is now
performed by the MachineOperatorReducer in a uniform way. To avoid
code duplication, the premature optimizations in CodeAssembler have
been removed in this CL.

Bug: v8:10021
Change-Id: I9b99f05e4f9ab31ff933f22d62674ee80efee8ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995277
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65707}
2020-01-10 15:34:01 +00:00
Milad Farazmand
2806dd786a PPC/s390: [liftoff][wasm-simd] Specify alignment requirements
Port 571686343c

Original Commit Message:

    Declare an inline method for the various backends to define based on
    alignment requirements. That way backends that might take a performance
    hit when data is not naturally aligned can specify the requirements.

    With this requirement defined, we can then specify that SIMD values
    require 16 bytes on the stack.

    This also opens up the possibility of storing 32-bit values in 32-bits,
    rather than the fixed kStackSlotSize.

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

Change-Id: Ic61ba7508d37971a04fddad9e25025d038fdc3bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1994181
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#65706}
2020-01-10 15:32:31 +00:00
Clemens Backes
193c08adfe [base] Improve logging for long error messages
When comparing objects which get printed to very long strings (e.g.
collections like vectors), it's much more readable if they get printed
to individual lines. Differences are much easier to spot then.

This CL refactors the CHECK/DCHECK macros to print the left hand side
and right-hand side in individual lines if any of them is longer than 50
characters.

To that end, the {PrintCheckOperand} method (only used from
{MakeCheckOpString}) is changed to return the string directly instead of
printing to an output stream.

R=mlippautz@chromium.org

Change-Id: I6e24a5cbfeb1af53fa0aca2828e23f642b15569c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1991866
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65705}
2020-01-10 15:24:11 +00:00
Santiago Aboy Solanes
6837667685 [cleanup][CSA] TNodify LoadPropertyFromFastObject and related functions
Related ones are TryGetOwnProperty and CallGetterIfAccessor.

Bug: v8:10021
Change-Id: I1b65c4260ab48b4431fa2b84a8be5789f24fa800
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993960
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65704}
2020-01-10 15:08:21 +00:00
Clemens Backes
d987e45d57 Remove {PerfBasicLogger} on non-linux
This is a follow-up to https://crrev.com/c/1993969. --perf-basic-prof is
only supported on linux platforms, thus the {PerfBasicLogger} class does
not need to be compiled on other platforms.

R=ahaas@chromium.org

Bug: chromium:1035233
Change-Id: Ic84fb6922f6c4ea5147ba7b54fbf43e557d6d792
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993978
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65703}
2020-01-10 15:06:51 +00:00
Eric Leese
d67a44bf74 Always encode floats as little-endian
Change-Id: I7dd05e5b5feffceb1dd3b2a055c308266aea7c94
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995272
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Commit-Queue: Eric Leese <leese@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65702}
2020-01-10 15:04:41 +00:00
Seth Brenith
87c16da505 [torque] move more bitfield definitions to Torque
This change moves the definitions of the bitfield flags used by Symbol
and Map to Torque. Symbol could directly follow the pattern established
by SharedFunctionInfo, but Map required some other changes:
- Until now, Torque bitfield definitions have required unsigned types. I
  thought that this would be the least-surprising behavior, since we
  never sign-extend when decoding bitfield values. However, I believe
  that the amount of churn involved in making ElementsKind be unsigned
  outweighs the benefit we were getting from this restriction (and
  similar difficulties are likely to arise in converting other bitfield
  structs to Torque), so this CL updates Torque to allow signed bitfield
  values.
- If we try to make Map extend from all of the generated classes that
  define its flags, we end up with class sizing problems because some
  compilers only apply empty base class optimization to the first in a
  row of empty base classes. We could work around this issue by
  generating macros instead of classes, but I took this as an
  opportunity for a minor clean-up instead: rather than having bitfield
  definitions for several different bitfield structs all jumbled
  together in Map, they can be split up. I think this makes the code a
  little easier to follow, but if others disagree I'm happy to implement
  macro generation instead.

Change-Id: Ibf339b0be97f72d740bf1daa8300b471912faeba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1988934
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#65701}
2020-01-10 14:57:01 +00:00
Dominik Inführ
2a7c3d2ba7 [OWNERS] Add dinfuehr@ to COMMON_OWNERS
Change-Id: I826830e3eee1a597af183852ac8ab9f07706a8cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1992429
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65700}
2020-01-10 14:42:32 +00:00
Andreas Haas
61242a54e7 [cleanup][wasm] Delete dead AsyncCompilationResolver class
R=jkummerow@chromium.org

Bug: v8:10021
Change-Id: Ia90918507bb34d4a35e58d7b2895a6347b853fe3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993970
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65699}
2020-01-10 14:36:56 +00:00
Thibaud Michaud
e98e52e2ff [wasm] Remove outdated comment
Non-embedded builtins are deprecated, and the "#ifdef" this comment is
referring to was already removed.

R=clemensb@chromium.org

Bug: v8:10021
Change-Id: I043963d689e7c3c1bf7e9e44fd07c49f0f19cdd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995264
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65698}
2020-01-10 14:35:51 +00:00
Zhao Jiazhong
cb631803bb [mips] Allow concurrent patching of the jump table.
Bug: v8:8974
Change-Id: Ib1e1c84b79190359d5ad519509b881e93d519604
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1989323
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65697}
2020-01-10 14:17:01 +00:00
Sigurd Schneider
b05c5896a1 [coverage] Report timestamp on coverage updates
This CL adds timestamps to coverage updates. This is useful for clients,
because between requesting a coverage update and collecting coverage data
significant time may pass. This change allows precise attribution at what
time a coverage update was taken.

Change-Id: I65a9cccb0171e892b7dbe35d105d3ca246ba08d0
Bug: chromium:1022031
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1992435
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65696}
2020-01-10 14:11:51 +00:00
Clemens Backes
25f242ad76 Remove --perf-prof flag on non-linux
The fuzzers picked up this flag, and are now complaining that they run
into UNREACHABLE/FATAL too often because the {PerfJitLogger} is not
implemented on non-linux platforms.
This CL removes the flag if it's not supported, so users get a warning
about the unknown flag, but otherwise it's ignored. This should unblock
the fuzzers, and slightly reduces binary size on non-linux.

R=ahaas@chromium.org

Bug: chromium:1035233
Change-Id: I6b9282318bc82ff23173bc83ae31cb2d8cbdcdb7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993969
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65695}
2020-01-10 13:58:50 +00:00
Sigurd Schneider
b44f8abb2a [runtime] Add a mode to lookup iterator that doesn't allocate
This CL adds a mode to the JSReceiver::GetDataProperty that does
not box unboxed double fields. This method can be used to fix a critical
bug in the heap snapshot generator that currently causes a GC in a place
where no GC should be caused.

Change-Id: If195f6811090281d364e3c8fa221a1d6b96bcd80
Bug: v8:9993
Fixed: chromium:1038490
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993286
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65694}
2020-01-10 13:56:21 +00:00
Maya Lekova
328c166ef4 [cleanup] TNodify TryLookupElement
Bug: v8:10021
Change-Id: Ic9fecc8cdea8457652637bc3128addc145061be0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993965
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65693}
2020-01-10 13:48:32 +00:00
Joshua Litt
d8fe5b9d09 Reland "Reland "Reland "[promises] Port Promise.race to Torque."""
This reverts commit e5e8685c15.

Bug: v8:9838
Change-Id: I3e45479a2470cb7891b39ac6f7d08404115aa7d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1991954
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Joshua Litt <joshualitt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65692}
2020-01-10 13:37:50 +00:00
Clemens Backes
5f3af52a6c [wasm] Internalize strings used for property lookups
During the property lookup, the strings will be internalized anyway.
Doing it early will save the creation of duplicate strings by using the
internalized object right away.
This might fix the GC overhead we see for huge numbers of imports.

R=ahaas@chromium.org

Bug: chromium:1036737
Change-Id: I9c968a0652f394e977c6d061ef157037ebb0f7f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993289
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65691}
2020-01-10 13:13:51 +00:00