Commit Graph

64428 Commits

Author SHA1 Message Date
Martin Bidlingmaier
3f4f4a0dcc [regexp] Handle zero-length matches in experimental engine
Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
Bug: v8:10765
Change-Id: I9e23fb5ba8a21aa1ddf96ab7936058f671bcc9ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2397895
Commit-Queue: Martin Bidlingmaier <mbid@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69736}
2020-09-08 12:45:27 +00:00
Marja Hölttä
3d40ec8d99 [super property speed] Add an IC for super property loads
Bug: v8:9237
Change-Id: I06d7e74ba0360334e6fa65c19f24548e220e4c69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349297
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69735}
2020-09-08 12:28:05 +00:00
Z Nguyen-Huu
7b8cce7724 [v8windbg] Cast resource as ExternalStringResourceBase*
Cast resource field in ExternalString as

v8: :String::ExternalStringResourceBase* would give us more info.
Change-Id: Iae97b477f400f58365e2381b7230d2226d490aa7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2388742
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#69734}
2020-09-08 12:08:15 +00:00
Martin Bidlingmaier
bc4174cc3b [regexp] Check capture_count before using experimental engine
Sometimes the parser throws away redundant parts of the AST while
parsing.  For example, the regexp /(?:(?=(f)o))?f/ is (almost)
equivalent to just /f/ because the optional block (...)? is zero-length.
The parser notices this and returns the same tree as for /f/.  However,
there is a capture inside the (...)? block (which is never recorded
because the quantifier containing it can only match zero-width, which is
considered failure), so in this case it doesn't suffice to check that
the regexp AST doesn't contain captures.

Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
Bug: v8:10765
Change-Id: I6145849d95b3522a397eadd2bae63d1d8e880f28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2397896
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Martin Bidlingmaier <mbid@google.com>
Cr-Commit-Position: refs/heads/master@{#69733}
2020-09-08 11:52:35 +00:00
Sathya Gunasekaran
b5fe40aab1 [inspector] Skip failing test
TBR: solanes@chromium.org
Bug: v8:10876
Change-Id: Ifd00704ea6328c0f470a2e33f37fb7a7e423435a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2397897
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69732}
2020-09-08 11:29:05 +00:00
Thibaud Michaud
d5e0d1f78d [wasm][debug] Handle OSR edge case
When the top frame is paused at a breakpoint, and this breakpoint is
being removed or was already removed, introduce a "dead breakpoint" in
the new code. This ensures that:
- The source position for the new frame is correct, otherwise it would
just pick the source position of the previous call,
- The offset between the source position and return address is the same
in the new and old code, which is necessary for OSR to find the correct
return address.

R=clemensb@chromium.org

Bug: v8:10337
Change-Id: I400886ff14846d3973d0634592c05960c05de738
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2377686
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69731}
2020-09-08 10:39:04 +00:00
Mythri A
58164026fe [turboprop] Fix type info to also expect Smi for double data-field loads
An earlier cl:
https://chromium-review.googlesource.com/c/v8/v8/+/2354810 fixed loading
double fields with dynamic map checks. The fix however didn't update the
expected type information to also expect Smi fields. So, in the later
optimization phases the CheckHeapObject operation was reduced to a NoP
since the expected type was a HeapObject. This cl fixes the bug by
updating the type to Type::Any.

Bug: chromium:1124696, v8:10582
Change-Id: Ic96dd74c97caf8eaf5289d8e8939f6feb1686a57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2396088
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69730}
2020-09-08 09:41:34 +00:00
Dan Elphick
0c7516e07c [cleanup] Remove stale TODOs related to RO_SPACE
The GetReadOnlyRoots will need to remain on HeapObject due to pointer
compression and the Isolate overload of HashSeed is convenient.

Change-Id: Id7fa8e57e3b8bfa6f50465c24da1fc5d0b4db0bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2397889
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69729}
2020-09-08 08:53:54 +00:00
Jakob Gruber
d2993d57e6 Refactor CallDescriptor::Flags handling
These flags are later packed into an InstructionCode by the
instruction selector, but not all bits are preserved. This CL adds a
few assertions and helper methods to clarify and make this a bit
safer.

Bug: v8:8888
Change-Id: I01adc9f7887cc21c623d790dc204ac1d4b9bc7ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2388116
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69728}
2020-09-08 06:00:24 +00:00
v8-ci-autoroll-builder
6ea2a2981f Update V8 DEPS.
Rolling v8/build: fc95b89..2dc8141

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8584a9d..69e45dc

