Skip to content

Commit 8f625f3

Browse files
deps: patch V8 to 15.6.75.50
Refs: v8/v8@15.6.75.33...15.6.75.50
1 parent ae353ec commit 8f625f3

61 files changed

Lines changed: 2238 additions & 177 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎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 15
1212
#define V8_MINOR_VERSION 6
1313
#define V8_BUILD_NUMBER 75
14-
#define V8_PATCH_LEVEL 33
14+
#define V8_PATCH_LEVEL 50
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‎

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ Scope::Scope(Zone* zone, Scope* outer_scope, ScopeType scope_type)
118118
DCHECK(!is_script_scope());
119119
SetDefaults();
120120
set_language_mode(outer_scope->language_mode());
121-
set_private_name_lookup_skips_outer_class(
122-
outer_scope->is_class_scope() &&
123-
outer_scope->AsClassScope()->IsParsingHeritage());
121+
if (outer_scope->is_class_scope() &&
122+
outer_scope->AsClassScope()->IsParsingHeritage()) {
123+
set_private_name_lookup_skips_outer_class(true);
124+
outer_scope->GetClosureScope()->RecordNeedsPrivateNameContextChainRecalc();
125+
}
124126
outer_scope_->AddInnerScope(this);
125127
}
126128

@@ -180,6 +182,9 @@ DeclarationScope::DeclarationScope(Zone* zone, Scope* outer_scope,
180182
params_(4, zone) {
181183
DCHECK(!is_script_scope());
182184
SetDefaults();
185+
if (V8_UNLIKELY(private_name_lookup_skips_outer_class())) {
186+
RecordNeedsPrivateNameContextChainRecalc();
187+
}
183188
}
184189

185190
ModuleScope::ModuleScope(DeclarationScope* script_scope,
@@ -305,18 +310,14 @@ DeclarationScope::DeclarationScope(Zone* zone, ScopeType scope_type,
305310
DCHECK(IsClassConstructor(function_kind()));
306311
set_class_scope_has_private_brand(true);
307312
}
313+
if (V8_UNLIKELY(private_name_lookup_skips_outer_class())) {
314+
RecordNeedsPrivateNameContextChainRecalc();
315+
}
308316
}
309317

310318
Scope::Scope(Zone* zone, const AstRawString* catch_variable_name,
311319
MaybeAssignedFlag maybe_assigned, Handle<ScopeInfo> scope_info)
312-
: outer_scope_(nullptr),
313-
variables_(zone),
314-
scope_info_(scope_info),
315-
scope_type_(CATCH_SCOPE) {
316-
SetDefaults();
317-
#ifdef DEBUG
318-
already_resolved_ = true;
319-
#endif
320+
: Scope(zone, CATCH_SCOPE, nullptr, scope_info) {
320321
// Cache the catch variable, even though it's also available via the
321322
// scope_info, as the parser expects that a catch scope always has the catch
322323
// variable as first and only variable.
@@ -326,7 +327,6 @@ Scope::Scope(Zone* zone, const AstRawString* catch_variable_name,
326327
kCreatedInitialized, maybe_assigned, &was_added);
327328
DCHECK(was_added);
328329
AllocateHeapSlot(variable);
329-
set_is_hoisted_in_context(scope_info->is_hoisted_in_context());
330330
}
331331

332332
void DeclarationScope::SetDefaults() {
@@ -454,9 +454,14 @@ Scope* Scope::DeserializeScopeChain(
454454
eval_scope->set_start_position(position);
455455
eval_scope->set_end_position(position);
456456
eval_scope->set_eval_position(position);
457-
458457
if (current_scope != nullptr) {
458+
eval_scope->set_private_name_lookup_skips_outer_class(
459+
current_scope->private_name_lookup_skips_outer_class());
460+
current_scope->set_private_name_lookup_skips_outer_class(false);
459461
eval_scope->AddInnerScope(current_scope);
462+
} else if (parse_info != nullptr) {
463+
eval_scope->set_private_name_lookup_skips_outer_class(
464+
parse_info->flags().private_name_lookup_skips_outer_class());
460465
}
461466
current_scope = eval_scope;
462467
if (innermost_scope == nullptr) innermost_scope = current_scope;
@@ -940,6 +945,7 @@ Scope* Scope::FinalizeBlockScope() {
940945
scope->outer_scope_ = outer_scope();
941946
if (private_name_lookup_skips_outer_class()) {
942947
scope->set_private_name_lookup_skips_outer_class(true);
948+
scope->GetClosureScope()->RecordNeedsPrivateNameContextChainRecalc();
943949
}
944950
if (scope->is_function_scope()) {
945951
scope->set_is_hoisted_in_context(false);
@@ -997,12 +1003,14 @@ void Scope::Snapshot::Reparent(DeclarationScope* new_parent) {
9971003
for (; inner_scope->sibling() != top_inner_scope_;
9981004
inner_scope = inner_scope->sibling()) {
9991005
inner_scope->outer_scope_ = new_parent;
1006+
inner_scope->set_private_name_lookup_skips_outer_class(false);
10001007
if (inner_scope->inner_scope_calls_eval()) {
10011008
new_parent->set_inner_scope_calls_eval(true);
10021009
}
10031010
DCHECK_NE(inner_scope, new_parent);
10041011
}
10051012
inner_scope->outer_scope_ = new_parent;
1013+
inner_scope->set_private_name_lookup_skips_outer_class(false);
10061014
if (inner_scope->inner_scope_calls_eval()) {
10071015
new_parent->set_inner_scope_calls_eval(true);
10081016
}
@@ -1454,7 +1462,12 @@ bool DeclarationScope::AllocateVariables(ParseInfo* info) {
14541462
}
14551463

14561464
// Don't allocate variables of preparsed scopes.
1457-
if (!was_lazily_parsed()) AllocateVariablesRecursively();
1465+
if (!was_lazily_parsed()) {
1466+
AllocateVariablesRecursively();
1467+
if (needs_private_name_context_chain_recalc()) {
1468+
RecalcPrivateNameContextChain();
1469+
}
1470+
}
14581471

14591472
return true;
14601473
}
@@ -2924,10 +2937,6 @@ void DeclarationScope::AllocateScopeInfos(ParseInfo* parse_info,
29242937
}
29252938
}
29262939

2927-
if (scope->needs_private_name_context_chain_recalc()) {
2928-
scope->RecalcPrivateNameContextChain();
2929-
}
2930-
29312940
Tagged<WeakFixedArray> infos = script->infos();
29322941
std::unordered_map<int, Handle<ScopeInfo>> scope_infos_to_reuse;
29332942
if (infos->ulength().value() != 0) {

‎deps/v8/src/ast/scopes.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,6 +1512,7 @@ void Scope::RecordEvalCall() {
15121512
GetDeclarationScope()->RecordDeclarationScopeEvalCall();
15131513
}
15141514
RecordInnerScopeEvalCall();
1515+
GetClosureScope()->RecordNeedsPrivateNameContextChainRecalc();
15151516
// The eval contents might access "super" (if it's inside a function that
15161517
// binds super).
15171518
DeclarationScope* receiver_scope = GetReceiverScope();

‎deps/v8/src/codegen/arm64/assembler-arm64-inl.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ Instr Assembler::SF(Register rd) {
983983
}
984984

985985
Instr Assembler::ImmAddSub(int imm) {
986-
DCHECK(IsImmAddSub(imm));
986+
CHECK(IsImmAddSub(imm));
987987
if (is_uint12(imm)) { // No shift required.
988988
imm <<= ImmAddSub_offset;
989989
} else {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4043,7 +4043,7 @@ void Assembler::AddSub(const Register& rd, const Register& rn,
40434043
DCHECK(!operand.NeedsRelocation(this));
40444044
if (operand.IsImmediate()) {
40454045
int64_t immediate = operand.ImmediateValue();
4046-
DCHECK(IsImmAddSub(immediate));
4046+
CHECK(IsImmAddSub(immediate));
40474047
Instr dest_reg = (S == SetFlags) ? Rd(rd) : RdSP(rd);
40484048
Emit(SF(rd) | AddSubImmediateFixed | op | Flags(S) |
40494049
ImmAddSub(static_cast<int>(immediate)) | dest_reg | RnSP(rn));

‎deps/v8/src/codegen/arm64/macro-assembler-arm64.cc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,11 +979,11 @@ void MacroAssembler::LoadStoreMacroComplex(const CPURegister& rt,
979979
// Post-index beyond unscaled addressing range.
980980
DCHECK(!is_imm_unscaled);
981981
LoadStore(rt, MemOperand(addr.base()), op);
982-
add(addr.base(), addr.base(), offset);
982+
Add(addr.base(), addr.base(), offset);
983983
} else {
984984
// Pre-index beyond unscaled addressing range.
985985
DCHECK(!is_imm_unscaled && addr.IsPreIndex());
986-
add(addr.base(), addr.base(), offset);
986+
Add(addr.base(), addr.base(), offset);
987987
LoadStore(rt, MemOperand(addr.base()), op);
988988
}
989989
}

‎deps/v8/src/codegen/compiler.cc‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3320,7 +3320,8 @@ MaybeDirectHandle<JSFunction> Compiler::GetFunctionFromEval(
33203320
DirectHandle<SharedFunctionInfo> outer_info, DirectHandle<Context> context,
33213321
LanguageMode language_mode, ParseRestriction restriction,
33223322
int parameters_end_pos, int eval_position,
3323-
ParsingWhileDebugging parsing_while_debugging) {
3323+
ParsingWhileDebugging parsing_while_debugging,
3324+
bool private_name_lookup_skips_outer_class) {
33243325
// The cache lookup key needs to be aware of the separation between the
33253326
// parameters and the body to prevent this valid invocation:
33263327
// Function("", "function anonymous(\n/**/) {\n}");
@@ -3376,6 +3377,8 @@ MaybeDirectHandle<JSFunction> Compiler::GetFunctionFromEval(
33763377
v8_flags.lazy_eval);
33773378
flags.set_is_eval(true);
33783379
flags.set_parsing_while_debugging(parsing_while_debugging);
3380+
flags.set_private_name_lookup_skips_outer_class(
3381+
private_name_lookup_skips_outer_class);
33793382
DCHECK(!flags.is_module());
33803383
flags.set_parse_restriction(restriction);
33813384

‎deps/v8/src/codegen/compiler.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ class V8_EXPORT_PRIVATE Compiler : public AllStatic {
166166
ParseRestriction restriction, int parameters_end_pos,
167167
int eval_position,
168168
ParsingWhileDebugging parsing_while_debugging =
169-
ParsingWhileDebugging::kNo);
169+
ParsingWhileDebugging::kNo,
170+
bool private_name_lookup_skips_outer_class = false);
170171

171172
// Create a function that results from wrapping |source| in a function,
172173
// with |arguments| being a list of parameters for that function.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4674,7 +4674,7 @@ void CodeGenerator::Pop(InstructionOperand* dest, MachineRepresentation rep) {
46744674
void CodeGenerator::PopTempStackSlots() {
46754675
if (temp_slots_ > 0) {
46764676
frame_access_state()->IncreaseSPDelta(-temp_slots_);
4677-
__ add(sp, sp, Operand(temp_slots_ * kSystemPointerSize));
4677+
__ Add(sp, sp, Operand(temp_slots_ * kSystemPointerSize));
46784678
temp_slots_ = 0;
46794679
}
46804680
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,8 +1695,8 @@ void CodeGenerator::AddTranslationForOperand(Instruction* instr,
16951695
default:
16961696
UNREACHABLE();
16971697
}
1698-
if (literal.object().equals(info()->closure()) &&
1699-
info()->function_context_specializing()) {
1698+
if (info()->function_context_specializing() &&
1699+
literal.IsObject(info()->closure())) {
17001700
translations_.StoreJSFrameFunction();
17011701
} else {
17021702
int literal_id = DefineDeoptimizationLiteral(literal);

0 commit comments

Comments
 (0)