diff --git a/runtime/tests/vm/dart/heap_snapshot_regress_49711_test.dart b/runtime/tests/vm/dart/heap_snapshot_regress_49711_test.dart
index 9044e0a19ae..65b103daf98 100644
--- a/runtime/tests/vm/dart/heap_snapshot_regress_49711_test.dart
+++ b/runtime/tests/vm/dart/heap_snapshot_regress_49711_test.dart
@@ -62,6 +62,8 @@ main() async {
['Array', 'List', 'Record'].any((p) => klass.name.contains(p))) {
Expect.isTrue(fields.length <= object.references.length);
} else {
+ // For objects with vm-defined layouts, this fails if a new field is
+ // added but runtime/vm/raw_object_fields.cc is not updated accordingly.
Expect.equals(fields.length, object.references.length, klass.name);
}
}
diff --git a/runtime/tests/vm/dart/regress_54426_test.dart b/runtime/tests/vm/dart/regress_54426_test.dart
new file mode 100644
index 00000000000..f3a72e8f260
--- /dev/null
+++ b/runtime/tests/vm/dart/regress_54426_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for https://github.com/dart-lang/sdk/issues/54426.
+
+import 'package:expect/expect.dart';
+
+class A
{
+ final List bar2TypeArguments = [];
+
+ void foo() {
+ void bar(List? arg) {
+ void bar2>(List? arg) {
+ bar2TypeArguments..add(T2);
+ }
+
+ dynamic f = bar2;
+ f(null);
+ }
+
+ // Call with explicit type arguments.
+ bar(null);
+ }
+}
+
+void main() {
+ final a = new A();
+ a.foo();
+ Expect.equals(Map, a.bar2TypeArguments.first);
+}
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index 84701e7adac..048ea61c0f6 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -72,19 +72,22 @@ static void Finish(Thread* thread) {
#if defined(DEBUG)
// Verify that closure field offsets are identical in Dart and C++.
- ASSERT(fields.Length() == 6);
+ ASSERT_EQUAL(fields.Length(), 7);
field ^= fields.At(0);
- ASSERT(field.HostOffset() == Closure::instantiator_type_arguments_offset());
+ ASSERT_EQUAL(field.HostOffset(),
+ Closure::instantiator_type_arguments_offset());
field ^= fields.At(1);
- ASSERT(field.HostOffset() == Closure::function_type_arguments_offset());
+ ASSERT_EQUAL(field.HostOffset(), Closure::function_type_arguments_offset());
field ^= fields.At(2);
- ASSERT(field.HostOffset() == Closure::delayed_type_arguments_offset());
+ ASSERT_EQUAL(field.HostOffset(), Closure::delayed_type_arguments_offset());
field ^= fields.At(3);
- ASSERT(field.HostOffset() == Closure::function_offset());
+ ASSERT_EQUAL(field.HostOffset(), Closure::default_type_arguments_offset());
field ^= fields.At(4);
- ASSERT(field.HostOffset() == Closure::context_offset());
+ ASSERT_EQUAL(field.HostOffset(), Closure::function_offset());
field ^= fields.At(5);
- ASSERT(field.HostOffset() == Closure::hash_offset());
+ ASSERT_EQUAL(field.HostOffset(), Closure::context_offset());
+ field ^= fields.At(6);
+ ASSERT_EQUAL(field.HostOffset(), Closure::hash_offset());
#endif // defined(DEBUG)
// Eagerly compile to avoid repeated checks when loading constants or
diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc
index 90c4bac61a1..3bfadf933d9 100644
--- a/runtime/vm/compiler/backend/range_analysis.cc
+++ b/runtime/vm/compiler/backend/range_analysis.cc
@@ -2859,6 +2859,7 @@ void LoadFieldInstr::InferRange(RangeAnalysis* analysis, Range* range) {
case Slot::Kind::kTypeArguments:
case Slot::Kind::kArray_type_arguments:
case Slot::Kind::kClosure_context:
+ case Slot::Kind::kClosure_default_type_arguments:
case Slot::Kind::kClosure_delayed_type_arguments:
case Slot::Kind::kClosure_function:
case Slot::Kind::kClosure_function_type_arguments:
diff --git a/runtime/vm/compiler/backend/slot.cc b/runtime/vm/compiler/backend/slot.cc
index 91f9984d9a3..9042666c7c4 100644
--- a/runtime/vm/compiler/backend/slot.cc
+++ b/runtime/vm/compiler/backend/slot.cc
@@ -185,6 +185,7 @@ bool Slot::IsImmutableLengthSlot() const {
case Slot::Kind::kArray_type_arguments:
case Slot::Kind::kContext_parent:
case Slot::Kind::kClosure_context:
+ case Slot::Kind::kClosure_default_type_arguments:
case Slot::Kind::kClosure_delayed_type_arguments:
case Slot::Kind::kClosure_function:
case Slot::Kind::kClosure_function_type_arguments:
diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h
index cc5b6349841..ceec870740c 100644
--- a/runtime/vm/compiler/backend/slot.h
+++ b/runtime/vm/compiler/backend/slot.h
@@ -67,6 +67,7 @@ class ParsedFunction;
V(Closure, UntaggedClosure, instantiator_type_arguments, TypeArguments, \
FINAL) \
V(Closure, UntaggedClosure, delayed_type_arguments, TypeArguments, FINAL) \
+ V(Closure, UntaggedClosure, default_type_arguments, TypeArguments, FINAL) \
V(Closure, UntaggedClosure, function_type_arguments, TypeArguments, FINAL) \
V(FunctionType, UntaggedFunctionType, type_parameters, TypeParameters, \
FINAL) \
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index 606e6e37d8e..fc13c48e352 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -4447,6 +4447,15 @@ Fragment StreamingFlowGraphBuilder::BuildPartialTearoffInstantiation(
Slot::Closure_function_type_arguments(),
StoreFieldInstr::Kind::kInitializing);
+ // Copy over the cached default type arguments.
+ instructions += LoadLocal(new_closure);
+ instructions += LoadLocal(original_closure);
+ instructions += flow_graph_builder_->LoadNativeField(
+ Slot::Closure_default_type_arguments());
+ instructions += flow_graph_builder_->StoreNativeField(
+ Slot::Closure_default_type_arguments(),
+ StoreFieldInstr::Kind::kInitializing);
+
instructions += DropTempsPreserveTop(1); // Drop old closure.
return instructions;
@@ -6064,12 +6073,44 @@ Fragment StreamingFlowGraphBuilder::BuildFunctionNode(
if (function.IsGeneric()) {
// Only generic functions need to have properly initialized
- // delayed_type_arguments.
+ // delayed and default type arguments.
instructions += LoadLocal(closure);
instructions += Constant(Object::empty_type_arguments());
instructions += flow_graph_builder_->StoreNativeField(
Slot::Closure_delayed_type_arguments(),
StoreFieldInstr::Kind::kInitializing);
+
+ Function::DefaultTypeArgumentsKind kind;
+ const auto& default_types = TypeArguments::ZoneHandle(
+ Z, function.InstantiateToBounds(flow_graph_builder_->thread_, &kind));
+
+ if (!default_types.IsNull()) {
+ instructions += LoadLocal(closure);
+ switch (kind) {
+ case Function::DefaultTypeArgumentsKind::kInvalid:
+ UNREACHABLE();
+ break;
+ case Function::DefaultTypeArgumentsKind::kIsInstantiated:
+ instructions += Constant(default_types);
+ break;
+ case Function::DefaultTypeArgumentsKind::kNeedsInstantiation:
+ instructions += LoadInstantiatorTypeArguments();
+ instructions += LoadFunctionTypeArguments();
+ instructions +=
+ flow_graph_builder_->InstantiateTypeArguments(default_types);
+ break;
+ case Function::DefaultTypeArgumentsKind::
+ kSharesInstantiatorTypeArguments:
+ instructions += LoadInstantiatorTypeArguments();
+ break;
+ case Function::DefaultTypeArgumentsKind::kSharesFunctionTypeArguments:
+ instructions += LoadFunctionTypeArguments();
+ break;
+ }
+ instructions += flow_graph_builder_->StoreNativeField(
+ Slot::Closure_default_type_arguments(),
+ StoreFieldInstr::Kind::kInitializing);
+ }
}
return instructions;
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index c3602813b27..fb11748a730 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -1978,11 +1978,48 @@ Fragment FlowGraphBuilder::BuildImplicitClosureCreation(
if (target.IsGeneric()) {
// Only generic functions need to have properly initialized
- // delayed_type_arguments.
+ // delayed and default type arguments.
fragment += LoadLocal(closure);
fragment += Constant(Object::empty_type_arguments());
fragment += StoreNativeField(Slot::Closure_delayed_type_arguments(),
StoreFieldInstr::Kind::kInitializing);
+
+ Function::DefaultTypeArgumentsKind kind;
+ const auto& default_types = TypeArguments::ZoneHandle(
+ Z, target.InstantiateToBounds(thread_, &kind));
+
+ if (!default_types.IsNull()) {
+ switch (kind) {
+ case Function::DefaultTypeArgumentsKind::kInvalid:
+ UNREACHABLE();
+ break;
+ case Function::DefaultTypeArgumentsKind::kIsInstantiated:
+ fragment += LoadLocal(closure);
+ fragment += Constant(default_types);
+ fragment += StoreNativeField(Slot::Closure_default_type_arguments(),
+ StoreFieldInstr::Kind::kInitializing);
+ break;
+ case Function::DefaultTypeArgumentsKind::kNeedsInstantiation:
+ fragment += LoadLocal(closure);
+ fragment += LoadInstantiatorTypeArguments();
+ fragment += NullConstant(); // (Parent) function type arguments.
+ fragment += InstantiateTypeArguments(default_types);
+ fragment += StoreNativeField(Slot::Closure_default_type_arguments(),
+ StoreFieldInstr::Kind::kInitializing);
+ break;
+ case Function::DefaultTypeArgumentsKind::
+ kSharesInstantiatorTypeArguments:
+ fragment += LoadLocal(closure);
+ fragment += LoadInstantiatorTypeArguments();
+ fragment += StoreNativeField(Slot::Closure_default_type_arguments(),
+ StoreFieldInstr::Kind::kInitializing);
+ break;
+ case Function::DefaultTypeArgumentsKind::kSharesFunctionTypeArguments:
+ // Since the function has no generic parents, the null-initialized
+ // field already contains the appropriate type argument vector.
+ break;
+ }
+ }
}
return fragment;
@@ -2712,82 +2749,11 @@ Fragment FlowGraphBuilder::BuildClosureCallDefaultTypeHandling(
return store_provided;
}
- // Load the defaults, instantiating or replacing them with the other type
- // arguments as appropriate.
Fragment store_default;
store_default += LoadLocal(info.closure);
- store_default += LoadNativeField(Slot::Closure_function());
- store_default += LoadNativeField(Slot::Function_data());
- LocalVariable* closure_data = MakeTemporary("closure_data");
-
- store_default += LoadLocal(closure_data);
- store_default += BuildExtractUnboxedSlotBitFieldIntoSmi<
- ClosureData::PackedDefaultTypeArgumentsKind>(
- Slot::ClosureData_packed_fields());
- LocalVariable* default_tav_kind = MakeTemporary("default_tav_kind");
-
- // Two locals to drop after join, closure_data and default_tav_kind.
- JoinEntryInstr* done = BuildJoinEntry();
-
- store_default += LoadLocal(default_tav_kind);
- TargetEntryInstr* is_instantiated;
- TargetEntryInstr* is_not_instantiated;
- store_default += IntConstant(static_cast(
- ClosureData::DefaultTypeArgumentsKind::kIsInstantiated));
- store_default += BranchIfEqual(&is_instantiated, &is_not_instantiated);
- store_default.current = is_not_instantiated; // Check next case.
- store_default += LoadLocal(default_tav_kind);
- TargetEntryInstr* needs_instantiation;
- TargetEntryInstr* can_share;
- store_default += IntConstant(static_cast(
- ClosureData::DefaultTypeArgumentsKind::kNeedsInstantiation));
- store_default += BranchIfEqual(&needs_instantiation, &can_share);
- store_default.current = can_share; // Check next case.
- store_default += LoadLocal(default_tav_kind);
- TargetEntryInstr* can_share_instantiator;
- TargetEntryInstr* can_share_function;
- store_default += IntConstant(static_cast(
- ClosureData::DefaultTypeArgumentsKind::kSharesInstantiatorTypeArguments));
- store_default += BranchIfEqual(&can_share_instantiator, &can_share_function);
-
- Fragment instantiated(is_instantiated);
- instantiated += LoadLocal(info.type_parameters);
- instantiated += LoadNativeField(Slot::TypeParameters_defaults());
- instantiated += StoreLocal(info.vars->function_type_args);
- instantiated += Drop();
- instantiated += Goto(done);
-
- Fragment do_instantiation(needs_instantiation);
- // Load the instantiator type arguments.
- do_instantiation += LoadLocal(info.instantiator_type_args);
- // Load the parent function type arguments. (No local function type arguments
- // can be used within the defaults).
- do_instantiation += LoadLocal(info.parent_function_type_args);
- // Load the default type arguments to instantiate.
- do_instantiation += LoadLocal(info.type_parameters);
- do_instantiation += LoadNativeField(Slot::TypeParameters_defaults());
- do_instantiation += InstantiateDynamicTypeArguments();
- do_instantiation += StoreLocal(info.vars->function_type_args);
- do_instantiation += Drop();
- do_instantiation += Goto(done);
-
- Fragment share_instantiator(can_share_instantiator);
- share_instantiator += LoadLocal(info.instantiator_type_args);
- share_instantiator += StoreLocal(info.vars->function_type_args);
- share_instantiator += Drop();
- share_instantiator += Goto(done);
-
- Fragment share_function(can_share_function);
- // Since the defaults won't have local type parameters, these must all be
- // from the parent function type arguments, so we can just use it.
- share_function += LoadLocal(info.parent_function_type_args);
- share_function += StoreLocal(info.vars->function_type_args);
- share_function += Drop();
- share_function += Goto(done);
-
- store_default.current = done; // Return here after branching.
- store_default += DropTemporary(&default_tav_kind);
- store_default += DropTemporary(&closure_data);
+ store_default += LoadNativeField(Slot::Closure_default_type_arguments());
+ store_default += StoreLocal(info.vars->function_type_args);
+ store_default += Drop();
Fragment store_delayed;
store_delayed += LoadLocal(info.closure);
@@ -3773,22 +3739,31 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfNoSuchMethodForwarder(
}
Fragment FlowGraphBuilder::BuildDefaultTypeHandling(const Function& function) {
- if (function.IsGeneric()) {
- auto& default_types =
- TypeArguments::ZoneHandle(Z, function.InstantiateToBounds(thread_));
+ Fragment keep_same, use_defaults;
- if (!default_types.IsNull()) {
- Fragment then;
- Fragment otherwise;
+ if (!function.IsGeneric()) return keep_same;
- otherwise += TranslateInstantiatedTypeArguments(default_types);
- otherwise += StoreLocal(TokenPosition::kNoSource,
- parsed_function_->function_type_arguments());
- otherwise += Drop();
- return TestAnyTypeArgs(then, otherwise);
- }
+ auto& default_types =
+ TypeArguments::ZoneHandle(Z, function.InstantiateToBounds(thread_));
+
+ if (default_types.IsNull()) return keep_same;
+
+ if (function.IsClosureFunction()) {
+ // Closure objects contain a cached version of the defaults, properly
+ // instantiated by the instantiator and parent function type arguments
+ // in the closure.
+ LocalVariable* const closure = parsed_function_->ParameterVariable(0);
+
+ use_defaults += LoadLocal(closure);
+ use_defaults += LoadNativeField(Slot::Closure_default_type_arguments());
+ } else {
+ use_defaults += TranslateInstantiatedTypeArguments(default_types);
}
- return Fragment();
+ use_defaults += StoreLocal(TokenPosition::kNoSource,
+ parsed_function_->function_type_arguments());
+ use_defaults += Drop();
+
+ return TestAnyTypeArgs(keep_same, use_defaults);
}
FunctionEntryInstr* FlowGraphBuilder::BuildSharedUncheckedEntryPoint(
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index fdd06158535..17e767fc774 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -1476,6 +1476,7 @@ class Context : public AllStatic {
class Closure : public AllStatic {
public:
static word context_offset();
+ static word default_type_arguments_offset();
static word delayed_type_arguments_offset();
static word entry_point_offset();
static word function_offset();
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 8164f90fcd2..f584724eca4 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -149,13 +149,15 @@ static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0x6c;
static constexpr dart::compiler::target::word
ClassTable_allocation_tracing_state_table_offset = 0x4;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x14;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x10;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x14;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x18;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x1c;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x4;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -626,7 +628,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0xc;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x8;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0x78;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x1c;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x20;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x14;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x8;
static constexpr dart::compiler::target::word
@@ -863,13 +865,15 @@ static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0xbc;
static constexpr dart::compiler::target::word
ClassTable_allocation_tracing_state_table_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0x18;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x20;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x28;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -1345,7 +1349,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0x18;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0xc8;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x38;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x40;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x28;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x10;
static constexpr dart::compiler::target::word
@@ -1579,13 +1583,15 @@ static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0x6c;
static constexpr dart::compiler::target::word
ClassTable_allocation_tracing_state_table_offset = 0x4;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x14;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x10;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x14;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x18;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x1c;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x4;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -2055,7 +2061,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0xc;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x8;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0x78;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x1c;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x20;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x14;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x8;
static constexpr dart::compiler::target::word
@@ -2292,13 +2298,15 @@ static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0xbc;
static constexpr dart::compiler::target::word
ClassTable_allocation_tracing_state_table_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0x18;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x20;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x28;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -2776,7 +2784,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0x18;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0xc8;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x38;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x40;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x28;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x10;
static constexpr dart::compiler::target::word
@@ -3011,13 +3019,15 @@ static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0x70;
static constexpr dart::compiler::target::word
ClassTable_allocation_tracing_state_table_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x1c;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x14;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x14;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x18;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x1c;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x20;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -3492,7 +3502,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0x10;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0x80;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x20;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x28;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x18;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x10;
static constexpr dart::compiler::target::word
@@ -3727,13 +3737,15 @@ static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0x70;
static constexpr dart::compiler::target::word
ClassTable_allocation_tracing_state_table_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x1c;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x14;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x14;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x18;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x1c;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x20;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -4210,7 +4222,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0x10;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0x80;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x20;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x28;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x18;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x10;
static constexpr dart::compiler::target::word
@@ -4444,13 +4456,15 @@ static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0x6c;
static constexpr dart::compiler::target::word
ClassTable_allocation_tracing_state_table_offset = 0x4;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x14;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x10;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x14;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x18;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x1c;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x4;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -4922,7 +4936,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0xc;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x8;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0x78;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x1c;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x20;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x14;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x8;
static constexpr dart::compiler::target::word
@@ -5159,13 +5173,15 @@ static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0xbc;
static constexpr dart::compiler::target::word
ClassTable_allocation_tracing_state_table_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0x18;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x20;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x28;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -5642,7 +5658,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0x18;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0xc8;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x38;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x40;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x28;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x10;
static constexpr dart::compiler::target::word
@@ -5871,13 +5887,15 @@ static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
static constexpr dart::compiler::target::word Class_super_type_offset = 0x28;
static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0x68;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x14;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x10;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x14;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x18;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x1c;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x4;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -6345,7 +6363,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0xc;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x8;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0x74;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x1c;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x20;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x14;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x8;
static constexpr dart::compiler::target::word
@@ -6577,13 +6595,15 @@ static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
static constexpr dart::compiler::target::word Class_super_type_offset = 0x50;
static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0xb4;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0x18;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x20;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x28;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -7056,7 +7076,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0x18;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0xc0;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x38;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x40;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x28;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x10;
static constexpr dart::compiler::target::word
@@ -7285,13 +7305,15 @@ static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
static constexpr dart::compiler::target::word Class_super_type_offset = 0x28;
static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0x68;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x14;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x10;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x14;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x18;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x1c;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x4;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -7758,7 +7780,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0xc;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x8;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0x74;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x1c;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x20;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x14;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x8;
static constexpr dart::compiler::target::word
@@ -7990,13 +8012,15 @@ static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
static constexpr dart::compiler::target::word Class_super_type_offset = 0x50;
static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0xb4;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0x18;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x20;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x28;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -8471,7 +8495,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0x18;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0xc0;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x38;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x40;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x28;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x10;
static constexpr dart::compiler::target::word
@@ -8701,13 +8725,15 @@ static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
static constexpr dart::compiler::target::word Class_super_type_offset = 0x2c;
static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0x6c;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x1c;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x14;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x14;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x18;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x1c;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x20;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -9179,7 +9205,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0x10;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0x78;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x20;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x28;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x18;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x10;
static constexpr dart::compiler::target::word
@@ -9409,13 +9435,15 @@ static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
static constexpr dart::compiler::target::word Class_super_type_offset = 0x2c;
static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0x6c;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x1c;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x14;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x14;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x18;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x1c;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x20;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -9889,7 +9917,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0x10;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0x78;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x20;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x28;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x18;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x10;
static constexpr dart::compiler::target::word
@@ -10118,13 +10146,15 @@ static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
static constexpr dart::compiler::target::word Class_super_type_offset = 0x28;
static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0x68;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x14;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x10;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x14;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x8;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x18;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x1c;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x4;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -10593,7 +10623,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0xc;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x8;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0x74;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x1c;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x20;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x14;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x8;
static constexpr dart::compiler::target::word
@@ -10825,13 +10855,15 @@ static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
static constexpr dart::compiler::target::word Class_super_type_offset = 0x50;
static constexpr dart::compiler::target::word
Class_host_type_arguments_field_offset_in_words_offset = 0xb4;
-static constexpr dart::compiler::target::word Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
Closure_delayed_type_arguments_offset = 0x18;
-static constexpr dart::compiler::target::word Closure_function_offset = 0x20;
+static constexpr dart::compiler::target::word Closure_function_offset = 0x28;
static constexpr dart::compiler::target::word
Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word ClosureData_packed_fields_offset =
@@ -11305,7 +11337,7 @@ static constexpr dart::compiler::target::word Array_header_size = 0x18;
static constexpr dart::compiler::target::word Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Capability_InstanceSize = 0x10;
static constexpr dart::compiler::target::word Class_InstanceSize = 0xc0;
-static constexpr dart::compiler::target::word Closure_InstanceSize = 0x38;
+static constexpr dart::compiler::target::word Closure_InstanceSize = 0x40;
static constexpr dart::compiler::target::word ClosureData_InstanceSize = 0x28;
static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 0x10;
static constexpr dart::compiler::target::word
@@ -11408,7 +11440,7 @@ static constexpr dart::compiler::target::word
#if !defined(PRODUCT) && defined(TARGET_ARCH_ARM) && \
!defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x1c;
+ 0x20;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0xc;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x4;
@@ -11547,14 +11579,16 @@ static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x58;
static constexpr dart::compiler::target::word
AOT_ClassTable_allocation_tracing_state_table_offset = 0x4;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x14;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0xc;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x10;
+ 0x14;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0x8;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x18;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x1c;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x4;
static constexpr dart::compiler::target::word
@@ -12076,7 +12110,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x8;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x60;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x20;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x24;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x14;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -12199,7 +12233,7 @@ static constexpr dart::compiler::target::word
#if !defined(PRODUCT) && defined(TARGET_ARCH_X64) && \
!defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x38;
+ 0x40;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0x18;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x8;
@@ -12338,14 +12372,16 @@ static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0xa0;
static constexpr dart::compiler::target::word
AOT_ClassTable_allocation_tracing_state_table_offset = 0x8;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0x18;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x20;
+ 0x28;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word
@@ -12867,7 +12903,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0xa8;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x40;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x48;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x28;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -12997,7 +13033,7 @@ static constexpr dart::compiler::target::word
#if !defined(PRODUCT) && defined(TARGET_ARCH_ARM64) && \
!defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x38;
+ 0x40;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0x18;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x8;
@@ -13136,14 +13172,16 @@ static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0xa0;
static constexpr dart::compiler::target::word
AOT_ClassTable_allocation_tracing_state_table_offset = 0x8;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0x18;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x20;
+ 0x28;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word
@@ -13667,7 +13705,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0xa8;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x40;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x48;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x28;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -13791,7 +13829,7 @@ static constexpr dart::compiler::target::word
#if !defined(PRODUCT) && defined(TARGET_ARCH_X64) && \
defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x20;
+ 0x28;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0x10;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x4;
@@ -13930,14 +13968,16 @@ static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x5c;
static constexpr dart::compiler::target::word
AOT_ClassTable_allocation_tracing_state_table_offset = 0x8;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x1c;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x14;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x14;
+ 0x18;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x1c;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x20;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word
@@ -14461,7 +14501,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x68;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x28;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x30;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x18;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -14585,7 +14625,7 @@ static constexpr dart::compiler::target::word
#if !defined(PRODUCT) && defined(TARGET_ARCH_ARM64) && \
defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x20;
+ 0x28;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0x10;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x4;
@@ -14724,14 +14764,16 @@ static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x5c;
static constexpr dart::compiler::target::word
AOT_ClassTable_allocation_tracing_state_table_offset = 0x8;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x1c;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x14;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x14;
+ 0x18;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x1c;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x20;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word
@@ -15257,7 +15299,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x68;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x28;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x30;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x18;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -15381,7 +15423,7 @@ static constexpr dart::compiler::target::word
#if !defined(PRODUCT) && defined(TARGET_ARCH_RISCV32) && \
!defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x1c;
+ 0x20;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0xc;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x4;
@@ -15520,14 +15562,16 @@ static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x58;
static constexpr dart::compiler::target::word
AOT_ClassTable_allocation_tracing_state_table_offset = 0x4;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x14;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0xc;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x10;
+ 0x14;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0x8;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x18;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x1c;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x4;
static constexpr dart::compiler::target::word
@@ -16050,7 +16094,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x8;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x60;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x20;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x24;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x14;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -16173,7 +16217,7 @@ static constexpr dart::compiler::target::word
#if !defined(PRODUCT) && defined(TARGET_ARCH_RISCV64) && \
!defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x38;
+ 0x40;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0x18;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x8;
@@ -16312,14 +16356,16 @@ static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0xa0;
static constexpr dart::compiler::target::word
AOT_ClassTable_allocation_tracing_state_table_offset = 0x8;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0x18;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x20;
+ 0x28;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word
@@ -16842,7 +16888,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0xa8;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x40;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x48;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x28;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -16966,7 +17012,7 @@ static constexpr dart::compiler::target::word
#if defined(PRODUCT) && defined(TARGET_ARCH_ARM) && \
!defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x1c;
+ 0x20;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0xc;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x4;
@@ -17100,14 +17146,16 @@ static constexpr dart::compiler::target::word AOT_Class_super_type_offset =
0x28;
static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x4c;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x14;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0xc;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x10;
+ 0x14;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0x8;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x18;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x1c;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x4;
static constexpr dart::compiler::target::word
@@ -17625,7 +17673,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x8;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x54;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x20;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x24;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x14;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -17748,7 +17796,7 @@ static constexpr dart::compiler::target::word
#if defined(PRODUCT) && defined(TARGET_ARCH_X64) && \
!defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x38;
+ 0x40;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0x18;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x8;
@@ -17882,14 +17930,16 @@ static constexpr dart::compiler::target::word AOT_Class_super_type_offset =
0x50;
static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x88;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0x18;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x20;
+ 0x28;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word
@@ -18407,7 +18457,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x90;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x40;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x48;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x28;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -18537,7 +18587,7 @@ static constexpr dart::compiler::target::word
#if defined(PRODUCT) && defined(TARGET_ARCH_ARM64) && \
!defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x38;
+ 0x40;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0x18;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x8;
@@ -18671,14 +18721,16 @@ static constexpr dart::compiler::target::word AOT_Class_super_type_offset =
0x50;
static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x88;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0x18;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x20;
+ 0x28;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word
@@ -19198,7 +19250,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x90;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x40;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x48;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x28;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -19322,7 +19374,7 @@ static constexpr dart::compiler::target::word
#if defined(PRODUCT) && defined(TARGET_ARCH_X64) && \
defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x20;
+ 0x28;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0x10;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x4;
@@ -19456,14 +19508,16 @@ static constexpr dart::compiler::target::word AOT_Class_super_type_offset =
0x2c;
static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x50;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x1c;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x14;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x14;
+ 0x18;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x1c;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x20;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word
@@ -19983,7 +20037,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x58;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x28;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x30;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x18;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -20107,7 +20161,7 @@ static constexpr dart::compiler::target::word
#if defined(PRODUCT) && defined(TARGET_ARCH_ARM64) && \
defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x20;
+ 0x28;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0x10;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x4;
@@ -20241,14 +20295,16 @@ static constexpr dart::compiler::target::word AOT_Class_super_type_offset =
0x2c;
static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x50;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x1c;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x14;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x14;
+ 0x18;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0xc;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x1c;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x20;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word
@@ -20770,7 +20826,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x58;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x28;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x30;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x18;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -20894,7 +20950,7 @@ static constexpr dart::compiler::target::word
#if defined(PRODUCT) && defined(TARGET_ARCH_RISCV32) && \
!defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x1c;
+ 0x20;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0xc;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x4;
@@ -21028,14 +21084,16 @@ static constexpr dart::compiler::target::word AOT_Class_super_type_offset =
0x28;
static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x4c;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x14;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x18;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x10;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0xc;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x10;
+ 0x14;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0x8;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x18;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x1c;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x4;
static constexpr dart::compiler::target::word
@@ -21554,7 +21612,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x8;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x54;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x20;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x24;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x14;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
@@ -21677,7 +21735,7 @@ static constexpr dart::compiler::target::word
#if defined(PRODUCT) && defined(TARGET_ARCH_RISCV64) && \
!defined(DART_COMPRESSED_POINTERS)
static constexpr dart::compiler::target::word AOT_Closure_entry_point_offset =
- 0x38;
+ 0x40;
static constexpr dart::compiler::target::word AOT_Array_elements_start_offset =
0x18;
static constexpr dart::compiler::target::word AOT_Array_element_size = 0x8;
@@ -21811,14 +21869,16 @@ static constexpr dart::compiler::target::word AOT_Class_super_type_offset =
0x50;
static constexpr dart::compiler::target::word
AOT_Class_host_type_arguments_field_offset_in_words_offset = 0x88;
-static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x28;
+static constexpr dart::compiler::target::word AOT_Closure_context_offset = 0x30;
+static constexpr dart::compiler::target::word
+ AOT_Closure_default_type_arguments_offset = 0x20;
static constexpr dart::compiler::target::word
AOT_Closure_delayed_type_arguments_offset = 0x18;
static constexpr dart::compiler::target::word AOT_Closure_function_offset =
- 0x20;
+ 0x28;
static constexpr dart::compiler::target::word
AOT_Closure_function_type_arguments_offset = 0x10;
-static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x30;
+static constexpr dart::compiler::target::word AOT_Closure_hash_offset = 0x38;
static constexpr dart::compiler::target::word
AOT_Closure_instantiator_type_arguments_offset = 0x8;
static constexpr dart::compiler::target::word
@@ -22337,7 +22397,7 @@ static constexpr dart::compiler::target::word AOT_Bool_InstanceSize = 0x10;
static constexpr dart::compiler::target::word AOT_Capability_InstanceSize =
0x10;
static constexpr dart::compiler::target::word AOT_Class_InstanceSize = 0x90;
-static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x40;
+static constexpr dart::compiler::target::word AOT_Closure_InstanceSize = 0x48;
static constexpr dart::compiler::target::word AOT_ClosureData_InstanceSize =
0x28;
static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize =
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index 3a62082f4cf..90cd49168df 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -126,6 +126,7 @@
FIELD(Class, host_type_arguments_field_offset_in_words_offset) \
NOT_IN_PRODUCT(FIELD(ClassTable, allocation_tracing_state_table_offset)) \
FIELD(Closure, context_offset) \
+ FIELD(Closure, default_type_arguments_offset) \
FIELD(Closure, delayed_type_arguments_offset) \
FIELD(Closure, function_offset) \
FIELD(Closure, function_type_arguments_offset) \
diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc
index db0b2a575fa..aeaa7f44218 100644
--- a/runtime/vm/compiler/stub_code_compiler.cc
+++ b/runtime/vm/compiler/stub_code_compiler.cc
@@ -1222,6 +1222,9 @@ void StubCodeCompiler::GenerateAllocateClosureStub() {
__ StoreToSlotNoBarrier(AllocateClosureABI::kScratchReg,
AllocateClosureABI::kResultReg,
Slot::Closure_delayed_type_arguments());
+ __ StoreToSlotNoBarrier(AllocateClosureABI::kScratchReg,
+ AllocateClosureABI::kResultReg,
+ Slot::Closure_default_type_arguments());
__ StoreToSlotNoBarrier(AllocateClosureABI::kFunctionReg,
AllocateClosureABI::kResultReg,
Slot::Closure_function());
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index f04fb25c4e2..75d43d4d026 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -26313,6 +26313,34 @@ ClosurePtr Closure::New(const TypeArguments& instantiator_type_arguments,
instantiator_type_arguments.ptr());
result.untag()->set_function_type_arguments(function_type_arguments.ptr());
result.untag()->set_delayed_type_arguments(delayed_type_arguments.ptr());
+ // Cache instantiating the local type parameters to bounds. For non-generic
+ // closures, we just leave the field as its null initialization.
+ if (function.IsGeneric()) {
+ auto* const thread = Thread::Current();
+ Function::DefaultTypeArgumentsKind kind;
+ auto& default_type_args = TypeArguments::Handle(
+ thread->zone(), function.InstantiateToBounds(thread, &kind));
+ switch (kind) {
+ case Function::DefaultTypeArgumentsKind::kInvalid:
+ // We shouldn't hit the invalid case.
+ UNREACHABLE();
+ break;
+ case Function::DefaultTypeArgumentsKind::kIsInstantiated:
+ // Nothing left to do.
+ break;
+ case Function::DefaultTypeArgumentsKind::kNeedsInstantiation:
+ default_type_args = default_type_args.InstantiateAndCanonicalizeFrom(
+ instantiator_type_arguments, function_type_arguments);
+ break;
+ case Function::DefaultTypeArgumentsKind::kSharesInstantiatorTypeArguments:
+ default_type_args = instantiator_type_arguments.ptr();
+ break;
+ case Function::DefaultTypeArgumentsKind::kSharesFunctionTypeArguments:
+ default_type_args = function_type_arguments.ptr();
+ break;
+ }
+ result.untag()->set_default_type_arguments(default_type_args.ptr());
+ }
result.untag()->set_function(function.ptr());
result.untag()->set_context(context.ptr());
#if defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 255cab45ad6..faa6f160a1a 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -12437,6 +12437,16 @@ class Closure : public Instance {
return OFFSET_OF(UntaggedClosure, delayed_type_arguments_);
}
+ TypeArgumentsPtr default_type_arguments() const {
+ return untag()->default_type_arguments();
+ }
+ void set_default_type_arguments(const TypeArguments& args) const {
+ untag()->set_default_type_arguments(args.ptr());
+ }
+ static intptr_t default_type_arguments_offset() {
+ return OFFSET_OF(UntaggedClosure, default_type_arguments_);
+ }
+
FunctionPtr function() const { return untag()->function(); }
static intptr_t function_offset() {
return OFFSET_OF(UntaggedClosure, function_);
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index de63a6d154a..ada8079d9c4 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -2874,15 +2874,40 @@ class UntaggedClosure : public UntaggedInstance {
private:
RAW_HEAP_OBJECT_IMPLEMENTATION(Closure);
- // No instance fields should be declared before the following fields whose
- // offsets must be identical in Dart and C++.
-
// The following fields are also declared in the Dart source of class
- // _Closure.
+ // _Closure, and so must be the first fields in the object and must appear
+ // in the same order, so the offsets are identical in Dart and C++.
+ //
+ // Note that the type of a closure is defined by instantiating the
+ // signature of the closure function with the instantiator, function, and
+ // delayed (if non-empty) type arguments stored in the closure value.
+
+ // Stores the instantiator type arguments provided when the closure was
+ // created.
COMPRESSED_POINTER_FIELD(TypeArgumentsPtr, instantiator_type_arguments)
VISIT_FROM(instantiator_type_arguments)
+ // Stores the function type arguments provided for any generic parent
+ // functions when the closure was created.
COMPRESSED_POINTER_FIELD(TypeArgumentsPtr, function_type_arguments)
+ // If this field contains the empty type argument vector, then the closure
+ // value is generic.
+ //
+ // To create a new closure that is a specific type instantiation of a generic
+ // closure, a copy of the closure is created where the empty type argument
+ // vector in this field is replaced with the vector of local type arguments.
+ // The resulting closure value is not generic, and so an attempt to provide
+ // type arguments when invoking the new closure value is treated the same as
+ // calling any other non-generic function with unneeded type arguments.
+ //
+ // If the signature for the closure function has no local type parameters,
+ // the only guarantee about this field is that it never contains the empty
+ // type arguments vector. Thus, only this field need be inspected to
+ // determine whether a given closure value is generic.
COMPRESSED_POINTER_FIELD(TypeArgumentsPtr, delayed_type_arguments)
+ // Stores an instantiated to bounds version of the local type parameters
+ // (if any). This field is retrieved when a generic closure is called
+ // without providing type arguments.
+ COMPRESSED_POINTER_FIELD(TypeArgumentsPtr, default_type_arguments)
COMPRESSED_POINTER_FIELD(FunctionPtr, function)
COMPRESSED_POINTER_FIELD(ContextPtr, context)
COMPRESSED_POINTER_FIELD(SmiPtr, hash)
@@ -2896,29 +2921,6 @@ class UntaggedClosure : public UntaggedInstance {
CompressedObjectPtr* to_snapshot(Snapshot::Kind kind) { return to(); }
- // Note that instantiator_type_arguments_, function_type_arguments_ and
- // delayed_type_arguments_ are used to instantiate the signature of function_
- // when this closure is involved in a type test. In other words, these fields
- // define the function type of this closure instance.
- //
- // function_type_arguments_ and delayed_type_arguments_ may also be used when
- // invoking the closure. Whereas the source frontend will save a copy of the
- // function's type arguments in the closure's context and only use the
- // function_type_arguments_ field for type tests, the kernel frontend will use
- // the function_type_arguments_ vector here directly.
- //
- // If this closure is generic, it can be invoked with function type arguments
- // that will be processed in the prolog of the closure function_. For example,
- // if the generic closure function_ has a generic parent function, the
- // passed-in function type arguments get concatenated to the function type
- // arguments of the parent that are found in the context_.
- //
- // delayed_type_arguments_ is used to support the partial instantiation
- // feature. When this field is set to any value other than
- // Object::empty_type_arguments(), the types in this vector will be passed as
- // type arguments to the closure when invoked. In this case there may not be
- // any type arguments passed directly (or NSM will be invoked instead).
-
friend class UnitDeserializationRoots;
};
diff --git a/runtime/vm/raw_object_fields.cc b/runtime/vm/raw_object_fields.cc
index f9080b173f1..4731971685e 100644
--- a/runtime/vm/raw_object_fields.cc
+++ b/runtime/vm/raw_object_fields.cc
@@ -147,6 +147,7 @@ namespace dart {
F(Closure, instantiator_type_arguments_) \
F(Closure, function_type_arguments_) \
F(Closure, delayed_type_arguments_) \
+ F(Closure, default_type_arguments_) \
F(Closure, function_) \
F(Closure, context_) \
F(Closure, hash_) \
diff --git a/sdk/lib/_internal/vm/lib/function.dart b/sdk/lib/_internal/vm/lib/function.dart
index 7c4c9c6ef71..ed0758b58dd 100644
--- a/sdk/lib/_internal/vm/lib/function.dart
+++ b/sdk/lib/_internal/vm/lib/function.dart
@@ -39,6 +39,8 @@ final class _Closure implements Function {
@pragma("vm:entry-point")
var _delayed_type_arguments;
@pragma("vm:entry-point")
+ var _default_type_arguments;
+ @pragma("vm:entry-point")
var _function;
@pragma("vm:entry-point")
var _context;