Skip to content

Commit fcd2649

Browse files
committed
deps: patch V8 to 14.4.258.13
Refs: v8/v8@14.4.258.9...14.4.258.13
1 parent 8945afc commit fcd2649

File tree

9 files changed

+97
-21
lines changed

9 files changed

+97
-21
lines changed

deps/v8/include/v8-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 14
1212
#define V8_MINOR_VERSION 4
1313
#define V8_BUILD_NUMBER 258
14-
#define V8_PATCH_LEVEL 9
14+
#define V8_PATCH_LEVEL 13
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/codegen/code-stub-assembler.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13325,7 +13325,8 @@ void CodeStubAssembler::UpdateEmbeddedFeedback(
1332513325
Label end(this);
1332613326

1332713327
TNode<Int32T> previous_feedback =
13328-
Load<Uint16T>(bytecode_array, feedback_offset);
13328+
UnalignedLoad<Uint16T>(bytecode_array, feedback_offset);
13329+
1332913330
TNode<Int32T> combined_feedback = Word32Or(previous_feedback, feedback);
1333013331

1333113332
GotoIf(Word32Equal(previous_feedback, combined_feedback), &end);
@@ -13335,8 +13336,8 @@ void CodeStubAssembler::UpdateEmbeddedFeedback(
1333513336
ExitSandbox();
1333613337
#endif
1333713338

13338-
StoreNoWriteBarrier(MachineRepresentation::kWord16, bytecode_array,
13339-
feedback_offset, combined_feedback);
13339+
UnalignedStoreNoWriteBarrier(MachineRepresentation::kWord16, bytecode_array,
13340+
feedback_offset, combined_feedback);
1334013341

1334113342
#ifdef V8_ENABLE_SANDBOX_HARDWARE_SUPPORT
1334213343
EnterSandbox();

deps/v8/src/compiler/code-assembler.cc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,21 @@ void CodeAssembler::StoreNoWriteBarrier(MachineRepresentation rep, Node* base,
10521052
CanBeTaggedPointer(rep) ? kAssertNoWriteBarrier : kNoWriteBarrier);
10531053
}
10541054

1055+
void CodeAssembler::UnalignedStoreNoWriteBarrier(MachineRepresentation rep,
1056+
TNode<BytecodeArray> base,
1057+
TNode<IntPtrT> offset,
1058+
Node* value) {
1059+
DCHECK(!raw_assembler()->IsMapOffsetConstantMinusTag(offset));
1060+
if (UnalignedStoreSupported(rep)) {
1061+
raw_assembler()->Store(
1062+
rep, base, offset, value,
1063+
CanBeTaggedPointer(rep) ? kAssertNoWriteBarrier : kNoWriteBarrier);
1064+
} else {
1065+
Node* base_raw = BitcastTaggedToWord(base);
1066+
raw_assembler()->UnalignedStore(rep, base_raw, offset, value);
1067+
}
1068+
}
1069+
10551070
void CodeAssembler::UnsafeStoreNoWriteBarrier(MachineRepresentation rep,
10561071
Node* base, Node* value) {
10571072
raw_assembler()->Store(rep, base, value, kNoWriteBarrier);

deps/v8/src/compiler/code-assembler.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,13 +924,27 @@ class V8_EXPORT_PRIVATE CodeAssembler {
924924
return UncheckedCast<Type>(UnalignedLoad(mt, base, offset));
925925
}
926926

927+
template <typename Type>
928+
TNode<Type> UnalignedLoad(TNode<BytecodeArray> base, TNode<IntPtrT> offset) {
929+
MachineType type = MachineTypeOf<Type>::value;
930+
if (UnalignedLoadSupported(type.representation())) {
931+
return UncheckedCast<Type>(Load(type, base, offset));
932+
} else {
933+
TNode<RawPtrT> base_raw = BitcastTaggedToWord(base);
934+
return UncheckedCast<Type>(UnalignedLoad(type, base_raw, offset));
935+
}
936+
}
937+
927938
// Store value to raw memory location.
928939
void Store(Node* base, Node* value);
929940
void Store(Node* base, Node* offset, Node* value);
930941
void StoreEphemeronKey(Node* base, Node* offset, Node* value);
931942
void StoreNoWriteBarrier(MachineRepresentation rep, Node* base, Node* value);
932943
void StoreNoWriteBarrier(MachineRepresentation rep, Node* base, Node* offset,
933944
Node* value);
945+
void UnalignedStoreNoWriteBarrier(MachineRepresentation rep,
946+
TNode<BytecodeArray> base,
947+
TNode<IntPtrT> offset, Node* value);
934948
void UnsafeStoreNoWriteBarrier(MachineRepresentation rep, Node* base,
935949
Node* value);
936950
void UnsafeStoreNoWriteBarrier(MachineRepresentation rep, Node* base,

deps/v8/src/maglev/arm64/maglev-ir-arm64.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ void Int32Multiply::GenerateCode(MaglevAssembler* masm,
323323
__ Smull(out, left, right);
324324

325325
// Making sure that the 32-bit output is zero-extended.
326-
__ Move(out.W(), out.W());
326+
__ Mov(out.W(), out.W());
327327
}
328328

329329
void Int32MultiplyOverflownBits::SetValueLocationConstraints() {
@@ -468,7 +468,7 @@ void Int32MultiplyWithOverflow::GenerateCode(MaglevAssembler* masm,
468468

469469
// Making sure that the 32-bit output is zero-extended (and moving it to the
470470
// right register if {out_alias_input} is true).
471-
__ Move(out, res.W());
471+
__ Mov(out, res.W());
472472
}
473473

474474
void Int32DivideWithOverflow::SetValueLocationConstraints() {
@@ -536,7 +536,7 @@ void Int32DivideWithOverflow::GenerateCode(MaglevAssembler* masm,
536536
__ CompareAndBranch(temp, Immediate(0), ne,
537537
__ GetDeoptLabel(this, DeoptimizeReason::kNotInt32));
538538

539-
__ Move(out, res);
539+
__ Mov(out, res);
540540
}
541541

542542
void Int32ModulusWithOverflow::SetValueLocationConstraints() {

deps/v8/src/maglev/maglev-graph-builder.cc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12920,15 +12920,12 @@ MaybeReduceResult MaglevGraphBuilder::TryReduceConstructBuiltin(
1292012920
break;
1292112921
}
1292212922
case Builtin::kObjectConstructor: {
12923+
if (target != new_target) return {};
1292312924
// If no value is passed, we can immediately lower to a simple
1292412925
// constructor.
12925-
compiler::OptionalJSFunctionRef new_target_function =
12926-
TryGetConstant<JSFunction>(new_target);
12927-
if (args.count() == 0 && new_target_function.has_value() &&
12928-
new_target_function->has_initial_map(broker())) {
12929-
return BuildInlinedAllocation(
12930-
CreateJSConstructor(new_target_function.value()),
12931-
AllocationType::kYoung);
12926+
if (args.count() == 0) {
12927+
return BuildInlinedAllocation(CreateJSConstructor(target_function),
12928+
AllocationType::kYoung);
1293212929
}
1293312930
break;
1293412931
}

deps/v8/src/wasm/wasm-engine.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,11 +1184,11 @@ void WasmEngine::DeleteCompileJobsOnContext(DirectHandle<Context> context) {
11841184
DirectHandle<NativeContext> job_context;
11851185
if (it->first->context().ToHandle(&job_context) &&
11861186
job_context.is_identical_to(context)) {
1187+
jobs_to_delete.push_back(std::move(it->second));
1188+
it = async_compile_jobs_.erase(it);
1189+
} else {
11871190
++it;
1188-
continue;
11891191
}
1190-
jobs_to_delete.push_back(std::move(it->second));
1191-
it = async_compile_jobs_.erase(it);
11921192
}
11931193
}
11941194
}
@@ -1202,12 +1202,12 @@ void WasmEngine::DeleteCompileJobsOnIsolate(Isolate* isolate) {
12021202
base::MutexGuard guard(&mutex_);
12031203
for (auto it = async_compile_jobs_.begin();
12041204
it != async_compile_jobs_.end();) {
1205-
if (it->first->isolate() != isolate) {
1205+
if (it->first->isolate() == isolate) {
1206+
jobs_to_delete.push_back(std::move(it->second));
1207+
it = async_compile_jobs_.erase(it);
1208+
} else {
12061209
++it;
1207-
continue;
12081210
}
1209-
jobs_to_delete.push_back(std::move(it->second));
1210-
it = async_compile_jobs_.erase(it);
12111211
}
12121212
DCHECK(isolates_.contains(isolate));
12131213
auto* isolate_info = isolates_[isolate].get();
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2025 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Flags: --allow-natives-syntax
6+
7+
function trigger(cond) {
8+
let o = {};
9+
let mul = (cond ? 1 : 0x80000000) | 0;
10+
print(mul);
11+
let idx = (mul * 2) | 0;
12+
print(idx);
13+
o[0] = 1.1;
14+
if (cond) o[1] = 2.2;
15+
return o[idx];
16+
}
17+
18+
%PrepareFunctionForOptimization(trigger);
19+
trigger(true);
20+
trigger(false);
21+
%OptimizeMaglevOnNextCall(trigger);
22+
trigger(false);
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2025 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
//
5+
// Flags: --allow-natives-syntax
6+
7+
class C extends Object {
8+
constructor() {
9+
for (let i = 0; i < 5; i++) {
10+
if (!i) {
11+
super();
12+
}
13+
}
14+
}
15+
}
16+
function opt_me() {
17+
return Reflect.construct(C, [], WeakMap);
18+
}
19+
20+
opt_me();
21+
opt_me();
22+
opt_me();
23+
opt_me();
24+
opt_me();
25+
let obj = opt_me();
26+
27+
assertThrows(() => obj.set({}, 123), TypeError);

0 commit comments

Comments
 (0)