Skip to content

Commit c41d7df

Browse files
deps: patch V8 to 15.6.75.22
Refs: v8/v8@15.6.75.13...15.6.75.22
1 parent a232998 commit c41d7df

45 files changed

Lines changed: 1041 additions & 225 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 13
14+
#define V8_PATCH_LEVEL 22
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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ void DeclarationScope::SetDefaults() {
345345
is_module_scope());
346346
set_needs_private_name_context_chain_recalc(false);
347347
set_class_scope_has_private_brand(false);
348+
set_class_initializer_allows_await(false);
348349
receiver_ = nullptr;
349350
new_target_ = nullptr;
350351
function_ = nullptr;
@@ -1575,7 +1576,8 @@ bool Scope::NeedsScopeInfo() const {
15751576
}
15761577

15771578
bool Scope::ShouldBanArguments() {
1578-
return GetReceiverScope()->should_ban_arguments();
1579+
return GetReceiverScope()->should_ban_arguments() &&
1580+
!GetClosureScope()->from_scope_info();
15791581
}
15801582

15811583
DeclarationScope* Scope::GetReceiverScope() {

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,13 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope {
13871387
return ClassScopeHasPrivateBrandField::decode(flags_);
13881388
}
13891389

1390+
bool class_initializer_allows_await() const {
1391+
return ClassInitializerAllowsAwaitField::decode(flags_);
1392+
}
1393+
void set_class_initializer_allows_await(bool value) {
1394+
flags_ = ClassInitializerAllowsAwaitField::update(flags_, value);
1395+
}
1396+
13901397
private:
13911398
V8_INLINE void AllocateParameter(Variable* var, int index);
13921399

@@ -1430,6 +1437,8 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope {
14301437
HasThisDeclarationField::Next<bool, 1>;
14311438
using ClassScopeHasPrivateBrandField =
14321439
NeedsPrivateNameContextChainRecalcField::Next<bool, 1>;
1440+
using ClassInitializerAllowsAwaitField =
1441+
ClassScopeHasPrivateBrandField::Next<bool, 1>;
14331442

14341443
#if DEBUG
14351444
bool is_being_lazily_parsed_;

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2852,8 +2852,8 @@ void BackgroundDeserializeTask::Run() {
28522852
LocalHandleScope handle_scope(&isolate);
28532853

28542854
DirectHandle<SharedFunctionInfo> inner_result;
2855-
off_thread_data_ =
2856-
CodeSerializer::StartDeserializeOffThread(&isolate, &cached_data_);
2855+
CodeSerializer::StartDeserializeOffThread(&isolate, &cached_data_,
2856+
&off_thread_data_);
28572857
if (v8_flags.enable_slow_asserts && off_thread_data_.HasResult()) {
28582858
#ifdef ENABLE_SLOW_DCHECKS
28592859
MergeAssumptionChecker checker(&isolate, false);
@@ -2866,6 +2866,11 @@ void BackgroundDeserializeTask::SourceTextAvailable(
28662866
Isolate* isolate, Handle<String> source_text,
28672867
const ScriptDetails& script_details) {
28682868
DCHECK_EQ(isolate, isolate_for_local_isolate_);
2869+
if (!CodeSerializer::NotifySourceTextAvailable(isolate, &off_thread_data_,
2870+
&cached_data_, source_text,
2871+
script_details)) {
2872+
return;
2873+
}
28692874
LanguageMode language_mode = construct_language_mode(v8_flags.use_strict);
28702875
background_merge_task_.SetUpOnMainThread(isolate, source_text, script_details,
28712876
language_mode);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ class V8_EXPORT_PRIVATE BackgroundDeserializeTask {
719719
private:
720720
Isolate* isolate_for_local_isolate_;
721721
AlignedCachedData cached_data_;
722-
CodeSerializer::OffThreadDeserializeData off_thread_data_;
722+
OffThreadDeserializeData off_thread_data_;
723723
BackgroundMergeTask background_merge_task_;
724724
TimedHistogram* timer_;
725725
int64_t background_time_in_microseconds_ = 0;

‎deps/v8/src/compiler/common-operator.cc‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,32 @@ const ExitMachineGraphParameters& ExitMachineGraphParametersOf(
515515
return OpParameter<ExitMachineGraphParameters>(op);
516516
}
517517

518+
#if V8_ENABLE_SANDBOX
519+
size_t hash_value(const LoadTrustedPointerParameters& params) {
520+
return base::hash_combine(params.offset, params.tag);
521+
}
522+
523+
V8_EXPORT_PRIVATE std::ostream& operator<<(
524+
std::ostream& os, LoadTrustedPointerParameters params) {
525+
return os << "offset=" << params.offset << ", tag.first=" << params.tag.first
526+
<< ", tag.last=" << params.tag.last;
527+
}
528+
529+
class LoadTrustedPointerOperator final
530+
: public Operator1<LoadTrustedPointerParameters> {
531+
public:
532+
LoadTrustedPointerOperator(int offset, IndirectPointerTagRange tag)
533+
: Operator1<LoadTrustedPointerParameters>(
534+
IrOpcode::kLoadTrustedPointer, Operator::kEliminatable,
535+
"LoadTrustedPointer", 1, 1, 1, 1, 1, 0, {offset, tag}) {}
536+
};
537+
538+
const Operator* CommonOperatorBuilder::LoadTrustedPointer(
539+
int offset, IndirectPointerTagRange tag) {
540+
return zone_->New<LoadTrustedPointerOperator>(offset, tag);
541+
}
542+
#endif // V8_ENABLE_SANDBOX
543+
518544
#define COMMON_CACHED_OP_LIST(V) \
519545
V(Plug, Operator::kNoProperties, 0, 0, 0, 1, 0, 0) \
520546
V(Dead, Operator::kFoldable, 0, 0, 0, 1, 1, 1) \

‎deps/v8/src/compiler/common-operator.h‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,20 @@ V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
538538
V8_EXPORT_PRIVATE const ExitMachineGraphParameters&
539539
ExitMachineGraphParametersOf(const Operator* op) V8_WARN_UNUSED_RESULT;
540540

541+
#if V8_ENABLE_SANDBOX
542+
struct LoadTrustedPointerParameters {
543+
int offset;
544+
IndirectPointerTagRange tag;
545+
546+
bool operator==(const LoadTrustedPointerParameters&) const = default;
547+
};
548+
549+
size_t hash_value(const LoadTrustedPointerParameters& params);
550+
551+
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
552+
LoadTrustedPointerParameters params);
553+
#endif // V8_ENABLE_SANDBOX
554+
541555
// Interface for building common operators that can be used at any level of IR,
542556
// including JavaScript, mid-level, and low-level.
543557
class V8_EXPORT_PRIVATE CommonOperatorBuilder final
@@ -616,6 +630,9 @@ class V8_EXPORT_PRIVATE CommonOperatorBuilder final
616630
const Operator* HeapConstant(const Handle<HeapObject>&);
617631
const Operator* CompressedHeapConstant(const Handle<HeapObject>&);
618632
const Operator* TrustedHeapConstant(const Handle<HeapObject>&);
633+
#if V8_ENABLE_SANDBOX
634+
const Operator* LoadTrustedPointer(int offset, IndirectPointerTagRange tag);
635+
#endif
619636
const Operator* ObjectId(uint32_t);
620637

621638
const Operator* RelocatableInt32Constant(int32_t value,

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,16 @@
8585
V(EnterMachineGraph) \
8686
V(ExitMachineGraph)
8787

88-
#define COMMON_OP_LIST(V) \
89-
CONSTANT_OP_LIST(V) \
90-
INNER_OP_LIST(V) \
91-
V(Unreachable) \
92-
V(DeadValue) \
93-
V(Dead) \
94-
V(Plug) \
95-
V(SLVerifierHint) \
96-
V(MajorGCForCompilerTesting) \
88+
#define COMMON_OP_LIST(V) \
89+
CONSTANT_OP_LIST(V) \
90+
INNER_OP_LIST(V) \
91+
V(Unreachable) \
92+
V(DeadValue) \
93+
V(Dead) \
94+
V(Plug) \
95+
V(SLVerifierHint) \
96+
V(MajorGCForCompilerTesting) \
97+
IF_SANDBOX(V, LoadTrustedPointer) \
9798
V(StaticAssert)
9899

99100
// Opcodes for JavaScript operators.

‎deps/v8/src/compiler/simplified-lowering-verifier.cc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ void SimplifiedLoweringVerifier::VisitNode(Node* node,
504504
CASE(Dead)
505505
CASE(Plug)
506506
CASE(MajorGCForCompilerTesting)
507+
IF_SANDBOX(CASE, LoadTrustedPointer)
507508
CASE(StaticAssert)
508509
// Simplified change operators
509510
CASE(ChangeTaggedSignedToInt32)

‎deps/v8/src/compiler/turbofan-typer.cc‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,9 @@ Type Typer::Visitor::TypeMajorGCForCompilerTesting(Node* node) {
12971297
UNREACHABLE();
12981298
}
12991299
Type Typer::Visitor::TypeStaticAssert(Node* node) { UNREACHABLE(); }
1300+
#if V8_ENABLE_SANDBOX
1301+
Type Typer::Visitor::TypeLoadTrustedPointer(Node* node) { UNREACHABLE(); }
1302+
#endif
13001303
Type Typer::Visitor::TypeSLVerifierHint(Node* node) { UNREACHABLE(); }
13011304

13021305
// JS comparison operators.

0 commit comments

Comments
 (0)