Skip to content

Commit 2238532

Browse files
authored
deps: V8: cherry-pick 13192d6e10fa
Original commit message: [riscv][tagged-ptr] Convert more Objects to Tagged<> Port commit 064b9a7903b793734b6c03a86ee53a2dc85f0f80 Bug: v8:12710 Change-Id: If076ca5cd9e9d175c20fc3611e03d39c0260404d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4837830 Reviewed-by: Ji Qiu <[email protected]> Commit-Queue: Ji Qiu <[email protected]> Auto-Submit: Yahan Lu <[email protected]> Cr-Commit-Position: refs/heads/main@{#89780} Refs: v8/v8@13192d6 PR-URL: #50552 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent a709a7e commit 2238532

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.14',
39+
'v8_embedder_string': '-node.15',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/builtins/riscv/builtins-riscv.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,7 @@ static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
16731673
// Set the return address to the correct point in the interpreter entry
16741674
// trampoline.
16751675
Label builtin_trampoline, trampoline_loaded;
1676-
Smi interpreter_entry_return_pc_offset(
1676+
Tagged<Smi> interpreter_entry_return_pc_offset(
16771677
masm->isolate()->heap()->interpreter_entry_return_pc_offset());
16781678
DCHECK_NE(interpreter_entry_return_pc_offset, Smi::zero());
16791679

deps/v8/src/codegen/riscv/assembler-riscv-inl.h

+8-7
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ Handle<HeapObject> Assembler::compressed_embedded_object_handle_at(
128128
}
129129

130130
void Assembler::deserialization_set_special_target_at(
131-
Address instruction_payload, Code code, Address target) {
131+
Address instruction_payload, Tagged<Code> code, Address target) {
132132
set_target_address_at(instruction_payload,
133-
!code.is_null() ? code.constant_pool() : kNullAddress,
133+
!code.is_null() ? code->constant_pool() : kNullAddress,
134134
target);
135135
}
136136

@@ -159,12 +159,13 @@ void Assembler::deserialization_set_target_internal_reference_at(
159159
}
160160
}
161161

162-
HeapObject RelocInfo::target_object(PtrComprCageBase cage_base) {
162+
Tagged<HeapObject> RelocInfo::target_object(PtrComprCageBase cage_base) {
163163
DCHECK(IsCodeTarget(rmode_) || IsEmbeddedObjectMode(rmode_));
164164
if (IsCompressedEmbeddedObject(rmode_)) {
165-
return HeapObject::cast(Object(V8HeapCompressionScheme::DecompressTagged(
166-
cage_base,
167-
Assembler::target_compressed_address_at(pc_, constant_pool_))));
165+
return HeapObject::cast(
166+
Tagged<Object>(V8HeapCompressionScheme::DecompressTagged(
167+
cage_base,
168+
Assembler::target_compressed_address_at(pc_, constant_pool_))));
168169
} else {
169170
return HeapObject::cast(
170171
Object(Assembler::target_address_at(pc_, constant_pool_)));
@@ -186,7 +187,7 @@ Handle<HeapObject> RelocInfo::target_object_handle(Assembler* origin) {
186187
}
187188
}
188189

189-
void RelocInfo::set_target_object(HeapObject target,
190+
void RelocInfo::set_target_object(Tagged<HeapObject> target,
190191
ICacheFlushMode icache_flush_mode) {
191192
DCHECK(IsCodeTarget(rmode_) || IsEmbeddedObjectMode(rmode_));
192193
if (IsCompressedEmbeddedObject(rmode_)) {

deps/v8/src/codegen/riscv/assembler-riscv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase,
288288
// This is for calls and branches within generated code. The serializer
289289
// has already deserialized the lui/ori instructions etc.
290290
inline static void deserialization_set_special_target_at(Address location,
291-
Code code,
291+
Tagged<Code> code,
292292
Address target);
293293

294294
// Get the size of the special target encoded at 'instruction_payload'.

deps/v8/src/execution/riscv/simulator-riscv.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ void RiscvDebugger::Debug() {
18891889
sreg_t value;
18901890
StdoutStream os;
18911891
if (GetValue(arg1, &value)) {
1892-
Object obj(value);
1892+
Tagged<Object> obj(value);
18931893
os << arg1 << ": \n";
18941894
#ifdef DEBUG
18951895
Print(obj, os);
@@ -1938,7 +1938,7 @@ void RiscvDebugger::Debug() {
19381938
PrintF(" 0x%012" PRIxPTR " : 0x%016" REGIx_FORMAT
19391939
" %14" REGId_FORMAT " ",
19401940
reinterpret_cast<intptr_t>(cur), *cur, *cur);
1941-
Object obj(*cur);
1941+
Tagged<Object> obj(*cur);
19421942
Heap* current_heap = sim_->isolate_->heap();
19431943
if (IsSmi(obj) ||
19441944
IsValidHeapObject(current_heap, HeapObject::cast(obj))) {
@@ -4815,7 +4815,7 @@ bool Simulator::DecodeRvvVS() {
48154815
Builtin Simulator::LookUp(Address pc) {
48164816
for (Builtin builtin = Builtins::kFirst; builtin <= Builtins::kLast;
48174817
++builtin) {
4818-
if (builtins_.code(builtin).contains(isolate_, pc)) return builtin;
4818+
if (builtins_.code(builtin)->contains(isolate_, pc)) return builtin;
48194819
}
48204820
return Builtin::kNoBuiltinId;
48214821
}
@@ -4832,7 +4832,7 @@ void Simulator::DecodeRVIType() {
48324832
if (builtin != Builtin::kNoBuiltinId) {
48334833
auto code = builtins_.code(builtin);
48344834
if ((rs1_reg() != ra || imm12() != 0)) {
4835-
if ((Address)get_pc() == code.instruction_start()) {
4835+
if ((Address)get_pc() == code->instruction_start()) {
48364836
sreg_t arg0 = get_register(a0);
48374837
sreg_t arg1 = get_register(a1);
48384838
sreg_t arg2 = get_register(a2);

deps/v8/src/regexp/riscv/regexp-macro-assembler-riscv.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ static T* frame_entry_address(Address re_frame, int frame_offset) {
12161216
int64_t RegExpMacroAssemblerRISCV::CheckStackGuardState(Address* return_address,
12171217
Address raw_code,
12181218
Address re_frame) {
1219-
InstructionStream re_code = InstructionStream::cast(Object(raw_code));
1219+
Tagged<InstructionStream> re_code = InstructionStream::cast(Object(raw_code));
12201220
return NativeRegExpMacroAssembler::CheckStackGuardState(
12211221
frame_entry<Isolate*>(re_frame, kIsolateOffset),
12221222
static_cast<int>(frame_entry<int64_t>(re_frame, kStartIndexOffset)),

0 commit comments

Comments
 (0)