Commit Graph

69384 Commits

Author SHA1 Message Date
Camillo Bruni
ed7e4554db [mjsunit][tools][d8] Full roundtrip tickprocessor test
- Add os.d8Path property
- Add os.name property
- Change tickprocssor test to use command line arguments for testing
  various configurations
- Change tickprocessor test to create a temporary v8.log and read it
  back in on linux only
- Rearrange code in tickprocessor.mjs to allow instantiating the
  CppEntriesProvider directly
- Drop complete symbol-list for tickprocessor-test-large.log for better
  code searching in V8

Change-Id: Ib56dd0a1ba5377282c84c4de6f17e2fd69ee8123
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2929120
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74892}
2021-06-01 17:38:37 +00:00
Milad Fa
986299250e [wasm-simd] Skip tests which require Simd enabled
These tests require Simd enabled which causes failures
on machines without the support.

They are already skipped on Mips: https://crrev.com/c/2841887

Change-Id: I4b9a9bb3cb208a0e9aa12dc135393bc515ad766e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2927210
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74891}
2021-06-01 17:09:27 +00:00
Shu-yu Guo
360c7afca5 [weakrefs] Clear unregister token-related fields when clearing weak cells
Bug: chromium:1213770
Change-Id: Ic063e79bfa8f3dabdd29d1cc9ed74c7af44d0c31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2923294
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74890}
2021-06-01 16:28:48 +00:00
Jose Dapena Paz
3d24b3ab8a ARM64: VRegister::from_code expected to be constexpr
GCC build fails trying to use a non constexpr function from a
constexpr function.

../chromium-92.0.4503.0/v8/src/wasm/baseline/liftoff-register.h: In member function 'constexpr v8::internal::DoubleRegister v8::internal::wasm::LiftoffRegister::fp() const':
../chromium-92.0.4503.0/v8/src/wasm/baseline/liftoff-register.h:286:71: error: call to non-'constexpr' function 'static v8::internal::VRegister v8::internal::VRegister::from_code(int)'
  286 |     return DoubleRegister::from_code(code_ - kAfterMaxLiftoffGpRegCode);
      |                                                                       ^
In file included from ../chromium-92.0.4503.0/v8/src/codegen/register-arch.h:16,
                 from ../chromium-92.0.4503.0/v8/src/deoptimizer/translation-array.h:8,
                 from ../chromium-92.0.4503.0/v8/src/objects/code.h:10,
                 from ../chromium-92.0.4503.0/v8/src/codegen/reloc-info.h:10,
                 from ../chromium-92.0.4503.0/v8/src/codegen/assembler.h:47,
                 from ../chromium-92.0.4503.0/v8/src/codegen/assembler-arch.h:8,
                 from ../chromium-92.0.4503.0/v8/src/codegen/turbo-assembler.h:12,
                 from ../chromium-92.0.4503.0/v8/src/codegen/macro-assembler.h:8,
                 from ../chromium-92.0.4503.0/v8/src/wasm/baseline/liftoff-assembler.h:13,
                 from ../chromium-92.0.4503.0/v8/src/wasm/baseline/liftoff-assembler.cc:5:
../chromium-92.0.4503.0/v8/src/codegen/arm64/register-arm64.h:416:20: note: 'static v8::internal::VRegister v8::internal::VRegister::from_code(int)' declared here
  416 |   static VRegister from_code(int code) {
      |                    ^~~~~~~~~

Bug: chromium:819294
Change-Id: Ia19ea90f3f666702d32c90e147af17dcda7e08a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2929805
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#74889}
2021-06-01 16:21:37 +00:00
Milad Fa
180f5a1bb6 PPC: Add missing semicolon to fix compilation error
Port: c69b0c809d

Change-Id: I5fafcb67ab35d489eab02755304a52730411ef72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2930361
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74888}
2021-06-01 16:20:32 +00:00
Junliang Yan
02f6a1b60e ppc: Unify Memory Operation 1
Cleanup LoadU64 and LoadU64WithUpdate

