Skip to content

Commit

Permalink
deps: patch V8 to 10.2.154.26
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
targos authored and RafaelGSS committed Feb 16, 2023
1 parent e862871 commit 5e1f213
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 10
#define V8_MINOR_VERSION 2
#define V8_BUILD_NUMBER 154
#define V8_PATCH_LEVEL 23
#define V8_PATCH_LEVEL 26

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
1 change: 1 addition & 0 deletions deps/v8/src/ast/scopes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ void Scope::Snapshot::Reparent(DeclarationScope* new_parent) {
// Move eval calls since Snapshot's creation into new_parent.
if (outer_scope_->calls_eval_) {
new_parent->RecordEvalCall();
outer_scope_->calls_eval_ = false;
declaration_scope_->sloppy_eval_can_extend_vars_ = false;
}
}
Expand Down
19 changes: 15 additions & 4 deletions deps/v8/src/codegen/arm/assembler-arm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1455,10 +1455,6 @@ int Assembler::branch_offset(Label* L) {
L->link_to(pc_offset());
}

// Block the emission of the constant pool, since the branch instruction must
// be emitted at the pc offset recorded by the label.
if (!is_const_pool_blocked()) BlockConstPoolFor(1);

return target_pos - (pc_offset() + Instruction::kPcLoadDelta);
}

Expand All @@ -1469,6 +1465,11 @@ void Assembler::b(int branch_offset, Condition cond, RelocInfo::Mode rmode) {
int imm24 = branch_offset >> 2;
const bool b_imm_check = is_int24(imm24);
CHECK(b_imm_check);

// Block the emission of the constant pool before the next instruction.
// Otherwise the passed-in branch offset would be off.
BlockConstPoolFor(1);

emit(cond | B27 | B25 | (imm24 & kImm24Mask));

if (cond == al) {
Expand All @@ -1483,6 +1484,11 @@ void Assembler::bl(int branch_offset, Condition cond, RelocInfo::Mode rmode) {
int imm24 = branch_offset >> 2;
const bool bl_imm_check = is_int24(imm24);
CHECK(bl_imm_check);

// Block the emission of the constant pool before the next instruction.
// Otherwise the passed-in branch offset would be off.
BlockConstPoolFor(1);

emit(cond | B27 | B25 | B24 | (imm24 & kImm24Mask));
}

Expand All @@ -1492,6 +1498,11 @@ void Assembler::blx(int branch_offset) {
int imm24 = branch_offset >> 2;
const bool blx_imm_check = is_int24(imm24);
CHECK(blx_imm_check);

// Block the emission of the constant pool before the next instruction.
// Otherwise the passed-in branch offset would be off.
BlockConstPoolFor(1);

emit(kSpecialCondition | B27 | B25 | h | (imm24 & kImm24Mask));
}

Expand Down
17 changes: 16 additions & 1 deletion deps/v8/src/compiler/backend/x64/code-generator-x64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5032,7 +5032,22 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
case MoveType::kStackToRegister: {
Operand src = g.ToOperand(source);
if (source->IsStackSlot()) {
__ movq(g.ToRegister(destination), src);
MachineRepresentation mr =
LocationOperand::cast(source)->representation();
const bool is_32_bit = mr == MachineRepresentation::kWord32 ||
mr == MachineRepresentation::kCompressed ||
mr == MachineRepresentation::kCompressedPointer;
// TODO(13581): Fix this for other code kinds (see
// https://crbug.com/1356461).
if (code_kind() == CodeKind::WASM_FUNCTION && is_32_bit) {
// When we need only 32 bits, move only 32 bits. Benefits:
// - Save a byte here and there (depending on the destination
// register; "movl eax, ..." is smaller than "movq rax, ...").
// - Safeguard against accidental decompression of compressed slots.
__ movl(g.ToRegister(destination), src);
} else {
__ movq(g.ToRegister(destination), src);
}
} else {
DCHECK(source->IsFPStackSlot());
XMMRegister dst = g.ToDoubleRegister(destination);
Expand Down
7 changes: 7 additions & 0 deletions deps/v8/test/mjsunit/regress/regress-crbug-1394973.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Flags: --stress-lazy-source-positions

((__v_0 = ((__v_0 =eval()) => {})()) => {})()

0 comments on commit 5e1f213

Please sign in to comment.