Skip to content

Commit 71bf513

Browse files
targosRafaelGSS
authored andcommitted
deps: patch V8 to 10.8.168.25
Refs: v8/v8@10.8.168.21...10.8.168.25 PR-URL: #45996 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
1 parent 9e16406 commit 71bf513

File tree

8 files changed

+49
-19
lines changed

8 files changed

+49
-19
lines changed

deps/v8/include/v8-version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 10
1212
#define V8_MINOR_VERSION 8
1313
#define V8_BUILD_NUMBER 168
14-
#define V8_PATCH_LEVEL 21
14+
#define V8_PATCH_LEVEL 25
1515

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

deps/v8/src/ast/scopes.cc

+1
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,7 @@ void Scope::Snapshot::Reparent(DeclarationScope* new_parent) {
929929
// Move eval calls since Snapshot's creation into new_parent.
930930
if (outer_scope_->calls_eval_) {
931931
new_parent->RecordEvalCall();
932+
outer_scope_->calls_eval_ = false;
932933
declaration_scope_->sloppy_eval_can_extend_vars_ = false;
933934
}
934935
}

deps/v8/src/codegen/arm/assembler-arm.cc

+15-4
Original file line numberDiff line numberDiff line change
@@ -1444,10 +1444,6 @@ int Assembler::branch_offset(Label* L) {
14441444
L->link_to(pc_offset());
14451445
}
14461446

1447-
// Block the emission of the constant pool, since the branch instruction must
1448-
// be emitted at the pc offset recorded by the label.
1449-
if (!is_const_pool_blocked()) BlockConstPoolFor(1);
1450-
14511447
return target_pos - (pc_offset() + Instruction::kPcLoadDelta);
14521448
}
14531449