Change-Id: If98c6949aeaa9c2b9bca47958cb72d80d70e7309
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2930360
Commit-Queue: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74887}
2021-06-01 16:19:27 +00:00
Milad Fa
3805a698f7 PPC/s390: [wasm][liftoff] Always zero-extend 32 bit offsets
Port 2b77ca200c

Original Commit Message:

    The upper 32 bits of the 64 bit offset register are not guaranteed to be
    cleared, so a zero-extension is needed. We already do the zero-extension
    in the case of explicit bounds checking, but this should also be done if
    the trap handler is enabled.

R=thibaudm@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Ife3ae4f93b85fe1b2c76fe4b98fa408b5b51ed71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2929661
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74886}
2021-06-01 14:32:49 +00:00
Vicky Kontoura
e2ebe3b181 [web snapshot] Add more mjsunit tests
This CL adds all relevant cctests as mjsunit tests as well.

Bug: v8:11525, v8:11706
Change-Id: I2d05e21adc6f665613249b67f24695c82e2ea455
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2930157
Commit-Queue: Vicky Kontoura <vkont@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74885}
2021-06-01 14:22:47 +00:00
Maya Lekova
6e6e10d479 [fastcall] Fix unused functions in lite mode
Change-Id: Iddb3e161535fb3639e5883443d07520fdfe06c4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2930166
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74884}
2021-06-01 13:45:37 +00:00
Camillo Bruni
a345a442d3 [d8][mjsunit][tools] Improve d8 file API
- Add d8.file.read() and d8.file.execute() helpers
- Change tools and tests to use new d8.file helper
- Unify error throwing in v8::Shell::ReadFile

Change-Id: I5ef4cb27f217508a367106f01e872a4059d5e399
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928505
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74883}
2021-06-01 13:37:57 +00:00
Clemens Backes
616a75f1dd [wasm] Merge immediate "completion" into "validation"
The split between "Complete" methods and "Validate" methods is subtle
and undocumented. The "Complete" methods are only used in places where
we know that the function is valid anyway: Printing wasm code and
getting stack effects of an instruction (for the interpreter). Both are
also not performance critical.
Hence this CL merges the "Complete" methods in the respective "Validate"
methods and just call the latter instead of the former.

R=jkummerow@chromium.org

Bug: v8:11831
Change-Id: Id9591c73587262c30b8c56770b090f2b0d2d45b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2922118
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74882}
2021-06-01 13:21:17 +00:00
Thibaud Michaud
2b77ca200c [wasm][liftoff] Always zero-extend 32 bit offsets
The upper 32 bits of the 64 bit offset register are not guaranteed to be
cleared, so a zero-extension is needed. We already do the zero-extension
in the case of explicit bounds checking, but this should also be done if
the trap handler is enabled.

R=clemensb@chromium.org
CC=jkummerow@chromium.org

Bug: v8:11809
Change-Id: I21e2535c701041d11fa06c176fa683d82db0a3f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917612
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74881}
2021-06-01 12:59:17 +00:00
Vicky Kontoura
def58d04ff [web snapshot] Support empty objects
This CL fixes the deserialization of the map for empty objects, so that
the initial empty map is used.

Bug: chromium:1213851, v8:11525, v8:11706
Change-Id: I37de0b147b9c89ead9c96f776e5fbf88da4630cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928192
Commit-Queue: Vicky Kontoura <vkont@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74880}
2021-06-01 12:58:07 +00:00
Wenyu Zhao
e1716becb2 [heap] Add a global allocation site tracking flag
This CL adds a v8_allocation_site_tracking flag to control the allocation and
tracking of memento objects.

Disables FLAG_allocation_site_pretenuring if v8_allocation_site_tracking
is disabled.

v8_enable_single_generation implies !v8_allocation_site by default.

Change-Id: Ib07528bd37d91de6bb6ea0bfea1699be4e17fae9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897326
Commit-Queue: Wenyu Zhao <wenyu.zhao@anu.edu.au>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74879}
2021-06-01 12:44:07 +00:00
Dominik Inführ
0f9e351fac [heap] Use TimeTicks::Now() also for incremental_marking_start_time_
NotifyIncrementalMarkingStart() was using a different timer in the
default configuration to set incremental_marking_start_time_.