Rolling v8/third_party/depot_tools: a070dd1..9218ba2

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Icccb92296366c45ff1a1a1b33a6310504465861f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2397199
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@{#69727}
2020-09-08 03:32:13 +00:00
Yolanda Chen
60e452b7b2 [x64] Eliminate unncessary push-pop pair in AssembleSwap
The current implementation in AssembleSwap will generate a push-pop pair to swap between a general register and a stack slot for both x64 and ia32 targets. This is unnecessary for x64 target, as we can use the kScratchRegister to save the general register and swap with the stack slot.

Change-Id: I10e0dc360dec22cdf5afa63ece3d5943685d7ecb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2394177
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Yolanda Chen <yolanda.chen@intel.com>
Cr-Commit-Position: refs/heads/master@{#69726}
2020-09-08 03:03:03 +00:00
Andreas Haas
10348e8eb6 [wasm][liftoff] Emit safepoints for externref values on the stack
With this CL we emit safepoint maps for externref values on the Liftoff
value stack. With that there is support for externref parameters and
locals in Liftoff, as well as for intermediate values of type
externref.

R=thibaudm@chromium.org

Bug: v8:7581
Change-Id: I2df0a8d00b2da33fe06ff474b039cca4c7be726d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387571
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69725}
2020-09-07 20:26:23 +00:00
Thibaud Michaud
40ce9f70a5 [wasm] Scan stack in foreground code GC
When a WasmGCForegroundTask starts during runMessageLoopOnPause, the
stack may contain Wasm code. In this case we need to scan the stack to
report live code.

This is already caught by some tests when RemoveBreakpoint is
implemented correctly, which will be done in a separate CL, so no
regression test is added here.

R=clemensb@chromium.org

Bug: v8:10337
Change-Id: I308145b9c2cf69f0100853be47ec9e30ce79a876
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2379510
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69724}
2020-09-07 18:38:33 +00:00
Clemens Backes
1a3cc6432d [wasm] Fix check for committing over the global limit
If we generate more code than allowed by the --wasm-max-code-space flag,
the {WasmCodeManager::Commit} method will fail (via fatal error). The
DCHECK that was placed before that call checked for a related condition
though, and failed before the {Commit} method could fail.
By moving it after the call, we fix this issue.

Adding a test case for this seems to be involved, since that test would
crash the whole process (because of the fatal error). So it would have
to be a unittest such that we can use ASSERT_DEATH_IF_SUPPORTED. In
unittests though we don't yet have the infrastructure to create a
NativeModule (needed for the WasmCodeAllocator). Alternatively we could
add special testing methods (and a constructor) to the
WasmCodeAllocator, but I do not consider this worth the effort for this
little fix.

R=thibaudm@chromium.org

Bug: chromium:1124646
Change-Id: Ief09dfbd0a5b0b040fe9cf8a34e458d1d01dfacc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390754
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69723}
2020-09-07 18:09:43 +00:00
Camillo Bruni
56a54c0f45 [logging][flags] Use flag implications for --log-all and --prof
This avoids race conditions in certain situations detected by TSAN.

Bug: v8:10644
Change-Id: Ic3082da4e918890940fcc1cabf0933b0419f41de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2396083
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69722}
2020-09-07 17:47:53 +00:00
Camillo Bruni
0fed3c75e1 [strings] Special case looking for zero byte in multi-byte strings
memchr is used in the default case but for two-byte strings that contain
mostly ascii sequences every other byte is 0.

This CL special-cases the 0 byte search in a two-byte string to simply
peform a simple for loop which is rouhly 10x faster than the repeated
memchr approach.

Bug: v8:10737
Change-Id: Icde6b858b6679da69448295616734c46aa95e439
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2364507
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69721}
2020-09-07 17:33:53 +00:00
Marcel Laverdet
7e8e76e784 Check interrupts in runtime BigInt parser
The BigInt constructor has quadratic complexity while parsing strings,
and the input is unbounded. Interrupts should be checked during this
operation to ensure the embedder has control over runaway execution.

since the implicit cast from string may now throw.

