Skip to content

Commit 5e1f213

Browse files
targosRafaelGSS
authored andcommittedFeb 16, 2023
deps: patch V8 to 10.2.154.26
Refs: v8/v8@10.2.154.23...10.2.154.26 PR-URL: #46446 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent e862871 commit 5e1f213

File tree

5 files changed

+40
-6
lines changed

5 files changed

+40
-6
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 2
1313
#define V8_BUILD_NUMBER 154
14-
#define V8_PATCH_LEVEL 23
14+
#define V8_PATCH_LEVEL 26
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
@@ -932,6 +932,7 @@ void Scope::Snapshot::Reparent(DeclarationScope* new_parent) {
932932
// Move eval calls since Snapshot's creation into new_parent.
933933
if (outer_scope_->calls_eval_) {
934934
new_parent->RecordEvalCall();
935+
outer_scope_->calls_eval_ = false;
935936
declaration_scope_->sloppy_eval_can_extend_vars_ = false;
936937
}
937938
}

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

+15-4
Original file line numberDiff line numberDiff line change
@@ -1455,10 +1455,6 @@ int Assembler::branch_offset(Label* L) {
14551455
L->link_to(pc_offset());
14561456
}
14571457

1458-
// Block the emission of the constant pool, since the branch instruction must
1459-
// be emitted at the pc offset recorded by the label.
1460-
if (!is_const_pool_blocked()) BlockConstPoolFor(1);
1461-
14621458
return target_pos - (pc_offset() + Instruction::kPcLoadDelta);
14631459
}
14641460

@@ -1469,6 +1465,11 @@ void Assembler::b(int branch_offset, Condition cond, RelocInfo::Mode rmode) {
14691465
int imm24 = branch_offset >> 2;
14701466
const bool b_imm_check = is_int24(imm24);
14711467
CHECK(b_imm_check);
1468+
1469+
// Block the emission of the constant pool before the next instruction.
1470+
// Otherwise the passed-in branch offset would be off.
1471+
BlockConstPoolFor(1);
1472+
14721473
emit(cond | B27 | B25 | (imm24 & kImm24Mask));
14731474

14741475
if (cond == al) {
@@ -1483,6 +1484,11 @@ void Assembler::bl(int branch_offset, Condition cond, RelocInfo::Mode rmode) {
14831484
int imm24 = branch_offset >> 2;
14841485
const bool bl_imm_check = is_int24(imm24);
14851486
CHECK(bl_imm_check);
1487+
1488+
// Block the emission of the constant pool before the next instruction.
1489+
// Otherwise the passed-in branch offset would be off.
1490+
BlockConstPoolFor(1);
1491+
14861492
emit(cond | B27 | B25 | B24 | (imm24 & kImm24Mask));
14871493
}
14881494

@@ -1492,6 +1498,11 @@ void Assembler::blx(int branch_offset) {
14921498
int imm24 = branch_offset >> 2;
14931499
const bool blx_imm_check = is_int24(imm24);
14941500
CHECK(blx_imm_check);
1501+
1502+
// Block the emission of the constant pool before the next instruction.
1503+
// Otherwise the passed-in branch offset would be off.
1504+
BlockConstPoolFor(1);
1505+
14951506
emit(kSpecialCondition | B27 | B25 | h | (imm24 & kImm24Mask));
14961507
}
14971508

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

+16-1
Original file line numberDiff line numberDiff line change
@@ -5032,7 +5032,22 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
50325032
case MoveType::kStackToRegister: {
50335033
Operand src = g.ToOperand(source);
50345034
if (source->IsStackSlot()) {
5035-
__ movq(g.ToRegister(destination), src);
5035+
MachineRepresentation mr =
5036+
LocationOperand::cast(source)->representation();
5037+
const bool is_32_bit = mr == MachineRepresentation::kWord32 ||
5038+
mr == MachineRepresentation::kCompressed ||
5039+
mr == MachineRepresentation::kCompressedPointer;
5040+
// TODO(13581): Fix this for other code kinds (see
5041+
// https://crbug.com/1356461).
5042+
if (code_kind() == CodeKind::WASM_FUNCTION && is_32_bit) {
5043+
// When we need only 32 bits, move only 32 bits. Benefits:
5044+
// - Save a byte here and there (depending on the destination
5045+
// register; "movl eax, ..." is smaller than "movq rax, ...").
5046+
// - Safeguard against accidental decompression of compressed slots.
5047+
__ movl(g.ToRegister(destination), src);
5048+
} else {
5049+
__ movq(g.ToRegister(destination), src);
5050+
}
50365051
} else {
50375052
DCHECK(source->IsFPStackSlot());
50385053
XMMRegister dst = g.ToDoubleRegister(destination);
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)
Please sign in to comment.