Bug: v8:11801
Change-Id: I1551bcc659d025bf8c46c865f5d2bd429934f628
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2930158
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74878}
2021-06-01 12:36:37 +00:00
Benedikt Meurer
3740764cca [debug][cleanup] Use consistent StepInto and StepOver naming.
In the Chrome DevTools Protocol, the step actions are named StepOut,
StepOver, and StepInto, but internally we used StepOut, StepNext, and
StepIn instead. This change adjusts the naming to be consistent.

Bug: chromium:901814, chromium:1162229
Change-Id: Id3502a1b0a4aadd94734ec3d1fef73c1782fa220
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928510
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74877}
2021-06-01 11:26:57 +00:00
Camillo Bruni
c69b0c809d [builtins] Preparation for callee-saved registers in RecordWrite stubs
Various behaviour preserving changes that make it easier to switch on
callee-saved registers without having to land refactoring code at the
same time.

- Use MaybeStoreRegisters / MaybeRestoreRegisters
- Use CallRecordWriteStubSaveRegisters everywhere for now. Eventually
  this will be replaced by CallRecordWriteStub in places with fixed
  registers.
- Use WriteBarrierDescriptor::ComputeSavedRegisters, which for now
  returns the same as allocatable_registers

Full x64 implementation: https://crrev.com/c/2922604

Bug: v8:11420
Change-Id: I04e6ac2f6333edc91cb1030a0217f59ad441a1d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2922250
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74876}
2021-06-01 11:20:47 +00:00
Camillo Bruni
dff35b65a9 [mjsunit][tools] Run tickprocessor and dumpcpp tests on fewer systems
Limit tests to release, linux and macos since they are mostly for
checking whether the tools work correctly rather than JS correctness.

Change-Id: I26e49fbda33a4dac8d774b2e03fa07ae1f2f142a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2930156
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74875}
2021-06-01 11:18:47 +00:00
Camillo Bruni
22a32f11f7 [api] Support PropertyAttribute in v8::Template::Set
Bug: v8:11195
Change-Id: I100a19087dffc35e3935b75ed00c6c1a4e887d50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928506
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74874}
2021-06-01 09:46:46 +00:00
Camillo Bruni
5dbd342b8d [tools] Cleanup Arguments processing in tools
- Move readFile helper to LogReader.readFile
- Add static BaseArgumentsProcessor.process helper
- Move SourceMap handling to the TickProcessor
- Always skip example file mjsunit/tools/tickprocessor-test-large.js
- Run tickprocessor and dumpcpp tests only in release mode

Change-Id: I635fb2d2839233219b058faf9710fd0f19880fd2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2929117
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74873}
2021-06-01 09:43:46 +00:00
Santiago Aboy Solanes
59a60aed12 [codegen] Add TSAN support for kX64MovqCompressTagged generated code
This CL would finish adding TSAN support for the generated tagged
stores.

Bug: v8:7790, v8:11600
Change-Id: Icaadc06ea740089dadf3d9f86da56d84dad1d4b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2922113
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74872}
2021-06-01 09:34:07 +00:00
Daniel Lehmann
8e143a2ba5 [wasm] Always publish TurboFan units in batches
So far, units compiled with TurboFan were published one-by-one as soon
as they were ready, which reduces the latency until the faster code is
available. However, especially when write-protecting code with mprotect,
this yielded a lot of page protection switches, which incurs syscall and
lock contention overhead. Thus, https://crrev.com/c/2922114 already
introduced TurboFan batching when using write-protection.

During experiments, we found this could even be beneficial in the
default configuration, i.e., without write-protection enabled. This CL
changes to always do the publishing in batches. This choice should be
revisited once the tier-up strategy changes, e.g., with lazy compilation
or dynamic tier-up.

R=clemensb@chromium.org
CC=​​​​jkummerow@chromium.org