BigInt: :CompareToString and BigInt::EqualToString now return Maybe<..>
Change-Id: Iccb85fafac4df69075a34d1de647cb4f0184cb12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2392629
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69720}
2020-09-07 15:21:33 +00:00
Michael Achenbach
aede8c7795 [test] Derive simulator status flag from build product
Guessing the architecture on the testing machine is not required to
derive if the simulator is supposed to run. The architecture check
doesn't work on some platforms.

We derive this now by checking if we have compiled a simulator build:
target_cpu != v8_target_cpu.

Bug: chromium:1110824
Change-Id: Id30a647f0610f21efb00d68ad1602e62dcd2c65c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2395563
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69719}
2020-09-07 15:10:23 +00:00
Santiago Aboy Solanes
32801e10da [compiler] Temporarily enable --turbo-direct-heap-access
This can be done since --local-heaps is also temporarily enabled. This
lets us perform a reverse finch trial and start testing out direct heap
access.

Bug: chromium:1125606, v8:7790
Change-Id: I746e459824aa345dec8184bccc21bbd54070e3b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2396077
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69718}
2020-09-07 14:31:23 +00:00
Camillo Bruni
8bf237dd49 Revert "[test][d8] Add d8.log.getAndStop helper"
This reverts commit 95aa697b2f.

Reason for revert: breaks under tsan

Original change's description:
> [test][d8] Add d8.log.getAndStop helper
> 
> The new helper function allows us to write tests for log parsing
> without the need to first generating a log file. This makes it easier
> to spot errors when the log format changes.
> 
> - Add d8 global variable
> - Add file_name accessor to Logger and Log classes
> - Change OS::LogFileOpenMode to w+ / wb+
> - Use separate Log::WriteLogHeader method
> - Remove unused logger_ instance variable from Log
> 
> Bug: v8:10644
> Change-Id: Ifc7e35aa4e91b3f01f0847843263946e085944c3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387563
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69715}

TBR=mlippautz@chromium.org,cbruni@chromium.org,gsathya@chromium.org,verwaest@chromium.org

Change-Id: Iad47d2f1e3391cae3c2f8c9e6c904c43925e1671
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10644
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2396080
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69717}
2020-09-07 14:12:48 +00:00
Victor Gomes
8e89559631 [BUILD] Enable reverse jsargs
Change-Id: I04bab17c1636e99f7486987bc777bea73997a0c6
Bug: v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387579
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69716}
2020-09-07 14:11:43 +00:00
Camillo Bruni
95aa697b2f [test][d8] Add d8.log.getAndStop helper
The new helper function allows us to write tests for log parsing
without the need to first generating a log file. This makes it easier
to spot errors when the log format changes.

- Add d8 global variable
- Add file_name accessor to Logger and Log classes
- Change OS::LogFileOpenMode to w+ / wb+
- Use separate Log::WriteLogHeader method
- Remove unused logger_ instance variable from Log

Bug: v8:10644
Change-Id: Ifc7e35aa4e91b3f01f0847843263946e085944c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387563
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69715}
2020-09-07 12:29:03 +00:00
Victor Gomes
c1d06eb3d3 [compiler] Fix extra arguments position when reversed stack
When the interface descriptor of a builtin uses DEFINE_JS_PARAMETERS, the extra stack arguments must be positioned just above the return address, otherwise we would need to calculate its offset depending on the actual number of the arguments, we currently use a fixed offset to access them in CSA.

Therefore, these extra arguments are either the first arguments when V8_REVERSE_JSARGS is enabled or otherwise the last arguments.

Change-Id: If38ac7fd7f0079fc0e4fdccdb6cfb26e0425eb84
Bug: v8:10825
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2379854
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69714}
2020-09-07 10:47:08 +00:00
Camillo Bruni
0017c7bb86 [runtime] Add Normalization step in SetOrCopyDataProperties
Normalize the target object if we're guaranteed to end up in
dicionary mode after copying over all enumerable properties from the
source object.

This partially addresses performance issues when using the spread
operator on large dict-mode objects.

