From a666dd0846131dc9e45822bb398628e9bcbc1c73 Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Mon, 28 Oct 2024 20:30:58 +0400 Subject: [PATCH 01/11] here we go again --- runtime/vm/stack_frame.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc index 401bccf96b73..f2e573652bcb 100644 --- a/runtime/vm/stack_frame.cc +++ b/runtime/vm/stack_frame.cc @@ -151,7 +151,6 @@ bool StackFrame::IsStubFrame() const { if (FLAG_precompiled_mode) { return IsBareInstructionsStubFrame(); } - ASSERT(!(IsEntryFrame() || IsExitFrame())); #if !defined(DART_HOST_OS_WINDOWS) && !defined(DART_HOST_OS_FUCHSIA) // On Windows and Fuchsia, the profiler calls this from a separate thread From b7ae8adc9fc70f6b01fb977fe61400346d66be91 Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Mon, 28 Oct 2024 20:31:15 +0400 Subject: [PATCH 02/11] fibers --- runtime/vm/stack_frame.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc index f2e573652bcb..401bccf96b73 100644 --- a/runtime/vm/stack_frame.cc +++ b/runtime/vm/stack_frame.cc @@ -151,6 +151,7 @@ bool StackFrame::IsStubFrame() const { if (FLAG_precompiled_mode) { return IsBareInstructionsStubFrame(); } + ASSERT(!(IsEntryFrame() || IsExitFrame())); #if !defined(DART_HOST_OS_WINDOWS) && !defined(DART_HOST_OS_FUCHSIA) // On Windows and Fuchsia, the profiler calls this from a separate thread From a655c40781b5178da0e922e581b60e21ff782e09 Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Tue, 29 Oct 2024 23:43:19 +0400 Subject: [PATCH 03/11] enable debug for sdk --- runtime/vm/compiler/backend/il.cc | 3 +-- runtime/vm/stack_frame.cc | 2 +- runtime/vm/thread.cc | 2 +- sdk/BUILD.gn | 23 +++++++++++++++++------ 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc index eceee1dbc7f8..5d4c27dcae56 100644 --- a/runtime/vm/compiler/backend/il.cc +++ b/runtime/vm/compiler/backend/il.cc @@ -8614,8 +8614,7 @@ void CoroutineTransferInstr::EmitNativeCode(FlowGraphCompiler* compiler) { __ LoadFieldFromOffset(SPREG, kToCoroutine, Coroutine::stack_base_offset()); __ PopRegister(FPREG); if (!FLAG_precompiled_mode) __ RestoreCodePointer(); - if (FLAG_precompiled_mode) - __ movq(PP, compiler::Address(THR, Thread::global_object_pool_offset())); + if (FLAG_precompiled_mode) __ movq(PP, compiler::Address(THR, Thread::global_object_pool_offset())); __ LoadFieldFromOffset(kToStackLimit, kToCoroutine, Coroutine::overflow_stack_limit_offset()); __ StoreToOffset(kToCoroutine, THR, Thread::coroutine_offset()); diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc index 401bccf96b73..8bc389db7bfb 100644 --- a/runtime/vm/stack_frame.cc +++ b/runtime/vm/stack_frame.cc @@ -625,7 +625,7 @@ void StackFrameIterator::FrameSetIterator::Unpoison() { StackFrame* StackFrameIterator::FrameSetIterator::NextFrame(bool validate) { StackFrame* frame; ASSERT(HasNext()); - if (StubCode::InCoroutineStub(stack_frame_.pc_)) { + if (StubCode::InCoroutineStub(pc_)) { frame = &stack_frame_; frame->sp_ = sp_; frame->fp_ = fp_; diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc index f7baaf5032f7..af4c98558a96 100644 --- a/runtime/vm/thread.cc +++ b/runtime/vm/thread.cc @@ -851,7 +851,7 @@ ErrorPtr Thread::HandleInterrupts() { } #endif // !defined(PRODUCT) - OS::Print("After ProcessCompletedBlocks"); + OS::Print("After ProcessCompletedBlocks\n "); #if !defined(PRODUCT) || defined(FORCE_INCLUDE_SAMPLING_HEAP_PROFILER) HeapProfileSampler& sampler = heap_sampler(); diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index f6fb6be7f5b3..642d0586dda6 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -21,10 +21,12 @@ import("../utils/application_snapshot.gni") declare_args() { # Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries. dart_platform_sdk = true + dart_use_precompiled_runtime_product = false # Path to stripped dart binaries relative to build output directory. dart_stripped_binary = "dart" dart_precompiled_runtime_stripped_binary = "dart_precompiled_runtime_product" + dart_precompiled_runtime_binary = "dart_precompiled_runtime" gen_snapshot_stripped_binary = "gen_snapshot_product" analyze_snapshot_binary = "analyze_snapshot" wasm_opt_stripped_binary = "wasm-opt" @@ -299,12 +301,21 @@ if (target_os != current_os && target_os == "fuchsia") { copy("copy_dartaotruntime") { visibility = [ ":group_dart2native" ] - deps = [ "../runtime/bin:dart_precompiled_runtime_product" ] - src_dir = get_label_info("../runtime/bin:dart_precompiled_runtime_product", - "root_out_dir") - sources = [ - "$src_dir/${dart_precompiled_runtime_stripped_binary}${executable_suffix}", - ] + if (dart_use_precompiled_runtime_product) { + deps = [ "../runtime/bin:dart_precompiled_runtime_product" ] + src_dir = get_label_info("../runtime/bin:dart_precompiled_runtime_product", + "root_out_dir") + sources = [ + "$src_dir/${dart_precompiled_runtime_stripped_binary}${executable_suffix}", + ] + } else { + deps = [ "../runtime/bin:dart_precompiled_runtime" ] + src_dir = get_label_info("../runtime/bin:dart_precompiled_runtime", + "root_out_dir") + sources = [ + "$src_dir/${dart_precompiled_runtime_binary}${executable_suffix}", + ] + } outputs = [ "$root_out_dir/$dart_sdk_output/bin/dartaotruntime${executable_suffix}", ] From 8eed1e187b344376d5a37d72ba67178bd4c956f1 Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Tue, 29 Oct 2024 23:47:56 +0400 Subject: [PATCH 04/11] fixes --- runtime/vm/heap/marker.cc | 2 -- runtime/vm/heap/pages.cc | 2 -- runtime/vm/thread.cc | 8 -------- sdk/BUILD.gn | 2 +- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/runtime/vm/heap/marker.cc b/runtime/vm/heap/marker.cc index 5b4e5ddc6a2f..6e0466f6f23c 100644 --- a/runtime/vm/heap/marker.cc +++ b/runtime/vm/heap/marker.cc @@ -747,7 +747,6 @@ void GCMarker::ResetSlices() { } void GCMarker::IterateRoots(ObjectPointerVisitor* visitor) { - OS::Print("IterateRoots start\n"); for (;;) { intptr_t slice = root_slices_started_.fetch_add(1); if (slice >= root_slices_count_) { @@ -776,7 +775,6 @@ void GCMarker::IterateRoots(ObjectPointerVisitor* visitor) { ml.Notify(); } } - OS::Print("IterateRoots end\n"); } enum WeakSlices { diff --git a/runtime/vm/heap/pages.cc b/runtime/vm/heap/pages.cc index df52417afc94..adcf581cc0c2 100644 --- a/runtime/vm/heap/pages.cc +++ b/runtime/vm/heap/pages.cc @@ -1067,9 +1067,7 @@ void PageSpace::CollectGarbageHelper(Thread* thread, // Abandon the remainder of the bump allocation block. ReleaseBumpAllocation(); - OS::Print("MarkObjects start\n"); marker_->MarkObjects(this); - OS::Print("MarkObjects end\n"); usage_.used_in_words = marker_->marked_words() + allocated_black_in_words_; allocated_black_in_words_ = 0; mark_words_per_micro_ = marker_->MarkedWordsPerMicro(); diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc index af4c98558a96..a61a41ed1c83 100644 --- a/runtime/vm/thread.cc +++ b/runtime/vm/thread.cc @@ -841,9 +841,7 @@ ErrorPtr Thread::HandleInterrupts() { // occur that does promote them. heap()->CollectGarbage(this, GCType::kEvacuate, GCReason::kStoreBuffer); } - OS::Print("After CollectGarbage\n"); heap()->CheckFinalizeMarking(this); - OS::Print("After CheckFinalizeMarking\n"); #if !defined(PRODUCT) if (isolate()->TakeHasCompletedBlocks()) { @@ -851,8 +849,6 @@ ErrorPtr Thread::HandleInterrupts() { } #endif // !defined(PRODUCT) - OS::Print("After ProcessCompletedBlocks\n "); - #if !defined(PRODUCT) || defined(FORCE_INCLUDE_SAMPLING_HEAP_PROFILER) HeapProfileSampler& sampler = heap_sampler(); if (sampler.ShouldSetThreadSamplingInterval()) { @@ -1104,8 +1100,6 @@ void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor, const StackFrameIterator::CrossThreadPolicy cross_thread_policy = StackFrameIterator::kAllowCrossThreadIteration; - OS::Print("Thread::VisitObjectPointers\n"); - // Iterate over all the stack frames and visit objects on the stack. StackFrameIterator frames_iterator(top_exit_frame_info(), validation_policy, this, cross_thread_policy); @@ -1120,8 +1114,6 @@ void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor, // We are not on the mutator thread. RELEASE_ASSERT(top_exit_frame_info() == 0); } - - OS::Print("Thread::VisitObjectPointers end\n"); } class RestoreWriteBarrierInvariantVisitor : public ObjectPointerVisitor { diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 642d0586dda6..08fddf6df880 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -21,7 +21,7 @@ import("../utils/application_snapshot.gni") declare_args() { # Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries. dart_platform_sdk = true - dart_use_precompiled_runtime_product = false + dart_use_precompiled_runtime_product = !dart_debug # Path to stripped dart binaries relative to build output directory. dart_stripped_binary = "dart" From cf42a2a80112648eee85054aa40f5f0a4d68cbf9 Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Wed, 30 Oct 2024 00:23:38 +0400 Subject: [PATCH 05/11] fixes --- runtime/platform/globals.h | 2 +- runtime/vm/runtime_entry.cc | 2 +- runtime/vm/stack_frame.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h index 29bbb969d1dd..ec0714d4365e 100644 --- a/runtime/platform/globals.h +++ b/runtime/platform/globals.h @@ -89,7 +89,7 @@ #include #include #include - +#include #include // For assert() in constant expressions. #if defined(_WIN32) diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc index ee67d190b43a..b35045784946 100644 --- a/runtime/vm/runtime_entry.cc +++ b/runtime/vm/runtime_entry.cc @@ -3880,7 +3880,7 @@ DEFINE_RUNTIME_ENTRY(EnterCoroutine, 1) { } DEFINE_RUNTIME_ENTRY(ExitCoroutine, 1) { - auto& coroutine = Coroutine::CheckedHandle(zone, arguments.ArgAt(0)); + auto& coroutine = Coroutine::CheckedHandle(zone, thread->coroutine()); coroutine.HandleRootExit(thread, zone); } diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc index 8bc389db7bfb..3cfff5ff3506 100644 --- a/runtime/vm/stack_frame.cc +++ b/runtime/vm/stack_frame.cc @@ -646,7 +646,7 @@ StackFrame* StackFrameIterator::FrameSetIterator::NextFrame(bool validate) { fp_ = frame->GetCallerFp(); pc_ = frame->GetCallerPc(); Unpoison(); - ASSERT(!validate || frame->IsValid()); + OS::Print(" pc 0x%" Pp " fp 0x%" Pp " sp 0x%" Pp "\n", pc_, fp_, sp_);ASSERT(!validate || frame->IsValid()); return frame; } From e1d34a57227ba951cc11d74c3a4ef8d28ab1c6ba Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Wed, 30 Oct 2024 21:35:03 +0400 Subject: [PATCH 06/11] fixes --- runtime/vm/compiler/stub_code_compiler.cc | 8 ++------ runtime/vm/runtime_entry.cc | 12 ++++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc index 058c9ba6ef98..b0802362dafc 100644 --- a/runtime/vm/compiler/stub_code_compiler.cc +++ b/runtime/vm/compiler/stub_code_compiler.cc @@ -3270,9 +3270,7 @@ void StubCodeCompiler::GenerateCoroutineInitializeStub() { if (FLAG_precompiled_mode) __ movq(PP, compiler::Address(THR, Thread::global_object_pool_offset())); __ PushObject(compiler::NullObject()); - __ PushRegister(kCoroutine); - __ CallRuntime(kExitCoroutineRuntimeEntry, 1); - __ PopRegister(kCoroutine); + __ CallRuntime(kExitCoroutineRuntimeEntry, 0); __ Drop(1); __ LeaveStubFrame(); @@ -3320,9 +3318,7 @@ void StubCodeCompiler::GenerateCoroutineForkStub() { __ movq(PP, compiler::Address(THR, Thread::global_object_pool_offset())); __ PushObject(compiler::NullObject()); - __ PushRegister(kForkedCoroutine); - __ CallRuntime(kExitForkedCoroutineRuntimeEntry, 1); - __ PopRegister(kForkedCoroutine); + __ CallRuntime(kExitForkedCoroutineRuntimeEntry, 0); __ Drop(1); __ LeaveStubFrame(); diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc index b35045784946..5e5408a1fb25 100644 --- a/runtime/vm/runtime_entry.cc +++ b/runtime/vm/runtime_entry.cc @@ -3879,19 +3879,19 @@ DEFINE_RUNTIME_ENTRY(EnterCoroutine, 1) { coroutine.HandleRootEnter(thread, zone); } -DEFINE_RUNTIME_ENTRY(ExitCoroutine, 1) { +DEFINE_RUNTIME_ENTRY(ExitCoroutine, 0) { auto& coroutine = Coroutine::CheckedHandle(zone, thread->coroutine()); coroutine.HandleRootExit(thread, zone); } DEFINE_RUNTIME_ENTRY(EnterForkedCoroutine, 1) { - auto& forked = Coroutine::CheckedHandle(zone, arguments.ArgAt(0)); - forked.HandleForkedEnter(thread, zone); + auto& coroutine = Coroutine::CheckedHandle(zone, arguments.ArgAt(0)); + coroutine.HandleForkedEnter(thread, zone); } -DEFINE_RUNTIME_ENTRY(ExitForkedCoroutine, 1) { - auto& forked = Coroutine::CheckedHandle(zone, arguments.ArgAt(0)); - forked.HandleForkedExit(thread, zone); +DEFINE_RUNTIME_ENTRY(ExitForkedCoroutine, 0) { + auto& coroutine = Coroutine::CheckedHandle(zone, thread->coroutine()); + coroutine.HandleForkedExit(thread, zone); } DEFINE_RUNTIME_ENTRY(JumpToFrameCoroutine, 2) { From 05987dd3580486b0e0c255149a25d105f1d30b1f Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Wed, 30 Oct 2024 23:58:37 +0400 Subject: [PATCH 07/11] visit coroutines --- runtime/vm/compiler/backend/range_analysis.cc | 2 - runtime/vm/compiler/backend/slot.cc | 2 - runtime/vm/compiler/backend/slot.h | 8 +- runtime/vm/compiler/frontend/kernel_to_il.cc | 26 +- .../vm/compiler/runtime_offsets_extracted.h | 1042 ++++++++--------- runtime/vm/heap/compactor.cc | 22 +- runtime/vm/heap/compactor.h | 6 +- runtime/vm/heap/incremental_compactor.cc | 29 +- runtime/vm/object.cc | 21 +- runtime/vm/object.h | 39 +- runtime/vm/raw_object.cc | 50 +- runtime/vm/raw_object.h | 11 +- runtime/vm/stack_frame.cc | 41 +- runtime/vm/stack_frame.h | 22 +- runtime/vm/visitor.h | 4 + .../js_dev_runtime/patch/fiber_patch.dart | 2 - .../_internal/js_runtime/lib/fiber_patch.dart | 2 - sdk/lib/_internal/vm/lib/fiber_patch.dart | 4 - sdk/lib/_internal/wasm/lib/fiber_patch.dart | 2 - sdk/lib/fiber/fiber.dart | 1 - 20 files changed, 736 insertions(+), 600 deletions(-) diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc index be38fc1063d8..3c4a0bf8f544 100644 --- a/runtime/vm/compiler/backend/range_analysis.cc +++ b/runtime/vm/compiler/backend/range_analysis.cc @@ -2836,8 +2836,6 @@ void LoadFieldInstr::InferRange(RangeAnalysis* analysis, Range* range) { case Slot::Kind::kTypedDataBase_length: case Slot::Kind::kTypedDataView_offset_in_bytes: - case Slot::Kind::kCoroutine_attributes: - case Slot::Kind::kCoroutine_index: *range = Range(RangeBoundary::FromConstant(0), RangeBoundary::MaxSmi()); break; diff --git a/runtime/vm/compiler/backend/slot.cc b/runtime/vm/compiler/backend/slot.cc index a5dd62548485..522bd7836ab0 100644 --- a/runtime/vm/compiler/backend/slot.cc +++ b/runtime/vm/compiler/backend/slot.cc @@ -239,8 +239,6 @@ bool Slot::IsImmutableLengthSlot() const { case Slot::Kind::kClosure_hash: case Slot::Kind::kRecord_shape: case Slot::Kind::kAbstractType_hash: - case Slot::Kind::kCoroutine_attributes: - case Slot::Kind::kCoroutine_index: return false; } UNREACHABLE(); diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h index 5f878ef11249..2c059c6e818e 100644 --- a/runtime/vm/compiler/backend/slot.h +++ b/runtime/vm/compiler/backend/slot.h @@ -125,9 +125,7 @@ class ParsedFunction; V(Record, UntaggedRecord, shape, Smi, FINAL) \ V(TypeArguments, UntaggedTypeArguments, hash, Smi, VAR) \ V(TypeArguments, UntaggedTypeArguments, length, Smi, FINAL) \ - V(AbstractType, UntaggedTypeArguments, hash, Smi, VAR) \ - V(Coroutine, UntaggedCoroutine, index, Smi, VAR) \ - V(Coroutine, UntaggedCoroutine, attributes, Smi, VAR) + V(AbstractType, UntaggedTypeArguments, hash, Smi, VAR) // The list of slots that correspond to non-nullable boxed fields of native // Dart objects that do not contain integers in the following format: @@ -189,7 +187,9 @@ class ParsedFunction; FINAL) \ V(FunctionType, UntaggedFunctionType, packed_type_parameter_counts, Uint16, \ FINAL) \ - V(SubtypeTestCache, UntaggedSubtypeTestCache, num_inputs, Uint32, FINAL) + V(SubtypeTestCache, UntaggedSubtypeTestCache, num_inputs, Uint32, FINAL) \ + V(Coroutine, UntaggedCoroutine, index, IntPtr, VAR) \ + V(Coroutine, UntaggedCoroutine, attributes, IntPtr, VAR) // Native slots containing untagged addresses that do not exist in JIT mode. // See UNTAGGED_NATIVE_DART_SLOTS_LIST for the format. diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc index 4350af91f32e..ff71024de6da 100644 --- a/runtime/vm/compiler/frontend/kernel_to_il.cc +++ b/runtime/vm/compiler/frontend/kernel_to_il.cc @@ -926,13 +926,11 @@ const Function& TypedListGetNativeFunction(Thread* thread, classid_t cid) { V(Coroutine_getEntry, Coroutine_entry) \ V(Coroutine_getTrampoline, Coroutine_trampoline) \ V(Coroutine_getArguments, Coroutine_arguments) \ - V(Coroutine_getAttributes, Coroutine_attributes) \ V(Coroutine_getCaller, Coroutine_caller) \ V(Coroutine_getScheduler, Coroutine_scheduler) \ V(Coroutine_getProcessor, Coroutine_processor) \ V(Coroutine_getToProcessorNext, Coroutine_to_processor_next) \ V(Coroutine_getToProcessorPrevious, Coroutine_to_processor_previous) \ - V(Coroutine_getIndex, Coroutine_index) \ V(SuspendState_getThenCallback, SuspendState_then_callback) \ V(SuspendState_getErrorCallback, SuspendState_error_callback) \ V(TypedDataViewOffsetInBytes, TypedDataView_offset_in_bytes) \ @@ -958,7 +956,6 @@ const Function& TypedListGetNativeFunction(Thread* thread, classid_t cid) { V(Coroutine_setEntry, Coroutine_entry) \ V(Coroutine_setTrampoline, Coroutine_trampoline) \ V(Coroutine_setArguments, Coroutine_arguments) \ - V(Coroutine_setAttributes, Coroutine_attributes) \ V(Coroutine_setCaller, Coroutine_caller) \ V(Coroutine_setScheduler, Coroutine_scheduler) \ V(Coroutine_setProcessor, Coroutine_processor) \ @@ -1165,6 +1162,9 @@ bool FlowGraphBuilder::IsRecognizedMethodForFlowGraph( case MethodRecognizer::kCoroutineTransfer: case MethodRecognizer::kCoroutine_getCurrent: case MethodRecognizer::kCoroutine_atIndex: + case MethodRecognizer::kCoroutine_getAttributes: + case MethodRecognizer::kCoroutine_setAttributes: + case MethodRecognizer::kCoroutine_getIndex: return true; default: return false; @@ -1969,6 +1969,26 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfRecognizedMethod( body += LoadIndexed(kArrayCid); break; } + case MethodRecognizer::kCoroutine_getIndex: { + body += LoadLocal(parsed_function_->RawParameterVariable(0)); + body += LoadNativeField(Slot::Coroutine_index()); + body += Box(kUnboxedInt64); + break; + } + case MethodRecognizer::kCoroutine_getAttributes: { + body += LoadLocal(parsed_function_->RawParameterVariable(0)); + body += LoadNativeField(Slot::Coroutine_attributes()); + body += Box(kUnboxedInt64); + break; + } + case MethodRecognizer::kCoroutine_setAttributes: { + body += LoadLocal(parsed_function_->RawParameterVariable(0)); + body += LoadLocal(parsed_function_->RawParameterVariable(1)); + body += UnboxTruncate(kUnboxedInt64); + body += StoreNativeField(Slot::Coroutine_attributes()); + body += NullConstant(); + break; + } #define IL_BODY(method, slot) \ case MethodRecognizer::k##method: \ ASSERT_EQUAL(function.NumParameters(), 1); \ diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h index 685842819e56..b2d71ac164f1 100644 --- a/runtime/vm/compiler/runtime_offsets_extracted.h +++ b/runtime/vm/compiler/runtime_offsets_extracted.h @@ -405,33 +405,32 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x4; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x8; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x4; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0xc; -static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x10; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x8; +static constexpr dart::compiler::target::word Coroutine_trampoline_offset = 0xc; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x18; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x1c; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x20; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x24; + 0x4c; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x1c; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x28; + Coroutine_to_processor_next_offset = 0x20; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x2c; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x30; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x8; + Coroutine_to_processor_previous_offset = 0x24; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0x50; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x3c; + 0x34; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x40; + Coroutine_native_stack_base_offset = 0x38; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x44; + 0x3c; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x48; + 0x40; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x4c; + 0x44; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0x50; + Coroutine_overflow_stack_limit_offset = 0x48; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x4, 0xc, 0x8, 0x10}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -909,33 +908,33 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x10; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x20; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x28; + 0x18; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x20; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x30; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x38; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x40; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x48; + 0x98; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x30; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x38; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x50; + Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x58; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x60; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x10; + Coroutine_to_processor_previous_offset = 0x48; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x50; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x80; + Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0xa0; + Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -1408,33 +1407,32 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x4; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x8; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x4; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0xc; -static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x10; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x8; +static constexpr dart::compiler::target::word Coroutine_trampoline_offset = 0xc; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x18; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x1c; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x20; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x24; + 0x4c; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x1c; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x28; + Coroutine_to_processor_next_offset = 0x20; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x2c; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x30; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x8; + Coroutine_to_processor_previous_offset = 0x24; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0x50; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x3c; + 0x34; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x40; + Coroutine_native_stack_base_offset = 0x38; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x44; + 0x3c; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x48; + 0x40; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x4c; + 0x44; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0x50; + Coroutine_overflow_stack_limit_offset = 0x48; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x4, 0xc, 0x8, 0x10}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -1911,33 +1909,33 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x10; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x20; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x28; + 0x18; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x20; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x30; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x38; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x40; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x48; + 0x98; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x30; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x38; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x50; + Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x58; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x60; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x10; + Coroutine_to_processor_previous_offset = 0x48; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x50; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x80; + Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0xa0; + Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -2418,33 +2416,33 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0xc; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0xc; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x10; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0xc; static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x14; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x18; + 0x10; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x14; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x1c; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x20; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x24; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x28; + 0x78; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x1c; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x20; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x2c; + Coroutine_to_processor_next_offset = 0x24; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x30; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x38; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0xc; + Coroutine_to_processor_previous_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x30; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0x80; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x50; + 0x48; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x58; + Coroutine_native_stack_base_offset = 0x50; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x60; + 0x58; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x68; + 0x60; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x70; + 0x68; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0x78; + Coroutine_overflow_stack_limit_offset = 0x70; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -2510,7 +2508,7 @@ static constexpr dart::compiler::target::word Sentinel_InstanceSize = 0x8; static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize = 0x20; static constexpr dart::compiler::target::word StackTrace_InstanceSize = 0x18; static constexpr dart::compiler::target::word SuspendState_HeaderSize = 0x30; -static constexpr dart::compiler::target::word Coroutine_InstanceSize = 0x80; +static constexpr dart::compiler::target::word Coroutine_InstanceSize = 0x88; static constexpr dart::compiler::target::word String_InstanceSize = 0x10; static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize = 0x18; static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 0x20; @@ -2923,33 +2921,33 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0xc; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0xc; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x10; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0xc; static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x14; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x18; + 0x10; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x14; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x1c; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x20; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x24; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x28; + 0x78; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x1c; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x20; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x2c; + Coroutine_to_processor_next_offset = 0x24; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x30; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x38; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0xc; + Coroutine_to_processor_previous_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x30; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0x80; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x50; + 0x48; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x58; + Coroutine_native_stack_base_offset = 0x50; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x60; + 0x58; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x68; + 0x60; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x70; + 0x68; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0x78; + Coroutine_overflow_stack_limit_offset = 0x70; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -3017,7 +3015,7 @@ static constexpr dart::compiler::target::word Sentinel_InstanceSize = 0x8; static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize = 0x20; static constexpr dart::compiler::target::word StackTrace_InstanceSize = 0x18; static constexpr dart::compiler::target::word SuspendState_HeaderSize = 0x30; -static constexpr dart::compiler::target::word Coroutine_InstanceSize = 0x80; +static constexpr dart::compiler::target::word Coroutine_InstanceSize = 0x88; static constexpr dart::compiler::target::word String_InstanceSize = 0x10; static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize = 0x18; static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 0x20; @@ -3429,33 +3427,32 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x4; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x8; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x4; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0xc; -static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x10; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x8; +static constexpr dart::compiler::target::word Coroutine_trampoline_offset = 0xc; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x18; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x1c; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x20; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x24; + 0x4c; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x1c; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x28; + Coroutine_to_processor_next_offset = 0x20; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x2c; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x30; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x8; + Coroutine_to_processor_previous_offset = 0x24; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0x50; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x3c; + 0x34; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x40; + Coroutine_native_stack_base_offset = 0x38; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x44; + 0x3c; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x48; + 0x40; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x4c; + 0x44; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0x50; + Coroutine_overflow_stack_limit_offset = 0x48; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x4, 0xc, 0x8, 0x10}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -3934,33 +3931,33 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x10; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x20; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x28; + 0x18; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x20; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x30; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x38; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x40; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x48; + 0x98; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x30; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x38; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x50; + Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x58; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x60; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x10; + Coroutine_to_processor_previous_offset = 0x48; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x50; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x80; + Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0xa0; + Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -4434,33 +4431,32 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x4; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x8; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x4; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0xc; -static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x10; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x8; +static constexpr dart::compiler::target::word Coroutine_trampoline_offset = 0xc; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x18; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x1c; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x20; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x24; + 0x4c; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x1c; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x28; + Coroutine_to_processor_next_offset = 0x20; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x2c; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x30; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x8; + Coroutine_to_processor_previous_offset = 0x24; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0x50; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x3c; + 0x34; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x40; + Coroutine_native_stack_base_offset = 0x38; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x44; + 0x3c; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x48; + 0x40; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x4c; + 0x44; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0x50; + Coroutine_overflow_stack_limit_offset = 0x48; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x4, 0xc, 0x8, 0x10}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -4933,33 +4929,33 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x10; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x20; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x28; + 0x18; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x20; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x30; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x38; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x40; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x48; + 0x98; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x30; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x38; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x50; + Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x58; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x60; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x10; + Coroutine_to_processor_previous_offset = 0x48; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x50; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x80; + Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0xa0; + Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -5427,33 +5423,32 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x4; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x8; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x4; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0xc; -static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x10; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x8; +static constexpr dart::compiler::target::word Coroutine_trampoline_offset = 0xc; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x18; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x1c; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x20; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x24; + 0x4c; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x1c; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x28; + Coroutine_to_processor_next_offset = 0x20; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x2c; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x30; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x8; + Coroutine_to_processor_previous_offset = 0x24; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0x50; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x3c; + 0x34; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x40; + Coroutine_native_stack_base_offset = 0x38; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x44; + 0x3c; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x48; + 0x40; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x4c; + 0x44; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0x50; + Coroutine_overflow_stack_limit_offset = 0x48; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x4, 0xc, 0x8, 0x10}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -5925,33 +5920,33 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x10; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x20; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x28; + 0x18; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x20; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x30; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x38; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x40; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x48; + 0x98; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x30; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x38; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x50; + Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x58; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x60; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x10; + Coroutine_to_processor_previous_offset = 0x48; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x50; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x80; + Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0xa0; + Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -6427,33 +6422,33 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0xc; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0xc; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x10; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0xc; static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x14; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x18; + 0x10; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x14; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x1c; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x20; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x24; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x28; + 0x78; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x1c; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x20; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x2c; + Coroutine_to_processor_next_offset = 0x24; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x30; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x38; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0xc; + Coroutine_to_processor_previous_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x30; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0x80; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x50; + 0x48; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x58; + Coroutine_native_stack_base_offset = 0x50; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x60; + 0x58; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x68; + 0x60; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x70; + 0x68; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0x78; + Coroutine_overflow_stack_limit_offset = 0x70; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -6519,7 +6514,7 @@ static constexpr dart::compiler::target::word Sentinel_InstanceSize = 0x8; static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize = 0x20; static constexpr dart::compiler::target::word StackTrace_InstanceSize = 0x18; static constexpr dart::compiler::target::word SuspendState_HeaderSize = 0x30; -static constexpr dart::compiler::target::word Coroutine_InstanceSize = 0x80; +static constexpr dart::compiler::target::word Coroutine_InstanceSize = 0x88; static constexpr dart::compiler::target::word String_InstanceSize = 0x10; static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize = 0x18; static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 0x20; @@ -6927,33 +6922,33 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0xc; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0xc; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x10; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0xc; static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x14; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x18; + 0x10; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x14; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x1c; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x20; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x24; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x28; + 0x78; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x1c; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x20; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x2c; + Coroutine_to_processor_next_offset = 0x24; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x30; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x38; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0xc; + Coroutine_to_processor_previous_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x30; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0x80; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x50; + 0x48; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x58; + Coroutine_native_stack_base_offset = 0x50; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x60; + 0x58; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x68; + 0x60; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x70; + 0x68; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0x78; + Coroutine_overflow_stack_limit_offset = 0x70; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -7021,7 +7016,7 @@ static constexpr dart::compiler::target::word Sentinel_InstanceSize = 0x8; static constexpr dart::compiler::target::word SingleTargetCache_InstanceSize = 0x20; static constexpr dart::compiler::target::word StackTrace_InstanceSize = 0x18; static constexpr dart::compiler::target::word SuspendState_HeaderSize = 0x30; -static constexpr dart::compiler::target::word Coroutine_InstanceSize = 0x80; +static constexpr dart::compiler::target::word Coroutine_InstanceSize = 0x88; static constexpr dart::compiler::target::word String_InstanceSize = 0x10; static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize = 0x18; static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 0x20; @@ -7428,33 +7423,32 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x4; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x8; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x4; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0xc; -static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x10; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x8; +static constexpr dart::compiler::target::word Coroutine_trampoline_offset = 0xc; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x18; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x1c; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x20; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x24; + 0x4c; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x14; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x1c; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x28; + Coroutine_to_processor_next_offset = 0x20; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x2c; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x30; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x8; + Coroutine_to_processor_previous_offset = 0x24; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0x50; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x3c; + 0x34; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x40; + Coroutine_native_stack_base_offset = 0x38; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x44; + 0x3c; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x48; + 0x40; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x4c; + 0x44; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0x50; + Coroutine_overflow_stack_limit_offset = 0x48; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x4, 0xc, 0x8, 0x10}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -7928,33 +7922,33 @@ static constexpr dart::compiler::target::word WeakProperty_value_offset = 0x10; static constexpr dart::compiler::target::word WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word Coroutine_trampoline_offset = - 0x20; -static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x28; + 0x18; +static constexpr dart::compiler::target::word Coroutine_arguments_offset = 0x20; static constexpr dart::compiler::target::word Coroutine_attributes_offset = - 0x30; -static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x38; -static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x40; -static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x48; + 0x98; +static constexpr dart::compiler::target::word Coroutine_caller_offset = 0x28; +static constexpr dart::compiler::target::word Coroutine_scheduler_offset = 0x30; +static constexpr dart::compiler::target::word Coroutine_processor_offset = 0x38; static constexpr dart::compiler::target::word - Coroutine_to_processor_next_offset = 0x50; + Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - Coroutine_to_processor_previous_offset = 0x58; -static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x60; -static constexpr dart::compiler::target::word Coroutine_index_offset = 0x10; + Coroutine_to_processor_previous_offset = 0x48; +static constexpr dart::compiler::target::word Coroutine_to_state_offset = 0x50; +static constexpr dart::compiler::target::word Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - Coroutine_native_stack_base_offset = 0x80; + Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - Coroutine_overflow_stack_limit_offset = 0xa0; + Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word Thread_write_barrier_wrappers_thread_offset[] = { @@ -8435,38 +8429,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x4; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0x8; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x4; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0xc; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x8; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x10; + 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x14; + 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x18; + 0x4c; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x1c; + 0x14; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x24; + 0x1c; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x28; + AOT_Coroutine_to_processor_next_offset = 0x20; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x2c; + AOT_Coroutine_to_processor_previous_offset = 0x24; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x30; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x8; + 0x28; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x50; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x3c; + 0x34; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x40; + AOT_Coroutine_native_stack_base_offset = 0x38; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x44; + 0x3c; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x48; + 0x40; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x4c; + 0x44; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0x50; + AOT_Coroutine_overflow_stack_limit_offset = 0x48; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x4, 0xc, 0x8, 0x10}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -8946,38 +8940,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x28; + 0x20; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x30; + 0x98; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x38; + 0x28; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x40; + 0x30; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x48; + 0x38; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x50; + AOT_Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x58; + AOT_Coroutine_to_processor_previous_offset = 0x48; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x60; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x10; + 0x50; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x80; + AOT_Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0xa0; + AOT_Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -9462,38 +9456,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x28; + 0x20; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x30; + 0x98; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x38; + 0x28; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x40; + 0x30; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x48; + 0x38; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x50; + AOT_Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x58; + AOT_Coroutine_to_processor_previous_offset = 0x48; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x60; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x10; + 0x50; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x80; + AOT_Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0xa0; + AOT_Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -9976,38 +9970,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x10; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x14; + 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x18; + 0x14; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x1c; + 0x78; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x24; + 0x1c; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x28; + 0x20; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x2c; + AOT_Coroutine_to_processor_next_offset = 0x24; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x30; + AOT_Coroutine_to_processor_previous_offset = 0x28; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x38; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0xc; + 0x30; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x80; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x50; + 0x48; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x58; + AOT_Coroutine_native_stack_base_offset = 0x50; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x60; + 0x58; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x68; + 0x60; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x70; + 0x68; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0x78; + AOT_Coroutine_overflow_stack_limit_offset = 0x70; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -10073,7 +10067,7 @@ static constexpr dart::compiler::target::word AOT_Sentinel_InstanceSize = 0x8; static constexpr dart::compiler::target::word AOT_SingleTargetCache_InstanceSize = 0x20; static constexpr dart::compiler::target::word AOT_StackTrace_InstanceSize = 0x18; static constexpr dart::compiler::target::word AOT_SuspendState_HeaderSize = 0x28; -static constexpr dart::compiler::target::word AOT_Coroutine_InstanceSize = 0x80; +static constexpr dart::compiler::target::word AOT_Coroutine_InstanceSize = 0x88; static constexpr dart::compiler::target::word AOT_String_InstanceSize = 0x10; static constexpr dart::compiler::target::word AOT_SubtypeTestCache_InstanceSize = 0x18; static constexpr dart::compiler::target::word AOT_LoadingUnit_InstanceSize = 0x20; @@ -10488,38 +10482,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x10; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x14; + 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x18; + 0x14; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x1c; + 0x78; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x24; + 0x1c; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x28; + 0x20; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x2c; + AOT_Coroutine_to_processor_next_offset = 0x24; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x30; + AOT_Coroutine_to_processor_previous_offset = 0x28; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x38; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0xc; + 0x30; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x80; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x50; + 0x48; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x58; + AOT_Coroutine_native_stack_base_offset = 0x50; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x60; + 0x58; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x68; + 0x60; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x70; + 0x68; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0x78; + AOT_Coroutine_overflow_stack_limit_offset = 0x70; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -10587,7 +10581,7 @@ static constexpr dart::compiler::target::word AOT_Sentinel_InstanceSize = 0x8; static constexpr dart::compiler::target::word AOT_SingleTargetCache_InstanceSize = 0x20; static constexpr dart::compiler::target::word AOT_StackTrace_InstanceSize = 0x18; static constexpr dart::compiler::target::word AOT_SuspendState_HeaderSize = 0x28; -static constexpr dart::compiler::target::word AOT_Coroutine_InstanceSize = 0x80; +static constexpr dart::compiler::target::word AOT_Coroutine_InstanceSize = 0x88; static constexpr dart::compiler::target::word AOT_String_InstanceSize = 0x10; static constexpr dart::compiler::target::word AOT_SubtypeTestCache_InstanceSize = 0x18; static constexpr dart::compiler::target::word AOT_LoadingUnit_InstanceSize = 0x20; @@ -11001,38 +10995,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x4; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0x8; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x4; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0xc; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x8; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x10; + 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x14; + 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x18; + 0x4c; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x1c; + 0x14; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x24; + 0x1c; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x28; + AOT_Coroutine_to_processor_next_offset = 0x20; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x2c; + AOT_Coroutine_to_processor_previous_offset = 0x24; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x30; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x8; + 0x28; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x50; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x3c; + 0x34; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x40; + AOT_Coroutine_native_stack_base_offset = 0x38; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x44; + 0x3c; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x48; + 0x40; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x4c; + 0x44; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0x50; + AOT_Coroutine_overflow_stack_limit_offset = 0x48; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x4, 0xc, 0x8, 0x10}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -11513,38 +11507,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x28; + 0x20; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x30; + 0x98; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x38; + 0x28; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x40; + 0x30; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x48; + 0x38; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x50; + AOT_Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x58; + AOT_Coroutine_to_processor_previous_offset = 0x48; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x60; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x10; + 0x50; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x80; + AOT_Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0xa0; + AOT_Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -12020,38 +12014,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x4; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0x8; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x4; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0xc; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x8; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x10; + 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x14; + 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x18; + 0x4c; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x1c; + 0x14; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x24; + 0x1c; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x28; + AOT_Coroutine_to_processor_next_offset = 0x20; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x2c; + AOT_Coroutine_to_processor_previous_offset = 0x24; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x30; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x8; + 0x28; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x50; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x3c; + 0x34; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x40; + AOT_Coroutine_native_stack_base_offset = 0x38; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x44; + 0x3c; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x48; + 0x40; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x4c; + 0x44; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0x50; + AOT_Coroutine_overflow_stack_limit_offset = 0x48; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x4, 0xc, 0x8, 0x10}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -12526,38 +12520,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x28; + 0x20; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x30; + 0x98; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x38; + 0x28; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x40; + 0x30; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x48; + 0x38; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x50; + AOT_Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x58; + AOT_Coroutine_to_processor_previous_offset = 0x48; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x60; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x10; + 0x50; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x80; + AOT_Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0xa0; + AOT_Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -13037,38 +13031,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x28; + 0x20; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x30; + 0x98; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x38; + 0x28; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x40; + 0x30; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x48; + 0x38; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x50; + AOT_Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x58; + AOT_Coroutine_to_processor_previous_offset = 0x48; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x60; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x10; + 0x50; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x80; + AOT_Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0xa0; + AOT_Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -13546,38 +13540,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x10; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x14; + 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x18; + 0x14; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x1c; + 0x78; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x24; + 0x1c; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x28; + 0x20; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x2c; + AOT_Coroutine_to_processor_next_offset = 0x24; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x30; + AOT_Coroutine_to_processor_previous_offset = 0x28; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x38; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0xc; + 0x30; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x80; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x50; + 0x48; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x58; + AOT_Coroutine_native_stack_base_offset = 0x50; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x60; + 0x58; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x68; + 0x60; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x70; + 0x68; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0x78; + AOT_Coroutine_overflow_stack_limit_offset = 0x70; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -13643,7 +13637,7 @@ static constexpr dart::compiler::target::word AOT_Sentinel_InstanceSize = 0x8; static constexpr dart::compiler::target::word AOT_SingleTargetCache_InstanceSize = 0x20; static constexpr dart::compiler::target::word AOT_StackTrace_InstanceSize = 0x18; static constexpr dart::compiler::target::word AOT_SuspendState_HeaderSize = 0x28; -static constexpr dart::compiler::target::word AOT_Coroutine_InstanceSize = 0x80; +static constexpr dart::compiler::target::word AOT_Coroutine_InstanceSize = 0x88; static constexpr dart::compiler::target::word AOT_String_InstanceSize = 0x10; static constexpr dart::compiler::target::word AOT_SubtypeTestCache_InstanceSize = 0x18; static constexpr dart::compiler::target::word AOT_LoadingUnit_InstanceSize = 0x20; @@ -14053,38 +14047,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x10; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x14; + 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x18; + 0x14; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x1c; + 0x78; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x24; + 0x1c; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x28; + 0x20; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x2c; + AOT_Coroutine_to_processor_next_offset = 0x24; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x30; + AOT_Coroutine_to_processor_previous_offset = 0x28; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x38; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0xc; + 0x30; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x80; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x50; + 0x48; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x58; + AOT_Coroutine_native_stack_base_offset = 0x50; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x60; + 0x58; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x68; + 0x60; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x70; + 0x68; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0x78; + AOT_Coroutine_overflow_stack_limit_offset = 0x70; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -14152,7 +14146,7 @@ static constexpr dart::compiler::target::word AOT_Sentinel_InstanceSize = 0x8; static constexpr dart::compiler::target::word AOT_SingleTargetCache_InstanceSize = 0x20; static constexpr dart::compiler::target::word AOT_StackTrace_InstanceSize = 0x18; static constexpr dart::compiler::target::word AOT_SuspendState_HeaderSize = 0x28; -static constexpr dart::compiler::target::word AOT_Coroutine_InstanceSize = 0x80; +static constexpr dart::compiler::target::word AOT_Coroutine_InstanceSize = 0x88; static constexpr dart::compiler::target::word AOT_String_InstanceSize = 0x10; static constexpr dart::compiler::target::word AOT_SubtypeTestCache_InstanceSize = 0x18; static constexpr dart::compiler::target::word AOT_LoadingUnit_InstanceSize = 0x20; @@ -14561,38 +14555,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x4; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0x8; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x4; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0xc; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x8; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x10; + 0xc; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x14; + 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x18; + 0x4c; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x1c; + 0x14; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x24; + 0x1c; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x28; + AOT_Coroutine_to_processor_next_offset = 0x20; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x2c; + AOT_Coroutine_to_processor_previous_offset = 0x24; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x30; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x8; + 0x28; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x50; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x3c; + 0x34; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x40; + AOT_Coroutine_native_stack_base_offset = 0x38; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x44; + 0x3c; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x48; + 0x40; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x4c; + 0x44; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0x50; + AOT_Coroutine_overflow_stack_limit_offset = 0x48; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x4, 0xc, 0x8, 0x10}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { @@ -15068,38 +15062,38 @@ static constexpr dart::compiler::target::word AOT_WeakProperty_value_offset = 0x static constexpr dart::compiler::target::word AOT_WeakReference_target_offset = 0x8; static constexpr dart::compiler::target::word AOT_WeakReference_type_arguments_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_name_offset = 0x8; -static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x18; +static constexpr dart::compiler::target::word AOT_Coroutine_entry_offset = 0x10; static constexpr dart::compiler::target::word AOT_Coroutine_trampoline_offset = - 0x20; + 0x18; static constexpr dart::compiler::target::word AOT_Coroutine_arguments_offset = - 0x28; + 0x20; static constexpr dart::compiler::target::word AOT_Coroutine_attributes_offset = - 0x30; + 0x98; static constexpr dart::compiler::target::word AOT_Coroutine_caller_offset = - 0x38; + 0x28; static constexpr dart::compiler::target::word AOT_Coroutine_scheduler_offset = - 0x40; + 0x30; static constexpr dart::compiler::target::word AOT_Coroutine_processor_offset = - 0x48; + 0x38; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_next_offset = 0x50; + AOT_Coroutine_to_processor_next_offset = 0x40; static constexpr dart::compiler::target::word - AOT_Coroutine_to_processor_previous_offset = 0x58; + AOT_Coroutine_to_processor_previous_offset = 0x48; static constexpr dart::compiler::target::word AOT_Coroutine_to_state_offset = - 0x60; -static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0x10; + 0x50; +static constexpr dart::compiler::target::word AOT_Coroutine_index_offset = 0xa0; static constexpr dart::compiler::target::word AOT_Coroutine_stack_size_offset = - 0x78; + 0x68; static constexpr dart::compiler::target::word - AOT_Coroutine_native_stack_base_offset = 0x80; + AOT_Coroutine_native_stack_base_offset = 0x70; static constexpr dart::compiler::target::word AOT_Coroutine_stack_root_offset = - 0x88; + 0x78; static constexpr dart::compiler::target::word AOT_Coroutine_stack_base_offset = - 0x90; + 0x80; static constexpr dart::compiler::target::word AOT_Coroutine_stack_limit_offset = - 0x98; + 0x88; static constexpr dart::compiler::target::word - AOT_Coroutine_overflow_stack_limit_offset = 0xa0; + AOT_Coroutine_overflow_stack_limit_offset = 0x90; static constexpr dart::compiler::target::word AOT_Code_entry_point_offset[] = {0x8, 0x18, 0x10, 0x20}; static constexpr dart::compiler::target::word AOT_Thread_write_barrier_wrappers_thread_offset[] = { diff --git a/runtime/vm/heap/compactor.cc b/runtime/vm/heap/compactor.cc index 118850fc4421..b5df952b5180 100644 --- a/runtime/vm/heap/compactor.cc +++ b/runtime/vm/heap/compactor.cc @@ -355,13 +355,22 @@ void GCCompactor::Compact(Page* pages, FreeList* freelist, Mutex* pages_lock) { "ForwardPostponedSuspendStatePointers"); // After heap sliding is complete and ObjectStore pointers are forwarded // it is finally safe to visit SuspendState objects with copied frames. - can_visit_stack_frames_ = true; + can_visit_suspend_states_ = true; const intptr_t length = postponed_suspend_states_.length(); for (intptr_t i = 0; i < length; ++i) { auto suspend_state = postponed_suspend_states_[i]; suspend_state->untag()->VisitPointers(this); } } + { + TIMELINE_FUNCTION_GC_DURATION(thread(), + "ForwardPostponedCoroutinePointers"); + can_visit_coroutines_ = true; + const intptr_t length = postponed_coroutines_.length(); + for (intptr_t i = 0; i < length; ++i) { + postponed_coroutines_[i]->untag()->VisitPointers(this); + } + } heap_->old_space()->VisitRoots(this); @@ -816,7 +825,7 @@ void GCCompactor::VisitCompressedPointers(uword heap_base, #endif bool GCCompactor::CanVisitSuspendStatePointers(SuspendStatePtr suspend_state) { - if ((suspend_state->untag()->pc() != 0) && !can_visit_stack_frames_) { + if ((suspend_state->untag()->pc() != 0) && !can_visit_suspend_states_) { // Visiting pointers of SuspendState objects with copied stack frame // needs to query stack map, which can touch other Dart objects // (such as GrowableObjectArray of InstructionsTable). @@ -830,6 +839,15 @@ bool GCCompactor::CanVisitSuspendStatePointers(SuspendStatePtr suspend_state) { return true; } +bool GCCompactor::CanVisitCoroutinePointers(CoroutinePtr coroutine) { + if (!can_visit_coroutines_) { + MutexLocker ml(&postponed_coroutines_mutex_); + postponed_coroutines_.Add(coroutine); + return false; + } + return true; +} + void GCCompactor::VisitHandle(uword addr) { FinalizablePersistentHandle* handle = reinterpret_cast(addr); diff --git a/runtime/vm/heap/compactor.h b/runtime/vm/heap/compactor.h index c9f57b1328bd..dbfcd80cf29b 100644 --- a/runtime/vm/heap/compactor.h +++ b/runtime/vm/heap/compactor.h @@ -51,6 +51,7 @@ class GCCompactor : public ValueObject, CompressedObjectPtr* last) override; #endif bool CanVisitSuspendStatePointers(SuspendStatePtr suspend_state) override; + bool CanVisitCoroutinePointers(CoroutinePtr coroutine) override; void VisitHandle(uword addr) override; Heap* heap_; @@ -83,9 +84,12 @@ class GCCompactor : public ValueObject, // SuspendState objects with copied frame must be updated after sliding is // complete. - bool can_visit_stack_frames_ = false; + bool can_visit_suspend_states_ = false; + bool can_visit_coroutines_ = false; Mutex postponed_suspend_states_mutex_; + Mutex postponed_coroutines_mutex_; MallocGrowableArray postponed_suspend_states_; + MallocGrowableArray postponed_coroutines_; }; } // namespace dart diff --git a/runtime/vm/heap/incremental_compactor.cc b/runtime/vm/heap/incremental_compactor.cc index 3a4c16024858..1e47647da3ce 100644 --- a/runtime/vm/heap/incremental_compactor.cc +++ b/runtime/vm/heap/incremental_compactor.cc @@ -463,7 +463,7 @@ class IncrementalForwardingVisitor : public ObjectPointerVisitor, } bool CanVisitSuspendStatePointers(SuspendStatePtr suspend_state) override { - if ((suspend_state->untag()->pc() != 0) && !can_visit_stack_frames_) { + if ((suspend_state->untag()->pc() != 0) && !can_visit_suspend_states_) { // Visiting pointers of SuspendState objects with copied stack frame // needs to query stack map, which can touch other Dart objects // (such as GrowableObjectArray of InstructionsTable). @@ -476,6 +476,14 @@ class IncrementalForwardingVisitor : public ObjectPointerVisitor, return true; } + bool CanVisitCoroutinePointers(CoroutinePtr coroutine) override { + if (!can_visit_coroutines_) { + coroutines_.Add(coroutine); + return false; + } + return true; + } + void UpdateViews() { const intptr_t length = typed_data_views_.length(); for (intptr_t i = 0; i < length; ++i) { @@ -494,7 +502,7 @@ class IncrementalForwardingVisitor : public ObjectPointerVisitor, } void UpdateSuspendStates() { - can_visit_stack_frames_ = true; + can_visit_suspend_states_ = true; const intptr_t length = suspend_states_.length(); for (intptr_t i = 0; i < length; ++i) { auto suspend_state = suspend_states_[i]; @@ -502,10 +510,20 @@ class IncrementalForwardingVisitor : public ObjectPointerVisitor, } } + void UpdateCoroutines() { + can_visit_coroutines_ = true; + const intptr_t length = coroutines_.length(); + for (intptr_t i = 0; i < length; ++i) { + coroutines_[i]->untag()->VisitPointers(this); + } + } + private: - bool can_visit_stack_frames_ = false; + bool can_visit_suspend_states_ = false; + bool can_visit_coroutines_ = false; MallocGrowableArray typed_data_views_; MallocGrowableArray suspend_states_; + MallocGrowableArray coroutines_; DISALLOW_COPY_AND_ASSIGN(IncrementalForwardingVisitor); }; @@ -715,6 +733,11 @@ class EpilogueTask : public ThreadPool::Task { visitor.UpdateSuspendStates(); } + { + TIMELINE_FUNCTION_GC_DURATION(thread, "Coroutines"); + visitor.UpdateCoroutines(); + } + if (state_->TakeResetProgressBars()) { // After ForwardRememberedCards. old_space_->ResetProgressBars(); diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc index c994a88bbd37..5bf6e355cc5d 100644 --- a/runtime/vm/object.cc +++ b/runtime/vm/object.cc @@ -9205,6 +9205,9 @@ bool Function::RecognizedKindForceOptimize() const { case MethodRecognizer::kTypedData_memMove16: case MethodRecognizer::kCoroutine_getCurrent: case MethodRecognizer::kCoroutine_atIndex: + case MethodRecognizer::kCoroutine_getAttributes: + case MethodRecognizer::kCoroutine_getIndex: + case MethodRecognizer::kCoroutine_setAttributes: case MethodRecognizer::kMemCopy: // Prevent the GC from running so that the operation is atomic from // a GC point of view. Always double check implementation in @@ -26699,7 +26702,7 @@ CoroutinePtr Coroutine::New(uintptr_t size, FunctionPtr trampoline) { coroutine.untag()->stack_base_ = stack_base; coroutine.untag()->stack_limit_ = stack_limit; coroutine.untag()->overflow_stack_limit_ = stack_limit + CalculateHeadroom(stack_base - stack_limit); - coroutine.untag()->set_index(Smi::New(-1)); + coroutine.untag()->set_index(-1); coroutine.untag()->set_trampoline(trampoline); CoroutineLink::AddHead(active, coroutine.to_state()); @@ -26719,7 +26722,7 @@ CoroutinePtr Coroutine::New(uintptr_t size, FunctionPtr trampoline) { object_store->set_coroutines_registry(registry); } - coroutine.untag()->set_index(Smi::New(free_index)); + coroutine.untag()->set_index(free_index); registry.SetAt(free_index, coroutine); return coroutine.ptr(); @@ -26757,14 +26760,14 @@ void Coroutine::dispose(Thread* thread, Zone* zone, bool remove_from_registry) c untag()->overflow_stack_limit_ = (uword) nullptr; if (!remove_from_registry) { - untag()->set_index(Smi::New(-1)); + untag()->set_index(-1); return; } auto object_store = thread->isolate()->isolate_object_store(); auto& coroutines = Array::Handle(zone, object_store->coroutines_registry()); - auto current_index = Smi::Value(index()); - untag()->set_index(Smi::New(-1)); + auto current_index = index(); + untag()->set_index(-1); if (coroutines.Length() < FLAG_coroutines_registry_shrink_marker) { coroutines.SetAt(current_index, Object::null_object()); @@ -26787,7 +26790,7 @@ void Coroutine::dispose(Thread* thread, Zone* zone, bool remove_from_registry) c if (coroutines.At(index) != Object::null()) { coroutine ^= coroutines.At(index); new_coroutines.SetAt(new_index, coroutine); - coroutine.set_index(Smi::New(new_index)); + coroutine.set_index(new_index); new_index++; } } @@ -26870,7 +26873,7 @@ void Coroutine::HandleRootExit(Thread* thread, Zone* zone) { coroutine ^= coroutines.At(index); if (coroutine.is_finished()) { recycled.SetAt(recycled_index, coroutine); - coroutine.set_index(Smi::New(recycled_index)); + coroutine.set_index(recycled_index); recycled_index++; } } @@ -26893,8 +26896,8 @@ void Coroutine::HandleForkedEnter(Thread* thread, Zone* zone) { void Coroutine::HandleForkedExit(Thread* thread, Zone* zone) { auto saved_caller = caller(); - auto new_caller_state = (Smi::Value(saved_caller->untag()->attributes()) & ~CoroutineAttributes::suspended) | CoroutineAttributes::running; - saved_caller->untag()->set_attributes(Smi::New(new_caller_state)); + auto new_caller_state = (saved_caller->untag()->attributes() & ~CoroutineAttributes::suspended) | CoroutineAttributes::running; + saved_caller->untag()->set_attributes(new_caller_state); if (is_persistent()) { recycle(zone); } diff --git a/runtime/vm/object.h b/runtime/vm/object.h index e7693976b966..3d6e786755e1 100644 --- a/runtime/vm/object.h +++ b/runtime/vm/object.h @@ -3629,14 +3629,6 @@ class Function : public Object { return recognized_kind() != MethodRecognizer::kUnknown; } - DART_FORCE_INLINE - static bool IsCoroutineRecognized(FunctionPtr function) { - auto kind = function->untag()->kind_tag_.Read(); - return kind == MethodRecognizer::kCoroutineFork || - kind == MethodRecognizer::kCoroutineInitialize || - kind == MethodRecognizer::kCoroutineTransfer; - } - bool HasOptimizedCode() const; // Returns true if the argument counts are valid for calling this function. @@ -12741,8 +12733,8 @@ class Coroutine : public Instance { StringPtr name() const { return untag()->name(); } static uword name_offset() { return OFFSET_OF(UntaggedCoroutine, name_); } - SmiPtr index() const { return untag()->index(); } - void set_index(SmiPtr index) const { untag()->index_ = index; } + intptr_t index() const { return untag()->index(); } + void set_index(intptr_t index) const { untag()->set_index(index); } static uword index_offset() { return OFFSET_OF(UntaggedCoroutine, index_); } ClosurePtr entry() const { return untag()->entry(); } @@ -12754,51 +12746,46 @@ class Coroutine : public Instance { } DART_FORCE_INLINE - SmiPtr attributes() const { return untag()->attributes(); } - DART_FORCE_INLINE - intptr_t get_attributes() const { return Smi::Value(untag()->attributes()); } + intptr_t attributes() const { return untag()->attributes(); } DART_FORCE_INLINE bool is_persistent() const { - return (bool)(get_attributes() & CoroutineAttributes::persistent); + return (bool)(attributes() & CoroutineAttributes::persistent); } DART_FORCE_INLINE bool is_ephemeral() const { return !is_persistent(); } DART_FORCE_INLINE bool is_created() const { - return (bool)(get_attributes() & CoroutineAttributes::created); + return (bool)(attributes() & CoroutineAttributes::created); } DART_FORCE_INLINE bool is_running() const { - return (bool)(get_attributes() & CoroutineAttributes::running); + return (bool)(attributes() & CoroutineAttributes::running); } DART_FORCE_INLINE bool is_finished() const { - return (bool)(get_attributes() & CoroutineAttributes::finished); + return (bool)(attributes() & CoroutineAttributes::finished); } DART_FORCE_INLINE bool is_disposed() const { - return (bool)(get_attributes() & CoroutineAttributes::disposed); + return (bool)(attributes() & CoroutineAttributes::disposed); } DART_FORCE_INLINE bool is_suspended() const { - return (bool)(get_attributes() & CoroutineAttributes::suspended); + return (bool)(attributes() & CoroutineAttributes::suspended); } DART_FORCE_INLINE - void set_attributes(intptr_t value) const { - untag()->set_attributes(Smi::New(value)); - } + void set_attributes(intptr_t value) const { untag()->set_attributes(value); } DART_FORCE_INLINE void or_attribute(intptr_t value) const { - untag()->set_attributes(Smi::New(get_attributes() | value)); + untag()->set_attributes(attributes() | value); } DART_FORCE_INLINE void change_state(intptr_t from_value, intptr_t to_value) const { - untag()->set_attributes( - Smi::New((get_attributes() & ~from_value) | to_value)); + untag()->set_attributes((attributes() & ~from_value) | to_value); } DART_FORCE_INLINE void and_attribute(intptr_t value) const { - untag()->set_attributes(Smi::New(get_attributes() & value)); + untag()->set_attributes(attributes() & value); } static uword attributes_offset() { return OFFSET_OF(UntaggedCoroutine, attributes_); diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc index 1a1c0597ad08..6cc35338e333 100644 --- a/runtime/vm/raw_object.cc +++ b/runtime/vm/raw_object.cc @@ -553,7 +553,6 @@ COMPRESSED_VISITOR(FinalizerEntry) COMPRESSED_VISITOR(NativeFinalizer) COMPRESSED_VISITOR(MirrorReference) COMPRESSED_VISITOR(UserTag) -COMPRESSED_VISITOR(Coroutine) REGULAR_VISITOR(SubtypeTestCache) COMPRESSED_VISITOR(LoadingUnit) COMPRESSED_VISITOR(TypeParameters) @@ -652,6 +651,55 @@ intptr_t UntaggedSuspendState::VisitSuspendStatePointers( return SuspendState::InstanceSize(raw_obj->untag()->frame_capacity()); } +intptr_t UntaggedCoroutine::VisitCoroutinePointers( + CoroutinePtr raw_obj, + ObjectPointerVisitor* visitor) { + ASSERT(raw_obj->IsHeapObject()); + auto native_stack = raw_obj->untag()->native_stack_base(); + auto stack = raw_obj->untag()->stack_base(); + auto attributes = raw_obj->untag()->attributes(); + + if (visitor->CanVisitCoroutinePointers(raw_obj)) { + visitor->VisitCompressedPointers( + raw_obj->heap_base(), raw_obj->untag()->from(), raw_obj->untag()->to()); + + Thread* thread = Thread::Current(); + if (thread->IsDartMutatorThread()) { + if (native_stack != 0 && + (attributes & (Coroutine::CoroutineAttributes::suspended | + Coroutine::CoroutineAttributes::running)) != 0) { + const uword sp = native_stack; + const uword fp = *reinterpret_cast(sp); + StackFrameIterator frames_iterator( + fp, ValidationPolicy::kDontValidateFrames, thread, + StackFrameIterator::kAllowCrossThreadIteration, + StackFrameIterator::kStackOwnerCoroutine); + StackFrame* frame = frames_iterator.NextFrame(); + while (frame != nullptr) { + frame->VisitObjectPointers(visitor); + frame = frames_iterator.NextFrame(); + } + } + + if ((attributes & (Coroutine::CoroutineAttributes::suspended)) != 0) { + const uword sp = stack; + const uword fp = *reinterpret_cast(sp); + StackFrameIterator frames_iterator( + fp, ValidationPolicy::kDontValidateFrames, thread, + StackFrameIterator::kAllowCrossThreadIteration, + StackFrameIterator::kStackOwnerCoroutine); + StackFrame* frame = frames_iterator.NextFrame(); + while (frame != nullptr) { + frame->VisitObjectPointers(visitor); + frame = frames_iterator.NextFrame(); + } + } + } + } + + return Coroutine::InstanceSize(); +} + bool UntaggedCode::ContainsPC(const ObjectPtr raw_obj, uword pc) { if (!raw_obj->IsCode()) return false; auto const raw_code = static_cast(raw_obj); diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h index 324cf270982f..3dbb4fd9deea 100644 --- a/runtime/vm/raw_object.h +++ b/runtime/vm/raw_object.h @@ -3779,11 +3779,9 @@ class UntaggedCoroutine : public UntaggedInstance { RAW_HEAP_OBJECT_IMPLEMENTATION(Coroutine); COMPRESSED_POINTER_FIELD(StringPtr, name) VISIT_FROM(name) - COMPRESSED_POINTER_FIELD(SmiPtr, index) COMPRESSED_POINTER_FIELD(ClosurePtr, entry) COMPRESSED_POINTER_FIELD(FunctionPtr, trampoline) COMPRESSED_POINTER_FIELD(ArrayPtr, arguments) - COMPRESSED_POINTER_FIELD(SmiPtr, attributes) COMPRESSED_POINTER_FIELD(CoroutinePtr, caller) COMPRESSED_POINTER_FIELD(CoroutinePtr, scheduler) COMPRESSED_POINTER_FIELD(ObjectPtr, processor) @@ -3798,6 +3796,8 @@ class UntaggedCoroutine : public UntaggedInstance { uword stack_base_; uword stack_limit_; uword overflow_stack_limit_; + uword attributes_; + uword index_; public: CoroutineLink* to_state() { return &to_state_; } @@ -3807,6 +3807,13 @@ class UntaggedCoroutine : public UntaggedInstance { uword stack_root() const { return stack_root_; } uword stack_limit() const { return stack_limit_; } uword overflow_stack_limit() const { return overflow_stack_limit_; } + + uword attributes() const { return attributes_; } + uword index() const { return index_; } + + void set_index(uword index) { index_ = index; } + void set_attributes(uword attributes) { attributes_ = attributes; } + bool HasStackHeadroom() { return OSThread::GetCurrentStackPointer() > overflow_stack_limit_; } diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc index 3cfff5ff3506..a577af549a84 100644 --- a/runtime/vm/stack_frame.cc +++ b/runtime/vm/stack_frame.cc @@ -212,7 +212,6 @@ void StackFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) { // helper functions to the raw object interface. NoSafepointScope no_safepoint; Code code; -OS::Print(" pc 0x%" Pp " fp 0x%" Pp " sp 0x%" Pp "\n", pc_, fp_, sp_); CompressedStackMaps::RawPayloadHandle maps; CompressedStackMaps::RawPayloadHandle global_table; @@ -486,7 +485,9 @@ StackFrameIterator::StackFrameIterator(ValidationPolicy validation_policy, : validate_(validation_policy == ValidationPolicy::kValidateFrames), entry_(thread), exit_(thread), - frames_(thread), + frames_(thread, + thread->has_coroutine() ? StackOwner::kStackOwnerCoroutine + : StackOwner::kStackOwnerThread), current_frame_(nullptr), thread_(thread) { ASSERT(cross_thread_policy == kAllowCrossThreadIteration || @@ -501,7 +502,28 @@ StackFrameIterator::StackFrameIterator(uword last_fp, : validate_(validation_policy == ValidationPolicy::kValidateFrames), entry_(thread), exit_(thread), - frames_(thread), + frames_(thread, + thread->has_coroutine() ? StackOwner::kStackOwnerCoroutine + : StackOwner::kStackOwnerThread), + current_frame_(nullptr), + thread_(thread) { + ASSERT(cross_thread_policy == kAllowCrossThreadIteration || + thread_ == Thread::Current()); + frames_.fp_ = last_fp; + frames_.sp_ = 0; + frames_.pc_ = 0; + frames_.Unpoison(); +} + +StackFrameIterator::StackFrameIterator(uword last_fp, + ValidationPolicy validation_policy, + Thread* thread, + CrossThreadPolicy cross_thread_policy, + StackOwner stack_owner) + : validate_(validation_policy == ValidationPolicy::kValidateFrames), + entry_(thread), + exit_(thread), + frames_(thread, stack_owner), current_frame_(nullptr), thread_(thread) { ASSERT(cross_thread_policy == kAllowCrossThreadIteration || @@ -521,7 +543,9 @@ StackFrameIterator::StackFrameIterator(uword fp, : validate_(validation_policy == ValidationPolicy::kValidateFrames), entry_(thread), exit_(thread), - frames_(thread), + frames_(thread, + thread->has_coroutine() ? StackOwner::kStackOwnerCoroutine + : StackOwner::kStackOwnerThread), current_frame_(nullptr), thread_(thread) { ASSERT(cross_thread_policy == kAllowCrossThreadIteration || @@ -536,7 +560,9 @@ StackFrameIterator::StackFrameIterator(const StackFrameIterator& orig) : validate_(orig.validate_), entry_(orig.thread_), exit_(orig.thread_), - frames_(orig.thread_), + frames_(orig.thread_, + orig.thread_->has_coroutine() ? StackOwner::kStackOwnerCoroutine + : StackOwner::kStackOwnerThread), current_frame_(nullptr), thread_(orig.thread_) { frames_.fp_ = orig.frames_.fp_; @@ -606,7 +632,8 @@ void StackFrameIterator::FrameSetIterator::Unpoison() { #if !defined(USING_SIMULATOR) if (fp_ == 0) return; // Note that Thread::os_thread_ is cleared when the thread is descheduled. - ASSERT((thread_->has_coroutine()) || (thread_->os_thread() == nullptr) || + ASSERT(stack_owner_ == kStackOwnerCoroutine || + (thread_->os_thread() == nullptr) || ((thread_->os_thread()->stack_limit() < fp_) && (thread_->os_thread()->stack_base() > fp_))); uword lower; @@ -646,7 +673,7 @@ StackFrame* StackFrameIterator::FrameSetIterator::NextFrame(bool validate) { fp_ = frame->GetCallerFp(); pc_ = frame->GetCallerPc(); Unpoison(); - OS::Print(" pc 0x%" Pp " fp 0x%" Pp " sp 0x%" Pp "\n", pc_, fp_, sp_);ASSERT(!validate || frame->IsValid()); + ASSERT(!validate || frame->IsValid()); return frame; } diff --git a/runtime/vm/stack_frame.h b/runtime/vm/stack_frame.h index 07a00a1b32e2..e33164f405d7 100644 --- a/runtime/vm/stack_frame.h +++ b/runtime/vm/stack_frame.h @@ -222,6 +222,10 @@ class StackFrameIterator { kNoCrossThreadIteration = 0, kAllowCrossThreadIteration = 1, }; + enum StackOwner { + kStackOwnerCoroutine = 0, + kStackOwnerThread = 1, + }; // Iterators for iterating over all frames from the last ExitFrame to the // first EntryFrame. @@ -232,7 +236,11 @@ class StackFrameIterator { ValidationPolicy validation_policy, Thread* thread, CrossThreadPolicy cross_thread_policy); - + StackFrameIterator(uword last_fp, + ValidationPolicy validation_policy, + Thread* thread, + CrossThreadPolicy cross_thread_policy, + StackOwner stack_owner); // Iterator for iterating over all frames from the current frame (given by its // fp, sp, and pc) to the first EntryFrame. StackFrameIterator(uword fp, @@ -271,8 +279,13 @@ class StackFrameIterator { StackFrame* NextFrame(bool validate); private: - explicit FrameSetIterator(Thread* thread) - : fp_(0), sp_(0), pc_(0), stack_frame_(thread), thread_(thread) {} + explicit FrameSetIterator(Thread* thread, StackOwner stack_owner) + : fp_(0), + sp_(0), + pc_(0), + stack_frame_(thread), + thread_(thread), + stack_owner_(stack_owner) {} void Unpoison(); uword fp_; @@ -280,6 +293,7 @@ class StackFrameIterator { uword pc_; StackFrame stack_frame_; // Singleton frame returned by NextFrame(). Thread* thread_; + StackOwner stack_owner_; friend class StackFrameIterator; DISALLOW_COPY_AND_ASSIGN(FrameSetIterator); @@ -300,6 +314,8 @@ class StackFrameIterator { void SetupLastExitFrameData(); void SetupNextExitFrameData(); + bool HasCoroutine(); + bool validate_; // Validate each frame as we traverse the frames. EntryFrame entry_; // Singleton entry frame returned by NextEntryFrame(). ExitFrame exit_; // Singleton exit frame returned by NextExitFrame(). diff --git a/runtime/vm/visitor.h b/runtime/vm/visitor.h index e306164bb056..d93502bd6d5d 100644 --- a/runtime/vm/visitor.h +++ b/runtime/vm/visitor.h @@ -79,6 +79,10 @@ class ObjectPointerVisitor { return true; } + virtual bool CanVisitCoroutinePointers(CoroutinePtr coroutine) { + return true; + } + private: IsolateGroup* isolate_group_; const char* gc_root_type_; diff --git a/sdk/lib/_internal/js_dev_runtime/patch/fiber_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/fiber_patch.dart index 19e0cb45101c..071da311395a 100644 --- a/sdk/lib/_internal/js_dev_runtime/patch/fiber_patch.dart +++ b/sdk/lib/_internal/js_dev_runtime/patch/fiber_patch.dart @@ -12,8 +12,6 @@ class _Coroutine { @patch int get _index => throw UnsupportedError("_Coroutine._current"); @patch - set _index(int value) => throw UnsupportedError("_Coroutine._current"); - @patch void Function() get _entry => throw UnsupportedError("_Coroutine._current"); @patch set _entry(void Function() value) => throw UnsupportedError("_Coroutine._current"); diff --git a/sdk/lib/_internal/js_runtime/lib/fiber_patch.dart b/sdk/lib/_internal/js_runtime/lib/fiber_patch.dart index 19e0cb45101c..071da311395a 100644 --- a/sdk/lib/_internal/js_runtime/lib/fiber_patch.dart +++ b/sdk/lib/_internal/js_runtime/lib/fiber_patch.dart @@ -12,8 +12,6 @@ class _Coroutine { @patch int get _index => throw UnsupportedError("_Coroutine._current"); @patch - set _index(int value) => throw UnsupportedError("_Coroutine._current"); - @patch void Function() get _entry => throw UnsupportedError("_Coroutine._current"); @patch set _entry(void Function() value) => throw UnsupportedError("_Coroutine._current"); diff --git a/sdk/lib/_internal/vm/lib/fiber_patch.dart b/sdk/lib/_internal/vm/lib/fiber_patch.dart index 0e632b678007..a17c8c18ef37 100644 --- a/sdk/lib/_internal/vm/lib/fiber_patch.dart +++ b/sdk/lib/_internal/vm/lib/fiber_patch.dart @@ -21,10 +21,6 @@ class _Coroutine { @pragma("vm:recognized", "other") @pragma("vm:prefer-inline") external int get _index; - @patch - @pragma("vm:recognized", "other") - @pragma("vm:prefer-inline") - external set _index(int value); @patch @pragma("vm:recognized", "other") diff --git a/sdk/lib/_internal/wasm/lib/fiber_patch.dart b/sdk/lib/_internal/wasm/lib/fiber_patch.dart index 19e0cb45101c..071da311395a 100644 --- a/sdk/lib/_internal/wasm/lib/fiber_patch.dart +++ b/sdk/lib/_internal/wasm/lib/fiber_patch.dart @@ -12,8 +12,6 @@ class _Coroutine { @patch int get _index => throw UnsupportedError("_Coroutine._current"); @patch - set _index(int value) => throw UnsupportedError("_Coroutine._current"); - @patch void Function() get _entry => throw UnsupportedError("_Coroutine._current"); @patch set _entry(void Function() value) => throw UnsupportedError("_Coroutine._current"); diff --git a/sdk/lib/fiber/fiber.dart b/sdk/lib/fiber/fiber.dart index 8efa3c70397c..98a61184fe7c 100644 --- a/sdk/lib/fiber/fiber.dart +++ b/sdk/lib/fiber/fiber.dart @@ -78,7 +78,6 @@ class _Coroutine { external set _name(String value); external int get _index; - external set _index(int value); external void Function() get _entry; external set _entry(void Function() value); From 4c60a769735366a56d9c498f220390761decfe6e Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Thu, 31 Oct 2024 00:03:35 +0400 Subject: [PATCH 08/11] fixes --- runtime/vm/raw_object.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc index 6cc35338e333..b82d4f59402d 100644 --- a/runtime/vm/raw_object.cc +++ b/runtime/vm/raw_object.cc @@ -672,7 +672,7 @@ intptr_t UntaggedCoroutine::VisitCoroutinePointers( const uword fp = *reinterpret_cast(sp); StackFrameIterator frames_iterator( fp, ValidationPolicy::kDontValidateFrames, thread, - StackFrameIterator::kAllowCrossThreadIteration, + StackFrameIterator::kNoCrossThreadIteration, StackFrameIterator::kStackOwnerCoroutine); StackFrame* frame = frames_iterator.NextFrame(); while (frame != nullptr) { @@ -686,7 +686,7 @@ intptr_t UntaggedCoroutine::VisitCoroutinePointers( const uword fp = *reinterpret_cast(sp); StackFrameIterator frames_iterator( fp, ValidationPolicy::kDontValidateFrames, thread, - StackFrameIterator::kAllowCrossThreadIteration, + StackFrameIterator::kNoCrossThreadIteration, StackFrameIterator::kStackOwnerCoroutine); StackFrame* frame = frames_iterator.NextFrame(); while (frame != nullptr) { From 35e230fd1ba8ab9109fe010981f324d2201c78db Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Thu, 31 Oct 2024 00:20:21 +0400 Subject: [PATCH 09/11] fibers --- runtime/tests/vm/dart/fiber/fiber_test.dart | 101 ++++++++++---------- runtime/vm/compiler/stub_code_compiler.cc | 3 + sdk/lib/fiber/fiber_processor.dart | 3 +- 3 files changed, 54 insertions(+), 53 deletions(-) diff --git a/runtime/tests/vm/dart/fiber/fiber_test.dart b/runtime/tests/vm/dart/fiber/fiber_test.dart index ed47ca5dd3cb..f476e8111d1b 100644 --- a/runtime/tests/vm/dart/fiber/fiber_test.dart +++ b/runtime/tests/vm/dart/fiber/fiber_test.dart @@ -5,12 +5,9 @@ import 'package:expect/expect.dart'; var globalState = ""; void main() { -// testBase(); - - while (true) { - testClosures(); - } -// testRecycle(); + testBase(); + // // testClosures(); + // testRecycle(); } void testBase() { @@ -60,51 +57,51 @@ void testClosures() { ); Expect.equals("after fiber", localState); - // localState = "localState"; - // Fiber.launch( - // () { - // Expect.equals("localState", localState); - // localState = "after main fiber"; - // Fiber.schedule(Fiber.current()); - // Fiber.spawn( - // () { - // Expect.equals("after main fiber", localState); - // localState = "after child fiber"; - // Fiber.reschedule(); - // Expect.equals("after child fiber after main fiber", localState); - // localState = "finish"; - // }, - // name: "child", - // ); - // Expect.equals("after child fiber", localState); - // localState = "after child fiber after main fiber"; - // Fiber.suspend(); - // }, - // terminate: true, - // ); - // Expect.equals("finish", localState); + localState = "localState"; + Fiber.launch( + () { + Expect.equals("localState", localState); + localState = "after main fiber"; + Fiber.schedule(Fiber.current()); + Fiber.spawn( + () { + Expect.equals("after main fiber", localState); + localState = "after child fiber"; + Fiber.reschedule(); + Expect.equals("after child fiber after main fiber", localState); + localState = "finish"; + }, + name: "child", + ); + Expect.equals("after child fiber", localState); + localState = "after child fiber after main fiber"; + Fiber.suspend(); + }, + terminate: true, + ); + Expect.equals("finish", localState); - // localState = "level 1"; - // Fiber.launch( - // () { - // Expect.equals("level 1", localState); - // localState = "level 2"; - // Fiber.spawn( - // () { - // Expect.equals("level 2", localState); - // localState = "level 3"; - // Fiber.spawn( - // () { - // Expect.equals("level 3", localState); - // localState = "level 4"; - // }, - // name: "child", - // ); - // }, - // name: "child", - // ); - // }, - // terminate: true, - // ); - // Expect.equals("level 4", localState); + localState = "level 1"; + Fiber.launch( + () { + Expect.equals("level 1", localState); + localState = "level 2"; + Fiber.spawn( + () { + Expect.equals("level 2", localState); + localState = "level 3"; + Fiber.spawn( + () { + Expect.equals("level 3", localState); + localState = "level 4"; + }, + name: "child", + ); + }, + name: "child", + ); + }, + terminate: true, + ); + Expect.equals("level 4", localState); } diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc index b0802362dafc..09d42291e63d 100644 --- a/runtime/vm/compiler/stub_code_compiler.cc +++ b/runtime/vm/compiler/stub_code_compiler.cc @@ -3299,6 +3299,7 @@ void StubCodeCompiler::GenerateCoroutineForkStub() { __ StoreFieldToOffset(SPREG, kCallerCoroutine, Coroutine::stack_base_offset()); __ LoadFieldFromOffset(SPREG, kForkedCoroutine, Coroutine::stack_base_offset()); + __ PushRegister(kForkedCoroutine); __ LoadCompressedFieldFromOffset(FUNCTION_REG, kForkedCoroutine, Coroutine::trampoline_offset()); if (!FLAG_precompiled_mode) { @@ -3306,6 +3307,8 @@ void StubCodeCompiler::GenerateCoroutineForkStub() { __ LoadImmediate(ARGS_DESC_REG, 0); } __ Call(compiler::FieldAddress(FUNCTION_REG, Function::entry_point_offset())); + + __ PopRegister(kForkedCoroutine); __ StoreFieldToOffset(SPREG, kForkedCoroutine, Coroutine::stack_base_offset()); diff --git a/sdk/lib/fiber/fiber_processor.dart b/sdk/lib/fiber/fiber_processor.dart index fb3ef69dc566..56666abab657 100644 --- a/sdk/lib/fiber/fiber_processor.dart +++ b/sdk/lib/fiber/fiber_processor.dart @@ -103,7 +103,8 @@ class _FiberProcessor { scheduler._attributes = (scheduler._attributes & ~_kFiberRunning) | _kFiberSuspended; first._attributes = (first._attributes & ~_kFiberSuspended) | _kFiberRunning; _Coroutine._transfer(scheduler, first); - if (processor._running && scheduled._isEmpty) { + if (!processor._running) return; + if (scheduled._isEmpty) { idle(); if (!processor._running) { return; From c597f98a9188f18c035e5bf3b53d54e23ad91c40 Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Thu, 31 Oct 2024 00:23:32 +0400 Subject: [PATCH 10/11] fixes --- runtime/tests/vm/dart/fiber/fiber_test.dart | 2 +- sdk/lib/fiber/fiber_processor.dart | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/tests/vm/dart/fiber/fiber_test.dart b/runtime/tests/vm/dart/fiber/fiber_test.dart index f476e8111d1b..9dc204198524 100644 --- a/runtime/tests/vm/dart/fiber/fiber_test.dart +++ b/runtime/tests/vm/dart/fiber/fiber_test.dart @@ -6,7 +6,7 @@ var globalState = ""; void main() { testBase(); - // // testClosures(); + testClosures(); // testRecycle(); } diff --git a/sdk/lib/fiber/fiber_processor.dart b/sdk/lib/fiber/fiber_processor.dart index 56666abab657..eb0e28320fd6 100644 --- a/sdk/lib/fiber/fiber_processor.dart +++ b/sdk/lib/fiber/fiber_processor.dart @@ -110,7 +110,6 @@ class _FiberProcessor { return; } if (scheduled._isEmpty) throw StateError("There are no scheduled fibers after idle"); - continue; } } } From 30746b540daea4ab3e6da32a017f23a1fab9d052 Mon Sep 17 00:00:00 2001 From: "anton.bashirov" Date: Thu, 31 Oct 2024 00:25:34 +0400 Subject: [PATCH 11/11] fixes --- runtime/tests/vm/dart/fiber/fiber_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/tests/vm/dart/fiber/fiber_test.dart b/runtime/tests/vm/dart/fiber/fiber_test.dart index 9dc204198524..1d57a80a5931 100644 --- a/runtime/tests/vm/dart/fiber/fiber_test.dart +++ b/runtime/tests/vm/dart/fiber/fiber_test.dart @@ -7,7 +7,7 @@ var globalState = ""; void main() { testBase(); testClosures(); - // testRecycle(); + testRecycle(); } void testBase() {