Change-Id: I0ba792c969f7e017ac57103d2bbfe9a142cf302d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928186
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Daniel Lehmann <dlehmann@google.com>
Cr-Commit-Position: refs/heads/master@{#74871}
2021-06-01 09:29:37 +00:00
Camillo Bruni
8ff87ecc91 Reland "[builtins][x64] Use callee-saved registers for write barrier stubs"
This is a reland of 17915002fc with an
added fix for TurboAssembler::CallTSANRelaxedStoreStub.

Original change's description:
> [builtins][x64] Use callee-saved registers for write barrier stubs
>
> Calls to the record write stub are quite frequent and the caller has to
> save all registers used by the builtin.
>
> This CL moves the register saving to the builtin itself, reducing the
> call-site code size significantly in many cases and thus improving
> compilation speed of sparkplug.
>
> Follow-up CLs with introduce the same behaviour to other platforms.
>
> - CallRecordWriteStubSaveRegisters preserves the existing behaviour and
>   saves clobbered registers.
> - CallRecordWriteStub expects the registers to match the ones specified
>   in the WriteBarrierDescriptor for more compact code.
>
> Bug: v8:11420
> Change-Id: Ib1260cf972712bb9ba879beacd34b06a7fa347f1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2922103
> Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74831}

Bug: v8:11420
Change-Id: Ibac3e6f0360d35579ee0b0dc5d698f8cdab93260
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2922604
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74870}
2021-06-01 08:42:37 +00:00
v8-ci-autoroll-builder
fd3562ae57 Update V8 DEPS.
Rolling v8/build: 068753b..0f7c842

Rolling v8/buildtools/third_party/libunwind/trunk: c8d0fb8..c0776fc

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/edf4e0e..12d96cd

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I84fa018b8346e0dc49f95876359cbd83fd498f56
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2927417
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@{#74869}
2021-06-01 03:59:46 +00:00
Milad Fa
78ab10d39d PPC [simd]: Check MemOperand offset is in a register
All our Simd load/store opcodes are using MRR format.
Added DCHECKs will make sure the passed MemOperands are using
2 registers and not an Immediate value.

Change-Id: Ife470d3c80a10853bbb8365f8c00350ebdc98b2d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2927208
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74868}
2021-05-31 18:32:06 +00:00
Manos Koukoutos
9323085aa3 [wasm-gc] Add ArrayTooLarge trap
This will be thrown during array allocations if the requested size is
larger than kV8MaxWasmArrayLength.

Additional changes:
- In test-gc.cc, add the possibility to check against the trap message
  in CheckHasThrown.
- Small reorganization of WasmGCTester in test-gc.cc.

Bug: v8:7748
Change-Id: I6f74b525bd7087fcc66f43c451ef130df022b0f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2922247
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74867}
2021-05-31 17:56:26 +00:00
Mike Stanton
5895436b67 Better describe the meaning of a zombie AllocationSite
AllocationSites are strongly rooted in various places.
AllocationMementos, small heap objects immediately behind the
objects which AllocationSites tracks, are purposely left
unrooted. They do however, point to AllocationSites.

This leads to a situation where an AllocationSite may no longer
be seen to have strong roots at gc time, and yet new space is
still repleat with AllocationMementos which point to it.
The GC recognizes this, and marks the AllocationSite as a
"zombie," that is, an object which should be kept alive for
one more GC cycle because of the existence of those mementos
which point to it.