Change-Id: I5be7cbc6e6a7e4b1b59412779db9b651f5f68b45
Bug: v8:10763
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2362961
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69713}
2020-09-07 09:29:01 +00:00
v8-ci-autoroll-builder
37ccb46b2a Update V8 DEPS.
Rolling v8/build: 2b8377b..fc95b89

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ic59889e29560c4a2d8b91fbe04e4fd1101f4b924
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2394857
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@{#69712}
2020-09-07 03:49:48 +00:00
v8-ci-autoroll-builder
c42297c726 Update V8 DEPS.
Rolling v8/build: a9ca728..2b8377b

Rolling v8/third_party/depot_tools: 5dba9c9..a070dd1

Rolling v8/third_party/zlib: 59187e1..aec16ef

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I03c0e9bb1562243c059175d4e09cb5b03655a7fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2393889
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@{#69711}
2020-09-05 03:48:13 +00:00
Milad Farazmand
db89a34a34 s390: Check for zero-extended phi inputs during instruction selection
Port 5c0f7219bd

Original Commit Message:

    The 64-bit instruction selectors check whether the input value to
    a ChangeUint32ToUint64 node was produced by a node that sets the upper
    32 bits to zero, and if so, they avoid emitting an extra instruction to
    clear the upper bits. This change:

    1. Extends that existing mechanism to also include phi values: if all of
       the inputs to a phi value guarantee that the upper 32 bits are zero,
       then the phi value does too.
    2. Updates x64 to include non-negative int32 constants in the list of
       nodes that always clear the upper bits. I didn't add this to any
       other architecture because I'm less certain of how they resolve moves
       from constants.

    This change improves the speed of the Mono interpreter on x64 by about
    5%.

R=seth.brenith@microsoft.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ic515a254025b518c767fb64c5b1282cdf226f5ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2393742
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#69710}
2020-09-04 16:56:23 +00:00
v8-ci-autoroll-builder
2810faa9e5 Update V8 DEPS.
Rolling v8/build: 7cbd827..a9ca728

Rolling v8/third_party/depot_tools: 56048e6..5dba9c9

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ic9a9215b971e8e2de9eeb5d8d2f58972c49a24a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2393535
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@{#69709}
2020-09-04 03:42:52 +00:00
Zequan Wu
e0682fef63 Fix implicit conversion loses integer precision warning
Bug: chromium:1124085
Change-Id: I92bea75caad4ffc99d3890440295115f6d65e849
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2393216
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Auto-Submit: Zequan Wu <zequanwu@google.com>
Cr-Commit-Position: refs/heads/master@{#69708}
2020-09-03 23:40:16 +00:00
Ng Zhi An
040316463d [wasm-simd][scalar-lowering] Add missing comparison ops
Some comparison ops are missing from the list, so an incorrect
replacement type was set on those instructions.

Bug: v8:10507
Change-Id: I1ebee298261a33863fe09e62e94336a792966a47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2393099
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69707}
2020-09-03 22:25:46 +00:00
Seth Brenith
5c0f7219bd Check for zero-extended phi inputs during instruction selection
The 64-bit instruction selectors check whether the input value to
a ChangeUint32ToUint64 node was produced by a node that sets the upper
32 bits to zero, and if so, they avoid emitting an extra instruction to
clear the upper bits. This change:

1. Extends that existing mechanism to also include phi values: if all of
   the inputs to a phi value guarantee that the upper 32 bits are zero,
   then the phi value does too.
2. Updates x64 to include non-negative int32 constants in the list of
   nodes that always clear the upper bits. I didn't add this to any
   other architecture because I'm less certain of how they resolve moves
   from constants.

This change improves the speed of the Mono interpreter on x64 by about
5%.

Bug: v8:10606
Change-Id: Ife8ce9c7330524e0b2fad836209a81180b4870e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2382509
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#69706}
2020-09-03 20:57:36 +00:00
Ng Zhi An
1f7cb7e1c1 [wasm-simd][scalar-lowering] Fix lowering of functions returning f32x4
Functions with v128 in their signatures are always lowered to 4 word32.
So if a return happens to be have an input that is a f32x4 operation, we
get a register allocator error because it tries to fit a float into a
general register. To fix that we need to do some checks when lowering
kReturn, and for each input node, if we are returning a v128, and it is
to be lowered into 4 f32 nodes, we bitcast the floats to ints.

Bug: v8:10507
Change-Id: Iea2fdfc4057304ebf0898e6f7091124629c589f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391331
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69705}
2020-09-03 18:41:36 +00:00
Dominik Inführ
8654df00f4 [heap] Skip some tests with --stress-concurrent-allocation
Tests do not expect concurrent allocation and are simply skipped in that
configuration.

Bug: v8:10315
Change-Id: Ia371efa3c27e1f8b76fab47abcce2d7c218224bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390774
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69704}
2020-09-03 18:27:56 +00:00
Jakob Kummerow
ec49e377b1 Revert "Check interrupts in runtime BigInt parser"
This reverts commit 825c61d8b4.

Reason for revert: Processing interrupts triggers a DisallowHeapAllocation scope failure.

Original change's description:
> Check interrupts in runtime BigInt parser
> 
> The BigInt constructor has quadratic complexity while parsing strings,
> and the input is unbounded. Interrupts should be checked during this
> operation to ensure the host has control over runaway execution.
> 
> Change-Id: I15db9adeeafadc7b866a395dd8263aa8c2109ce8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2384166
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69679}

