[vm/nnbd] More detailed error messages for late field/variable errors
TEST=tests/language/nnbd/syntax/late_modifier_runtime_error_test.dart
Fixes https://github.com/dart-lang/sdk/issues/44361
Change-Id: I84727583a0b743c5c868921a6148b18f12eb68e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174842
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: RĂ©gis Crelier <regis@google.com>
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.h b/runtime/vm/compiler/backend/flow_graph_compiler.h
index 33f2627..ca9a298 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.h
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.h
@@ -364,7 +364,7 @@
LateInitializationErrorSlowPath(LoadFieldInstr* instruction,
intptr_t try_index)
: ThrowErrorSlowPathCode(instruction,
- kLateInitializationErrorRuntimeEntry,
+ kLateFieldNotInitializedErrorRuntimeEntry,
try_index) {}
virtual const char* name() { return "late initialization error"; }
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index 15d0a86..d466c551 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -2064,7 +2064,7 @@
// The variable has no initializer, so throw a LateInitializationError.
Fragment initialize(is_uninitialized);
initialize += flow_graph_builder_->ThrowLateInitializationError(
- position, variable->name());
+ position, "_throwLocalNotInitialized", variable->name());
initialize += Goto(join);
}
}
@@ -2130,7 +2130,7 @@
// Already initialized, so throw a LateInitializationError.
Fragment already_initialized(is_initialized);
already_initialized += flow_graph_builder_->ThrowLateInitializationError(
- position, variable->name());
+ position, "_throwLocalAlreadyInitialized", variable->name());
already_initialized += Goto(join);
}
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
index 175cc4e..0718d9d 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
@@ -217,8 +217,6 @@
Fragment StringInterpolate(TokenPosition position);
Fragment StringInterpolateSingle(TokenPosition position);
Fragment ThrowTypeError();
- Fragment ThrowLateInitializationError(TokenPosition position,
- const String& name);
Fragment LoadInstantiatorTypeArguments();
Fragment LoadFunctionTypeArguments();
Fragment InstantiateType(const AbstractType& type);
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index 105feaa..e84cc87 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -440,22 +440,24 @@
}
}
-Fragment FlowGraphBuilder::ThrowLateInitializationError(TokenPosition position,
- const String& name) {
- const Class& klass = Class::ZoneHandle(
- Z, Library::LookupCoreClass(Symbols::LateInitializationError()));
+Fragment FlowGraphBuilder::ThrowLateInitializationError(
+ TokenPosition position,
+ const char* throw_method_name,
+ const String& name) {
+ const Class& klass =
+ Class::ZoneHandle(Z, Library::LookupCoreClass(Symbols::LateError()));
ASSERT(!klass.IsNull());
const auto& error = klass.EnsureIsFinalized(thread_);
ASSERT(error == Error::null());
const Function& throw_new =
Function::ZoneHandle(Z, klass.LookupStaticFunctionAllowPrivate(
- H.DartSymbolObfuscate("_throwNew")));
+ H.DartSymbolObfuscate(throw_method_name)));
ASSERT(!throw_new.IsNull());
Fragment instructions;
- // Call _LateInitializationError._throwNew.
+ // Call LateError._throwFoo.
instructions += Constant(name);
instructions += StaticCall(position, throw_new,
/* argument_count = */ 1, ICData::kStatic);
@@ -495,7 +497,8 @@
// If the field is already initialized, throw a LateInitializationError.
Fragment already_initialized(is_initialized);
already_initialized += ThrowLateInitializationError(
- position, String::ZoneHandle(Z, field.name()));
+ position, "_throwFieldAlreadyInitialized",
+ String::ZoneHandle(Z, field.name()));
already_initialized += Goto(join);
}
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.h b/runtime/vm/compiler/frontend/kernel_to_il.h
index 6d4eaa8..1041f9c 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.h
+++ b/runtime/vm/compiler/frontend/kernel_to_il.h
@@ -224,6 +224,7 @@
Fragment ThrowTypeError();
Fragment ThrowNoSuchMethodError(const Function& target);
Fragment ThrowLateInitializationError(TokenPosition position,
+ const char* throw_method_name,
const String& name);
Fragment BuildImplicitClosureCreation(const Function& target);
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index e4dae18..2a76c83 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -221,9 +221,9 @@
static constexpr dart::compiler::target::word
Thread_AllocateArray_entry_point_offset = 368;
static constexpr dart::compiler::target::word Thread_active_exception_offset =
- 688;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
692;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+ 696;
static constexpr dart::compiler::target::word
Thread_array_write_barrier_code_offset = 120;
static constexpr dart::compiler::target::word
@@ -248,7 +248,7 @@
Thread_allocate_object_slow_entry_point_offset = 288;
static constexpr dart::compiler::target::word
Thread_allocate_object_slow_stub_offset = 196;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 724;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 728;
static constexpr dart::compiler::target::word
Thread_auto_scope_native_wrapper_entry_point_offset = 332;
static constexpr dart::compiler::target::word Thread_bool_false_offset = 112;
@@ -259,7 +259,7 @@
Thread_call_to_runtime_entry_point_offset = 268;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 136;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 732;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 736;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 48;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -277,7 +277,7 @@
static constexpr dart::compiler::target::word
Thread_enter_safepoint_stub_offset = 248;
static constexpr dart::compiler::target::word Thread_execution_state_offset =
- 708;
+ 712;
static constexpr dart::compiler::target::word
Thread_exit_safepoint_stub_offset = 252;
static constexpr dart::compiler::target::word
@@ -297,11 +297,11 @@
static constexpr dart::compiler::target::word
Thread_float_zerow_address_offset = 364;
static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
- 696;
+ 700;
static constexpr dart::compiler::target::word
Thread_invoke_dart_code_stub_offset = 132;
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
- 720;
+ 724;
static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
68;
@@ -344,11 +344,11 @@
static constexpr dart::compiler::target::word Thread_object_null_offset = 104;
static constexpr dart::compiler::target::word
Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 700;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 704;
static constexpr dart::compiler::target::word
- Thread_saved_shadow_call_stack_offset = 704;
+ Thread_saved_shadow_call_stack_offset = 708;
static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
- 712;
+ 716;
static constexpr dart::compiler::target::word
Thread_slow_type_test_stub_offset = 240;
static constexpr dart::compiler::target::word
@@ -381,7 +381,7 @@
Thread_write_barrier_entry_point_offset = 260;
static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
40;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 716;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 720;
static constexpr dart::compiler::target::word TimelineStream_enabled_offset = 8;
static constexpr dart::compiler::target::word TwoByteString_data_offset = 12;
static constexpr dart::compiler::target::word Type_arguments_offset = 16;
@@ -433,7 +433,7 @@
4, 12, 8, 16};
static constexpr dart::compiler::target::word
Thread_write_barrier_wrappers_thread_offset[] = {
- 656, 660, 664, 668, 672, -1, 676, -1, 680, 684, -1, -1, -1, -1, -1, -1};
+ 660, 664, 668, 672, 676, -1, 680, -1, 684, 688, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word ApiError_InstanceSize = 8;
static constexpr dart::compiler::target::word Array_InstanceSize = 12;
static constexpr dart::compiler::target::word Array_header_size = 12;
@@ -738,9 +738,9 @@
static constexpr dart::compiler::target::word
Thread_AllocateArray_entry_point_offset = 728;
static constexpr dart::compiler::target::word Thread_active_exception_offset =
- 1392;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
1400;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+ 1408;
static constexpr dart::compiler::target::word
Thread_array_write_barrier_code_offset = 232;
static constexpr dart::compiler::target::word
@@ -766,7 +766,7 @@
static constexpr dart::compiler::target::word
Thread_allocate_object_slow_stub_offset = 384;
static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
- 1464;
+ 1472;
static constexpr dart::compiler::target::word
Thread_auto_scope_native_wrapper_entry_point_offset = 656;
static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
@@ -777,7 +777,7 @@
Thread_call_to_runtime_entry_point_offset = 528;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 264;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1480;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1488;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 96;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -795,7 +795,7 @@
static constexpr dart::compiler::target::word
Thread_enter_safepoint_stub_offset = 488;
static constexpr dart::compiler::target::word Thread_execution_state_offset =
- 1432;
+ 1440;
static constexpr dart::compiler::target::word
Thread_exit_safepoint_stub_offset = 496;
static constexpr dart::compiler::target::word
@@ -815,11 +815,11 @@
static constexpr dart::compiler::target::word
Thread_float_zerow_address_offset = 720;
static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
- 1408;
+ 1416;
static constexpr dart::compiler::target::word
Thread_invoke_dart_code_stub_offset = 256;
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
- 1456;
+ 1464;
static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
136;
@@ -862,11 +862,11 @@
static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
static constexpr dart::compiler::target::word
Thread_predefined_symbols_address_offset = 664;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1416;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1424;
static constexpr dart::compiler::target::word
- Thread_saved_shadow_call_stack_offset = 1424;
+ Thread_saved_shadow_call_stack_offset = 1432;
static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
- 1440;
+ 1448;
static constexpr dart::compiler::target::word
Thread_slow_type_test_stub_offset = 472;
static constexpr dart::compiler::target::word
@@ -900,7 +900,7 @@
static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
80;
static constexpr dart::compiler::target::word Thread_callback_code_offset =
- 1448;
+ 1456;
static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
16;
static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -953,8 +953,8 @@
8, 24, 16, 32};
static constexpr dart::compiler::target::word
Thread_write_barrier_wrappers_thread_offset[] = {
- 1304, 1312, 1320, 1328, -1, -1, 1336, 1344,
- 1352, 1360, 1368, -1, 1376, 1384, -1, -1};
+ 1312, 1320, 1328, 1336, -1, -1, 1344, 1352,
+ 1360, 1368, 1376, -1, 1384, 1392, -1, -1};
static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word Array_InstanceSize = 24;
static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -1257,9 +1257,9 @@
static constexpr dart::compiler::target::word
Thread_AllocateArray_entry_point_offset = 368;
static constexpr dart::compiler::target::word Thread_active_exception_offset =
- 656;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
660;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+ 664;
static constexpr dart::compiler::target::word
Thread_array_write_barrier_code_offset = 120;
static constexpr dart::compiler::target::word
@@ -1284,7 +1284,7 @@
Thread_allocate_object_slow_entry_point_offset = 288;
static constexpr dart::compiler::target::word
Thread_allocate_object_slow_stub_offset = 196;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 692;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 696;
static constexpr dart::compiler::target::word
Thread_auto_scope_native_wrapper_entry_point_offset = 332;
static constexpr dart::compiler::target::word Thread_bool_false_offset = 112;
@@ -1295,7 +1295,7 @@
Thread_call_to_runtime_entry_point_offset = 268;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 136;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 700;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 704;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 48;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -1313,7 +1313,7 @@
static constexpr dart::compiler::target::word
Thread_enter_safepoint_stub_offset = 248;
static constexpr dart::compiler::target::word Thread_execution_state_offset =
- 676;
+ 680;
static constexpr dart::compiler::target::word
Thread_exit_safepoint_stub_offset = 252;
static constexpr dart::compiler::target::word
@@ -1333,11 +1333,11 @@
static constexpr dart::compiler::target::word
Thread_float_zerow_address_offset = 364;
static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
- 664;
+ 668;
static constexpr dart::compiler::target::word
Thread_invoke_dart_code_stub_offset = 132;
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
- 688;
+ 692;
static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
68;
@@ -1380,11 +1380,11 @@
static constexpr dart::compiler::target::word Thread_object_null_offset = 104;
static constexpr dart::compiler::target::word
Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 668;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 672;
static constexpr dart::compiler::target::word
- Thread_saved_shadow_call_stack_offset = 672;
+ Thread_saved_shadow_call_stack_offset = 676;
static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
- 680;
+ 684;
static constexpr dart::compiler::target::word
Thread_slow_type_test_stub_offset = 240;
static constexpr dart::compiler::target::word
@@ -1417,7 +1417,7 @@
Thread_write_barrier_entry_point_offset = 260;
static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
40;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 684;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 688;
static constexpr dart::compiler::target::word TimelineStream_enabled_offset = 8;
static constexpr dart::compiler::target::word TwoByteString_data_offset = 12;
static constexpr dart::compiler::target::word Type_arguments_offset = 16;
@@ -1771,9 +1771,9 @@
static constexpr dart::compiler::target::word
Thread_AllocateArray_entry_point_offset = 728;
static constexpr dart::compiler::target::word Thread_active_exception_offset =
- 1464;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
1472;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+ 1480;
static constexpr dart::compiler::target::word
Thread_array_write_barrier_code_offset = 232;
static constexpr dart::compiler::target::word
@@ -1799,7 +1799,7 @@
static constexpr dart::compiler::target::word
Thread_allocate_object_slow_stub_offset = 384;
static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
- 1536;
+ 1544;
static constexpr dart::compiler::target::word
Thread_auto_scope_native_wrapper_entry_point_offset = 656;
static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
@@ -1810,7 +1810,7 @@
Thread_call_to_runtime_entry_point_offset = 528;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 264;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1552;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1560;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 96;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -1828,7 +1828,7 @@
static constexpr dart::compiler::target::word
Thread_enter_safepoint_stub_offset = 488;
static constexpr dart::compiler::target::word Thread_execution_state_offset =
- 1504;
+ 1512;
static constexpr dart::compiler::target::word
Thread_exit_safepoint_stub_offset = 496;
static constexpr dart::compiler::target::word
@@ -1848,11 +1848,11 @@
static constexpr dart::compiler::target::word
Thread_float_zerow_address_offset = 720;
static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
- 1480;
+ 1488;
static constexpr dart::compiler::target::word
Thread_invoke_dart_code_stub_offset = 256;
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
- 1528;
+ 1536;
static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
136;
@@ -1895,11 +1895,11 @@
static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
static constexpr dart::compiler::target::word
Thread_predefined_symbols_address_offset = 664;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1488;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1496;
static constexpr dart::compiler::target::word
- Thread_saved_shadow_call_stack_offset = 1496;
+ Thread_saved_shadow_call_stack_offset = 1504;
static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
- 1512;
+ 1520;
static constexpr dart::compiler::target::word
Thread_slow_type_test_stub_offset = 472;
static constexpr dart::compiler::target::word
@@ -1933,7 +1933,7 @@
static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
80;
static constexpr dart::compiler::target::word Thread_callback_code_offset =
- 1520;
+ 1528;
static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
16;
static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -1986,9 +1986,9 @@
8, 24, 16, 32};
static constexpr dart::compiler::target::word
Thread_write_barrier_wrappers_thread_offset[] = {
- 1304, 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384,
- 1392, 1400, 1408, 1416, -1, -1, -1, -1, 1424, 1432, -1,
- -1, 1440, 1448, 1456, -1, -1, -1, -1, -1, -1};
+ 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392,
+ 1400, 1408, 1416, 1424, -1, -1, -1, -1, 1432, 1440, -1,
+ -1, 1448, 1456, 1464, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word Array_InstanceSize = 24;
static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -2290,9 +2290,9 @@
static constexpr dart::compiler::target::word
Thread_AllocateArray_entry_point_offset = 368;
static constexpr dart::compiler::target::word Thread_active_exception_offset =
- 688;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
692;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+ 696;
static constexpr dart::compiler::target::word
Thread_array_write_barrier_code_offset = 120;
static constexpr dart::compiler::target::word
@@ -2317,7 +2317,7 @@
Thread_allocate_object_slow_entry_point_offset = 288;
static constexpr dart::compiler::target::word
Thread_allocate_object_slow_stub_offset = 196;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 724;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 728;
static constexpr dart::compiler::target::word
Thread_auto_scope_native_wrapper_entry_point_offset = 332;
static constexpr dart::compiler::target::word Thread_bool_false_offset = 112;
@@ -2328,7 +2328,7 @@
Thread_call_to_runtime_entry_point_offset = 268;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 136;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 732;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 736;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 48;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -2346,7 +2346,7 @@
static constexpr dart::compiler::target::word
Thread_enter_safepoint_stub_offset = 248;
static constexpr dart::compiler::target::word Thread_execution_state_offset =
- 708;
+ 712;
static constexpr dart::compiler::target::word
Thread_exit_safepoint_stub_offset = 252;
static constexpr dart::compiler::target::word
@@ -2366,11 +2366,11 @@
static constexpr dart::compiler::target::word
Thread_float_zerow_address_offset = 364;
static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
- 696;
+ 700;
static constexpr dart::compiler::target::word
Thread_invoke_dart_code_stub_offset = 132;
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
- 720;
+ 724;
static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
68;
@@ -2413,11 +2413,11 @@
static constexpr dart::compiler::target::word Thread_object_null_offset = 104;
static constexpr dart::compiler::target::word
Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 700;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 704;
static constexpr dart::compiler::target::word
- Thread_saved_shadow_call_stack_offset = 704;
+ Thread_saved_shadow_call_stack_offset = 708;
static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
- 712;
+ 716;
static constexpr dart::compiler::target::word
Thread_slow_type_test_stub_offset = 240;
static constexpr dart::compiler::target::word
@@ -2450,7 +2450,7 @@
Thread_write_barrier_entry_point_offset = 260;
static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
40;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 716;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 720;
static constexpr dart::compiler::target::word TimelineStream_enabled_offset = 8;
static constexpr dart::compiler::target::word TwoByteString_data_offset = 12;
static constexpr dart::compiler::target::word Type_arguments_offset = 16;
@@ -2499,7 +2499,7 @@
4, 12, 8, 16};
static constexpr dart::compiler::target::word
Thread_write_barrier_wrappers_thread_offset[] = {
- 656, 660, 664, 668, 672, -1, 676, -1, 680, 684, -1, -1, -1, -1, -1, -1};
+ 660, 664, 668, 672, 676, -1, 680, -1, 684, 688, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word ApiError_InstanceSize = 8;
static constexpr dart::compiler::target::word Array_InstanceSize = 12;
static constexpr dart::compiler::target::word Array_header_size = 12;
@@ -2801,9 +2801,9 @@
static constexpr dart::compiler::target::word
Thread_AllocateArray_entry_point_offset = 728;
static constexpr dart::compiler::target::word Thread_active_exception_offset =
- 1392;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
1400;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+ 1408;
static constexpr dart::compiler::target::word
Thread_array_write_barrier_code_offset = 232;
static constexpr dart::compiler::target::word
@@ -2829,7 +2829,7 @@
static constexpr dart::compiler::target::word
Thread_allocate_object_slow_stub_offset = 384;
static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
- 1464;
+ 1472;
static constexpr dart::compiler::target::word
Thread_auto_scope_native_wrapper_entry_point_offset = 656;
static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
@@ -2840,7 +2840,7 @@
Thread_call_to_runtime_entry_point_offset = 528;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 264;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1480;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1488;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 96;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -2858,7 +2858,7 @@
static constexpr dart::compiler::target::word
Thread_enter_safepoint_stub_offset = 488;
static constexpr dart::compiler::target::word Thread_execution_state_offset =
- 1432;
+ 1440;
static constexpr dart::compiler::target::word
Thread_exit_safepoint_stub_offset = 496;
static constexpr dart::compiler::target::word
@@ -2878,11 +2878,11 @@
static constexpr dart::compiler::target::word
Thread_float_zerow_address_offset = 720;
static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
- 1408;
+ 1416;
static constexpr dart::compiler::target::word
Thread_invoke_dart_code_stub_offset = 256;
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
- 1456;
+ 1464;
static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
136;
@@ -2925,11 +2925,11 @@
static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
static constexpr dart::compiler::target::word
Thread_predefined_symbols_address_offset = 664;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1416;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1424;
static constexpr dart::compiler::target::word
- Thread_saved_shadow_call_stack_offset = 1424;
+ Thread_saved_shadow_call_stack_offset = 1432;
static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
- 1440;
+ 1448;
static constexpr dart::compiler::target::word
Thread_slow_type_test_stub_offset = 472;
static constexpr dart::compiler::target::word
@@ -2963,7 +2963,7 @@
static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
80;
static constexpr dart::compiler::target::word Thread_callback_code_offset =
- 1448;
+ 1456;
static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
16;
static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -3013,8 +3013,8 @@
8, 24, 16, 32};
static constexpr dart::compiler::target::word
Thread_write_barrier_wrappers_thread_offset[] = {
- 1304, 1312, 1320, 1328, -1, -1, 1336, 1344,
- 1352, 1360, 1368, -1, 1376, 1384, -1, -1};
+ 1312, 1320, 1328, 1336, -1, -1, 1344, 1352,
+ 1360, 1368, 1376, -1, 1384, 1392, -1, -1};
static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word Array_InstanceSize = 24;
static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -3314,9 +3314,9 @@
static constexpr dart::compiler::target::word
Thread_AllocateArray_entry_point_offset = 368;
static constexpr dart::compiler::target::word Thread_active_exception_offset =
- 656;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
660;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+ 664;
static constexpr dart::compiler::target::word
Thread_array_write_barrier_code_offset = 120;
static constexpr dart::compiler::target::word
@@ -3341,7 +3341,7 @@
Thread_allocate_object_slow_entry_point_offset = 288;
static constexpr dart::compiler::target::word
Thread_allocate_object_slow_stub_offset = 196;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 692;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 696;
static constexpr dart::compiler::target::word
Thread_auto_scope_native_wrapper_entry_point_offset = 332;
static constexpr dart::compiler::target::word Thread_bool_false_offset = 112;
@@ -3352,7 +3352,7 @@
Thread_call_to_runtime_entry_point_offset = 268;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 136;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 700;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 704;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 48;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -3370,7 +3370,7 @@
static constexpr dart::compiler::target::word
Thread_enter_safepoint_stub_offset = 248;
static constexpr dart::compiler::target::word Thread_execution_state_offset =
- 676;
+ 680;
static constexpr dart::compiler::target::word
Thread_exit_safepoint_stub_offset = 252;
static constexpr dart::compiler::target::word
@@ -3390,11 +3390,11 @@
static constexpr dart::compiler::target::word
Thread_float_zerow_address_offset = 364;
static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
- 664;
+ 668;
static constexpr dart::compiler::target::word
Thread_invoke_dart_code_stub_offset = 132;
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
- 688;
+ 692;
static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
68;
@@ -3437,11 +3437,11 @@
static constexpr dart::compiler::target::word Thread_object_null_offset = 104;
static constexpr dart::compiler::target::word
Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 668;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 672;
static constexpr dart::compiler::target::word
- Thread_saved_shadow_call_stack_offset = 672;
+ Thread_saved_shadow_call_stack_offset = 676;
static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
- 680;
+ 684;
static constexpr dart::compiler::target::word
Thread_slow_type_test_stub_offset = 240;
static constexpr dart::compiler::target::word
@@ -3474,7 +3474,7 @@
Thread_write_barrier_entry_point_offset = 260;
static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
40;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 684;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 688;
static constexpr dart::compiler::target::word TimelineStream_enabled_offset = 8;
static constexpr dart::compiler::target::word TwoByteString_data_offset = 12;
static constexpr dart::compiler::target::word Type_arguments_offset = 16;
@@ -3822,9 +3822,9 @@
static constexpr dart::compiler::target::word
Thread_AllocateArray_entry_point_offset = 728;
static constexpr dart::compiler::target::word Thread_active_exception_offset =
- 1464;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
1472;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+ 1480;
static constexpr dart::compiler::target::word
Thread_array_write_barrier_code_offset = 232;
static constexpr dart::compiler::target::word
@@ -3850,7 +3850,7 @@
static constexpr dart::compiler::target::word
Thread_allocate_object_slow_stub_offset = 384;
static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
- 1536;
+ 1544;
static constexpr dart::compiler::target::word
Thread_auto_scope_native_wrapper_entry_point_offset = 656;
static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
@@ -3861,7 +3861,7 @@
Thread_call_to_runtime_entry_point_offset = 528;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 264;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1552;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1560;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 96;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -3879,7 +3879,7 @@
static constexpr dart::compiler::target::word
Thread_enter_safepoint_stub_offset = 488;
static constexpr dart::compiler::target::word Thread_execution_state_offset =
- 1504;
+ 1512;
static constexpr dart::compiler::target::word
Thread_exit_safepoint_stub_offset = 496;
static constexpr dart::compiler::target::word
@@ -3899,11 +3899,11 @@
static constexpr dart::compiler::target::word
Thread_float_zerow_address_offset = 720;
static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
- 1480;
+ 1488;
static constexpr dart::compiler::target::word
Thread_invoke_dart_code_stub_offset = 256;
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
- 1528;
+ 1536;
static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
136;
@@ -3946,11 +3946,11 @@
static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
static constexpr dart::compiler::target::word
Thread_predefined_symbols_address_offset = 664;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1488;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1496;
static constexpr dart::compiler::target::word
- Thread_saved_shadow_call_stack_offset = 1496;
+ Thread_saved_shadow_call_stack_offset = 1504;
static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
- 1512;
+ 1520;
static constexpr dart::compiler::target::word
Thread_slow_type_test_stub_offset = 472;
static constexpr dart::compiler::target::word
@@ -3984,7 +3984,7 @@
static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
80;
static constexpr dart::compiler::target::word Thread_callback_code_offset =
- 1520;
+ 1528;
static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
16;
static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -4034,9 +4034,9 @@
8, 24, 16, 32};
static constexpr dart::compiler::target::word
Thread_write_barrier_wrappers_thread_offset[] = {
- 1304, 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384,
- 1392, 1400, 1408, 1416, -1, -1, -1, -1, 1424, 1432, -1,
- -1, 1440, 1448, 1456, -1, -1, -1, -1, -1, -1};
+ 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392,
+ 1400, 1408, 1416, 1424, -1, -1, -1, -1, 1432, 1440, -1,
+ -1, 1448, 1456, 1464, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word Array_InstanceSize = 24;
static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -4361,9 +4361,9 @@
static constexpr dart::compiler::target::word
AOT_Thread_AllocateArray_entry_point_offset = 368;
static constexpr dart::compiler::target::word
- AOT_Thread_active_exception_offset = 688;
+ AOT_Thread_active_exception_offset = 692;
static constexpr dart::compiler::target::word
- AOT_Thread_active_stacktrace_offset = 692;
+ AOT_Thread_active_stacktrace_offset = 696;
static constexpr dart::compiler::target::word
AOT_Thread_array_write_barrier_code_offset = 120;
static constexpr dart::compiler::target::word
@@ -4389,7 +4389,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_allocate_object_slow_stub_offset = 196;
static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
- 724;
+ 728;
static constexpr dart::compiler::target::word
AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 332;
static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
@@ -4402,7 +4402,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 136;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 732;
+ 736;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 48;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -4421,7 +4421,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_enter_safepoint_stub_offset = 248;
static constexpr dart::compiler::target::word
- AOT_Thread_execution_state_offset = 708;
+ AOT_Thread_execution_state_offset = 712;
static constexpr dart::compiler::target::word
AOT_Thread_exit_safepoint_stub_offset = 252;
static constexpr dart::compiler::target::word
@@ -4441,11 +4441,11 @@
static constexpr dart::compiler::target::word
AOT_Thread_float_zerow_address_offset = 364;
static constexpr dart::compiler::target::word
- AOT_Thread_global_object_pool_offset = 696;
+ AOT_Thread_global_object_pool_offset = 700;
static constexpr dart::compiler::target::word
AOT_Thread_invoke_dart_code_stub_offset = 132;
static constexpr dart::compiler::target::word
- AOT_Thread_exit_through_ffi_offset = 720;
+ AOT_Thread_exit_through_ffi_offset = 724;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 44;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 68;
@@ -4490,11 +4490,11 @@
104;
static constexpr dart::compiler::target::word
AOT_Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 700;
+static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 704;
static constexpr dart::compiler::target::word
- AOT_Thread_saved_shadow_call_stack_offset = 704;
+ AOT_Thread_saved_shadow_call_stack_offset = 708;
static constexpr dart::compiler::target::word
- AOT_Thread_safepoint_state_offset = 712;
+ AOT_Thread_safepoint_state_offset = 716;
static constexpr dart::compiler::target::word
AOT_Thread_slow_type_test_stub_offset = 240;
static constexpr dart::compiler::target::word
@@ -4530,7 +4530,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_mask_offset = 40;
static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
- 716;
+ 720;
static constexpr dart::compiler::target::word
AOT_TimelineStream_enabled_offset = 8;
static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -4595,7 +4595,7 @@
4, 12, 8, 16};
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_wrappers_thread_offset[] = {
- 656, 660, 664, 668, 672, -1, 676, -1, 680, 684, -1, -1, -1, -1, -1, -1};
+ 660, 664, 668, 672, 676, -1, 680, -1, 684, 688, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 8;
static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 12;
static constexpr dart::compiler::target::word AOT_Array_header_size = 12;
@@ -4933,9 +4933,9 @@
static constexpr dart::compiler::target::word
AOT_Thread_AllocateArray_entry_point_offset = 728;
static constexpr dart::compiler::target::word
- AOT_Thread_active_exception_offset = 1392;
+ AOT_Thread_active_exception_offset = 1400;
static constexpr dart::compiler::target::word
- AOT_Thread_active_stacktrace_offset = 1400;
+ AOT_Thread_active_stacktrace_offset = 1408;
static constexpr dart::compiler::target::word
AOT_Thread_array_write_barrier_code_offset = 232;
static constexpr dart::compiler::target::word
@@ -4961,7 +4961,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_allocate_object_slow_stub_offset = 384;
static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
- 1464;
+ 1472;
static constexpr dart::compiler::target::word
AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 656;
static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
@@ -4974,7 +4974,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 264;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1480;
+ 1488;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 96;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -4993,7 +4993,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_enter_safepoint_stub_offset = 488;
static constexpr dart::compiler::target::word
- AOT_Thread_execution_state_offset = 1432;
+ AOT_Thread_execution_state_offset = 1440;
static constexpr dart::compiler::target::word
AOT_Thread_exit_safepoint_stub_offset = 496;
static constexpr dart::compiler::target::word
@@ -5013,11 +5013,11 @@
static constexpr dart::compiler::target::word
AOT_Thread_float_zerow_address_offset = 720;
static constexpr dart::compiler::target::word
- AOT_Thread_global_object_pool_offset = 1408;
+ AOT_Thread_global_object_pool_offset = 1416;
static constexpr dart::compiler::target::word
AOT_Thread_invoke_dart_code_stub_offset = 256;
static constexpr dart::compiler::target::word
- AOT_Thread_exit_through_ffi_offset = 1456;
+ AOT_Thread_exit_through_ffi_offset = 1464;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 136;
@@ -5063,11 +5063,11 @@
static constexpr dart::compiler::target::word
AOT_Thread_predefined_symbols_address_offset = 664;
static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
- 1416;
+ 1424;
static constexpr dart::compiler::target::word
- AOT_Thread_saved_shadow_call_stack_offset = 1424;
+ AOT_Thread_saved_shadow_call_stack_offset = 1432;
static constexpr dart::compiler::target::word
- AOT_Thread_safepoint_state_offset = 1440;
+ AOT_Thread_safepoint_state_offset = 1448;
static constexpr dart::compiler::target::word
AOT_Thread_slow_type_test_stub_offset = 472;
static constexpr dart::compiler::target::word
@@ -5103,7 +5103,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_mask_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
- 1448;
+ 1456;
static constexpr dart::compiler::target::word
AOT_TimelineStream_enabled_offset = 16;
static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -5168,8 +5168,8 @@
8, 24, 16, 32};
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_wrappers_thread_offset[] = {
- 1304, 1312, 1320, 1328, -1, -1, 1336, 1344,
- 1352, 1360, 1368, -1, 1376, 1384, -1, -1};
+ 1312, 1320, 1328, 1336, -1, -1, 1344, 1352,
+ 1360, 1368, 1376, -1, 1384, 1392, -1, -1};
static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Array_header_size = 24;
@@ -5510,9 +5510,9 @@
static constexpr dart::compiler::target::word
AOT_Thread_AllocateArray_entry_point_offset = 728;
static constexpr dart::compiler::target::word
- AOT_Thread_active_exception_offset = 1464;
+ AOT_Thread_active_exception_offset = 1472;
static constexpr dart::compiler::target::word
- AOT_Thread_active_stacktrace_offset = 1472;
+ AOT_Thread_active_stacktrace_offset = 1480;
static constexpr dart::compiler::target::word
AOT_Thread_array_write_barrier_code_offset = 232;
static constexpr dart::compiler::target::word
@@ -5538,7 +5538,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_allocate_object_slow_stub_offset = 384;
static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
- 1536;
+ 1544;
static constexpr dart::compiler::target::word
AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 656;
static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
@@ -5551,7 +5551,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 264;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1552;
+ 1560;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 96;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -5570,7 +5570,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_enter_safepoint_stub_offset = 488;
static constexpr dart::compiler::target::word
- AOT_Thread_execution_state_offset = 1504;
+ AOT_Thread_execution_state_offset = 1512;
static constexpr dart::compiler::target::word
AOT_Thread_exit_safepoint_stub_offset = 496;
static constexpr dart::compiler::target::word
@@ -5590,11 +5590,11 @@
static constexpr dart::compiler::target::word
AOT_Thread_float_zerow_address_offset = 720;
static constexpr dart::compiler::target::word
- AOT_Thread_global_object_pool_offset = 1480;
+ AOT_Thread_global_object_pool_offset = 1488;
static constexpr dart::compiler::target::word
AOT_Thread_invoke_dart_code_stub_offset = 256;
static constexpr dart::compiler::target::word
- AOT_Thread_exit_through_ffi_offset = 1528;
+ AOT_Thread_exit_through_ffi_offset = 1536;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 136;
@@ -5640,11 +5640,11 @@
static constexpr dart::compiler::target::word
AOT_Thread_predefined_symbols_address_offset = 664;
static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
- 1488;
+ 1496;
static constexpr dart::compiler::target::word
- AOT_Thread_saved_shadow_call_stack_offset = 1496;
+ AOT_Thread_saved_shadow_call_stack_offset = 1504;
static constexpr dart::compiler::target::word
- AOT_Thread_safepoint_state_offset = 1512;
+ AOT_Thread_safepoint_state_offset = 1520;
static constexpr dart::compiler::target::word
AOT_Thread_slow_type_test_stub_offset = 472;
static constexpr dart::compiler::target::word
@@ -5680,7 +5680,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_mask_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
- 1520;
+ 1528;
static constexpr dart::compiler::target::word
AOT_TimelineStream_enabled_offset = 16;
static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -5745,9 +5745,9 @@
8, 24, 16, 32};
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_wrappers_thread_offset[] = {
- 1304, 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384,
- 1392, 1400, 1408, 1416, -1, -1, -1, -1, 1424, 1432, -1,
- -1, 1440, 1448, 1456, -1, -1, -1, -1, -1, -1};
+ 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392,
+ 1400, 1408, 1416, 1424, -1, -1, -1, -1, 1432, 1440, -1,
+ -1, 1448, 1456, 1464, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Array_header_size = 24;
@@ -6082,9 +6082,9 @@
static constexpr dart::compiler::target::word
AOT_Thread_AllocateArray_entry_point_offset = 368;
static constexpr dart::compiler::target::word
- AOT_Thread_active_exception_offset = 688;
+ AOT_Thread_active_exception_offset = 692;
static constexpr dart::compiler::target::word
- AOT_Thread_active_stacktrace_offset = 692;
+ AOT_Thread_active_stacktrace_offset = 696;
static constexpr dart::compiler::target::word
AOT_Thread_array_write_barrier_code_offset = 120;
static constexpr dart::compiler::target::word
@@ -6110,7 +6110,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_allocate_object_slow_stub_offset = 196;
static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
- 724;
+ 728;
static constexpr dart::compiler::target::word
AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 332;
static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
@@ -6123,7 +6123,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 136;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 732;
+ 736;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 48;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -6142,7 +6142,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_enter_safepoint_stub_offset = 248;
static constexpr dart::compiler::target::word
- AOT_Thread_execution_state_offset = 708;
+ AOT_Thread_execution_state_offset = 712;
static constexpr dart::compiler::target::word
AOT_Thread_exit_safepoint_stub_offset = 252;
static constexpr dart::compiler::target::word
@@ -6162,11 +6162,11 @@
static constexpr dart::compiler::target::word
AOT_Thread_float_zerow_address_offset = 364;
static constexpr dart::compiler::target::word
- AOT_Thread_global_object_pool_offset = 696;
+ AOT_Thread_global_object_pool_offset = 700;
static constexpr dart::compiler::target::word
AOT_Thread_invoke_dart_code_stub_offset = 132;
static constexpr dart::compiler::target::word
- AOT_Thread_exit_through_ffi_offset = 720;
+ AOT_Thread_exit_through_ffi_offset = 724;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 44;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 68;
@@ -6211,11 +6211,11 @@
104;
static constexpr dart::compiler::target::word
AOT_Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 700;
+static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 704;
static constexpr dart::compiler::target::word
- AOT_Thread_saved_shadow_call_stack_offset = 704;
+ AOT_Thread_saved_shadow_call_stack_offset = 708;
static constexpr dart::compiler::target::word
- AOT_Thread_safepoint_state_offset = 712;
+ AOT_Thread_safepoint_state_offset = 716;
static constexpr dart::compiler::target::word
AOT_Thread_slow_type_test_stub_offset = 240;
static constexpr dart::compiler::target::word
@@ -6251,7 +6251,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_mask_offset = 40;
static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
- 716;
+ 720;
static constexpr dart::compiler::target::word
AOT_TimelineStream_enabled_offset = 8;
static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -6313,7 +6313,7 @@
4, 12, 8, 16};
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_wrappers_thread_offset[] = {
- 656, 660, 664, 668, 672, -1, 676, -1, 680, 684, -1, -1, -1, -1, -1, -1};
+ 660, 664, 668, 672, 676, -1, 680, -1, 684, 688, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 8;
static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 12;
static constexpr dart::compiler::target::word AOT_Array_header_size = 12;
@@ -6647,9 +6647,9 @@
static constexpr dart::compiler::target::word
AOT_Thread_AllocateArray_entry_point_offset = 728;
static constexpr dart::compiler::target::word
- AOT_Thread_active_exception_offset = 1392;
+ AOT_Thread_active_exception_offset = 1400;
static constexpr dart::compiler::target::word
- AOT_Thread_active_stacktrace_offset = 1400;
+ AOT_Thread_active_stacktrace_offset = 1408;
static constexpr dart::compiler::target::word
AOT_Thread_array_write_barrier_code_offset = 232;
static constexpr dart::compiler::target::word
@@ -6675,7 +6675,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_allocate_object_slow_stub_offset = 384;
static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
- 1464;
+ 1472;
static constexpr dart::compiler::target::word
AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 656;
static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
@@ -6688,7 +6688,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 264;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1480;
+ 1488;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 96;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -6707,7 +6707,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_enter_safepoint_stub_offset = 488;
static constexpr dart::compiler::target::word
- AOT_Thread_execution_state_offset = 1432;
+ AOT_Thread_execution_state_offset = 1440;
static constexpr dart::compiler::target::word
AOT_Thread_exit_safepoint_stub_offset = 496;
static constexpr dart::compiler::target::word
@@ -6727,11 +6727,11 @@
static constexpr dart::compiler::target::word
AOT_Thread_float_zerow_address_offset = 720;
static constexpr dart::compiler::target::word
- AOT_Thread_global_object_pool_offset = 1408;
+ AOT_Thread_global_object_pool_offset = 1416;
static constexpr dart::compiler::target::word
AOT_Thread_invoke_dart_code_stub_offset = 256;
static constexpr dart::compiler::target::word
- AOT_Thread_exit_through_ffi_offset = 1456;
+ AOT_Thread_exit_through_ffi_offset = 1464;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 136;
@@ -6777,11 +6777,11 @@
static constexpr dart::compiler::target::word
AOT_Thread_predefined_symbols_address_offset = 664;
static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
- 1416;
+ 1424;
static constexpr dart::compiler::target::word
- AOT_Thread_saved_shadow_call_stack_offset = 1424;
+ AOT_Thread_saved_shadow_call_stack_offset = 1432;
static constexpr dart::compiler::target::word
- AOT_Thread_safepoint_state_offset = 1440;
+ AOT_Thread_safepoint_state_offset = 1448;
static constexpr dart::compiler::target::word
AOT_Thread_slow_type_test_stub_offset = 472;
static constexpr dart::compiler::target::word
@@ -6817,7 +6817,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_mask_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
- 1448;
+ 1456;
static constexpr dart::compiler::target::word
AOT_TimelineStream_enabled_offset = 16;
static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -6879,8 +6879,8 @@
8, 24, 16, 32};
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_wrappers_thread_offset[] = {
- 1304, 1312, 1320, 1328, -1, -1, 1336, 1344,
- 1352, 1360, 1368, -1, 1376, 1384, -1, -1};
+ 1312, 1320, 1328, 1336, -1, -1, 1344, 1352,
+ 1360, 1368, 1376, -1, 1384, 1392, -1, -1};
static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Array_header_size = 24;
@@ -7217,9 +7217,9 @@
static constexpr dart::compiler::target::word
AOT_Thread_AllocateArray_entry_point_offset = 728;
static constexpr dart::compiler::target::word
- AOT_Thread_active_exception_offset = 1464;
+ AOT_Thread_active_exception_offset = 1472;
static constexpr dart::compiler::target::word
- AOT_Thread_active_stacktrace_offset = 1472;
+ AOT_Thread_active_stacktrace_offset = 1480;
static constexpr dart::compiler::target::word
AOT_Thread_array_write_barrier_code_offset = 232;
static constexpr dart::compiler::target::word
@@ -7245,7 +7245,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_allocate_object_slow_stub_offset = 384;
static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
- 1536;
+ 1544;
static constexpr dart::compiler::target::word
AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 656;
static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
@@ -7258,7 +7258,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 264;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1552;
+ 1560;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 96;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -7277,7 +7277,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_enter_safepoint_stub_offset = 488;
static constexpr dart::compiler::target::word
- AOT_Thread_execution_state_offset = 1504;
+ AOT_Thread_execution_state_offset = 1512;
static constexpr dart::compiler::target::word
AOT_Thread_exit_safepoint_stub_offset = 496;
static constexpr dart::compiler::target::word
@@ -7297,11 +7297,11 @@
static constexpr dart::compiler::target::word
AOT_Thread_float_zerow_address_offset = 720;
static constexpr dart::compiler::target::word
- AOT_Thread_global_object_pool_offset = 1480;
+ AOT_Thread_global_object_pool_offset = 1488;
static constexpr dart::compiler::target::word
AOT_Thread_invoke_dart_code_stub_offset = 256;
static constexpr dart::compiler::target::word
- AOT_Thread_exit_through_ffi_offset = 1528;
+ AOT_Thread_exit_through_ffi_offset = 1536;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 136;
@@ -7347,11 +7347,11 @@
static constexpr dart::compiler::target::word
AOT_Thread_predefined_symbols_address_offset = 664;
static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
- 1488;
+ 1496;
static constexpr dart::compiler::target::word
- AOT_Thread_saved_shadow_call_stack_offset = 1496;
+ AOT_Thread_saved_shadow_call_stack_offset = 1504;
static constexpr dart::compiler::target::word
- AOT_Thread_safepoint_state_offset = 1512;
+ AOT_Thread_safepoint_state_offset = 1520;
static constexpr dart::compiler::target::word
AOT_Thread_slow_type_test_stub_offset = 472;
static constexpr dart::compiler::target::word
@@ -7387,7 +7387,7 @@
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_mask_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
- 1520;
+ 1528;
static constexpr dart::compiler::target::word
AOT_TimelineStream_enabled_offset = 16;
static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -7449,9 +7449,9 @@
8, 24, 16, 32};
static constexpr dart::compiler::target::word
AOT_Thread_write_barrier_wrappers_thread_offset[] = {
- 1304, 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384,
- 1392, 1400, 1408, 1416, -1, -1, -1, -1, 1424, 1432, -1,
- -1, 1440, 1448, 1456, -1, -1, -1, -1, -1, -1};
+ 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392,
+ 1400, 1408, 1416, 1424, -1, -1, -1, -1, 1432, 1440, -1,
+ -1, 1448, 1456, 1464, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 24;
static constexpr dart::compiler::target::word AOT_Array_header_size = 24;
diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc
index 5456c29..8295e00 100644
--- a/runtime/vm/compiler/stub_code_compiler.cc
+++ b/runtime/vm/compiler/stub_code_compiler.cc
@@ -121,7 +121,7 @@
__ Bind(&throw_exception);
__ PushObject(NullObject()); // Make room for (unused) result.
__ PushRegister(kFieldReg);
- __ CallRuntime(kLateInitializationErrorRuntimeEntry,
+ __ CallRuntime(kLateFieldAssignedDuringInitializationErrorRuntimeEntry,
/*argument_count=*/1);
__ Breakpoint();
}
@@ -692,7 +692,8 @@
bool with_fpu_regs) {
auto perform_runtime_call = [&]() {
__ PushRegister(LateInitializationErrorABI::kFieldReg);
- __ CallRuntime(kLateInitializationErrorRuntimeEntry, /*argument_count=*/1);
+ __ CallRuntime(kLateFieldNotInitializedErrorRuntimeEntry,
+ /*argument_count=*/1);
};
GenerateSharedStubGeneric(
assembler, /*save_fpu_registers=*/with_fpu_regs,
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index d67906f..6cc253e 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -1104,10 +1104,18 @@
Exceptions::ThrowByType(Exceptions::kCompileTimeError, args);
}
-void Exceptions::ThrowLateInitializationError(const String& name) {
+void Exceptions::ThrowLateFieldNotInitialized(const String& name) {
const Array& args = Array::Handle(Array::New(1));
args.SetAt(0, name);
- Exceptions::ThrowByType(Exceptions::kLateInitializationError, args);
+ Exceptions::ThrowByType(Exceptions::kLateFieldNotInitialized, args);
+}
+
+void Exceptions::ThrowLateFieldAssignedDuringInitialization(
+ const String& name) {
+ const Array& args = Array::Handle(Array::New(1));
+ args.SetAt(0, name);
+ Exceptions::ThrowByType(Exceptions::kLateFieldAssignedDuringInitialization,
+ args);
}
ObjectPtr Exceptions::Create(ExceptionType type, const Array& arguments) {
@@ -1197,9 +1205,15 @@
library = Library::CoreLibrary();
class_name = &Symbols::_CompileTimeError();
break;
- case kLateInitializationError:
- library = Library::CoreLibrary();
- class_name = &Symbols::LateInitializationError();
+ case kLateFieldAssignedDuringInitialization:
+ library = Library::InternalLibrary();
+ class_name = &Symbols::LateError();
+ constructor_name = &Symbols::DotFieldADI();
+ break;
+ case kLateFieldNotInitialized:
+ library = Library::InternalLibrary();
+ class_name = &Symbols::LateError();
+ constructor_name = &Symbols::DotFieldNI();
break;
}
diff --git a/runtime/vm/exceptions.h b/runtime/vm/exceptions.h
index e7b52e5..20aef13 100644
--- a/runtime/vm/exceptions.h
+++ b/runtime/vm/exceptions.h
@@ -67,7 +67,8 @@
kAbstractClassInstantiation,
kCyclicInitializationError,
kCompileTimeError,
- kLateInitializationError,
+ kLateFieldAssignedDuringInitialization,
+ kLateFieldNotInitialized,
};
DART_NORETURN static void ThrowByType(ExceptionType type,
@@ -83,7 +84,9 @@
intptr_t expected_to);
DART_NORETURN static void ThrowUnsupportedError(const char* msg);
DART_NORETURN static void ThrowCompileTimeError(const LanguageError& error);
- DART_NORETURN static void ThrowLateInitializationError(const String& name);
+ DART_NORETURN static void ThrowLateFieldAssignedDuringInitialization(
+ const String& name);
+ DART_NORETURN static void ThrowLateFieldNotInitialized(const String& name);
// Returns a RawInstance if the exception is successfully created,
// otherwise returns a RawError.
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 44d23c2..5fa7d0e 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -10453,7 +10453,7 @@
}
} else {
if (is_late() && !has_initializer()) {
- Exceptions::ThrowLateInitializationError(String::Handle(name()));
+ Exceptions::ThrowLateFieldNotInitialized(String::Handle(name()));
UNREACHABLE();
}
#if defined(DART_PRECOMPILED_RUNTIME)
@@ -10467,7 +10467,8 @@
ASSERT(value.IsNull() || value.IsInstance());
if (is_late() && is_final() &&
(instance.GetField(*this) != Object::sentinel().raw())) {
- Exceptions::ThrowLateInitializationError(String::Handle(name()));
+ Exceptions::ThrowLateFieldAssignedDuringInitialization(
+ String::Handle(name()));
UNREACHABLE();
}
instance.SetField(*this, value);
@@ -10481,7 +10482,7 @@
auto& value = Object::Handle();
if (is_late()) {
if (!has_initializer()) {
- Exceptions::ThrowLateInitializationError(String::Handle(name()));
+ Exceptions::ThrowLateFieldNotInitialized(String::Handle(name()));
UNREACHABLE();
}
value = EvaluateInitializer();
@@ -10489,7 +10490,8 @@
return Error::Cast(value).raw();
}
if (is_final() && (StaticValue() != Object::sentinel().raw())) {
- Exceptions::ThrowLateInitializationError(String::Handle(name()));
+ Exceptions::ThrowLateFieldAssignedDuringInitialization(
+ String::Handle(name()));
UNREACHABLE();
}
} else {
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index baf79d3..0a13543 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -3161,9 +3161,15 @@
arguments.SetReturn(result);
}
-DEFINE_RUNTIME_ENTRY(LateInitializationError, 1) {
+DEFINE_RUNTIME_ENTRY(LateFieldAssignedDuringInitializationError, 1) {
const Field& field = Field::CheckedHandle(zone, arguments.ArgAt(0));
- Exceptions::ThrowLateInitializationError(String::Handle(field.name()));
+ Exceptions::ThrowLateFieldAssignedDuringInitialization(
+ String::Handle(field.name()));
+}
+
+DEFINE_RUNTIME_ENTRY(LateFieldNotInitializedError, 1) {
+ const Field& field = Field::CheckedHandle(zone, arguments.ArgAt(0));
+ Exceptions::ThrowLateFieldNotInitialized(String::Handle(field.name()));
}
DEFINE_RUNTIME_ENTRY(NotLoaded, 0) {
diff --git a/runtime/vm/runtime_entry_list.h b/runtime/vm/runtime_entry_list.h
index 40f5bd8..34ac296 100644
--- a/runtime/vm/runtime_entry_list.h
+++ b/runtime/vm/runtime_entry_list.h
@@ -50,7 +50,8 @@
V(UpdateFieldCid) \
V(InitInstanceField) \
V(InitStaticField) \
- V(LateInitializationError) \
+ V(LateFieldAssignedDuringInitializationError) \
+ V(LateFieldNotInitializedError) \
V(CompileFunction) \
V(SwitchableCallMiss) \
V(NotLoaded)
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 4ea837a..1e408f1 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -64,7 +64,6 @@
V(Current, "current") \
V(CurrentContextVar, ":current_context_var") \
V(CyclicInitializationError, "CyclicInitializationError") \
- V(LateInitializationError, "_LateInitializationError") \
V(DartAsync, "dart:async") \
V(DartCollection, "dart:collection") \
V(DartCore, "dart:core") \
@@ -94,6 +93,8 @@
V(Default, "Default") \
V(DefaultLabel, ":L") \
V(DotCreate, "._create") \
+ V(DotFieldNI, ".fieldNI") \
+ V(DotFieldADI, ".fieldADI") \
V(DotRange, ".range") \
V(DotUnder, "._") \
V(DotValue, ".value") \
@@ -196,6 +197,7 @@
V(IteratorParameter, ":iterator") \
V(KernelProgramInfo, "KernelProgramInfo") \
V(LanguageError, "LanguageError") \
+ V(LateError, "LateError") \
V(LeftShiftOperator, "<<") \
V(Length, "length") \
V(LessEqualOperator, "<=") \
diff --git a/sdk/lib/_internal/vm/lib/errors_patch.dart b/sdk/lib/_internal/vm/lib/errors_patch.dart
index 75776ec..a33b803 100644
--- a/sdk/lib/_internal/vm/lib/errors_patch.dart
+++ b/sdk/lib/_internal/vm/lib/errors_patch.dart
@@ -44,8 +44,8 @@
static _doThrowNew(int assertionStart, int assertionEnd, Object? message)
native "AssertionError_throwNew";
- static _doThrowNewSource(String failedAssertion, int line, int column, Object? message)
- native "AssertionError_throwNewSource";
+ static _doThrowNewSource(String failedAssertion, int line, int column,
+ Object? message) native "AssertionError_throwNewSource";
@pragma("vm:entry-point", "call")
static _evaluateAssertion(condition) {
@@ -494,18 +494,3 @@
toString() => "Error: field '$_name' is already initialized.";
}
-
-class _LateInitializationError extends Error
- implements LateInitializationError {
- @pragma("vm:entry-point")
- _LateInitializationError(this._name);
-
- @pragma("vm:entry-point")
- static void _throwNew(String name) {
- throw _LateInitializationError(name);
- }
-
- String toString() => "LateInitializationError: $_name";
-
- final String _name;
-}
diff --git a/sdk/lib/_internal/vm/lib/internal_patch.dart b/sdk/lib/_internal/vm/lib/internal_patch.dart
index 1566701..24f9461 100644
--- a/sdk/lib/_internal/vm/lib/internal_patch.dart
+++ b/sdk/lib/_internal/vm/lib/internal_patch.dart
@@ -195,3 +195,21 @@
@patch
bool isSentinel(dynamic value) => throw UnsupportedError('isSentinel');
+
+@patch
+class LateError {
+ @pragma("vm:entry-point")
+ static _throwFieldAlreadyInitialized(String fieldName) {
+ throw new LateError.fieldAI(fieldName);
+ }
+
+ @pragma("vm:entry-point")
+ static _throwLocalNotInitialized(String localName) {
+ throw new LateError.localNI(localName);
+ }
+
+ @pragma("vm:entry-point")
+ static _throwLocalAlreadyInitialized(String localName) {
+ throw new LateError.localAI(localName);
+ }
+}
diff --git a/sdk/lib/internal/errors.dart b/sdk/lib/internal/errors.dart
index 5f8ca81..3fe6e40 100644
--- a/sdk/lib/internal/errors.dart
+++ b/sdk/lib/internal/errors.dart
@@ -12,10 +12,12 @@
// The constructor names have been deliberately shortened to reduce the size
// of unminified code as used by DDC.
+ @pragma("vm:entry-point")
LateError.fieldADI(String fieldName)
: _message =
"Field '$fieldName' has been assigned during initialization.";
+ @pragma("vm:entry-point")
LateError.fieldNI(String fieldName)
: _message = "Field '${fieldName}' has not been initialized.";
diff --git a/tests/language/language.status b/tests/language/language.status
index b8da9a3..5739de1 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -2,6 +2,9 @@
# 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.
+[ $builder_tag == obfuscated ]
+nnbd/syntax/late_modifier_runtime_error_test: SkipByDesign # Names are obfuscated in error messages
+
[ $compiler != dart2analyzer ]
switch/case_warn_test: Skip # Analyzer only, see language_analyzer2.status
diff --git a/tests/language/nnbd/syntax/late_modifier_runtime_error_test.dart b/tests/language/nnbd/syntax/late_modifier_runtime_error_test.dart
new file mode 100644
index 0000000..851d225
--- /dev/null
+++ b/tests/language/nnbd/syntax/late_modifier_runtime_error_test.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2020, 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.
+
+import 'package:expect/expect.dart';
+
+class A {
+ static late int sf1;
+ static late final int sf2;
+ static late final int sf3 = recursiveInitSf3();
+
+ static bool doRecursiveInitSf3 = true;
+ static int recursiveInitSf3() {
+ if (doRecursiveInitSf3) {
+ doRecursiveInitSf3 = false;
+ return sf3; // Trigger initialization recursively.
+ }
+ return 3;
+ }
+
+ late int f1;
+ late final int f2;
+ late final int f3 = recursiveInitF3();
+
+ bool doRecursiveInitF3 = true;
+ int recursiveInitF3() {
+ if (doRecursiveInitF3) {
+ doRecursiveInitF3 = false;
+ return f3; // Trigger initialization recursively.
+ }
+ return 3;
+ }
+}
+
+bool isValidError(error, String message) {
+ if (error is LateInitializationError) {
+ Expect.equals('LateInitializationError: $message', error.toString());
+ return true;
+ }
+ return false;
+}
+
+main() {
+ // Static fields.
+
+ Expect.throws(() => A.sf1,
+ (e) => isValidError(e, "Field 'sf1' has not been initialized."));
+ Expect.throws(() => A.sf2,
+ (e) => isValidError(e, "Field 'sf2' has not been initialized."));
+ A.sf2 = 42;
+ Expect.throws(() {
+ A.sf2 = 2;
+ }, (e) => isValidError(e, "Field 'sf2' has already been initialized."));
+ Expect.throws(
+ () => A.sf3,
+ (e) => isValidError(
+ e, "Field 'sf3' has been assigned during initialization."));
+
+ // Instance fields.
+
+ A obj = A();
+ Expect.throws(() => obj.f1,
+ (e) => isValidError(e, "Field 'f1' has not been initialized."));
+ Expect.throws(() => obj.f2,
+ (e) => isValidError(e, "Field 'f2' has not been initialized."));
+ obj.f2 = 42;
+ Expect.throws(() {
+ obj.f2 = 2;
+ }, (e) => isValidError(e, "Field 'f2' has already been initialized."));
+ Expect.throws(
+ () => obj.f3,
+ (e) => isValidError(
+ e, "Field 'f3' has been assigned during initialization."));
+
+ // Local variables.
+ late int local1;
+ late final int local2;
+
+ late int Function() recursiveInitLocal3;
+ late final int local3 = recursiveInitLocal3();
+
+ bool doRecursiveInitLocal3 = true;
+ recursiveInitLocal3 = () {
+ if (doRecursiveInitLocal3) {
+ doRecursiveInitLocal3 = false;
+ return local3; // Trigger initialization recursively.
+ }
+ return 3;
+ };
+
+ // Avoid compile-time error "Late variable 'local1' without initializer is
+ // definitely unassigned."
+ if (int.parse('1') == 2) {
+ local1 = -1;
+ }
+
+ Expect.throws(() => local1,
+ (e) => isValidError(e, "Local 'local1' has not been initialized."));
+ Expect.throws(() => local2,
+ (e) => isValidError(e, "Local 'local2' has not been initialized."));
+ // Assignment is conditional to avoid compile-time error "Late final variable
+ // 'local2' definitely assigned."
+ if (int.parse('1') == 1) {
+ local2 = 42;
+ }
+ Expect.throws(() {
+ local2 = 2;
+ }, (e) => isValidError(e, "Local 'local2' has already been initialized."));
+ // Uncomment after https://github.com/dart-lang/sdk/issues/44372 is fixed.
+ // Expect.throws(() => local3,
+ // (e) => isValidError(e, "Local 'local3' has already been initialized."));
+}