Change-Id: Ifa720c28f216dee2eaf7edd6f489b5c7427d4353
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928500
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74866}
2021-05-31 17:01:06 +00:00
Igor Sheludko
3e64f2cfbe [bigint] Fix BigInt size calculation on 32-bit architectures
Bug: chromium:1209723
Change-Id: Ied077c7819312ea71d58997378d7c3f4acb02566
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928193
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74865}
2021-05-31 15:27:26 +00:00
Georg Neis
cb25099bb4 [TurboFan] Add missing BigInt case in RepresentationChanger
Bug: chromium:1212583
Change-Id: I6cce7e419b108a0d30cf4d9d9bb0ba304fb0803e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2922249
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74864}
2021-05-31 15:22:06 +00:00
Vicky Kontoura
48eaa74931 [web snapshot] Improve error handling in Realm.useWebSnapshot()
Bug: v8:11525, v8:11706
Change-Id: Ia1f15ab33708831323bed5cdd9b8d3cf029cb7a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928183
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Vicky Kontoura <vkont@google.com>
Cr-Commit-Position: refs/heads/master@{#74863}
2021-05-31 14:56:46 +00:00
Mathias Bynens
c211cb43a0 [inspector] Support printing RegExps with overridden toString
Prior to this patch, regular expression objects with a monkeypatched
`toString` were printed using the `toString` result value, rather than
actually representing the regular expression’s contents.

    const re = /./;
    re.toString = () => 'whoops!';
    console.log(re);
    // → logs 'whoops!'

Now that `v8::RegExp::GetSource` properly escapes special characters in
the source pattern [1], just like `RegExp#toString`, there is no longer
any reason to avoid it.

[1]: https://chromium-review.googlesource.com/c/v8/v8/+/2900737

Bug: v8:11693
Change-Id: I9a69cdb6813f76b669bdc24e4823c6d261f2ae73
Fixed: v8:11836
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928188
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74862}
2021-05-31 13:51:56 +00:00
Manos Koukoutos
85e5f795d1 [wasm-gc] Fixes in array.copy
Changes:
- Fix OpcodeLength for array.copy
- Check that the destination array for array.copy is mutable.

Bug: v8:7748

Change-Id: I2c84b967ba91e150b772a959e76ebb382bfc29bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928176
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74861}
2021-05-31 13:42:06 +00:00
Camillo Bruni
8ff6a214b1 [tools][system-analyzer] Support profiling ticks
This adds a first crude version of displaying a flamechart in the
system-analyzer.

- Basic function types are distinguishable by colors.
- Tooltip information is available as well

Bug: v8:11835
Change-Id: I87e092f749d4c16aa5017af39df8d2f7bd7e2edd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928179
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74860}
2021-05-31 13:09:16 +00:00
Victor Gomes
81181a8ad8 [JSON] Fix GC issue in BuildJsonObject
We must ensure that the sweeper is not running or has already swept
mutable_double_buffer. Otherwise the GC can add it to the free list.

Bug: v8:11837
Change-Id: Ifd9cf15f1c94f664fd6489c70bb38b59730cdd78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928181
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74859}
2021-05-31 12:39:56 +00:00
Wenyu Zhao
687ba03193 Add a global v8_enable_allocation_folding build-time flag
When this flag is enabled, allocation folding behaviour depends
on the --turbo-allocation-folding runtime flag.

When it's disabled, --turbo-allocation-folding is ignored.

This flag will be used later to control the
CodeStubAssembler::InlineAllocate behaviour.

Change-Id: Iea7bbafd8454571dda7d56349b3dc63d3b54ba99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2878754
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Wenyu Zhao <wenyu.zhao@anu.edu.au>
Cr-Commit-Position: refs/heads/master@{#74858}
2021-05-31 12:31:56 +00:00
Maya Lekova
7261bf01d7 [fastcall] Extend the fast API interface with sequences
This CL enhances the interface of the fast C API with constants and
structs necessary for supporting JSArrays, TypedArrays and ArrayBuffers.
It also adds checks for incompatible combinations of argument type/flags.

Bug: chromium:1052746
Change-Id: I032167d0739d33f8151f78574c89d565cb9bd821
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2903147
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74857}
2021-05-31 12:18:16 +00:00
Camillo Bruni
0e6263ec22 [test] Skip RuntimeCallStatsTest.GarbageCollection for gc stress tests
Bug: v8:11820
Change-Id: Iec8c75737648ca239363069511fd7783c26a5d64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928497
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74856}
2021-05-31 12:10:56 +00:00
Thibaud Michaud
ca1a2cfb39 [wasm][interpreter][eh] Fix unreachable ref
The delegate instruction is executed when an exception is thrown, not
after the last instruction of the block. Handle reachability
accordingly.

R=ahaas@chromium.org