TBR=jkummerow@chromium.org,leszeks@chromium.org,marcel@laverdet.com

Bug: chromium:1124477
# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I1ba8c1de1f809f71a1c4fae9b56a8bd40f9f7e7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2392815
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69703}
2020-09-03 17:43:26 +00:00
Ng Zhi An
ee63b8427a [scalar-lowering][wasm-simd] Remove unnecessary equal
We are comparing equals to 0, we can remove this equality comparison,
and invert the phi outputs. This saves 1 op/node for every lowered
comparision.

Bug: v8:10824
Change-Id: I4957bed635c34d47fff98c5556ab55754d3fd91e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391911
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69702}
2020-09-03 17:37:36 +00:00
Santiago Aboy Solanes
ba797ba204 [compiler] Modify NeverSerialized macros for direct access to the heap
There are some objects that are serialized with concurrent inlining off
even when they are part of HEAP_BROKER_NEVER_SERIALIZED_OBJECT_LIST.

Bug: v8:7790
Change-Id: I91aa0e9d93cf86e2765f1f56bcfb8456c4b7685e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2382310
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69701}
2020-09-03 17:17:06 +00:00
evih
17cda1e6f1 [wasm] Use generic js-to-wasm wrapper for 0 or 1 int32 return case
The generic wrapper can be used for Wasm functions with int32 parameters
and 0 or 1 int32 return values.

Added tests for cases when the return value can & cannot be converted to
a Smi.

Bug: v8:10701
Change-Id: I470954ed0aced0e4ec6e65a9f38caac19c576549
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390141
Commit-Queue: Eva Herencsárová <evih@google.com>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69700}
2020-09-03 14:47:00 +00:00
Dominik Inführ
c878e00db8 [heap] Do not use always_allocate() when starting tear down
Do not use the already existing always_allocate() method for allowing
all allocations after tear down was started. Use explicit checks
of gc_state() == TEAR_DOWN instead.

This ensures that background threads extend the heap beyond its limits
only when tearing down the isolate. always_allocate() is also used
during regular execution in C++ code.

Bug: v8:10315
Change-Id: I66b5bfb06fa854048f37305a5d0cb7d60fadb30f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390764
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69699}
2020-09-03 14:31:20 +00:00
Dominik Inführ
d02ab0e13b [heap] Ensure Isolate::GetHeapStatistics uses space mutex
PagedSpace::CommittedPhysicalMemory() needs to use mutex when iterating
chunks due to concurrent allocations.

Also reorder sampling of memory statistics according to this order:

1) used memory
2) committed physical memory
3) committed memory

That way, used <= committed physical <= committed should hold.

Bug: v8:10315
Change-Id: Ie922ecc4846f724a09c71667a898bf74a8652220
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390768
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69698}
2020-09-03 14:20:10 +00:00
Milad Farazmand
b469661e51 PPC/S390: [execution] Add argument count to the standard frame
Port: a2fd94f014

Change-Id: I174ef5523806d23a0425e546ffe557b2c21defe7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390828
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#69697}
2020-09-03 14:02:10 +00:00
Dominik Inführ
a8ffcacb5f [heap] Enforce safepoint in unittest when iterating chunks
HeapWithPointerCompressionTest.HeapLayout sometimes raced with
background threads. When iterating chunks, background threads might add
chunks concurrently. Prevent this by enforcing safepoint during
iteration.

Bug: v8:10315
Change-Id: I2852ec3ea18905b669e60eadc660d9343ea35f48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390767
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69696}
2020-09-03 12:43:10 +00:00
Santiago Aboy Solanes
634c2a63e0 [csa][cleanup] Remove non-Tnodified IntPtrT version of LoadObjectField
There is an int version that will be TNodified in a follow-up CL.