@@ -1458,6 +1454,11 @@ void Assembler::b(int branch_offset, Condition cond, RelocInfo::Mode rmode) {
14581454
int imm24 = branch_offset >> 2;
14591455
const bool b_imm_check = is_int24(imm24);
14601456
CHECK(b_imm_check);
1457+
1458+
// Block the emission of the constant pool before the next instruction.
1459+
// Otherwise the passed-in branch offset would be off.
1460+
BlockConstPoolFor(1);
1461+
14611462
emit(cond | B27 | B25 | (imm24 & kImm24Mask));
14621463

14631464
if (cond == al) {
@@ -1472,6 +1473,11 @@ void Assembler::bl(int branch_offset, Condition cond, RelocInfo::Mode rmode) {
14721473
int imm24 = branch_offset >> 2;
14731474
const bool bl_imm_check = is_int24(imm24);
14741475
CHECK(bl_imm_check);
1476+
1477+
// Block the emission of the constant pool before the next instruction.
1478+
// Otherwise the passed-in branch offset would be off.
1479+
BlockConstPoolFor(1);
1480+
14751481
emit(cond | B27 | B25 | B24 | (imm24 & kImm24Mask));
14761482
}
14771483

@@ -1481,6 +1487,11 @@ void Assembler::blx(int branch_offset) {
14811487
int imm24 = branch_offset >> 2;
14821488
const bool blx_imm_check = is_int24(imm24);
14831489
CHECK(blx_imm_check);
1490+
1491+
// Block the emission of the constant pool before the next instruction.
1492+
// Otherwise the passed-in branch offset would be off.
1493+
BlockConstPoolFor(1);
1494+
14841495
emit(kSpecialCondition | B27 | B25 | h | (imm24 & kImm24Mask));
14851496
}
14861497

deps/v8/src/compiler/backend/x64/code-generator-x64.cc

+16-1
Original file line numberDiff line numberDiff line change
@@ -5295,7 +5295,22 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
52955295
case MoveType::kStackToRegister: {
52965296
Operand src = g.ToOperand(source);
52975297
if (source->IsStackSlot()) {
5298-
__ movq(g.ToRegister(destination), src);
5298+
MachineRepresentation mr =
5299+
LocationOperand::cast(source)->representation();
5300+
const bool is_32_bit = mr == MachineRepresentation::kWord32 ||
5301+
mr == MachineRepresentation::kCompressed ||
5302+
mr == MachineRepresentation::kCompressedPointer;
5303+
// TODO(13581): Fix this for other code kinds (see
5304+
// https://crbug.com/1356461).
5305+
if (code_kind() == CodeKind::WASM_FUNCTION && is_32_bit) {
5306+
// When we need only 32 bits, move only 32 bits. Benefits:
5307+
// - Save a byte here and there (depending on the destination
5308+
// register; "movl eax, ..." is smaller than "movq rax, ...").
5309+
// - Safeguard against accidental decompression of compressed slots.
5310+
__ movl(g.ToRegister(destination), src);
5311+
} else {
5312+
__ movq(g.ToRegister(destination), src);
5313+
}
52995314
} else {
53005315
DCHECK(source->IsFPStackSlot());
53015316
XMMRegister dst = g.ToDoubleRegister(destination);

deps/v8/src/sandbox/external-pointer-table-inl.h

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define V8_SANDBOX_EXTERNAL_POINTER_TABLE_INL_H_
77

88
#include "src/base/atomicops.h"
9+
#include "src/common/assert-scope.h"
910
#include "src/sandbox/external-pointer-table.h"
1011
#include "src/sandbox/external-pointer.h"
1112
#include "src/utils/allocation.h"
@@ -75,6 +76,13 @@ ExternalPointerHandle ExternalPointerTable::AllocateAndInitializeEntry(
7576
Isolate* isolate, Address initial_value, ExternalPointerTag tag) {
7677
DCHECK(is_initialized());
7778

79+
// We currently don't want entry allocation to trigger garbage collection as
80+
// this may cause seemingly harmless pointer field assignments to trigger
81+
// garbage collection. This is especially true for lazily-initialized
82+
// external pointer slots which will typically only allocate the external
83+
// pointer table entry when the pointer is first set to a non-null value.
84+
DisallowGarbageCollection no_gc;
85+
7886
Freelist freelist;
7987
bool success = false;
8088
while (!success) {

deps/v8/src/sandbox/external-pointer-table.cc

-12
Original file line numberDiff line numberDiff line change
@@ -315,18 +315,6 @@ ExternalPointerTable::Freelist ExternalPointerTable::Grow(Isolate* isolate) {
315315

316316
set_capacity(new_capacity);
317317

318-
// Schedule GC when the table's utilization crosses one of these thresholds.
319-
constexpr double kGCThresholds[] = {0.5, 0.75, 0.9, 0.95, 0.99};
320-
constexpr double kMaxCapacity = static_cast<double>(kMaxExternalPointers);
321-
double old_utilization = static_cast<double>(old_capacity) / kMaxCapacity;
322-
double new_utilization = static_cast<double>(new_capacity) / kMaxCapacity;
323-
for (double threshold : kGCThresholds) {
324-
if (old_utilization < threshold && new_utilization >= threshold) {
325-
isolate->heap()->ReportExternalMemoryPressure();
326-
break;
327-
}
328-
}
329-
330318
// Build freelist bottom to top, which might be more cache friendly.
331319
uint32_t start = std::max<uint32_t>(old_capacity, 1); // Skip entry zero
332320
uint32_t last = new_capacity - 1;

deps/v8/src/wasm/graph-builder-interface.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,7 @@ class WasmGraphBuildingInterface {
21062106
}
21072107
if (exception_value != nullptr) {
21082108
*exception_value = builder_->LoopExitValue(
2109-
*exception_value, MachineRepresentation::kWord32);
2109+
*exception_value, MachineRepresentation::kTaggedPointer);
21102110
}
21112111
if (wrap_exit_values) {
21122112
WrapLocalsAtLoopExit(decoder, control);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2022 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: --stress-lazy-source-positions
6+
7+
((__v_0 = ((__v_0 =eval()) => {})()) => {})()

0 commit comments

Comments
 (0)