Bug: chromium:1212396
Change-Id: I55e342cd73da44142cfbad7e16ab65ef513e6a60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928499
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74855}
2021-05-31 11:58:46 +00:00
Patrick Thier
67e97125eb [api] Properly escape RegExp source
Change API RegExp::GetSource to return a string identical to ToString()
and RegExp.prototype.source.

Bug: v8:11693
Change-Id: I3d148883fe6f8a3ff49e552ddd72b1e92f52baf3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2900737
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74854}
2021-05-31 10:17:56 +00:00
Vicky Kontoura
819d3cb57a [web snapshot] Refactor mjsunit tests
This CL refactors mjsunit tests, so that the common core of all tests is
abstracted away.

Bug: v8:11525, v8:11706
Change-Id: I24a1af4298380e21a64e4d17149422c32fbf8a4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2914882
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Vicky Kontoura <vkont@google.com>
Cr-Commit-Position: refs/heads/master@{#74853}
2021-05-31 09:43:16 +00:00
Maya Lekova
8c9c0cf77f [test] Skip flaky cpu profiler test
Bug: v8:10996
No-Try: true
Change-Id: Ic75702e2d9db17762b21cd3d90e6fbf461c634bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928178
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74852}
2021-05-31 09:22:16 +00:00
Camillo Bruni
7b5c4e122d [tools][system-analyzer] Remove theme settings
Removing some additional complexity that is not frequently used.

Change-Id: I10195971d872d710ba3a87170fb62c1948e7716e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2923502
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74851}
2021-05-31 08:53:56 +00:00
Victor Gomes
456855a476 [Object.hasOwn] Implementation Object.hasOwn tc39 proposal
Bug: chromium:1213927
Change-Id: I11729540d9f20b437411f0b9f8077be2a7f066b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2922117
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74850}
2021-05-31 08:46:56 +00:00
Wael Almattar
8a94daf518 [tools] Refactor, use built-in Array.flat() instead of custom flatten method
Change-Id: I0e4de2d943db5a6af41bb1a1599e0ebb0568d290
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912881
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74849}
2021-05-31 07:46:15 +00:00
v8-ci-autoroll-builder
ff9a6689df Update V8 DEPS.
Rolling v8/build: e5a2e0c..068753b

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I93438a1eb2ef704a3a50d8374acfdb2e0aa87ff4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2927501
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@{#74848}
2021-05-31 03:48:38 +00:00
Liu Yu
ebca5c16f5 [mips][codegen] Assert that RegisterArray has only unique registers
Port 032ab3d2ec

Bug: v8:11420
Change-Id: I7c5f627902db9f21ef35bf8d085ac6a6c72755ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2925315
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#74847}
2021-05-30 11:06:57 +00:00
v8-ci-autoroll-builder
d73c27db9a Update V8 DEPS.
Rolling v8/build: ec279cc..e5a2e0c

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/dca1c97..edf4e0e

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I3468fe7b1d66da0cc4adb2cbc672eb141243504f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2923407
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@{#74846}
2021-05-30 08:21:27 +00:00
v8-ci-autoroll-builder
e8c97c4d96 Update V8 DEPS.
Rolling v8/build: ca9596f..ec279cc

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e83a92e..dca1c97

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I15cc4fbe2fba7d10cc8c7873ac8ddbadc4821f07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2924506
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@{#74845}
2021-05-29 10:03:41 +00:00
v8-ci-autoroll-builder
a9dd116ede Update google_benchmark
Rolling v8/third_party/google_benchmark/src: db2de74..0e1255a

Removing freenode from README (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/0e1255a

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com,mlippautz@chromium.org

Change-Id: Ibf16c3ba389fe8b35685660d3e78d3eccda1e6e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2924507
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@{#74844}
2021-05-29 10:02:36 +00:00
Lu Yahan
82f405871e [riscv64][codegen] Assert that RegisterArray has only unique registers
Port 032ab3d2ec

Change-Id: I55715e1943e0e178079e810b8979d14d84e776cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2924605
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/master@{#74843}
2021-05-28 21:17:06 +00:00