Bug: v8:9708, v8:6949
Change-Id: I3a47cb352396dfe9dea426b6396216c06e0e3254
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387963
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69695}
2020-09-03 11:53:20 +00:00
Ulan Degenbaev
f20a63d1bf Reland "[heap] Add concurrent typed slot recording"
This is a reland of 9eb090d261

The android-pie-arm64-dbg compiler error was fixed in:
https://chromium-review.googlesource.com/c/v8/v8/+/2381450

Original change's description:
> [heap] Add concurrent typed slot recording
>
> Since the typed slot set is not thread-safe, each concurrent marking
> barrier collects typed slots locally and publishes them to the main
> typed slot set in safepoints.
> Bug: v8:10315
>
> Change-Id: If1f5c5df786df88aac7bc27088afe91a4173c826
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2370302
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69576}

Bug: v8:10315
Change-Id: Iae2882bad1cd0ffcae28c96318ba5fd7937f2215
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390763
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69694}
2020-09-03 11:16:44 +00:00
Ulan Degenbaev
8832a9e1f7 Disable --stress-concurrent-allocation for tests that change free lists
Tests that use SimulateFullSpace and SealCurrentObjects do not work
if there is a background thread allocating concurrently.

Bug: v8:10315
Change-Id: I73a4c9db8eb32fdf3e07fcb8f5dda309de797709
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390765
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69693}
2020-09-03 11:15:39 +00:00
Santiago Aboy Solanes
92993c1baf [csa][cleanup] TNodify LoadMap
This used to break x64 no embed bot due to it being Large code objects
but no embed no longer exists so this isn't a problem anymore.

Bug: v8:9708, v8:6949, v8:9637
Change-Id: I83836a94ff1747841315d46ca0e7ec5c73bbaf0d
Fix: v8:9637
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387962
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69692}
2020-09-03 10:21:49 +00:00
Ulan Degenbaev
d2d3256131 [heap] Disable --stress-concurrent-allocation in ManualGCScope
ManualGCScope is used in tests that perform GC manually. Stressing
concurrent allocation interferes with that and may trigger more GCs
than the test expects.

Bug: v8:10315
Change-Id: I6705f0b7cc555074b319a41d29810936b5a2a556
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2392242
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69691}
2020-09-03 09:06:00 +00:00
Jakob Gruber
4b26001c78 Reland "[compiler] Add a StartNode wrapper class"
This is a reland of 453cf21977

Original change's description:
> [compiler] Add a StartNode wrapper class
>
> .. to make implicit semantics of output nodes explicit.
>
> Bug: v8:8888
> Change-Id: I2ea5f5fa02f3d1f51196ea1e1e46b526dd9dc7d6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2388117
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69681}

Tbr: tebbi@chromium.org
Bug: v8:8888
Change-Id: I7ff3fc64c607a5289981a0762ad3a2b1de5a284d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2392241
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69690}
2020-09-03 07:15:09 +00:00
Jakob Gruber
6cf10c809c [snapshot] Fix clearing compiled code from JSFunction
JSFunctions with an attached InterpreterEntryTrampoline should also be
reset to CompileLazy, but this was recently broken by
https://crrev.com/c/2345966.

This CL introduces a new JSFunction::CanDiscardCompiled helper to
mirror SFI::CanDiscardCompiled, and uses it during serialization.

Bug: v8:10869
Change-Id: I176b77278d2d40d34db671638232faec4dda1d9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390145
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69689}
2020-09-03 06:01:49 +00:00
v8-ci-autoroll-builder
214d26d43e Update V8 DEPS.
Rolling v8/build: 6d55754..7cbd827

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/156bfc1..8584a9d

Rolling v8/third_party/depot_tools: ed15af5..56048e6

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I64ddc2caa6feae1432aa3a7cba4e854de98acf38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391803
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@{#69688}
2020-09-03 03:45:29 +00:00
Ng Zhi An
b72bd14f13 Force test to not run on unsupported SIMD platforms
Due to the way SSE flags work, we need to enable all versions prior to
SSE 4.1 as well.

Bug: v8:10863
Change-Id: I50ddd3f486641e7bf22c651fc2c9a8a4ccbc2b46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391325
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69687}
2020-09-02 23:07:49 +00:00