From acaf6df4655aea6364666eeda3dbfc4fe075fa07 Mon Sep 17 00:00:00 2001 From: Li Jie Date: Sat, 15 Aug 2026 01:36:44 +0800 Subject: [PATCH 1/4] perf(coro): fuse synchronous child await transactions --- cl/coro_abi.go | 209 ++++++++---------- cl/coro_abi_test.go | 72 +++--- cl/coro_await.go | 81 ++++--- cl/coro_child_keepalive_test.go | 35 +-- cl/coro_copy_managed_test.go | 2 +- cl/coro_defer_test.go | 84 +++++-- cl/coro_dynamic_await_test.go | 13 +- cl/coro_frame_roots_test.go | 2 +- cl/coro_generic_closure_instance_test.go | 2 +- cl/coro_generic_receiver_instance_test.go | 2 +- cl/coro_implicit_fault_test.go | 6 +- cl/coro_interface_dispatch_test.go | 4 +- cl/coro_interface_plain_test.go | 4 +- cl/coro_interface_zero_receiver_test.go | 4 +- cl/coro_method_test.go | 2 +- cl/coro_outcome_plain_test.go | 6 +- cl/coro_print_builtin_test.go | 2 +- cl/coro_pure_ssa_test.go | 2 +- cl/coro_recover_ir_test.go | 6 +- cl/coro_slice_managed_test.go | 4 +- cl/coro_string_concat_test.go | 4 +- cl/coro_uintptr_observation_test.go | 6 +- internal/build/build.go | 5 +- internal/build/coro_host_entry_test.go | 10 +- internal/build/coro_plan_test.go | 24 +- internal/build/coro_time_sleep_e2e_test.go | 2 +- internal/build/coro_tls_destructor_test.go | 1 - runtime/internal/coro/inline_await.go | 145 +++++++++++- runtime/internal/coro/inline_await_test.go | 190 ++++++++++++++-- runtime/internal/runtime/coro_frame.go | 7 - .../internal/runtime/coro_panic_payload.go | 34 ++- runtime/internal/runtime/coro_run_slice.go | 73 ++---- 32 files changed, 660 insertions(+), 383 deletions(-) diff --git a/cl/coro_abi.go b/cl/coro_abi.go index a2a78d6a0a..fabb49fa24 100644 --- a/cl/coro_abi.go +++ b/cl/coro_abi.go @@ -122,34 +122,31 @@ const ( coroFrameFreeHook = "__llgo_coro_frame_free_v0" coroDescriptorPrefix = "__llgo_coro_frame_descriptor_v0." - coroPhysicalABIVersionV1 uint32 = 1 - coroFrameAllocHookV1 = "__llgo_coro_frame_alloc_v1" - coroFramePublishHookV1 = "__llgo_coro_frame_publish_v1" - coroFramePublishHookV3 = "__llgo_coro_frame_publish_v3" - coroAwaitPrepareHookV1 = "__llgo_coro_await_prepare_v3" - coroAwaitInlineHookV1 = "__llgo_coro_await_inline_v1" - coroAwaitInlineBeginHookV2 = "__llgo_coro_await_inline_begin_v2" - coroAwaitInlineFinishHookV2 = "__llgo_coro_await_inline_finish_v2" - coroAwaitInlineDestroyCommitHookV2 = "__llgo_coro_await_inline_destroy_commit_v2" - coroFrameDestroyCommitHookV2 = "__llgo_coro_frame_destroy_commit_v2" - coroAwaitConsumeHookV1 = "__llgo_coro_await_consume_v1" - coroPreemptPollHookV1 = "__llgo_coro_preempt_poll_v1" - coroYieldPrepareHookV1 = "__llgo_coro_yield_prepare_v1" - coroCriticalEnterHookV1 = "__llgo_coro_critical_enter_v1" - coroCriticalExitHookV1 = "__llgo_coro_critical_exit_v1" - coroKeyedParkHookV2 = "__llgo_coro_keyed_park_v2" - coroKeyedResumeHookV2 = "__llgo_coro_keyed_resume_v2" - coroRunDecisionTakeHookV1 = "__llgo_coro_run_decision_take_v1" - coroRunDecisionTakeZeroHookV1 = "__llgo_coro_run_decision_take_zero_v1" - coroPanicPrepareHookV1 = "__llgo_coro_panic_prepare_v1" - coroPanicTraceReplaceHookV1 = "__llgo_coro_panic_trace_replace_v1" - coroRecoverTakeHookV1 = "__llgo_coro_recover_take_v1" - coroSpawnBeginHookV1 = "__llgo_coro_spawn_begin_v1" - coroSpawnCommitHookV1 = "__llgo_coro_spawn_commit_v1" - coroCompletePrepareHookV2 = "__llgo_coro_complete_prepare_v2" - coroFrameFreeHookV1 = "__llgo_coro_frame_free_v1" - coroDescriptorPrefixV1 = "__llgo_coro_frame_descriptor_v1." - coroBorrowedFrameMetadataWordsV2 = 20 + coroPhysicalABIVersionV1 uint32 = 1 + coroFrameAllocHookV1 = "__llgo_coro_frame_alloc_v1" + coroFramePublishHookV1 = "__llgo_coro_frame_publish_v1" + coroFramePublishHookV3 = "__llgo_coro_frame_publish_v3" + coroAwaitPrepareInlineHookV4 = "__llgo_coro_await_prepare_inline_v4" + coroAwaitInlineFinishHookV2 = "__llgo_coro_await_inline_finish_v2" + coroAwaitInlineDestroyConsumeHookV4 = "__llgo_coro_await_inline_destroy_consume_v4" + coroAwaitConsumeHookV1 = "__llgo_coro_await_consume_v1" + coroPreemptPollHookV1 = "__llgo_coro_preempt_poll_v1" + coroYieldPrepareHookV1 = "__llgo_coro_yield_prepare_v1" + coroCriticalEnterHookV1 = "__llgo_coro_critical_enter_v1" + coroCriticalExitHookV1 = "__llgo_coro_critical_exit_v1" + coroKeyedParkHookV2 = "__llgo_coro_keyed_park_v2" + coroKeyedResumeHookV2 = "__llgo_coro_keyed_resume_v2" + coroRunDecisionTakeHookV1 = "__llgo_coro_run_decision_take_v1" + coroRunDecisionTakeZeroHookV1 = "__llgo_coro_run_decision_take_zero_v1" + coroPanicPrepareHookV1 = "__llgo_coro_panic_prepare_v1" + coroPanicTraceReplaceHookV1 = "__llgo_coro_panic_trace_replace_v1" + coroRecoverTakeHookV1 = "__llgo_coro_recover_take_v1" + coroSpawnBeginHookV1 = "__llgo_coro_spawn_begin_v1" + coroSpawnCommitHookV1 = "__llgo_coro_spawn_commit_v1" + coroCompletePrepareHookV2 = "__llgo_coro_complete_prepare_v2" + coroFrameFreeHookV1 = "__llgo_coro_frame_free_v1" + coroDescriptorPrefixV1 = "__llgo_coro_frame_descriptor_v1." + coroBorrowedFrameMetadataWordsV2 = 20 ) const ( @@ -204,35 +201,33 @@ const coroPreemptInstructionBudget = 64 const coroPreemptCheckpointStride uint64 = 2048 type coroPhysicalABI struct { - version uint32 - hash [16]byte - descriptorFlags uint32 - descriptorName string - traceFunction string - traceFile string - frameAllocHook string - frameFreeHook string - framePublishHook string - awaitPrepareHook string - awaitInlineHook string - awaitInlineFinishHook string - awaitInlineCommitHook string - frameDestroyCommitHook string - awaitConsumeHook string - preemptPollHook string - yieldPrepareHook string - criticalEnterHook string - criticalExitHook string - runDecisionTakeHook string - runDecisionTakeZeroHook string - panicPrepareHook string - panicTraceReplaceHook string - recoverTakeHook string - completePrepareHook string - physicalSig *types.Signature - hasEnv bool - resultSlotType types.Type - resultCount int + version uint32 + hash [16]byte + descriptorFlags uint32 + descriptorName string + traceFunction string + traceFile string + frameAllocHook string + frameFreeHook string + framePublishHook string + awaitPrepareInlineHook string + awaitInlineFinishHook string + awaitInlineDestroyConsumeHook string + awaitConsumeHook string + preemptPollHook string + yieldPrepareHook string + criticalEnterHook string + criticalExitHook string + runDecisionTakeHook string + runDecisionTakeZeroHook string + panicPrepareHook string + panicTraceReplaceHook string + recoverTakeHook string + completePrepareHook string + physicalSig *types.Signature + hasEnv bool + resultSlotType types.Type + resultCount int } // coroBodyContext exists only while emitting one physical coroutine body. It @@ -307,11 +302,9 @@ func newCoroPhysicalABI(p *context, entry plannedFunctionSymbol, sourceSig *type frameFreeHook := coroFrameFreeHookV1 descriptorPrefix := coroDescriptorPrefixV1 framePublishHook := coroFramePublishHookV3 - awaitPrepareHook := coroAwaitPrepareHookV1 - awaitInlineHook := coroAwaitInlineBeginHookV2 + awaitPrepareInlineHook := coroAwaitPrepareInlineHookV4 awaitInlineFinishHook := coroAwaitInlineFinishHookV2 - awaitInlineCommitHook := coroAwaitInlineDestroyCommitHookV2 - frameDestroyCommitHook := coroFrameDestroyCommitHookV2 + awaitInlineDestroyConsumeHook := coroAwaitInlineDestroyConsumeHookV4 awaitConsumeHook := coroAwaitConsumeHookV1 preemptPollHook := coroPreemptPollHookV1 yieldPrepareHook := coroYieldPrepareHookV1 @@ -387,7 +380,7 @@ func newCoroPhysicalABI(p *context, entry plannedFunctionSymbol, sourceSig *type } } key := fmt.Sprintf( - "llgo-coro-physical-v%d\x00%s\x00descriptor-flags=%#x\x00trace-function=%s\x00trace-file=%s\x00coro=%s\x00scheduler=%s\x00panic=%s\x00panic-hook=%s\x00panic-trace-replace=%s\x00recover-take=%s\x00fault-hook=%s\x00fault-payload-hook=%s\x00fault-args-hook=%s\x00fault-args-payload-hook=%s\x00fault-args-abi=x64-yword-v2\x00func-rep=%s\x00frame-publish=%s\x00await-prepare=%s\x00await-inline=%s\x00await-inline-finish=%s\x00await-inline-commit=%s\x00frame-destroy-commit=%s\x00await-consume=%s\x00resume-decision=%s\x00resume-decision-zero=%s\x00critical-enter=%s\x00critical-exit=%s\x00preempt-stride=%d\x00os-thread-lock=%s\x00os-thread-unlock=%s\x00triple=%s\x00cpu=%s\x00features=%s\x00target-abi=%s\x00data-layout=%s\x00ptr=%d\x00sig=%s\x00result=%s", + "llgo-coro-physical-v%d\x00%s\x00descriptor-flags=%#x\x00trace-function=%s\x00trace-file=%s\x00coro=%s\x00scheduler=%s\x00panic=%s\x00panic-hook=%s\x00panic-trace-replace=%s\x00recover-take=%s\x00fault-hook=%s\x00fault-payload-hook=%s\x00fault-args-hook=%s\x00fault-args-payload-hook=%s\x00fault-args-abi=x64-yword-v2\x00func-rep=%s\x00frame-publish=%s\x00await-prepare-inline=%s\x00await-inline-finish=%s\x00await-inline-destroy-consume=%s\x00await-consume-slow=%s\x00resume-decision=%s\x00resume-decision-zero=%s\x00critical-enter=%s\x00critical-exit=%s\x00preempt-stride=%d\x00os-thread-lock=%s\x00os-thread-unlock=%s\x00triple=%s\x00cpu=%s\x00features=%s\x00target-abi=%s\x00data-layout=%s\x00ptr=%d\x00sig=%s\x00result=%s", version, entry.plan.ID, descriptorFlags, @@ -405,11 +398,9 @@ func newCoroPhysicalABI(p *context, entry plannedFunctionSymbol, sourceSig *type faultPayloadArgsHook, funcRepABI, framePublishHook, - awaitPrepareHook, - awaitInlineHook, + awaitPrepareInlineHook, awaitInlineFinishHook, - awaitInlineCommitHook, - frameDestroyCommitHook, + awaitInlineDestroyConsumeHook, awaitConsumeHook, runDecisionTakeHook, runDecisionTakeZeroHook, @@ -431,35 +422,33 @@ func newCoroPhysicalABI(p *context, entry plannedFunctionSymbol, sourceSig *type var hash [16]byte copy(hash[:], sum[:len(hash)]) return coroPhysicalABI{ - version: version, - hash: hash, - descriptorFlags: descriptorFlags, - descriptorName: descriptorPrefix + hex.EncodeToString(hash[:]), - traceFunction: traceFunction, - traceFile: traceFile, - frameAllocHook: frameAllocHook, - frameFreeHook: frameFreeHook, - framePublishHook: framePublishHook, - awaitPrepareHook: awaitPrepareHook, - awaitInlineHook: awaitInlineHook, - awaitInlineFinishHook: awaitInlineFinishHook, - awaitInlineCommitHook: awaitInlineCommitHook, - frameDestroyCommitHook: frameDestroyCommitHook, - awaitConsumeHook: awaitConsumeHook, - preemptPollHook: preemptPollHook, - yieldPrepareHook: yieldPrepareHook, - criticalEnterHook: criticalEnterHook, - criticalExitHook: criticalExitHook, - runDecisionTakeHook: runDecisionTakeHook, - runDecisionTakeZeroHook: runDecisionTakeZeroHook, - panicPrepareHook: panicPrepareHook, - panicTraceReplaceHook: panicTraceReplaceHook, - recoverTakeHook: recoverTakeHook, - completePrepareHook: completePrepareHook, - physicalSig: physicalSig, - hasEnv: hasEnv, - resultSlotType: resultSlotType, - resultCount: sourceSig.Results().Len(), + version: version, + hash: hash, + descriptorFlags: descriptorFlags, + descriptorName: descriptorPrefix + hex.EncodeToString(hash[:]), + traceFunction: traceFunction, + traceFile: traceFile, + frameAllocHook: frameAllocHook, + frameFreeHook: frameFreeHook, + framePublishHook: framePublishHook, + awaitPrepareInlineHook: awaitPrepareInlineHook, + awaitInlineFinishHook: awaitInlineFinishHook, + awaitInlineDestroyConsumeHook: awaitInlineDestroyConsumeHook, + awaitConsumeHook: awaitConsumeHook, + preemptPollHook: preemptPollHook, + yieldPrepareHook: yieldPrepareHook, + criticalEnterHook: criticalEnterHook, + criticalExitHook: criticalExitHook, + runDecisionTakeHook: runDecisionTakeHook, + runDecisionTakeZeroHook: runDecisionTakeZeroHook, + panicPrepareHook: panicPrepareHook, + panicTraceReplaceHook: panicTraceReplaceHook, + recoverTakeHook: recoverTakeHook, + completePrepareHook: completePrepareHook, + physicalSig: physicalSig, + hasEnv: hasEnv, + resultSlotType: resultSlotType, + resultCount: sourceSig.Results().Len(), } } @@ -696,7 +685,7 @@ func coroFramePublishSignature() *types.Signature { return types.NewSignatureType(nil, nil, nil, params, nil, false) } -func coroAwaitPrepareSignature() *types.Signature { +func coroAwaitPrepareInlineSignature() *types.Signature { params := types.NewTuple( types.NewParam(token.NoPos, nil, "g", types.Typ[types.UnsafePointer]), types.NewParam(token.NoPos, nil, "parent", types.Typ[types.UnsafePointer]), @@ -705,17 +694,7 @@ func coroAwaitPrepareSignature() *types.Signature { types.NewParam(token.NoPos, nil, "recoverType", types.Typ[types.UnsafePointer]), types.NewParam(token.NoPos, nil, "recoverData", types.Typ[types.UnsafePointer]), ) - return types.NewSignatureType(nil, nil, nil, params, nil, false) -} - -func coroAwaitInlineSignature() *types.Signature { - pointer := types.Typ[types.UnsafePointer] - params := types.NewTuple( - types.NewParam(token.NoPos, nil, "g", pointer), - types.NewParam(token.NoPos, nil, "parent", pointer), - types.NewParam(token.NoPos, nil, "child", pointer), - ) - results := types.NewTuple(types.NewParam(token.NoPos, nil, "completed", types.Typ[types.Bool])) + results := types.NewTuple(types.NewParam(token.NoPos, nil, "inline", types.Typ[types.Bool])) return types.NewSignatureType(nil, nil, nil, params, results, false) } @@ -731,23 +710,17 @@ func coroAwaitInlineFinishSignature() *types.Signature { return types.NewSignatureType(nil, nil, nil, params, results, false) } -func coroAwaitInlineCommitSignature() *types.Signature { +func coroAwaitInlineDestroyConsumeSignature() *types.Signature { pointer := types.Typ[types.UnsafePointer] params := types.NewTuple( types.NewParam(token.NoPos, nil, "g", pointer), types.NewParam(token.NoPos, nil, "parent", pointer), types.NewParam(token.NoPos, nil, "child", pointer), + types.NewParam(token.NoPos, nil, "typeOut", pointer), + types.NewParam(token.NoPos, nil, "dataOut", pointer), ) - return types.NewSignatureType(nil, nil, nil, params, nil, false) -} - -func coroFrameDestroyCommitSignature() *types.Signature { - pointer := types.Typ[types.UnsafePointer] - params := types.NewTuple( - types.NewParam(token.NoPos, nil, "g", pointer), - types.NewParam(token.NoPos, nil, "handle", pointer), - ) - return types.NewSignatureType(nil, nil, nil, params, nil, false) + results := types.NewTuple(types.NewParam(token.NoPos, nil, "status", types.Typ[types.Uint32])) + return types.NewSignatureType(nil, nil, nil, params, results, false) } func coroAwaitConsumeSignature() *types.Signature { diff --git a/cl/coro_abi_test.go b/cl/coro_abi_test.go index 59dfc8a544..91c01c6323 100644 --- a/cl/coro_abi_test.go +++ b/cl/coro_abi_test.go @@ -248,11 +248,9 @@ func TestCoroChildAwaitPhysicalABIV1Presplit(t *testing.T) { for _, hook := range []string{ coroFrameAllocHookV1, coroFramePublishHookV3, - coroAwaitPrepareHookV1, - coroAwaitInlineBeginHookV2, + coroAwaitPrepareInlineHookV4, coroAwaitInlineFinishHookV2, - coroFrameDestroyCommitHookV2, - coroAwaitInlineDestroyCommitHookV2, + coroAwaitInlineDestroyConsumeHookV4, coroAwaitConsumeHookV1, coroPreemptPollHookV1, coroRunDecisionTakeZeroHookV1, @@ -274,19 +272,14 @@ func TestCoroChildAwaitPhysicalABIV1Presplit(t *testing.T) { if got := strings.Count(ir, "call void @"+coroFramePublishHookV3); got != 2 { t.Fatalf("v1 frame publications = %d, want Parent + Child:\n%s", got, ir) } - if got := strings.Count(ir, "call void @"+coroAwaitPrepareHookV1); got != 1 { - t.Fatalf("v1 await preparations = %d, want one Parent->Child handoff:\n%s", got, ir) - } - if got := strings.Count(ir, "call i1 @"+coroAwaitInlineBeginHookV2); got != 1 { - t.Fatalf("v1 inline await attempts = %d, want one Parent->Child fast path:\n%s", got, ir) + if got := strings.Count(ir, "call i1 @"+coroAwaitPrepareInlineHookV4); got != 1 { + t.Fatalf("v4 fused await prepare/inline attempts = %d, want one Parent->Child handoff:\n%s", got, ir) } if got := strings.Count(ir, "call i1 @"+coroAwaitInlineFinishHookV2); got != 1 { t.Fatalf("v2 inline await finishes = %d, want one Parent->Child ownership settlement:\n%s", got, ir) } - for _, hook := range []string{coroFrameDestroyCommitHookV2, coroAwaitInlineDestroyCommitHookV2} { - if got := strings.Count(ir, "call void @"+hook); got != 1 { - t.Fatalf("v2 inline await %s calls = %d, want one:\n%s", hook, got, ir) - } + if got := strings.Count(ir, "call i32 @"+coroAwaitInlineDestroyConsumeHookV4); got != 1 { + t.Fatalf("v4 fused inline destroy/consume calls = %d, want one:\n%s", got, ir) } if got := strings.Count(ir, "call i32 @"+coroAwaitConsumeHookV1); got != 2 { t.Fatalf("v1 await outcome consume sites = %d, want normal/cancellation reconciliation:\n%s", got, ir) @@ -413,10 +406,14 @@ func TestCoroChildAwaitPhysicalABIV1CoroSplit(t *testing.T) { if !regexp.MustCompile(`call ptr @"?foo\.Child\$coro"?\(`).MatchString(parentResume) { t.Fatalf("Parent resume entry lost the static child ramp call:\n%s", parentResume) } - for _, hook := range []string{coroAwaitPrepareHookV1, coroCompletePrepareHookV2} { - if !strings.Contains(parentResume, "call void @"+hook) { - t.Fatalf("Parent resume entry lost %s:\n%s", hook, parentResume) - } + if !strings.Contains(parentResume, "call i1 @"+coroAwaitPrepareInlineHookV4) { + t.Fatalf("Parent resume entry lost %s:\n%s", coroAwaitPrepareInlineHookV4, parentResume) + } + if !strings.Contains(parentResume, "call void @"+coroCompletePrepareHookV2) { + t.Fatalf("Parent resume entry lost %s:\n%s", coroCompletePrepareHookV2, parentResume) + } + if !strings.Contains(parentResume, "call i32 @"+coroAwaitInlineDestroyConsumeHookV4) { + t.Fatalf("Parent resume entry lost %s:\n%s", coroAwaitInlineDestroyConsumeHookV4, parentResume) } if !strings.Contains(parentResume, "call i32 @"+coroAwaitConsumeHookV1) { t.Fatalf("Parent resume entry lost %s:\n%s", coroAwaitConsumeHookV1, parentResume) @@ -706,7 +703,7 @@ func init() { t.Fatalf("declared init lost its exact direct plain call:\n%s", declaredInit) } if !regexp.MustCompile(`call ptr @"?foo\.Yield\$coro"?\(`).MatchString(declaredInit) || - !strings.Contains(declaredInit, "call void @"+coroAwaitPrepareHookV1) { + !strings.Contains(declaredInit, "call i1 @"+coroAwaitPrepareInlineHookV4) { t.Fatalf("declared init lost its static child await:\n%s", declaredInit) } runCoroABITestPipeline(t, prog, module) @@ -2724,12 +2721,10 @@ func assertCoroStaticChildAwait(t *testing.T, parent string) { childCall := regexp.MustCompile(`call ptr @"?foo\.Child\$coro"?\(`).FindStringIndex(parent) publish := strings.Index(parent, "call void @"+coroFramePublishHookV3) initialSuspend := strings.Index(parent, "call i8 @llvm.coro.suspend") - await := strings.Index(parent, "call void @"+coroAwaitPrepareHookV1) - inline := strings.Index(parent, "call i1 @"+coroAwaitInlineBeginHookV2) + await := strings.Index(parent, "call i1 @"+coroAwaitPrepareInlineHookV4) if childCall == nil || publish < 0 || initialSuspend < 0 || await < 0 || - inline < 0 || - !(publish < initialSuspend && initialSuspend < childCall[0] && childCall[0] < await && await < inline) { - t.Fatalf("Parent hook order is not frame_publish -> initial suspend -> Child -> await_prepare -> await_inline:\n%s", parent) + !(publish < initialSuspend && initialSuspend < childCall[0] && childCall[0] < await) { + t.Fatalf("Parent hook order is not frame_publish -> initial suspend -> Child -> fused await_prepare_inline:\n%s", parent) } prefix := parent[childCall[0]:await] promiseResult := regexp.MustCompile(`(%[-a-zA-Z$._0-9]+) = call ptr @llvm\.coro\.promise\(ptr [^,]+, i32 [0-9]+, i1 false\)`).FindStringSubmatch(prefix) @@ -2748,32 +2743,31 @@ func assertCoroStaticChildAwait(t *testing.T, parent string) { if !state.MatchString(prefix) { t.Fatalf("Parent does not publish Call/Suspended/stateID=1 before await_prepare:\n%s", prefix) } - awaitSuspend := strings.Index(parent[inline:], "call i8 @llvm.coro.suspend") + awaitSuspend := strings.Index(parent[await:], "call i8 @llvm.coro.suspend") if awaitSuspend < 0 { - t.Fatalf("Parent does not retain a conditional slow suspend after await_inline:\n%s", parent) + t.Fatalf("Parent does not retain a conditional slow suspend after fused await_prepare_inline:\n%s", parent) } - awaitSuspend += inline + awaitSuspend += await decisionRelative := strings.Index(parent[awaitSuspend:], "call i32 @"+coroRunDecisionTakeZeroHookV1) if decisionRelative < 0 { t.Fatalf("Parent slow edge does not take its run decision after await resume:\n%s", parent) } - if !regexp.MustCompile(`(?s)call i1 @` + regexp.QuoteMeta(coroAwaitInlineBeginHookV2) + - `.*xor i1 .*true.*br i1`).MatchString(parent[inline:]) { + if !regexp.MustCompile(`(?s)call i1 @` + regexp.QuoteMeta(coroAwaitPrepareInlineHookV4) + + `.*xor i1 .*true.*br i1`).MatchString(parent[await:]) { t.Fatalf("Parent does not branch to the slow suspend on an incomplete inline await:\n%s", parent) } - resume := strings.Index(parent[inline:], "call void @llvm.coro.resume") - done := strings.Index(parent[inline:], "call i1 @llvm.coro.done") - finish := strings.Index(parent[inline:], "call i1 @"+coroAwaitInlineFinishHookV2) - destroy := strings.Index(parent[inline:], "call void @llvm.coro.destroy") - frameCommit := strings.Index(parent[inline:], "call void @"+coroFrameDestroyCommitHookV2) - inlineCommit := strings.Index(parent[inline:], "call void @"+coroAwaitInlineDestroyCommitHookV2) + resume := strings.Index(parent[await:], "call void @llvm.coro.resume") + done := strings.Index(parent[await:], "call i1 @llvm.coro.done") + finish := strings.Index(parent[await:], "call i1 @"+coroAwaitInlineFinishHookV2) + destroy := strings.Index(parent[await:], "call void @llvm.coro.destroy") + inlineCommit := strings.Index(parent[await:], "call i32 @"+coroAwaitInlineDestroyConsumeHookV4) if resume < 0 || done <= resume || finish <= done || destroy <= finish || - frameCommit <= destroy || inlineCommit <= frameCommit { - t.Fatalf("Parent static-inline ownership order is not resume -> done -> finish -> destroy -> frame commit -> await commit:\n%s", parent) + inlineCommit <= destroy { + t.Fatalf("Parent static-inline ownership order is not resume -> done -> finish -> destroy -> fused destroy/consume:\n%s", parent) } - if !regexp.MustCompile(`(?s)store i16 0,.*store i16 2,.*call i32 @` + - regexp.QuoteMeta(coroAwaitConsumeHookV1) + `.*switch i32`).MatchString(parent[inline:]) { - t.Fatalf("Parent shared fast/resumed continuation does not activate and consume the child outcome:\n%s", parent) + if !regexp.MustCompile(`(?s)call i32 @` + regexp.QuoteMeta(coroAwaitInlineDestroyConsumeHookV4) + + `.*store i32 .*load i32.*switch i32`).MatchString(parent[await:]) { + t.Fatalf("Parent shared fast/resumed continuation does not carry the fused or slow child outcome into its status switch:\n%s", parent) } completionState := regexp.MustCompile(`(?s)store i16 2,.*store i16 4,.*store i32 2,`) if !completionState.MatchString(parent[childCall[0]:]) { diff --git a/cl/coro_await.go b/cl/coro_await.go index 00aa3a3c85..1008d2f9b8 100644 --- a/cl/coro_await.go +++ b/cl/coro_await.go @@ -830,12 +830,14 @@ func (p *context) awaitCoroChildWithRecovery( line := p.coroCurrentSourceLine() body.suspendForChild(b, line) - if body.abi.awaitPrepareHook == "" { + if body.abi.awaitPrepareInlineHook == "" { panic("coroutine child await has no scheduler handoff hook") } - publish := p.pkg.NewFunc(body.abi.awaitPrepareHook, coroAwaitPrepareSignature(), llssa.InC) - b.Call( - publish.Expr, + prepareInline := p.pkg.NewFunc( + body.abi.awaitPrepareInlineHook, coroAwaitPrepareInlineSignature(), llssa.InC, + ) + startedInline := b.Call( + prepareInline.Expr, body.task, body.coro.Handle(), child, @@ -843,14 +845,18 @@ func (p *context) awaitCoroChildWithRecovery( recoverType, recoverData, ) - completedInline := p.emitCoroStaticInlineAwait(b, child) if body.abi.awaitConsumeHook == "" { panic("coroutine child await has no outcome consume hook") } typeWord := p.coroFrameAlloca(p.prog.VoidPtr()) dataWord := p.coroFrameAlloca(p.prog.VoidPtr()) + statusWord := p.coroFrameAlloca(p.prog.Uint32()) b.Store(typeWord, p.prog.Nil(p.prog.VoidPtr())) b.Store(dataWord, p.prog.Nil(p.prog.VoidPtr())) + b.Store(statusWord, p.prog.IntVal(0, p.prog.Uint32())) + completedInline := p.emitCoroStaticInlineAwait( + b, child, startedInline, typeWord, dataWord, statusWord, + ) consume := p.pkg.NewFunc(body.abi.awaitConsumeHook, coroAwaitConsumeSignature(), llssa.InC) // A task-cancellation decision is taken before the site's ordinary resumed @@ -861,14 +867,35 @@ func (p *context) awaitCoroChildWithRecovery( // the base while reconciling a concurrent deferred-child recovery/panic as // the overlay. This preserves both cancellation and Go panic ordering. canceled := p.fn.MakeBlock() + resumedOutcome := p.fn.MakeBlock() + var normalContinuation llssa.BasicBlock body.suspendCoroCurrentBlockIf( b.UnOp(token.NOT, completedInline), nil, func(gate llssa.Builder, normal llssa.BasicBlock) { - body.dispatchZeroRunDecisionTo(gate, normal, canceled) + normalContinuation = normal + body.dispatchZeroRunDecisionTo(gate, resumedOutcome, canceled) }, ) + if normalContinuation == nil { + panic("coroutine child await lost its resumed normal continuation") + } body.activate(b) + resumeBuilder := p.fn.NewBuilder() + resumeBuilder.DICopyCurrentDebugLocation(b) + resumeBuilder.SetBlock(resumedOutcome) + body.activate(resumeBuilder) + resumedStatus := resumeBuilder.Call( + consume.Expr, + body.task, + body.coro.Handle(), + resumeBuilder.Convert(p.prog.VoidPtr(), typeWord), + resumeBuilder.Convert(p.prog.VoidPtr(), dataWord), + ) + resumeBuilder.Store(statusWord, resumedStatus) + resumeBuilder.Jump(normalContinuation) + resumeBuilder.Dispose() + cancelBuilder := p.fn.NewBuilder() cancelBuilder.DICopyCurrentDebugLocation(b) cancelBuilder.SetBlock(canceled) @@ -940,13 +967,7 @@ func (p *context) awaitCoroChildWithRecovery( // terminal outcome therefore lives in scheduler-owned parent metadata, not // in the result slot or child promise. Consume exactly once before reading // results or allowing another child transaction to start. - status := b.Call( - consume.Expr, - body.task, - body.coro.Handle(), - b.Convert(p.prog.VoidPtr(), typeWord), - b.Convert(p.prog.VoidPtr(), dataWord), - ) + status := b.Load(statusWord) p.emitCoroKeepaliveSlots(b, keepaliveSlots) returned := p.fn.MakeBlock() panicked := p.fn.MakeBlock() @@ -1005,27 +1026,28 @@ func (p *context) awaitCoroChildWithRecovery( // 22 to select a coro_elide_safe no-allocation ramp and embed the child frame // in its parent. A declined/deep or genuinely suspended child converges on the // existing false result and parent suspend path. -func (p *context) emitCoroStaticInlineAwait(b llssa.Builder, child llssa.Expr) llssa.Expr { +func (p *context) emitCoroStaticInlineAwait( + b llssa.Builder, child, startedInline, typeWord, dataWord, statusWord llssa.Expr, +) llssa.Expr { body := p.coroBody() - if body == nil || b == nil || b.Func != p.fn || child.IsNil() || - body.abi.awaitInlineHook == "" || body.abi.awaitInlineFinishHook == "" || - body.abi.awaitInlineCommitHook == "" || body.abi.frameDestroyCommitHook == "" { + if body == nil || b == nil || b.Func != p.fn || child.IsNil() || startedInline.IsNil() || + typeWord.IsNil() || dataWord.IsNil() || statusWord.IsNil() || + body.abi.awaitInlineFinishHook == "" || + body.abi.awaitInlineDestroyConsumeHook == "" { panic("coroutine static inline await has an incomplete physical contract") } - begin := p.pkg.NewFunc(body.abi.awaitInlineHook, coroAwaitInlineSignature(), llssa.InC) finish := p.pkg.NewFunc( body.abi.awaitInlineFinishHook, coroAwaitInlineFinishSignature(), llssa.InC, ) - frameCommit := p.pkg.NewFunc( - body.abi.frameDestroyCommitHook, coroFrameDestroyCommitSignature(), llssa.InC, - ) - inlineCommit := p.pkg.NewFunc( - body.abi.awaitInlineCommitHook, coroAwaitInlineCommitSignature(), llssa.InC, + destroyConsume := p.pkg.NewFunc( + body.abi.awaitInlineDestroyConsumeHook, + coroAwaitInlineDestroyConsumeSignature(), + llssa.InC, ) started, declined, destroy, joined := p.fn.MakeBlock(), p.fn.MakeBlock(), p.fn.MakeBlock(), p.fn.MakeBlock() parent := body.coro.Handle() - b.If(b.Call(begin.Expr, body.task, parent, child), started, declined) + b.If(startedInline, started, declined) b.SetBlockEx(started, llssa.AtEnd, false) b.CoroResume(child) @@ -1036,8 +1058,15 @@ func (p *context) emitCoroStaticInlineAwait(b llssa.Builder, child llssa.Expr) l b.Jump(joined) b.SetBlockEx(destroy, llssa.AtEnd, false) b.CoroDestroy(child) - b.Call(frameCommit.Expr, body.task, child) - b.Call(inlineCommit.Expr, body.task, parent, child) + destroyStatus := b.Call( + destroyConsume.Expr, + body.task, + parent, + child, + b.Convert(p.prog.VoidPtr(), typeWord), + b.Convert(p.prog.VoidPtr(), dataWord), + ) + b.Store(statusWord, destroyStatus) b.Jump(joined) b.SetBlockContinuation(joined) diff --git a/cl/coro_child_keepalive_test.go b/cl/coro_child_keepalive_test.go index e311cd2dc9..66bedcc80c 100644 --- a/cl/coro_child_keepalive_test.go +++ b/cl/coro_child_keepalive_test.go @@ -109,45 +109,46 @@ func Parent(pointer *byte) { } parentRamp := requireCoroPhysicalFunction(t, module, "foo.Parent") - consumeCount, ownerUseCount := coroChildAwaitCompletionOwnerUseCounts(parentRamp) - if consumeCount != 2 || ownerUseCount != 2 { - t.Fatalf("child completion consume/owner fake-use sites = %d/%d, want 2/2:\n%s", - consumeCount, ownerUseCount, parentRamp.String()) + slowConsumeCount, fusedConsumeCount, ownerUseCount := coroChildAwaitCompletionOwnerUseCounts(parentRamp) + if slowConsumeCount != 2 || fusedConsumeCount != 1 || ownerUseCount != 2 { + t.Fatalf("child completion slow/fused consume and owner fake-use sites = %d/%d/%d, want 2/1/2:\n%s", + slowConsumeCount, fusedConsumeCount, ownerUseCount, parentRamp.String()) } runCoroABITestPipeline(t, prog, module) resume := module.NamedFunction("foo.Parent$coro.resume") - consumeCount, ownerUseCount = coroChildAwaitCompletionOwnerUseCounts(resume) - if resume.IsNil() || consumeCount != 2 || ownerUseCount != 2 { + slowConsumeCount, fusedConsumeCount, ownerUseCount = coroChildAwaitCompletionOwnerUseCounts(resume) + if resume.IsNil() || slowConsumeCount != 2 || fusedConsumeCount != 1 || ownerUseCount != 2 { t.Fatalf("CoroSplit did not retain both completion-bound pointer owners:\n%s", module.String()) } } -func coroChildAwaitCompletionOwnerUseCounts(function llvm.Value) (consumes, ownerUses int) { +func coroChildAwaitCompletionOwnerUseCounts(function llvm.Value) (slowConsumes, fusedConsumes, ownerUses int) { if function.IsNil() { - return 0, 0 + return 0, 0, 0 } for _, block := range function.BasicBlocks() { - awaitingOwnerUse := false for instruction := block.FirstInstruction(); !instruction.IsNil(); instruction = llvm.NextInstruction(instruction) { if instruction.InstructionOpcode() != llvm.Call { continue } switch instruction.CalledValue().Name() { case coroAwaitConsumeHookV1: - consumes++ - awaitingOwnerUse = true + slowConsumes++ + case coroAwaitInlineDestroyConsumeHookV4: + fusedConsumes++ case "llvm.fake.use": // The scheduler's scalar run-decision scratch may also need an - // llvm.fake.use. The pointer owner retained across this exact - // child await is distinguished by its post-consume frame load. - if awaitingOwnerUse && instruction.OperandsCount() > 1 && - instruction.Operand(0).InstructionOpcode() == llvm.Load { + // llvm.fake.use. The pointer owner retained across this child + // transaction is distinguished by its pointer-typed frame load; + // one shared site covers both fused and normally-resumed outcomes. + if instruction.OperandsCount() > 1 && + instruction.Operand(0).InstructionOpcode() == llvm.Load && + instruction.Operand(0).Type().TypeKind() == llvm.PointerTypeKind { ownerUses++ - awaitingOwnerUse = false } } } } - return consumes, ownerUses + return slowConsumes, fusedConsumes, ownerUses } diff --git a/cl/coro_copy_managed_test.go b/cl/coro_copy_managed_test.go index 0ac44c332a..9de912d01b 100644 --- a/cl/coro_copy_managed_test.go +++ b/cl/coro_copy_managed_test.go @@ -136,7 +136,7 @@ func TestCoroCopyHelperNativeAndWasm32(t *testing.T) { if !strings.Contains(body, "runtime.SliceCopy") || strings.Contains(body, "runtime.SliceCopy$coro") { t.Fatalf("%s did not call the exact plain SliceCopy helper:\n%s", name, body) } - if strings.Contains(body, coroAwaitPrepareHookV1) || strings.Contains(body, coroAwaitConsumeHookV1) { + if strings.Contains(body, coroAwaitPrepareInlineHookV4) || strings.Contains(body, coroAwaitConsumeHookV1) { t.Fatalf("%s awaited a proven no-suspend SliceCopy helper:\n%s", name, body) } } diff --git a/cl/coro_defer_test.go b/cl/coro_defer_test.go index ff3f0de9e4..47ac8086c2 100644 --- a/cl/coro_defer_test.go +++ b/cl/coro_defer_test.go @@ -433,7 +433,7 @@ func TestCoroDynamicCleanupLIFOIRNativeAndWasm32(t *testing.T) { body := requireCoroPhysicalFunction(t, module, "foo.Root").String() for _, required := range []string{ "AllocU", "FreeDeferNode", "switch i32", "foo.Cleanup$coro", - "llvm.coro.promise", coroAwaitPrepareHookV1, coroFaultPayloadHookV1, + "llvm.coro.promise", coroAwaitPrepareInlineHookV4, coroFaultPayloadHookV1, } { if !strings.Contains(body, required) { t.Fatalf("dynamic cleanup body lacks %q:\n%s", required, body) @@ -494,7 +494,7 @@ func assertCoroCapturedCleanupCall(t *testing.T, function llvm.Value, target str if requireContextLoad && context.InstructionOpcode() != llvm.Load { t.Fatalf("captured cleanup context is not loaded from its registration slot:\n%s", call.String()) } - if got := countCoroIRDirectCalls(function, coroAwaitPrepareHookV1); got != 1 { + if got := countCoroIRDirectCalls(function, coroAwaitPrepareInlineHookV4); got != 1 { t.Fatalf("%s captured cleanup await_prepare calls = %d, want 1:\n%s", function.Name(), got, function.String()) } } @@ -566,7 +566,7 @@ func assertCoroAwaitCompletionCleanupControlFlow(t *testing.T, function llvm.Val t.Fatal("cannot inspect nil parent completion function") } body := function.String() - await := strings.Index(body, "call void @"+coroAwaitPrepareHookV1) + await := strings.Index(body, "call i1 @"+coroAwaitPrepareInlineHookV4) if await < 0 { t.Fatalf("%s has no parent-owned child await preparation:\n%s", function.Name(), body) } @@ -579,21 +579,23 @@ func assertCoroAwaitCompletionCleanupControlFlow(t *testing.T, function llvm.Val } } - var normalConsume, canceledConsume, dispatch, canceledDispatch llvm.Value + var slowConsume, fusedConsume, canceledConsume, dispatch, canceledDispatch llvm.Value for _, block := range function.BasicBlocks() { for instruction := block.FirstInstruction(); !instruction.IsNil(); instruction = llvm.NextInstruction(instruction) { - if instruction.InstructionOpcode() != llvm.Call || instruction.CalledValue().Name() != coroAwaitConsumeHookV1 { + if instruction.InstructionOpcode() != llvm.Call { continue } - terminator := block.LastInstruction() - if !terminator.IsNil() && terminator.InstructionOpcode() == llvm.Switch && terminator.Operand(0) == instruction && - !coroTestBlockStoresI32(block, coroStaticCleanupContinueComplete) { - if !normalConsume.IsNil() { - t.Fatalf("%s has multiple normal child completion dispatches:\n%s", function.Name(), body) + if instruction.CalledValue().Name() == coroAwaitInlineDestroyConsumeHookV4 { + if !fusedConsume.IsNil() { + t.Fatalf("%s has multiple fused child completion consumes:\n%s", function.Name(), body) } - normalConsume, dispatch = instruction, terminator + fusedConsume = instruction continue } + if instruction.CalledValue().Name() != coroAwaitConsumeHookV1 { + continue + } + terminator := block.LastInstruction() if !terminator.IsNil() && terminator.InstructionOpcode() == llvm.Switch && terminator.Operand(0) == instruction && coroTestBlockStoresI32(block, coroStaticCleanupContinueComplete) { if !canceledConsume.IsNil() { @@ -602,15 +604,32 @@ func assertCoroAwaitCompletionCleanupControlFlow(t *testing.T, function llvm.Val canceledConsume, canceledDispatch = instruction, terminator continue } - t.Fatalf("%s child completion consume is not status-dispatched into cleanup:\n%s", function.Name(), body) + if !slowConsume.IsNil() { + t.Fatalf("%s has multiple normally-resumed child completion consumes:\n%s", function.Name(), body) + } + slowConsume = instruction + } + terminator := block.LastInstruction() + if !terminator.IsNil() && coroTestIsAwaitCompletionSwitch(terminator) && + terminator.Operand(0).InstructionOpcode() == llvm.Load && + !coroTestBlockStoresI32(block, coroStaticCleanupContinueComplete) { + if !dispatch.IsNil() { + t.Fatalf("%s has multiple shared child completion dispatches:\n%s", function.Name(), body) + } + dispatch = terminator } } - if normalConsume.IsNil() || canceledConsume.IsNil() || dispatch.IsNil() || canceledDispatch.IsNil() { - t.Fatalf("%s lacks distinct normal/canceled child completion reconciliation:\n%s", function.Name(), body) + if slowConsume.IsNil() || fusedConsume.IsNil() || canceledConsume.IsNil() || dispatch.IsNil() || canceledDispatch.IsNil() { + t.Fatalf("%s lacks fused/normal/canceled child completion reconciliation:\n%s", function.Name(), body) + } + statusSlot := dispatch.Operand(0).Operand(0) + if !coroTestBlockStoresValueTo(slowConsume.InstructionParent(), slowConsume, statusSlot) || + !coroTestBlockStoresValueTo(fusedConsume.InstructionParent(), fusedConsume, statusSlot) { + t.Fatalf("%s fused and normally-resumed outcomes do not converge through one status slot:\n%s", function.Name(), body) } gateFound := false inlineFound := false - normalBlock, canceledBlock := normalConsume.InstructionParent(), canceledConsume.InstructionParent() + normalBlock, canceledBlock := dispatch.InstructionParent(), canceledConsume.InstructionParent() for _, block := range function.BasicBlocks() { for instruction := block.FirstInstruction(); !instruction.IsNil(); instruction = llvm.NextInstruction(instruction) { if instruction.InstructionOpcode() != llvm.Call { @@ -855,6 +874,41 @@ func coroTestFirstReachableAwaitConsumes( return result } +func coroTestIsAwaitCompletionSwitch(terminator llvm.Value) bool { + if terminator.IsNil() || terminator.InstructionOpcode() != llvm.Switch { + return false + } + want := map[uint64]bool{ + coroAwaitCompletionReturn: false, + coroAwaitCompletionPanic: false, + coroAwaitCompletionAbort: false, + coroAwaitCompletionShutdown: false, + coroAwaitCompletionGoexit: false, + } + for successor := 1; successor < terminator.SuccessorsCount(); successor++ { + value := terminator.GetSwitchCaseValue(successor).ZExtValue() + if _, ok := want[value]; ok { + want[value] = true + } + } + for _, present := range want { + if !present { + return false + } + } + return true +} + +func coroTestBlockStoresValueTo(block llvm.BasicBlock, value, address llvm.Value) bool { + for instruction := block.FirstInstruction(); !instruction.IsNil(); instruction = llvm.NextInstruction(instruction) { + if instruction.InstructionOpcode() == llvm.Store && + instruction.Operand(0) == value && instruction.Operand(1) == address { + return true + } + } + return false +} + func coroTestBlockCanReachDirectCall(entry llvm.BasicBlock, callee string) bool { seen := make(map[llvm.BasicBlock]bool) pending := []llvm.BasicBlock{entry} diff --git a/cl/coro_dynamic_await_test.go b/cl/coro_dynamic_await_test.go index 7dfb70567a..9fc4bed388 100644 --- a/cl/coro_dynamic_await_test.go +++ b/cl/coro_dynamic_await_test.go @@ -151,13 +151,12 @@ func Apply(callback func(int) int, value int) int { t.Fatalf("Apply is missing plain/coroutine descriptor branches (plain=%v coro=%v):\n%s", plainCall, coroCall, applyIR) } if !strings.Contains(applyIR, "@llvm.coro.promise") || - !strings.Contains(applyIR, "call void @"+coroAwaitPrepareHookV1) || - !strings.Contains(applyIR, "call i1 @"+coroAwaitInlineBeginHookV2) { + !strings.Contains(applyIR, "call i1 @"+coroAwaitPrepareInlineHookV4) || + !strings.Contains(applyIR, "call i32 @"+coroAwaitInlineDestroyConsumeHookV4) { t.Fatalf("Apply coroutine descriptor branch does not enter the shared child-await handoff:\n%s", applyIR) } - await := strings.Index(applyIR, "call void @"+coroAwaitPrepareHookV1) - inline := strings.Index(applyIR, "call i1 @"+coroAwaitInlineBeginHookV2) - if await < coroCall[0] || inline < await || strings.Index(applyIR[inline:], "call i8 @llvm.coro.suspend") < 0 { + await := strings.Index(applyIR, "call i1 @"+coroAwaitPrepareInlineHookV4) + if await < coroCall[0] || strings.Index(applyIR[await:], "call i8 @llvm.coro.suspend") < 0 { t.Fatalf("Apply does not publish, try inline completion, and retain its dynamic-child slow suspend:\n%s", applyIR) } if !regexp.MustCompile(`store i64 [^,]+, ptr `).MatchString(applyIR[plainCall[0]:]) { @@ -286,8 +285,8 @@ func Apply( t.Fatalf("verify aggregate managed descriptor await: %v\n%s", err, module.String()) } applyIR := requireCoroPhysicalFunction(t, module, "foo.Apply").String() - if !strings.Contains(applyIR, "call void @"+coroAwaitPrepareHookV1) || - !strings.Contains(applyIR, "call i1 @"+coroAwaitInlineBeginHookV2) || + if !strings.Contains(applyIR, "call i1 @"+coroAwaitPrepareInlineHookV4) || + !strings.Contains(applyIR, "call i32 @"+coroAwaitInlineDestroyConsumeHookV4) || strings.Count(applyIR, "extractvalue") < 6 { t.Fatalf("aggregate descriptor branches did not hand off child and merge six typed results:\n%s", applyIR) } diff --git a/cl/coro_frame_roots_test.go b/cl/coro_frame_roots_test.go index bf5abbcdb4..c683b1dca1 100644 --- a/cl/coro_frame_roots_test.go +++ b/cl/coro_frame_roots_test.go @@ -667,7 +667,7 @@ func Root(header *Header, offset uintptr) unsafe.Pointer { t.Fatalf("verify uintptr roundtrip before CoroSplit: %v\n%s", err, module.String()) } body := requireCoroPhysicalFunction(t, module, "foo.Root").String() - for _, required := range []string{"ptrtoint", "inttoptr", "foo.Align$coro", "call void @" + coroAwaitPrepareHookV1} { + for _, required := range []string{"ptrtoint", "inttoptr", "foo.Align$coro", "call i1 @" + coroAwaitPrepareInlineHookV4} { if !strings.Contains(body, required) { t.Fatalf("uintptr roundtrip child-await coroutine lacks %q:\n%s", required, body) } diff --git a/cl/coro_generic_closure_instance_test.go b/cl/coro_generic_closure_instance_test.go index 6c47424ac0..5c56e29b40 100644 --- a/cl/coro_generic_closure_instance_test.go +++ b/cl/coro_generic_closure_instance_test.go @@ -169,7 +169,7 @@ func Root(b *Box[int]) { b.All()(Yield) } } ir := module.String() if strings.Count(ir, coroPlainDispatchDescriptorPrefix) < 2 || - !strings.Contains(ir, "{ ptr, ptr }") || !strings.Contains(ir, "call void @"+coroAwaitPrepareHookV1) { + !strings.Contains(ir, "{ ptr, ptr }") || !strings.Contains(ir, "call i1 @"+coroAwaitPrepareInlineHookV4) { t.Fatalf("recursive descriptor transport is incomplete:\n%s", ir) } runCoroABITestPipeline(t, prog, module) diff --git a/cl/coro_generic_receiver_instance_test.go b/cl/coro_generic_receiver_instance_test.go index bc8a0c6b2a..bdf9b718c1 100644 --- a/cl/coro_generic_receiver_instance_test.go +++ b/cl/coro_generic_receiver_instance_test.go @@ -125,7 +125,7 @@ func Root(p *Pointer[int]) *int { return p.Load() } t.Fatalf("verify generic receiver instance before CoroSplit: %v\n%s", err, module.String()) } rootIR := requireCoroPhysicalFunction(t, module, "foo.Root").String() - if !strings.Contains(rootIR, "$coro") || !strings.Contains(rootIR, "call void @"+coroAwaitPrepareHookV1) { + if !strings.Contains(rootIR, "$coro") || !strings.Contains(rootIR, "call i1 @"+coroAwaitPrepareInlineHookV4) { t.Fatalf("generic receiver call did not use child await:\n%s", rootIR) } runCoroABITestPipeline(t, prog, module) diff --git a/cl/coro_implicit_fault_test.go b/cl/coro_implicit_fault_test.go index e1f81a6c06..38bf48c5d6 100644 --- a/cl/coro_implicit_fault_test.go +++ b/cl/coro_implicit_fault_test.go @@ -256,7 +256,7 @@ func TestCoroImplicitNilFieldAddrNativeAndWasm32(t *testing.T) { recovering := requireCoroPhysicalFunction(t, module, "foo.WithRecover").String() if strings.Count(recovering, "call void @"+coroFaultPayloadHookV1) != 1 || strings.Contains(recovering, "call void @"+coroFaultPrepareHookV1) || - countCoroIRDirectCalls(requireCoroPhysicalFunction(t, module, "foo.WithRecover"), coroAwaitPrepareHookV1) != 1 || + countCoroIRDirectCalls(requireCoroPhysicalFunction(t, module, "foo.WithRecover"), coroAwaitPrepareInlineHookV4) != 1 || countCoroIRDirectCalls(requireCoroPhysicalFunction(t, module, "foo.RecoverFault"), coroRecoverTakeHookV1) != 1 { t.Fatalf("recoverable implicit fault does not use the shared panic/child transaction:\nWithRecover:\n%s\nRecoverFault:\n%s", recovering, requireCoroPhysicalFunction(t, module, "foo.RecoverFault").String()) @@ -280,7 +280,7 @@ func TestCoroImplicitNilFieldAddrNativeAndWasm32(t *testing.T) { recoverFault := module.NamedFunction("foo.RecoverFault$coro.resume") if withRecover.IsNil() || recoverFault.IsNil() || strings.Count(withRecover.String(), "call void @"+coroFaultPayloadHookV1) != 1 || - countCoroIRDirectCalls(withRecover, coroAwaitPrepareHookV1) != 1 || + countCoroIRDirectCalls(withRecover, coroAwaitPrepareInlineHookV4) != 1 || countCoroIRDirectCalls(recoverFault, coroRecoverTakeHookV1) != 1 { t.Fatalf("post-split recoverable implicit fault lost its payload/recover transaction:\n%s", module.String()) } @@ -323,7 +323,7 @@ func TestCoroIntegerDivideByZeroUsesStructuredFaultNativeAndWasm32(t *testing.T) } body := requireCoroPhysicalFunction(t, module, "foo."+name).String() if strings.Contains(body, "AssertDivideByZero") || - strings.Contains(body, "call void @"+coroAwaitPrepareHookV1) || + strings.Contains(body, "call i1 @"+coroAwaitPrepareInlineHookV4) || strings.Count(body, "call void @"+coroFaultPrepareHookV1) != 1 || !strings.Contains(body, fmt.Sprintf("i32 %d", coroFaultIntegerDivideByZeroV1)) { t.Fatalf("%s did not exclusively use one structured divide-by-zero fault:\n%s", name, body) diff --git a/cl/coro_interface_dispatch_test.go b/cl/coro_interface_dispatch_test.go index 962228fdfd..04f50080a7 100644 --- a/cl/coro_interface_dispatch_test.go +++ b/cl/coro_interface_dispatch_test.go @@ -308,8 +308,8 @@ func Root(value interface{ As(any) bool }, target any, flag bool) bool { rootIR := requireCoroPhysicalFunction(t, module, "foo.Root").String() if !strings.Contains(rootIR, "coro.dispatch.version.invalid") || !strings.Contains(rootIR, "coro.dispatch.flags.unknown") || - !strings.Contains(rootIR, "call void @"+coroAwaitPrepareHookV1) || - !strings.Contains(rootIR, "call i1 @"+coroAwaitInlineBeginHookV2) { + !strings.Contains(rootIR, "call i1 @"+coroAwaitPrepareInlineHookV4) || + !strings.Contains(rootIR, "call i32 @"+coroAwaitInlineDestroyConsumeHookV4) { t.Fatalf("open interface invoke did not enter validated descriptor child-await lowering:\n%s", rootIR) } if strings.Contains(rootIR, "call i1 %") && !strings.Contains(rootIR, "coro.dispatch") { diff --git a/cl/coro_interface_plain_test.go b/cl/coro_interface_plain_test.go index 85851b4731..8e29b63d84 100644 --- a/cl/coro_interface_plain_test.go +++ b/cl/coro_interface_plain_test.go @@ -784,7 +784,7 @@ func assertCoroManagedClosedInterfaceIR(t *testing.T, ir string) { if !strings.Contains(ir, "llvm.coro.suspend") && !strings.Contains(ir, ".resume") { t.Fatalf("coroutine body has no suspension/resume marker:\n%s", ir) } - if !strings.Contains(ir, coroAwaitPrepareHookV1) { + if !strings.Contains(ir, coroAwaitPrepareInlineHookV4) { t.Fatalf("coroutine body does not await the managed interface child:\n%s", ir) } if strings.Contains(ir, "IfacePtrData") { @@ -797,7 +797,7 @@ func assertCoroClosedInterfacePlainIR(t *testing.T, ir string) { if !strings.Contains(ir, "llvm.coro.suspend") && !strings.Contains(ir, ".resume") { t.Fatalf("coroutine body has no suspension/resume marker:\n%s", ir) } - if strings.Contains(ir, coroAwaitPrepareHookV1) { + if strings.Contains(ir, coroAwaitPrepareInlineHookV4) { t.Fatalf("closed no-unwind interface invoke retained a managed child transaction:\n%s", ir) } } diff --git a/cl/coro_interface_zero_receiver_test.go b/cl/coro_interface_zero_receiver_test.go index 7741afb131..e34db36cf1 100644 --- a/cl/coro_interface_zero_receiver_test.go +++ b/cl/coro_interface_zero_receiver_test.go @@ -151,7 +151,7 @@ func Root(runner Runner) int { return runner.Run() } t.Fatalf("zero-size interface module retained a native-stack nil assertion:\n%s", ir) } rootIR := requireCoroPhysicalFunction(t, module, "foo.Root").String() - if !strings.Contains(rootIR, "call void @"+coroAwaitPrepareHookV1) || + if !strings.Contains(rootIR, "call i1 @"+coroAwaitPrepareInlineHookV4) || !strings.Contains(rootIR, "call i8 @llvm.coro.suspend") { t.Fatalf("zero-size interface dispatch did not use structured child-await lowering:\n%s", rootIR) } @@ -170,7 +170,7 @@ func Root(runner Runner) int { return runner.Run() } wrapperIR := wrapperCoro.String() if strings.Contains(wrapperIR, "AssertNilDeref") || !strings.Contains(wrapperIR, "call void @"+coroFaultPrepareHookV1) || - !strings.Contains(wrapperIR, "call void @"+coroAwaitPrepareHookV1) { + !strings.Contains(wrapperIR, "call i1 @"+coroAwaitPrepareInlineHookV4) { t.Fatalf("promoted wrapper did not lower pointer adaptation through structured fault/await edges:\n%s", wrapperIR) } diff --git a/cl/coro_method_test.go b/cl/coro_method_test.go index 59169e6cb7..dfc4cd36d2 100644 --- a/cl/coro_method_test.go +++ b/cl/coro_method_test.go @@ -193,7 +193,7 @@ func Root(waiter Waiter) uint32 { <-gate; return waiter.Wait() } } rootIR := requireCoroPhysicalFunction(t, module, "foo.Root").String() waitName := funcName(ssaPkg.Pkg, wait, false) + coroPrimarySuffix - if required := "call void @" + coroAwaitPrepareHookV1; !strings.Contains(rootIR, required) { + if required := "call i1 @" + coroAwaitPrepareInlineHookV4; !strings.Contains(rootIR, required) { t.Fatalf("pointer-receiver interface await lacks %q:\n%s", required, rootIR) } for _, forbidden := range []string{"coro.dispatch.version.invalid", "coro.dispatch.hash.invalid"} { diff --git a/cl/coro_outcome_plain_test.go b/cl/coro_outcome_plain_test.go index 9edbd701a5..144ccab340 100644 --- a/cl/coro_outcome_plain_test.go +++ b/cl/coro_outcome_plain_test.go @@ -580,7 +580,7 @@ func TestCoroOutcomePlainDAGNativeAndWasm32(t *testing.T) { t.Fatalf("Middle did not propagate child completion status %d into its parent record:\n%s", status, middleIR) } } - for _, forbidden := range []string{"llvm.coro.", "$coro", ".resume", ".destroy", coroAwaitPrepareHookV1, coroAwaitConsumeHookV1} { + for _, forbidden := range []string{"llvm.coro.", "$coro", ".resume", ".destroy", coroAwaitPrepareInlineHookV4, coroAwaitConsumeHookV1} { if strings.Contains(middleIR, forbidden) { t.Fatalf("outcome-plain DAG retained coroutine artifact %q:\n%s", forbidden, middleIR) } @@ -696,9 +696,9 @@ func TestCoroOutcomePlainPhysicalCostAgainstCoroutineBaseline(t *testing.T) { } baselineParent := baselineModule.NamedFunction("foo.Parent$coro.resume").String() optimizedParent := optimizedModule.NamedFunction("foo.Parent$coro.resume").String() - baselineAwaitCalls := strings.Count(baselineParent, coroAwaitPrepareHookV1) + + baselineAwaitCalls := strings.Count(baselineParent, coroAwaitPrepareInlineHookV4) + strings.Count(baselineParent, coroAwaitConsumeHookV1) - optimizedAwaitCalls := strings.Count(optimizedParent, coroAwaitPrepareHookV1) + + optimizedAwaitCalls := strings.Count(optimizedParent, coroAwaitPrepareInlineHookV4) + strings.Count(optimizedParent, coroAwaitConsumeHookV1) if baselineAwaitCalls != 0 || optimizedAwaitCalls != 0 || !strings.Contains(baselineParent, "foo.Leaf$outcome") || diff --git a/cl/coro_print_builtin_test.go b/cl/coro_print_builtin_test.go index ae2337776f..47c507a95f 100644 --- a/cl/coro_print_builtin_test.go +++ b/cl/coro_print_builtin_test.go @@ -246,7 +246,7 @@ func TestCoroPrintBuiltinManagedHelpersNativeAndWasm32(t *testing.T) { t.Fatalf("%s is not one call-free plain scalar transform:\n%s", transform, plain.String()) } } - if got := strings.Count(body, "call void @"+coroAwaitPrepareHookV1); got != 7 { + if got := strings.Count(body, "call i1 @"+coroAwaitPrepareInlineHookV4); got != 7 { t.Fatalf("print helper awaits = %d, want 7:\n%s", got, body) } diff --git a/cl/coro_pure_ssa_test.go b/cl/coro_pure_ssa_test.go index 7cbfc655b4..8b564e0f5d 100644 --- a/cl/coro_pure_ssa_test.go +++ b/cl/coro_pure_ssa_test.go @@ -118,7 +118,7 @@ func TestCoroPureSSAPhysicalABIV1NativeAndWasm(t *testing.T) { for _, required := range []string{ "alloca %foo.Pair", "foo.Child$coro", - "call void @" + coroAwaitPrepareHookV1, + "call i1 @" + coroAwaitPrepareInlineHookV4, "call i1 @" + coroPreemptPollHookV1, } { if !strings.Contains(rootIR, required) { diff --git a/cl/coro_recover_ir_test.go b/cl/coro_recover_ir_test.go index 4f7a5b5615..e033da9804 100644 --- a/cl/coro_recover_ir_test.go +++ b/cl/coro_recover_ir_test.go @@ -104,7 +104,7 @@ func assertCoroRecoverIR(t *testing.T, module llvm.Module, split bool) { rootRepanic := function("RootRepanic") catchAndRepanic := function("CatchAndRepanic") - if got := countCoroIRDirectCalls(rootRecover, coroAwaitPrepareHookV1); got != 1 { + if got := countCoroIRDirectCalls(rootRecover, coroAwaitPrepareInlineHookV4); got != 1 { t.Fatalf("RootRecover await_prepare_v3 calls = %d, want 1 (post-split=%t):\n%s", got, split, rootRecover.String()) } if got := countCoroIRDirectCalls(catch, coroRecoverTakeHookV1); got != 1 { @@ -113,11 +113,11 @@ func assertCoroRecoverIR(t *testing.T, module llvm.Module, split bool) { if got := countCoroIRDirectCalls(rootNil, coroRecoverTakeHookV1); got != 1 { t.Fatalf("root recover(nil) take calls = %d, want 1 (post-split=%t):\n%s", got, split, rootNil.String()) } - if got := countCoroIRDirectCalls(rootNil, coroAwaitPrepareHookV1); got != 0 { + if got := countCoroIRDirectCalls(rootNil, coroAwaitPrepareInlineHookV4); got != 0 { t.Fatalf("root recover(nil) unexpectedly creates a child transaction (post-split=%t):\n%s", split, rootNil.String()) } - if got := countCoroIRDirectCalls(rootRepanic, coroAwaitPrepareHookV1); got != 1 { + if got := countCoroIRDirectCalls(rootRepanic, coroAwaitPrepareInlineHookV4); got != 1 { t.Fatalf("RootRepanic await_prepare_v3 calls = %d, want 1 (post-split=%t):\n%s", got, split, rootRepanic.String()) } if got := countCoroIRDirectCalls(catchAndRepanic, coroRecoverTakeHookV1); got != 1 { diff --git a/cl/coro_slice_managed_test.go b/cl/coro_slice_managed_test.go index 4a94e4735d..df0718e251 100644 --- a/cl/coro_slice_managed_test.go +++ b/cl/coro_slice_managed_test.go @@ -146,14 +146,14 @@ func TestCoroManagedSliceHelpersNativeAndWasm32(t *testing.T) { for _, required := range []string{ "runtime.MakeSlice$coro", "runtime.SliceAppend$coro", - "call void @" + coroAwaitPrepareHookV1, + "call i1 @" + coroAwaitPrepareInlineHookV4, "call i32 @" + coroAwaitConsumeHookV1, } { if !strings.Contains(rootIR, required) { t.Fatalf("managed slice owner lacks %q:\n%s", required, rootIR) } } - if got := strings.Count(rootIR, "call void @"+coroAwaitPrepareHookV1); got != 2 { + if got := strings.Count(rootIR, "call i1 @"+coroAwaitPrepareInlineHookV4); got != 2 { t.Fatalf("managed slice awaits = %d, want MakeSlice + SliceAppend:\n%s", got, rootIR) } diff --git a/cl/coro_string_concat_test.go b/cl/coro_string_concat_test.go index 5621c7015f..c5916a36bc 100644 --- a/cl/coro_string_concat_test.go +++ b/cl/coro_string_concat_test.go @@ -137,7 +137,7 @@ func TestCoroStringConcatManagedHelperNativeAndWasm32(t *testing.T) { for _, required := range []string{ "runtime.StringCat$coro", "foo.Pause$coro", - "call void @" + coroAwaitPrepareHookV1, + "call i1 @" + coroAwaitPrepareInlineHookV4, "call i32 @" + coroAwaitConsumeHookV1, } { if !strings.Contains(rootIR, required) { @@ -147,7 +147,7 @@ func TestCoroStringConcatManagedHelperNativeAndWasm32(t *testing.T) { if got := strings.Count(rootIR, "runtime.StringCat$coro"); got != 2 { t.Fatalf("managed StringCat calls = %d, want two across Pause:\n%s", got, rootIR) } - if got := strings.Count(rootIR, "call void @"+coroAwaitPrepareHookV1); got != 3 { + if got := strings.Count(rootIR, "call i1 @"+coroAwaitPrepareInlineHookV4); got != 3 { t.Fatalf("managed awaits = %d, want StringCat + Pause + StringCat:\n%s", got, rootIR) } diff --git a/cl/coro_uintptr_observation_test.go b/cl/coro_uintptr_observation_test.go index 80a8c33dd8..412eb345fb 100644 --- a/cl/coro_uintptr_observation_test.go +++ b/cl/coro_uintptr_observation_test.go @@ -183,7 +183,7 @@ func TestCoroPointerUintptrAffineObservationNativeAndWasm32(t *testing.T) { t.Fatalf("%s plan = %+v, present=%t; want non-preempting outcome-only coroutine", name, functionPlan, ok) } body := requireCoroPhysicalFunction(t, module, "foo."+name).String() - if strings.Contains(body, coroAwaitPrepareHookV1) || strings.Contains(body, coroPreemptPollHookV1) { + if strings.Contains(body, coroAwaitPrepareInlineHookV4) || strings.Contains(body, coroPreemptPollHookV1) { t.Fatalf("%s scalar observation acquired an await/preempt hook:\n%s", name, body) } if got := strings.Count(body, "ptrtoint ptr"); got < 2 || !strings.Contains(body, "to "+target.uintptrType) { @@ -199,7 +199,7 @@ func TestCoroPointerUintptrAffineObservationNativeAndWasm32(t *testing.T) { t.Fatalf("post-split %s has no resume function", name) } resumeIR := resume.String() - if strings.Contains(resumeIR, coroAwaitPrepareHookV1) || strings.Contains(resumeIR, coroPreemptPollHookV1) { + if strings.Contains(resumeIR, coroAwaitPrepareInlineHookV4) || strings.Contains(resumeIR, coroPreemptPollHookV1) { t.Fatalf("post-split %s acquired an await/preempt hook:\n%s", name, resumeIR) } } @@ -412,7 +412,7 @@ func assertCoroUintptrAffineIR(t *testing.T, name, body string) { t.Fatalf("%s does not lower pointer+offset before comparison:\n%s", name, body) } span := affine[:comparison] - for _, hook := range []string{coroAwaitPrepareHookV1, coroPreemptPollHookV1, "llvm.coro.suspend"} { + for _, hook := range []string{coroAwaitPrepareInlineHookV4, coroPreemptPollHookV1, "llvm.coro.suspend"} { if strings.Contains(span, hook) { t.Fatalf("%s affine pointer lifetime crosses %s:\n%s", name, hook, body) } diff --git a/internal/build/build.go b/internal/build/build.go index f20ea4db38..0ee099b983 100644 --- a/internal/build/build.go +++ b/internal/build/build.go @@ -5226,7 +5226,6 @@ func requiredCoroProgramRuntimePlanWithLibrary( "__llgo_coro_frame_alloc_v1", "__llgo_coro_frame_publish_v1", "__llgo_coro_frame_publish_v3", - "__llgo_coro_frame_destroy_commit_v2", "__llgo_coro_await_prepare_v1", "__llgo_coro_preempt_poll_v1", "__llgo_coro_yield_prepare_v1", @@ -5234,8 +5233,8 @@ func requiredCoroProgramRuntimePlanWithLibrary( coroRunDecisionTakeZeroSymbolV1, "__llgo_coro_complete_prepare_v1", "__llgo_coro_frame_free_v1", - "__llgo_coro_await_prepare_v3", - "__llgo_coro_await_inline_v1", + "__llgo_coro_await_prepare_inline_v4", + "__llgo_coro_await_inline_destroy_consume_v4", "__llgo_coro_await_consume_v1", "__llgo_coro_complete_prepare_v2", "__llgo_coro_critical_enter_v1", diff --git a/internal/build/coro_host_entry_test.go b/internal/build/coro_host_entry_test.go index 46cdeb9399..92de36c485 100644 --- a/internal/build/coro_host_entry_test.go +++ b/internal/build/coro_host_entry_test.go @@ -59,10 +59,9 @@ func __llgo_coro_frame_allocator_bootstrap_v1() {} func __llgo_coro_frame_alloc_v1() {} func __llgo_coro_frame_publish_v1() {} func __llgo_coro_frame_publish_v3() {} -func __llgo_coro_frame_destroy_commit_v2() {} func __llgo_coro_await_prepare_v1() {} -func __llgo_coro_await_prepare_v3(g, parent, child unsafe.Pointer, mode uint32, typeWord, dataWord unsafe.Pointer) {} -func __llgo_coro_await_inline_v1(g, parent, child unsafe.Pointer) bool { return false } +func __llgo_coro_await_prepare_inline_v4(g, parent, child unsafe.Pointer, mode uint32, typeWord, dataWord unsafe.Pointer) bool { return false } +func __llgo_coro_await_inline_destroy_consume_v4(g, parent, child, typeOut, dataOut unsafe.Pointer) uint32 { return 1 } func __llgo_coro_await_consume_v1(g, parent, typeOut, dataOut unsafe.Pointer) uint32 { return 0 } func __llgo_coro_preempt_poll_v1() bool { return false } func __llgo_coro_yield_prepare_v1() {} @@ -156,7 +155,6 @@ func __llgo_coro_program_main_return_v1() {} "__llgo_coro_frame_alloc_v1", "__llgo_coro_frame_publish_v1", "__llgo_coro_frame_publish_v3", - "__llgo_coro_frame_destroy_commit_v2", "__llgo_coro_await_prepare_v1", "__llgo_coro_preempt_poll_v1", "__llgo_coro_yield_prepare_v1", @@ -164,8 +162,8 @@ func __llgo_coro_program_main_return_v1() {} coroRunDecisionTakeZeroSymbolV1, "__llgo_coro_complete_prepare_v1", "__llgo_coro_frame_free_v1", - "__llgo_coro_await_prepare_v3", - "__llgo_coro_await_inline_v1", + "__llgo_coro_await_prepare_inline_v4", + "__llgo_coro_await_inline_destroy_consume_v4", "__llgo_coro_await_consume_v1", "__llgo_coro_complete_prepare_v2", "__llgo_coro_critical_enter_v1", diff --git a/internal/build/coro_plan_test.go b/internal/build/coro_plan_test.go index b84b5ca28f..1f1f9e2839 100644 --- a/internal/build/coro_plan_test.go +++ b/internal/build/coro_plan_test.go @@ -581,10 +581,9 @@ func __llgo_coro_frame_allocator_bootstrap_v1() {} func __llgo_coro_frame_alloc_v1() {} func __llgo_coro_frame_publish_v1() {} func __llgo_coro_frame_publish_v3() {} -func __llgo_coro_frame_destroy_commit_v2() {} func __llgo_coro_await_prepare_v1() {} -func __llgo_coro_await_prepare_v3(g, parent, child unsafe.Pointer, mode uint32, typeWord, dataWord unsafe.Pointer) {} -func __llgo_coro_await_inline_v1(g, parent, child unsafe.Pointer) bool { return false } +func __llgo_coro_await_prepare_inline_v4(g, parent, child unsafe.Pointer, mode uint32, typeWord, dataWord unsafe.Pointer) bool { return false } +func __llgo_coro_await_inline_destroy_consume_v4(g, parent, child, typeOut, dataOut unsafe.Pointer) uint32 { return 1 } func __llgo_coro_await_consume_v1(g, parent, typeOut, dataOut unsafe.Pointer) uint32 { return 0 } var preemptRequest uint32 func __llgo_coro_preempt_poll_v1() bool { return atomicExchange(&preemptRequest, 0) == 1 } @@ -707,7 +706,6 @@ func atomicExchange(*uint32, uint32) uint32 "__llgo_coro_frame_alloc_v1", "__llgo_coro_frame_publish_v1", "__llgo_coro_frame_publish_v3", - "__llgo_coro_frame_destroy_commit_v2", "__llgo_coro_await_prepare_v1", "__llgo_coro_preempt_poll_v1", "__llgo_coro_yield_prepare_v1", @@ -715,8 +713,8 @@ func atomicExchange(*uint32, uint32) uint32 coroRunDecisionTakeZeroSymbolV1, "__llgo_coro_complete_prepare_v1", "__llgo_coro_frame_free_v1", - "__llgo_coro_await_prepare_v3", - "__llgo_coro_await_inline_v1", + "__llgo_coro_await_prepare_inline_v4", + "__llgo_coro_await_inline_destroy_consume_v4", "__llgo_coro_await_consume_v1", "__llgo_coro_complete_prepare_v2", "__llgo_coro_critical_enter_v1", @@ -1442,10 +1440,9 @@ func __llgo_coro_frame_allocator_bootstrap_v1() {} func __llgo_coro_frame_alloc_v1() {} func __llgo_coro_frame_publish_v1() {} func __llgo_coro_frame_publish_v3() {} -func __llgo_coro_frame_destroy_commit_v2() {} func __llgo_coro_await_prepare_v1() {} -func __llgo_coro_await_prepare_v3(g, parent, child unsafe.Pointer, mode uint32, typeWord, dataWord unsafe.Pointer) {} -func __llgo_coro_await_inline_v1(g, parent, child unsafe.Pointer) bool { return false } +func __llgo_coro_await_prepare_inline_v4(g, parent, child unsafe.Pointer, mode uint32, typeWord, dataWord unsafe.Pointer) bool { return false } +func __llgo_coro_await_inline_destroy_consume_v4(g, parent, child, typeOut, dataOut unsafe.Pointer) uint32 { return 1 } func __llgo_coro_await_consume_v1(g, parent, typeOut, dataOut unsafe.Pointer) uint32 { return 0 } func __llgo_coro_preempt_poll_v1() bool { return false } func __llgo_coro_yield_prepare_v1() {} @@ -2106,8 +2103,8 @@ func (f requiredCoroRuntimeFixture) analyze(config coro.SSAConfig) (*coro.SSAPla } const requiredCoroPhysicalRuntimeFixture = ` -func __llgo_coro_await_prepare_v3(g, parent, child unsafe.Pointer, mode uint32, typeWord, dataWord unsafe.Pointer) {} -func __llgo_coro_await_inline_v1(g, parent, child unsafe.Pointer) bool { return false } +func __llgo_coro_await_prepare_inline_v4(g, parent, child unsafe.Pointer, mode uint32, typeWord, dataWord unsafe.Pointer) bool { return false } +func __llgo_coro_await_inline_destroy_consume_v4(g, parent, child, typeOut, dataOut unsafe.Pointer) uint32 { return 1 } func __llgo_coro_await_consume_v1(g, parent, typeOut, dataOut unsafe.Pointer) uint32 { return 0 } func __llgo_coro_complete_prepare_v2(g, handle, header unsafe.Pointer, status uint32) {} func __llgo_coro_critical_enter_v1(g unsafe.Pointer) {} @@ -2136,7 +2133,6 @@ func __llgo_coro_frame_allocator_bootstrap_v1() {} func __llgo_coro_frame_alloc_v1() {} func __llgo_coro_frame_publish_v1() {} func __llgo_coro_frame_publish_v3() {} -func __llgo_coro_frame_destroy_commit_v2() {} func __llgo_coro_await_prepare_v1() {} func __llgo_coro_preempt_poll_v1() bool { return false } func __llgo_coro_yield_prepare_v1() {} @@ -2241,8 +2237,8 @@ func __llgo_coro_program_main_return_v1() {} func TestRequiredCoroProgramRuntimePlanCriticalRoots(t *testing.T) { const physicalHooks = ` -func __llgo_coro_await_prepare_v3() {} -func __llgo_coro_await_inline_v1(unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) bool { return false } +func __llgo_coro_await_prepare_inline_v4(unsafe.Pointer, unsafe.Pointer, unsafe.Pointer, uint32, unsafe.Pointer, unsafe.Pointer) bool { return false } +func __llgo_coro_await_inline_destroy_consume_v4(unsafe.Pointer, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer) uint32 { return 1 } func __llgo_coro_await_consume_v1() {} func __llgo_coro_complete_prepare_v2(unsafe.Pointer, unsafe.Pointer, unsafe.Pointer, uint32) {} func __llgo_coro_os_thread_lock_v1(unsafe.Pointer) {} diff --git a/internal/build/coro_time_sleep_e2e_test.go b/internal/build/coro_time_sleep_e2e_test.go index d9b060de8d..f4456a90b9 100644 --- a/internal/build/coro_time_sleep_e2e_test.go +++ b/internal/build/coro_time_sleep_e2e_test.go @@ -45,7 +45,7 @@ const ( coroTimeSleepParkSymbolV2 = "__llgo_coro_timer_park_v2" coroTimeSleepResumeSymbolV2 = "__llgo_coro_timer_resume_v2" coroTimeSleepPreemptPollV1 = "__llgo_coro_preempt_poll_v1" - coroTimeSleepAwaitHookV1 = "__llgo_coro_await_prepare_v3" + coroTimeSleepAwaitHookV1 = "__llgo_coro_await_prepare_inline_v4" ) // TestCoroNativeTimeSleepProductionPlanAndCodegen starts from an ordinary diff --git a/internal/build/coro_tls_destructor_test.go b/internal/build/coro_tls_destructor_test.go index 2a00824528..a82136a51a 100644 --- a/internal/build/coro_tls_destructor_test.go +++ b/internal/build/coro_tls_destructor_test.go @@ -535,7 +535,6 @@ func __llgo_coro_frame_allocator_bootstrap_v1() {} func __llgo_coro_frame_alloc_v1() {} func __llgo_coro_frame_publish_v1() {} func __llgo_coro_frame_publish_v3() {} -func __llgo_coro_frame_destroy_commit_v2() {} func __llgo_coro_await_prepare_v1() {} func __llgo_coro_preempt_poll_v1() bool { return false } func __llgo_coro_yield_prepare_v1() {} diff --git a/runtime/internal/coro/inline_await.go b/runtime/internal/coro/inline_await.go index 94a4a75b08..23ca51ebcb 100644 --- a/runtime/internal/coro/inline_await.go +++ b/runtime/internal/coro/inline_await.go @@ -18,9 +18,10 @@ package coro import "unsafe" -// InlineAwaitDisposition is the target-neutral half of one eager child -// resume. The runtime adapter remains the sole owner of llvm.coro.resume, -// llvm.coro.done, and llvm.coro.destroy; the core owns only frame state. +// InlineAwaitDisposition is the target-neutral scheduler half of one eager +// child resume. Generated code owns llvm.coro.resume, llvm.coro.done, and +// llvm.coro.destroy so LLVM can see the exact static handle lifetime; this core +// owns only frame, completion, and scheduler state. type InlineAwaitDisposition uint8 const ( @@ -36,8 +37,8 @@ const ( // transition after the native stack is gone. InlineAwaitSuspend // InlineAwaitDestroy means the immediate child reached final suspend and - // is now the exact destroy target. The adapter must destroy it and then - // call CommitInlineAwaitDestroy before returning success to generated code. + // is now the exact destroy target. Generated code must destroy it and then + // commit the physical/logical destroy receipt before continuing. InlineAwaitDestroy ) @@ -47,6 +48,73 @@ const ( // embedded host stacks and still collapses ordinary shallow Go call chains. const maxInlineAwaitDepth uint8 = 16 +// PrepareInlineAwaitCompiler atomically arms one compiler-owned child +// completion and selects the bounded eager-resume path. The old two-hook form +// authenticated the same immutable caller/child edge twice even though no +// callback, suspension, or scheduler entry exists between prepare and begin. +// This helper performs one shared proof and commits either pendingInlineStart +// or the canonical depth-bound pendingAwait transaction. +func PrepareInlineAwaitCompiler( + g *G, parentHandle, childHandle, recoverType, recoverData unsafe.Pointer, +) InlineAwaitDisposition { + if ValidG(g) && parentHandle != nil && childHandle != nil && + (recoverType != nil || recoverData == nil) && resumeGateTaken(g) && + g.runP != nil && g.pending.kind == pendingNone && + g.destroyTarget == nil && !g.destroyRoot && + g.spawnChild == nil && g.spawnParent == nil && g.spawnP == nil && + !g.waiting && compilerReleasableParkState(&g.park) { + p := g.runP + parent, child := g.active, g.frames + if parent != nil && child != nil && parent != child && + parent.handle == parentHandle && child.handle == childHandle && + parent.owner == g && child.owner == g && + parent.header != nil && child.header != nil && + parent.state == FrameActive && child.state == FrameInitialSuspended && + parent.header.SuspendReason == uint16(SuspendCall) && + parent.header.Lifecycle == uint16(FrameSuspended) && + child.header.Parent == parentHandle && + child.header.Lifecycle == uint16(FrameInitialSuspended) && + child.parent == nil && emptyCompletionRecord(&parent.completion) && + compilerInlineAwaitParentDepth(g, parent, p.inlineAwaitDepth) { + parent.completion.child = child.handle + if recoverType == nil { + parent.completion.status = completionArmed + } else { + parent.completion.status = completionRecoverArmed + parent.completion.typeWord = recoverType + parent.completion.dataWord = recoverData + } + child.parent = parent + if p.inlineAwaitDepth >= maxInlineAwaitDepth { + g.pending = pendingTransition{kind: pendingAwait, from: parent, target: child} + return InlineAwaitDeclined + } + parent.state = FrameSuspended + child.state = FrameActive + g.active = child + g.pending = pendingTransition{kind: pendingInlineStart, from: parent, target: child} + p.inlineAwaitDepth++ + return InlineAwaitStarted + } + } + + var prepared bool + if recoverType == nil { + if recoverData != nil { + return InlineAwaitInvalid + } + prepared = PrepareAwaitCompletionCompiler(g, parentHandle, childHandle) + } else { + prepared = PrepareAwaitCompletionRecover( + g, parentHandle, childHandle, recoverType, recoverData, + ) + } + if !prepared { + return InlineAwaitInvalid + } + return BeginInlineAwaitCompiler(g, parentHandle, childHandle) +} + func validInlineAwaitEdge(parent, child *Frame) bool { if parent == nil || child == nil || parent == child || parent.handle == nil || child.handle == nil || parent.header == nil || child.header == nil || @@ -271,8 +339,8 @@ func takeInlineAwaitInitialDecisionCompiler(g *G) bool { return true } -// FinishInlineAwait commits the return from the adapter's nested -// llvm.coro.resume. done is the adapter's exact llvm.coro.done result. +// FinishInlineAwait commits the return from generated code's nested +// llvm.coro.resume. done is its exact llvm.coro.done result. func FinishInlineAwait( g *G, parentHandle, childHandle unsafe.Pointer, done bool, ) InlineAwaitDisposition { @@ -378,10 +446,10 @@ func terminalInlineCompletion(record *CompletionRecord, childHandle unsafe.Point } } -// CommitInlineAwaitDestroy restores the parent activation after the adapter's -// synchronous llvm.coro.destroy has called ReleaseFrame. It never consumes the -// completion; generated code uses the same await-consume ABI as the scheduler -// path. +// CommitInlineAwaitDestroy restores the parent activation after generated +// code's synchronous llvm.coro.destroy has called ReleaseFrame. It never +// consumes the completion; compatibility callers use the same await-consume +// transaction as the scheduler path. func CommitInlineAwaitDestroy(g *G, parentHandle, childHandle unsafe.Pointer) bool { if !ValidG(g) || parentHandle == nil || childHandle == nil || g.runP == nil { return false @@ -436,6 +504,61 @@ func CommitInlineAwaitDestroyCompiler(g *G, parentHandle, childHandle unsafe.Poi return CommitInlineAwaitDestroy(g, parentHandle, childHandle) } +// CommitInlineAwaitPhysicalDestroyCompiler consumes the exact +// llvm.coro.destroy receipt, restores its static parent, and takes the terminal +// completion in one transaction. +// The common Return path uses compiler-borrowed metadata at the head of the +// frame list, so every fallible observation is completed before a no-fail +// unlink/zero/reactivate suffix. Dynamic storage, panic-trace retention, and +// non-Return outcomes retain the two complete compatibility transactions. +func CommitInlineAwaitPhysicalDestroyCompiler( + g *G, parentHandle, childHandle unsafe.Pointer, +) (CompletionSnapshot, bool) { + if ValidG(g) && parentHandle != nil && childHandle != nil && + gPreemptEnabledAtDepthZero(g) && g.runP != nil && + g.destroyTarget != nil && !g.destroyRoot && + g.pending == (pendingTransition{}) { + p := g.runP + parent, child := g.active, g.destroyTarget + if parent != nil && child != nil && parent != child && + parent.handle == parentHandle && child.handle == childHandle && + parent.owner == g && child.owner == g && child.parent == parent && + parent.header != nil && child.header != nil && + parent.state == FrameSuspended && child.state == FrameDestroyPending && + parent.header.SuspendReason == uint16(SuspendCall) && + parent.header.Lifecycle == uint16(FrameSuspended) && + child.header.Lifecycle == uint16(FrameDestroyPending) && + child.borrowedStorage && child.storage == nil && child.rawBase == nil && + child.allocationSize == 0 && child.parkWait == nil && + child.header.AllocationBase == unsafe.Pointer(child) && + !child.retainPanicTrace && g.frames == child && + parent.completion.child == childHandle && + parent.completion.status == CompletionReturn && + parent.completion.typeWord == nil && parent.completion.dataWord == nil && + p.current == g && p.inResume && g.state == GRunning && + p.runDecisionTaken && p.runDecision == (RunDecision{}) && + p.action.Kind == ActionResume && p.action.Flags == 0 && + compilerInlineAwaitParentDepth(g, parent, p.inlineAwaitDepth) { + g.frames = child.next + child.next = nil + child.state = FrameDestroyed + child.header.Lifecycle = uint16(FrameDestroyed) + g.destroyTarget = nil + Zero(unsafe.Pointer(child), unsafe.Sizeof(Frame{})) + parent.state = FrameActive + parent.header.SuspendReason = uint16(SuspendNone) + parent.header.Lifecycle = uint16(FrameActive) + parent.completion = CompletionRecord{} + return CompletionSnapshot{Status: CompletionReturn}, true + } + } + if !CommitFrameDestroyCompiler(g, childHandle) || + !CommitInlineAwaitDestroyCompiler(g, parentHandle, childHandle) { + return CompletionSnapshot{}, false + } + return ConsumeAwaitCompletionCompiler(g, parentHandle) +} + // resumedFrameForAction accepts the ordinary one-frame return or a completely // unwound inline chain. In the latter case dispatchPending must consume the // deepest active frame, not the outer ActionResume handle whose native call diff --git a/runtime/internal/coro/inline_await_test.go b/runtime/internal/coro/inline_await_test.go index acd42898ef..88cb39b7d8 100644 --- a/runtime/internal/coro/inline_await_test.go +++ b/runtime/internal/coro/inline_await_test.go @@ -35,7 +35,16 @@ func newInlineAwaitFixture(t *testing.T) *inlineAwaitFixture { } func newInlineAwaitFixtureForCompiler(t *testing.T, compiler bool) *inlineAwaitFixture { + return newInlineAwaitFixtureWithRecovery(t, compiler, nil, nil) +} + +func newInlineAwaitFixtureWithRecovery( + t *testing.T, compiler bool, recoverType, recoverData unsafe.Pointer, +) *inlineAwaitFixture { t.Helper() + if !compiler && (recoverType != nil || recoverData != nil) { + t.Fatal("compatibility inline-await fixture cannot arm compiler recovery") + } g := new(G) if !InitG(g) { t.Fatal("initialize inline-await G") @@ -62,19 +71,15 @@ func newInlineAwaitFixtureForCompiler(t *testing.T, compiler bool) *inlineAwaitF } parent.header.SuspendReason = uint16(SuspendCall) parent.header.Lifecycle = uint16(FrameSuspended) - var prepared bool - if compiler { - prepared = PrepareAwaitCompletionCompiler(g, parent.handle, child.handle) - } else { - prepared = PrepareAwaitCompletion(g, parent.handle, child.handle) - } - if !prepared { - t.Fatal("prepare inline-await child") - } var disposition InlineAwaitDisposition if compiler { - disposition = BeginInlineAwaitCompiler(g, parent.handle, child.handle) + disposition = PrepareInlineAwaitCompiler( + g, parent.handle, child.handle, recoverType, recoverData, + ) } else { + if !PrepareAwaitCompletion(g, parent.handle, child.handle) { + t.Fatal("prepare inline-await child") + } disposition = BeginInlineAwait(g, parent.handle, child.handle) } if disposition != InlineAwaitStarted { @@ -113,13 +118,9 @@ func TestCompilerInlineAwaitCompletesThroughTrustedSuffix(t *testing.T) { fixture.p.inlineAwaitDepth, fixture.g.active) } releaseTestFrame(t, fixture.g, fixture.child) - if !CommitFrameDestroyCompiler(fixture.g, fixture.child.handle) { - t.Fatal("commit compiler physical child destroy") - } - if !CommitInlineAwaitDestroyCompiler(fixture.g, fixture.parent.handle, fixture.child.handle) { - t.Fatal("commit compiler inline child destroy") - } - snapshot, ok := ConsumeAwaitCompletionCompiler(fixture.g, fixture.parent.handle) + snapshot, ok := CommitInlineAwaitPhysicalDestroyCompiler( + fixture.g, fixture.parent.handle, fixture.child.handle, + ) if !ok || snapshot != (CompletionSnapshot{Status: CompletionReturn}) { t.Fatalf("consume compiler inline child return = (%+v, %t)", snapshot, ok) } @@ -131,6 +132,114 @@ func TestCompilerInlineAwaitCompletesThroughTrustedSuffix(t *testing.T) { runtime.KeepAlive(fixture.parent.memory) } +func TestCompilerInlineAwaitFusesBorrowedDestroyAndConsume(t *testing.T) { + fixture := newInlineAwaitFixtureForCompiler(t, true) + child := FrameFromStorage(fixture.child.storage) + if child == nil { + t.Fatal("resolve borrowed compiler child") + } + child.borrowedStorage = true + child.storage = nil + child.rawBase = nil + child.allocationSize = 0 + fixture.child.header.AllocationBase = unsafe.Pointer(child) + fixture.child.header.SuspendReason = uint16(SuspendFrameComplete) + fixture.child.header.Lifecycle = uint16(FrameFinalSuspended) + if !PrepareCompleteStatusCompiler( + fixture.g, fixture.child.handle, fixture.child.header, CompletionReturn, + ) { + t.Fatal("publish borrowed compiler inline child return") + } + if got := FinishInlineAwaitCompiler( + fixture.g, fixture.parent.handle, fixture.child.handle, true, + ); got != InlineAwaitDestroy { + t.Fatalf("finish borrowed compiler inline-await = %d, want destroy", got) + } + snapshot, ok := CommitInlineAwaitPhysicalDestroyCompiler( + fixture.g, fixture.parent.handle, fixture.child.handle, + ) + if !ok || snapshot != (CompletionSnapshot{Status: CompletionReturn}) { + t.Fatalf("fused borrowed completion = (%+v, %t)", snapshot, ok) + } + if *child != (Frame{}) || fixture.g.destroyTarget != nil || fixture.g.frames != fixture.g.active || + fixture.g.active != FrameFromStorage(fixture.parent.storage) || + fixture.g.active.completion != (CompletionRecord{}) || + fixture.parent.header.SuspendReason != uint16(SuspendNone) || + fixture.parent.header.Lifecycle != uint16(FrameActive) { + t.Fatalf("fused borrowed completion left residue: child=%+v active=%p frames=%p target=%p completion=%+v header=(%d,%d)", + child, fixture.g.active, fixture.g.frames, fixture.g.destroyTarget, + fixture.g.active.completion, fixture.parent.header.SuspendReason, + fixture.parent.header.Lifecycle) + } + runtime.KeepAlive(fixture.parent.memory) + runtime.KeepAlive(fixture.child.memory) +} + +func TestCompilerInlineAwaitPanicRetainsCompatibilityProtocol(t *testing.T) { + fixture := newInlineAwaitFixtureForCompiler(t, true) + typeWord, dataWord := unsafe.Pointer(new(byte)), unsafe.Pointer(new(byte)) + fixture.child.header.SuspendReason = uint16(SuspendPanic) + fixture.child.header.Lifecycle = uint16(FrameFinalSuspended) + if !PreparePanic( + fixture.g, fixture.child.handle, fixture.child.header, typeWord, dataWord, + ) { + t.Fatal("publish compiler inline child panic") + } + if got := FinishInlineAwaitCompiler( + fixture.g, fixture.parent.handle, fixture.child.handle, true, + ); got != InlineAwaitDestroy { + t.Fatalf("finish panicking compiler inline-await = %d, want destroy", got) + } + releaseTestFrame(t, fixture.g, fixture.child) + snapshot, ok := CommitInlineAwaitPhysicalDestroyCompiler( + fixture.g, fixture.parent.handle, fixture.child.handle, + ) + if !ok || snapshot != (CompletionSnapshot{ + Status: CompletionPanic, TypeWord: typeWord, DataWord: dataWord, + }) { + t.Fatalf("consume compiler inline child panic = (%+v, %t)", snapshot, ok) + } + if !activePanicTrace(fixture.g) || panicTraceCarrier(fixture.g) != fixture.g.active { + t.Fatal("compiler inline child panic lost its retained trace carrier") + } + runtime.KeepAlive(typeWord) + runtime.KeepAlive(dataWord) + runtime.KeepAlive(fixture.parent.memory) + runtime.KeepAlive(fixture.child.memory) +} + +func TestCompilerInlineAwaitRecoveredReturnUsesCompatibilityProtocol(t *testing.T) { + typeWord, dataWord := unsafe.Pointer(new(byte)), unsafe.Pointer(new(byte)) + fixture := newInlineAwaitFixtureWithRecovery(t, true, typeWord, dataWord) + if snapshot, recovered, valid := TakeRecover( + fixture.g, fixture.child.handle, + ); !valid || !recovered || snapshot != (RecoverSnapshot{TypeWord: typeWord, DataWord: dataWord}) { + t.Fatalf("take compiler inline recovery = (%+v, %t, %t)", snapshot, recovered, valid) + } + fixture.child.header.SuspendReason = uint16(SuspendFrameComplete) + fixture.child.header.Lifecycle = uint16(FrameFinalSuspended) + if !PrepareCompleteStatusCompiler( + fixture.g, fixture.child.handle, fixture.child.header, CompletionReturn, + ) { + t.Fatal("publish recovered compiler inline child return") + } + if got := FinishInlineAwaitCompiler( + fixture.g, fixture.parent.handle, fixture.child.handle, true, + ); got != InlineAwaitDestroy { + t.Fatalf("finish recovered compiler inline-await = %d, want destroy", got) + } + releaseTestFrame(t, fixture.g, fixture.child) + snapshot, ok := CommitInlineAwaitPhysicalDestroyCompiler( + fixture.g, fixture.parent.handle, fixture.child.handle, + ) + if !ok || snapshot != (CompletionSnapshot{Status: CompletionReturnRecovered}) { + t.Fatalf("consume recovered compiler inline child = (%+v, %t)", snapshot, ok) + } + runtime.KeepAlive(typeWord) + runtime.KeepAlive(dataWord) + runtime.KeepAlive(fixture.parent.memory) +} + func TestCompilerInlineAwaitSlowYieldUsesCheckedDispatch(t *testing.T) { fixture := newInlineAwaitFixtureForCompiler(t, true) fixture.child.header.SuspendReason = uint16(SuspendYield) @@ -348,3 +457,50 @@ func TestInlineAwaitDepthBoundDeclinesWithoutMutation(t *testing.T) { runtime.KeepAlive(frame.memory) } } + +func TestCompilerFusedInlineAwaitDepthBoundLeavesCanonicalPendingAwait(t *testing.T) { + fixture := newInlineAwaitFixture(t) + frames := []*testFrame{fixture.parent, fixture.child} + active := fixture.child + for fixture.p.inlineAwaitDepth < maxInlineAwaitDepth { + next := newTestFrame(t, fixture.g, unsafe.Pointer(new(byte)), active.handle) + frames = append(frames, next) + active.header.SuspendReason = uint16(SuspendCall) + active.header.Lifecycle = uint16(FrameSuspended) + if got := PrepareInlineAwaitCompiler( + fixture.g, active.handle, next.handle, nil, nil, + ); got != InlineAwaitStarted { + t.Fatalf("fused inline depth %d = %d, want started", fixture.p.inlineAwaitDepth+1, got) + } + if outcome, caseID, task, source, generation, taken := TakeRunDecisionWordsCompiler( + fixture.g, 0, 0, + ); !taken || outcome != 0 || caseID != 0 || task != 0 || source != 0 || generation != 0 { + t.Fatalf("take fused inline depth %d initial gate", fixture.p.inlineAwaitDepth) + } + next.header.SuspendReason = uint16(SuspendNone) + next.header.Lifecycle = uint16(FrameActive) + active = next + } + + declined := newTestFrame(t, fixture.g, unsafe.Pointer(new(byte)), active.handle) + frames = append(frames, declined) + active.header.SuspendReason = uint16(SuspendCall) + active.header.Lifecycle = uint16(FrameSuspended) + if got := PrepareInlineAwaitCompiler( + fixture.g, active.handle, declined.handle, nil, nil, + ); got != InlineAwaitDeclined { + t.Fatalf("fused depth-bound inline await = %d, want declined", got) + } + parent, child := FrameFromStorage(active.storage), FrameFromStorage(declined.storage) + if fixture.g.pending.kind != pendingAwait || fixture.g.pending.from != parent || + fixture.g.pending.target != child || fixture.g.active != parent || + parent.state != FrameActive || child.state != FrameInitialSuspended || + child.parent != parent || parent.completion.child != child.handle || + parent.completion.status != completionArmed || + fixture.p.inlineAwaitDepth != maxInlineAwaitDepth { + t.Fatal("fused depth-bound refusal did not leave one canonical scheduler transaction") + } + for _, frame := range frames { + runtime.KeepAlive(frame.memory) + } +} diff --git a/runtime/internal/runtime/coro_frame.go b/runtime/internal/runtime/coro_frame.go index bf8b64fd79..f09aa9eef6 100644 --- a/runtime/internal/runtime/coro_frame.go +++ b/runtime/internal/runtime/coro_frame.go @@ -63,13 +63,6 @@ func __llgo_coro_frame_publish_v3( } } -//export __llgo_coro_frame_destroy_commit_v2 -func __llgo_coro_frame_destroy_commit_v2(g, handle unsafe.Pointer) { - if !coro.CommitFrameDestroyCompiler((*coro.G)(g), handle) { - coroRuntimeAbort("invalid borrowable coroutine frame destruction") - } -} - //export __llgo_coro_await_prepare_v1 func __llgo_coro_await_prepare_v1(g, parent, child unsafe.Pointer) { if !coro.PrepareAwait((*coro.G)(g), parent, child) { diff --git a/runtime/internal/runtime/coro_panic_payload.go b/runtime/internal/runtime/coro_panic_payload.go index 57c598b574..479f77876f 100644 --- a/runtime/internal/runtime/coro_panic_payload.go +++ b/runtime/internal/runtime/coro_panic_payload.go @@ -83,30 +83,40 @@ func __llgo_coro_panic_trace_replace_v1(g, handle unsafe.Pointer) { coroReleaseDiscardedPanicTraceV1(task) } -// __llgo_coro_await_prepare_v3 is the unified managed-child handoff. Mode zero -// is an ordinary call. Mode one marks an exact deferred child as eligible to -// recover the supplied panic; normalization here ensures a successfully -// recovered panic(nil) observes the Go 1.21+ *PanicNilError value. Both modes -// use the same parent CompletionRecord and terminal consume operation. +// __llgo_coro_await_prepare_inline_v4 fuses the compiler-private prepare and +// eager-begin transaction. Mode zero arms an ordinary call. Mode one arms an +// exact deferred child for recovery and normalizes panic(nil) to the Go 1.21+ +// *PanicNilError payload. False is the valid bounded-depth scheduler fallback; +// every malformed state remains fail-stop. // -//export __llgo_coro_await_prepare_v3 -func __llgo_coro_await_prepare_v3(g, parent, child unsafe.Pointer, mode uint32, typeWord, dataWord unsafe.Pointer) { +//export __llgo_coro_await_prepare_inline_v4 +func __llgo_coro_await_prepare_inline_v4(g, parent, child unsafe.Pointer, mode uint32, typeWord, dataWord unsafe.Pointer) bool { + task := (*coro.G)(g) + var disposition coro.InlineAwaitDisposition switch mode { case 0: - if typeWord != nil || dataWord != nil || - !coro.PrepareAwaitCompletionCompiler((*coro.G)(g), parent, child) { + if typeWord != nil || dataWord != nil { coroRuntimeAbort("invalid ordinary coroutine child completion handoff") } + disposition = coro.PrepareInlineAwaitCompiler(task, parent, child, nil, nil) case 1: typeWord, dataWord = coroNormalizePanicPayloadV1(typeWord, dataWord) - if typeWord == nil || !coro.PrepareAwaitCompletionRecover( - (*coro.G)(g), parent, child, typeWord, dataWord, - ) { + if typeWord == nil { coroRuntimeAbort("invalid recoverable coroutine child completion handoff") } + disposition = coro.PrepareInlineAwaitCompiler(task, parent, child, typeWord, dataWord) default: coroRuntimeAbort("invalid coroutine child completion mode") } + switch disposition { + case coro.InlineAwaitDeclined: + return false + case coro.InlineAwaitStarted: + return true + default: + coroRuntimeAbort("invalid coroutine child completion handoff") + return false + } } // __llgo_coro_recover_take_v1 implements one syntactic recover in the active diff --git a/runtime/internal/runtime/coro_run_slice.go b/runtime/internal/runtime/coro_run_slice.go index 9727876498..1539ec8a17 100644 --- a/runtime/internal/runtime/coro_run_slice.go +++ b/runtime/internal/runtime/coro_run_slice.go @@ -47,62 +47,6 @@ func coroHandleDestroyCommitted(g *coro.G, handle unsafe.Pointer) bool { return coro.CommitFrameDestroyCompiler(g, handle) } -// __llgo_coro_await_inline_v1 resumes one already prepared child on the -// current executor stack. A synchronous completion is destroyed and committed -// here; a real suspension returns false so generated parents unwind through -// llvm.coro.suspend before the outer scheduler consumes the deepest pending -// transition. No native stack survives that false return path. -// -//export __llgo_coro_await_inline_v1 -func __llgo_coro_await_inline_v1(g, parent, child unsafe.Pointer) bool { - task := (*coro.G)(g) - switch coro.BeginInlineAwait(task, parent, child) { - case coro.InlineAwaitDeclined: - return false - case coro.InlineAwaitStarted: - default: - coroRuntimeAbort("invalid coroutine inline child begin") - return false - } - - coroHandleResume(child) - switch coro.FinishInlineAwait(task, parent, child, coroHandleDone(child)) { - case coro.InlineAwaitSuspend: - return false - case coro.InlineAwaitDestroy: - if !coroHandleDestroyCommitted(task, child) { - coroRuntimeAbort("invalid coroutine inline child physical destroy") - return false - } - if !coro.CommitInlineAwaitDestroy(task, parent, child) { - coroRuntimeAbort("invalid coroutine inline child destroy commit") - return false - } - return true - default: - coroRuntimeAbort("invalid coroutine inline child return") - return false - } -} - -// __llgo_coro_await_inline_begin_v2 owns only the scheduler-state half of an -// eager static child handoff. Keeping llvm.coro.resume/done/destroy in the -// generated caller exposes the exact handle lifetime to LLVM 22's annotated -// frame-elision pass. -// -//export __llgo_coro_await_inline_begin_v2 -func __llgo_coro_await_inline_begin_v2(g, parent, child unsafe.Pointer) bool { - switch coro.BeginInlineAwaitCompiler((*coro.G)(g), parent, child) { - case coro.InlineAwaitDeclined: - return false - case coro.InlineAwaitStarted: - return true - default: - coroRuntimeAbort("invalid coroutine inline child begin") - return false - } -} - //export __llgo_coro_await_inline_finish_v2 func __llgo_coro_await_inline_finish_v2(g, parent, child unsafe.Pointer, done bool) bool { switch coro.FinishInlineAwaitCompiler((*coro.G)(g), parent, child, done) { @@ -116,11 +60,20 @@ func __llgo_coro_await_inline_finish_v2(g, parent, child unsafe.Pointer, done bo } } -//export __llgo_coro_await_inline_destroy_commit_v2 -func __llgo_coro_await_inline_destroy_commit_v2(g, parent, child unsafe.Pointer) { - if !coro.CommitInlineAwaitDestroyCompiler((*coro.G)(g), parent, child) { - coroRuntimeAbort("invalid coroutine inline child destroy commit") +//export __llgo_coro_await_inline_destroy_consume_v4 +func __llgo_coro_await_inline_destroy_consume_v4(g, parent, child, typeOut, dataOut unsafe.Pointer) uint32 { + if typeOut == nil || dataOut == nil { + coroRuntimeAbort("invalid coroutine inline child outcome output") } + task := (*coro.G)(g) + snapshot, ok := coro.CommitInlineAwaitPhysicalDestroyCompiler(task, parent, child) + if !ok { + coroRuntimeAbort("invalid coroutine inline physical child completion") + } + coroReleaseDiscardedPanicTraceV1(task) + *(*unsafe.Pointer)(typeOut) = snapshot.TypeWord + *(*unsafe.Pointer)(dataOut) = snapshot.DataWord + return uint32(snapshot.Status) } type coroProgramLifecycleV1 uint8 From 6caa42c90861bca66846fce968274b2705eec4b2 Mon Sep 17 00:00:00 2001 From: Li Jie Date: Sat, 15 Aug 2026 01:36:52 +0800 Subject: [PATCH 2/4] test(coro): refresh LLVM 22 lowering expectations --- cl/_testgo/allocinloop/in.go | 6 +- cl/_testgo/cgofull/cgofull.go | 2 +- cl/_testgo/defer3/in.go | 6 +- cl/_testgo/defer5/in.go | 2 +- cl/_testgo/deferdispatch-wasm-target/in.go | 2 +- cl/_testgo/deferdispatch-wasm/in.go | 2 +- cl/_testgo/deferdispatch/in.go | 2 +- cl/_testgo/errors/in.go | 6 +- cl/_testgo/goexit/in.go | 4 +- cl/_testgo/interface/in.go | 2 +- cl/_testgo/localitycodegen/in.go | 6 +- cl/_testgo/recoverthenpanic/in.go | 4 +- cl/_testgo/reflectconv/in.go | 14 +- cl/_testgo/reflectfn/in.go | 4 +- cl/_testgo/reflectmk/in.go | 4 +- cl/_testgo/returnorder/in.go | 9 +- cl/_testgo/rewrite/main.go | 8 +- cl/_testgo/syncmap/in.go | 4 +- cl/_testgo/tptypes/in.go | 21 +- cl/_testlibc/allocacstrs/in.go | 3 +- cl/_testlibc/complex/in.go | 2 +- cl/_testlibc/sqlite/in.go | 2 +- cl/_testlibgo/bytes/in.go | 13 +- cl/_testlibgo/complex/in.go | 5 +- cl/_testlibgo/errors/in.go | 3 +- cl/_testlibgo/mapzero/in.go | 2 +- cl/_testlibgo/math/in.go | 9 +- cl/_testlibgo/mathbits/in.go | 7 +- cl/_testlibgo/nettextproto/in.go | 2 +- cl/_testlibgo/os/in.go | 2 +- cl/_testlibgo/sync/in.go | 2 +- cl/_testmeta/ifaceuse_basic/meta-expect.txt | 31 +-- .../interface_anyonmous/meta-expect.txt | 136 ++++++----- .../interface_exported_var/meta-expect.txt | 211 ++++++++++-------- .../interface_generic/meta-expect.txt | 75 ++++--- .../api/meta-expect.txt | 14 +- .../meta-expect.txt | 127 ++++++----- .../model/meta-expect.txt | 21 +- .../interface_imported/api/meta-expect.txt | 22 +- .../interface_imported/meta-expect.txt | 126 ++++++----- cl/_testmeta/interface_named/meta-expect.txt | 94 +++++--- .../interface_unexported/meta-expect.txt | 94 +++++--- .../methodinfo_imported/meta-expect.txt | 56 +++-- cl/_testmeta/reflect_dynamic/meta-expect.txt | 109 +++++---- cl/_testmeta/reflect_named/meta-expect.txt | 124 +++++----- .../typechildren_basic/meta-expect.txt | 31 +-- cl/_testrt/tpunsafe/in.go | 28 +-- 47 files changed, 858 insertions(+), 601 deletions(-) diff --git a/cl/_testgo/allocinloop/in.go b/cl/_testgo/allocinloop/in.go index cf2727b79f..499fb6d1f6 100644 --- a/cl/_testgo/allocinloop/in.go +++ b/cl/_testgo/allocinloop/in.go @@ -18,10 +18,10 @@ func Foo(s string) int { // CHECK-DAG: call i64 @main.Foo(%"{{.*}}String" { ptr @{{[0-9]+}}, i64 5 }) // CHECK-DAG: call i1 @__llgo_coro_preempt_poll_v1(ptr %0) // CHECK-DAG: call ptr @"{{.*}}PrintInt$coro" -// CHECK-DAG: call void @__llgo_coro_await_prepare_v3 +// CHECK-DAG: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK-DAG: icmp slt i64 {{.*}}, 10000000 // CHECK-DAG: call ptr @"{{.*}}PrintByte$coro"({{.*}}i8 10) -// CHECK-DAG: call void @__llgo_coro_await_prepare_v3 +// CHECK-DAG: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK-NOT: call ptr @"{{.*}}AllocZ" func Test() { j := 0 @@ -33,7 +33,7 @@ func Test() { // CHECK-LABEL: define ptr @"main.main$coro"(ptr %0, ptr %1){{.*}} { // CHECK: call ptr @"main.Test$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 func main() { Test() } diff --git a/cl/_testgo/cgofull/cgofull.go b/cl/_testgo/cgofull/cgofull.go index 744d94f221..d25d51e189 100644 --- a/cl/_testgo/cgofull/cgofull.go +++ b/cl/_testgo/cgofull/cgofull.go @@ -197,7 +197,7 @@ func runPy() { // CHECK: call i32 @__llgo_coro_worker_resume_v1( // CHECK-LABEL: define ptr @"main.triggerC2func$coro"( // CHECK: call ptr @"main._C2func_test_structs$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define linkonce i64 @__llgo_coro_worker_cgo_thunk_v1_ // CHECK: call {{.*}} @main._Cfunc_ diff --git a/cl/_testgo/defer3/in.go b/cl/_testgo/defer3/in.go index 040b868528..78b63144b9 100644 --- a/cl/_testgo/defer3/in.go +++ b/cl/_testgo/defer3/in.go @@ -28,14 +28,14 @@ func main() { // CHECK-NOT: @llvm.coro. // CHECK: ret i1 // CHECK-LABEL: define ptr @"main.fail$coro"( -// CHECK: call void @__llgo_coro_frame_publish_v1( +// CHECK: call void @__llgo_coro_frame_publish_v3( // CHECK: call void @__llgo_coro_panic_prepare_v1( // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintString$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: call void @__llgo_coro_panic_prepare_v1( // CHECK: call ptr @"main.fail$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK-LABEL: define ptr @"main.main$1$coro"( // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintString$coro" diff --git a/cl/_testgo/defer5/in.go b/cl/_testgo/defer5/in.go index 4be7304de3..41f13ced45 100644 --- a/cl/_testgo/defer5/in.go +++ b/cl/_testgo/defer5/in.go @@ -20,7 +20,7 @@ func main() { // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: call void @__llgo_coro_panic_prepare_v1( // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintString$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK-LABEL: define ptr @"main.main$1$coro"( // CHECK: call void @__llgo_coro_recover_take_v1( // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintString$coro" diff --git a/cl/_testgo/deferdispatch-wasm-target/in.go b/cl/_testgo/deferdispatch-wasm-target/in.go index 17ce50c6e5..6d37109b10 100644 --- a/cl/_testgo/deferdispatch-wasm-target/in.go +++ b/cl/_testgo/deferdispatch-wasm-target/in.go @@ -13,7 +13,7 @@ func main() { // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: call i32 @llvm.coro.size.i32() // CHECK: call ptr @"main.run$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define ptr @"main.run$coro"( // CHECK: call i32 @llvm.coro.size.i32() diff --git a/cl/_testgo/deferdispatch-wasm/in.go b/cl/_testgo/deferdispatch-wasm/in.go index 04423bdd61..0de5282c7b 100644 --- a/cl/_testgo/deferdispatch-wasm/in.go +++ b/cl/_testgo/deferdispatch-wasm/in.go @@ -14,7 +14,7 @@ func main() { // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: call i32 @llvm.coro.size.i32() // CHECK: call ptr @"main.run$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define ptr @"main.run$coro"( // CHECK: call i32 @llvm.coro.size.i32() diff --git a/cl/_testgo/deferdispatch/in.go b/cl/_testgo/deferdispatch/in.go index 8d3420949e..befa8cdd62 100644 --- a/cl/_testgo/deferdispatch/in.go +++ b/cl/_testgo/deferdispatch/in.go @@ -14,7 +14,7 @@ func main() { // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: call i64 @llvm.coro.size.i64() // CHECK: call ptr @"main.run$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define ptr @"main.run$coro"( // CHECK: call i64 @llvm.coro.size.i64() diff --git a/cl/_testgo/errors/in.go b/cl/_testgo/errors/in.go index a1ebbc1361..331dda713c 100644 --- a/cl/_testgo/errors/in.go +++ b/cl/_testgo/errors/in.go @@ -5,7 +5,7 @@ package main // CHECK-NOT: _llgo_routine // CHECK-LABEL: define ptr @"main.New$coro"( // CHECK: call ptr @"{{.*}}AllocZ"( -// CHECK: call ptr @"{{.*}}NewItab$coro"( +// CHECK: insertvalue %"{{.*}}iface" { ptr @__llgo_static_itab. // CHECK: call i8 @llvm.coro.suspend( // CHECK-NOT: NewProc // CHECK-NOT: _llgo_routine @@ -15,9 +15,9 @@ package main // CHECK-NOT: NewProc // CHECK-NOT: _llgo_routine // CHECK-LABEL: define ptr @"main.main$coro"( -// CHECK: call ptr @"main.New$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call void @"main.New$outcome"( // CHECK: call ptr @"{{.*}}PrintIface$coro"( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr %{{[0-9]+}}(ptr %0, // CHECK: call ptr @"{{.*}}PrintString$coro"( // CHECK: call ptr @"{{.*}}PrintByte$coro"( diff --git a/cl/_testgo/goexit/in.go b/cl/_testgo/goexit/in.go index 5d8f20c4c1..81dd985ac4 100644 --- a/cl/_testgo/goexit/in.go +++ b/cl/_testgo/goexit/in.go @@ -17,9 +17,9 @@ import "runtime" // CHECK-NOT: _llgo_routine // CHECK-LABEL: define ptr @"main.demo1$1$coro"( // CHECK: call ptr @"runtime.Goexit$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"main.demo1$1$1$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK-NOT: NewProc // CHECK-NOT: _llgo_routine // CHECK-LABEL: define ptr @"main.demo1$1$1$coro"( diff --git a/cl/_testgo/interface/in.go b/cl/_testgo/interface/in.go index 6255085048..df44024e1c 100644 --- a/cl/_testgo/interface/in.go +++ b/cl/_testgo/interface/in.go @@ -13,7 +13,7 @@ import "github.com/goplus/llgo/cl/_testdata/foo" // CHECK: call ptr @"{{.*}}NewItab$coro"( // CHECK: call ptr @"{{.*}}PrintString$coro"( // CHECK: call ptr %{{[0-9]+}}(ptr %0, -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"{{.*}}NewItab$coro"( // CHECK: call i8 @llvm.coro.suspend( // CHECK-NOT: NewProc diff --git a/cl/_testgo/localitycodegen/in.go b/cl/_testgo/localitycodegen/in.go index 0f32cd7df5..a770cfdfa4 100644 --- a/cl/_testgo/localitycodegen/in.go +++ b/cl/_testgo/localitycodegen/in.go @@ -17,11 +17,11 @@ package main // CHECK: ret ptr // CHECK-LABEL: define ptr @"main.__llgo_local_dispatch_tls_0$coro"( // CHECK: call ptr @"main.__llgo_local_init_0$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define ptr @"main.__llgo_local_init_0$coro"( // CHECK: call ptr @main.newPointer() -// CHECK: call ptr @"{{.*}}LocalPackageLogical$coro"( +// CHECK: call void @"{{.*}}LocalPackageLogical$outcome"( // CHECK: call ptr @"{{.*}}EnsureLogicalLocalInitializer$coro"( // CHECK-LABEL: define ptr @"main.init$coro"( // CHECK: call ptr @main.newPointer() @@ -34,7 +34,7 @@ package main // CHECK-LABEL: define ptr @main.newPointer() // CHECK: ret ptr @main.backing // CHECK-LABEL: define ptr @"main.values$coro"( -// CHECK: call ptr @"{{.*}}LocalPackageLogical$coro"( +// CHECK: call void @"{{.*}}LocalPackageLogical$outcome"( // CHECK: call ptr @"{{.*}}EnsureLogicalLocalInitializer$coro"( // CHECK: call i8 @llvm.coro.suspend( // CHECK-NOT: NewProc diff --git a/cl/_testgo/recoverthenpanic/in.go b/cl/_testgo/recoverthenpanic/in.go index ba0a263160..5498142a78 100644 --- a/cl/_testgo/recoverthenpanic/in.go +++ b/cl/_testgo/recoverthenpanic/in.go @@ -7,7 +7,7 @@ package main // CHECK: call void @__llgo_coro_panic_prepare_v1( // CHECK: call void @__llgo_coro_recover_take_v1( // CHECK: call ptr @"{{.*}}PrintString$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"{{.*}}PrintByte$coro"( // CHECK: call i8 @llvm.coro.suspend( // CHECK-NOT: GetThreadDefer @@ -15,7 +15,7 @@ package main // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: call void @__llgo_coro_panic_prepare_v1( // CHECK: call ptr @"main.End$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call i8 @llvm.coro.suspend( // CHECK-NOT: GetThreadDefer // CHECK-NOT: SetThreadDefer diff --git a/cl/_testgo/reflectconv/in.go b/cl/_testgo/reflectconv/in.go index b57514f10e..99b9a9fddb 100644 --- a/cl/_testgo/reflectconv/in.go +++ b/cl/_testgo/reflectconv/in.go @@ -20,15 +20,15 @@ import ( // CHECK-NOT: _llgo_routine // CHECK-LABEL: define ptr @"main.TestConvert$coro"( // CHECK: call ptr @"reflect.Value.CanConvert$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"reflect.Value.Convert$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"reflect.Value.Interface$coro"( // CHECK: call ptr @"reflect.Value.Set$coro"( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define ptr @"main.TestConvertNaNs$coro"( // CHECK: call ptr @"reflect.Value.Convert$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK-LABEL: define ptr @"main.TestConvertPanic$coro"( // CHECK: call ptr @"reflect.Value.CanConvert$coro"( // CHECK: call ptr @"reflect.Value.Convert$coro"( @@ -39,13 +39,13 @@ import ( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: call ptr @"main.TestConvert$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"main.TestConvertPanic$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"main.TestConvertSlice2Array$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"main.TestConvertNaNs$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK-NOT: NewProc // CHECK-NOT: _llgo_routine diff --git a/cl/_testgo/reflectfn/in.go b/cl/_testgo/reflectfn/in.go index ea25ab08c8..cfb0d806fb 100644 --- a/cl/_testgo/reflectfn/in.go +++ b/cl/_testgo/reflectfn/in.go @@ -19,7 +19,7 @@ func demo() { // CHECK-LABEL: define ptr @"main.main$coro"(ptr %0, ptr %1){{.*}} { // CHECK: store { ptr, ptr } { ptr @__llgo_coro_func_descriptor_v1.{{.*}}, ptr null } // CHECK: call ptr @{{.*}}reflect.Value.UnsafePointer$coro{{.*}}( -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 func main() { v := 100 fn := func() { @@ -37,5 +37,5 @@ func main() { // CHECK-LABEL: define ptr @"main.main$1$coro"(ptr %0, ptr %1, ptr swiftself %2){{.*}} { // CHECK: load { ptr }, ptr %2 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintInt$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK-NOT: __llgo_stub. diff --git a/cl/_testgo/reflectmk/in.go b/cl/_testgo/reflectmk/in.go index 8e2ba50dcd..ca3a2e55ea 100644 --- a/cl/_testgo/reflectmk/in.go +++ b/cl/_testgo/reflectmk/in.go @@ -13,7 +13,7 @@ import ( // CHECK: @__llgo_coro_func_descriptor_v1.method.{{.*}} = linkonce_odr unnamed_addr constant // CHECK-LABEL: define ptr @"main.Point.String$coro"(ptr %0, ptr %1, %main.Point %2){{.*}} { // CHECK: call ptr @"fmt.Sprintf$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK-LABEL: define ptr @"main.(*Point).Set$coro"(ptr %0, ptr %1, ptr %2, i64 %3, i64 %4){{.*}} { // CHECK: store i64 %3 // CHECK: store i64 %4 @@ -25,7 +25,7 @@ import ( // CHECK-DAG: call ptr @"reflect.PointerTo$coro"( // CHECK-DAG: call ptr @"reflect.SliceOf$coro"( // CHECK-DAG: call ptr @"reflect.StructOf$coro"( -// CHECK-DAG: call ptr @"reflect.Value.Method$coro"( +// CHECK-DAG: call void @"reflect.Value.Method$outcome"( // CHECK-DAG: call ptr @"reflect.Value.MethodByName$coro"( // CHECK-DAG: call ptr @"reflect.Value.Call$coro"( // CHECK-LABEL: define ptr @"main.method$coro"(ptr %0, ptr %1, i64 %2){{.*}} { diff --git a/cl/_testgo/returnorder/in.go b/cl/_testgo/returnorder/in.go index 7bcd19daaf..30de5e8d18 100644 --- a/cl/_testgo/returnorder/in.go +++ b/cl/_testgo/returnorder/in.go @@ -4,14 +4,15 @@ package main import "fmt" // A call in a return list is evaluated before the sibling variable is loaded. -// The call itself uses the structured outcome path and its caller awaits the -// coroutine result rather than falling back to a native goroutine wrapper. +// The bounded call uses the structured outcome-plain path directly rather +// than falling back to a native goroutine wrapper or suspending its caller. // // CHECK-NOT: NewProc // CHECK-NOT: _llgo_routine // CHECK-LABEL: define ptr @"main.main$coro"( -// CHECK: call ptr @"main.returnStateAndMut$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call void @"main.returnStateAndMut$outcome"( +// CHECK-NOT: call i1 @__llgo_coro_await_prepare_inline_v4( +// CHECK: load i32 // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define ptr @"main.returnStateAndMut$coro"( // CHECK: store i64 1 diff --git a/cl/_testgo/rewrite/main.go b/cl/_testgo/rewrite/main.go index a7200abdcc..841e7319fe 100644 --- a/cl/_testgo/rewrite/main.go +++ b/cl/_testgo/rewrite/main.go @@ -18,9 +18,9 @@ import ( // CHECK-NOT: _llgo_routine // CHECK-LABEL: define ptr @"main.init$coro"( // CHECK: call ptr @"fmt.init$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"github.com/goplus/llgo/cl/_testgo/rewrite/dep.init$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: call ptr @"main.printLine$coro"( // CHECK: call ptr @"github.com/goplus/llgo/cl/_testgo/rewrite/dep.PrintVar$coro"( @@ -28,10 +28,10 @@ import ( // CHECK: call ptr @"main.printLine$coro"( // CHECK: call %"{{.*}}String" @runtime.Version() // CHECK: call ptr @"main.printLine$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK-LABEL: define ptr @"main.printLine$coro"( // CHECK: call ptr @"fmt.Printf$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK-NOT: NewProc // CHECK-NOT: _llgo_routine diff --git a/cl/_testgo/syncmap/in.go b/cl/_testgo/syncmap/in.go index e302cf2593..b7135fb7d4 100644 --- a/cl/_testgo/syncmap/in.go +++ b/cl/_testgo/syncmap/in.go @@ -14,7 +14,7 @@ import ( // CHECK-NOT: _llgo_routine // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: call ptr @"sync.(*Map).Store$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"sync.(*Map).Load$coro"( // CHECK: call ptr @"fmt.Println$coro"( // CHECK: call ptr @"sync.(*Map).Range$coro"( @@ -22,7 +22,7 @@ import ( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define ptr @"main.main$1$coro"( // CHECK: call ptr @"fmt.Printf$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK-NOT: __llgo_stub. // CHECK-NOT: NewProc // CHECK-NOT: _llgo_routine diff --git a/cl/_testgo/tptypes/in.go b/cl/_testgo/tptypes/in.go index ff5cb82b44..5ff5a0638d 100644 --- a/cl/_testgo/tptypes/in.go +++ b/cl/_testgo/tptypes/in.go @@ -1,26 +1,27 @@ // LITTEST package main -// Generic instances keep distinct typed entries but share the same stackless -// call/await protocol. Register allocation and expanded append lowering are not -// part of this fixture's contract. +// Generic instances keep distinct typed coroutine entries. Their bounded +// append bodies and statically known callers use the outcome-plain fast path; +// only genuinely suspending printing keeps the stackless await protocol. // // CHECK-NOT: NewProc // CHECK-NOT: _llgo_routine // CHECK-LABEL: define ptr @"main.main$coro"( -// CHECK: call ptr @"main.(*Slice{{\[\[\]int,int\]}}).Append$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( -// CHECK: call ptr @"main.(*Slice{{\[\[\]string,string\]}}).Append$coro"( -// CHECK: call ptr @"main.(*Slice{{\[\[\]int,int\]}}).Append2$coro"( +// CHECK: call void @"main.(*Slice{{\[\[\]int,int\]}}).Append$outcome"( +// CHECK: call void @"main.(*Slice{{\[\[\]string,string\]}}).Append$outcome"( +// CHECK: call void @"main.(*Slice{{\[\[\]int,int\]}}).Append$outcome"( +// CHECK: call void @"main.(*Slice{{\[\[\]int,int\]}}).Append2$outcome"( // CHECK: call ptr @"{{.*}}PrintInt$coro"( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call ptr @"{{.*}}PrintString$coro"( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define linkonce ptr @"main.(*Slice{{\[\[\]int,int\]}}).Append$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call void @"{{.*}}SliceAppend$outcome"( // CHECK-LABEL: define linkonce ptr @"main.(*Slice{{\[\[\]int,int\]}}).Append2$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call void @"{{.*}}SliceAppend$outcome"( // CHECK-LABEL: define linkonce ptr @"main.(*Slice{{\[\[\]string,string\]}}).Append$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call void @"{{.*}}SliceAppend$outcome"( // CHECK-NOT: NewProc // CHECK-NOT: _llgo_routine diff --git a/cl/_testlibc/allocacstrs/in.go b/cl/_testlibc/allocacstrs/in.go index 125f5b421e..3dbec0bf29 100644 --- a/cl/_testlibc/allocacstrs/in.go +++ b/cl/_testlibc/allocacstrs/in.go @@ -15,8 +15,7 @@ func main() { // CHECK: [[CSTRMEM:%[0-9]+]] = call ptr @"{{.*}}/runtime/internal/runtime.AllocU"(i64 // CHECK-NOT: alloca ptr, i64 // CHECK-NOT: alloca i8, i64 - // CHECK: [[COPY:%[0-9]+]] = call ptr @"{{.*}}/runtime/internal/runtime.CStrCopy$coro"({{.*}}ptr [[CSTRMEM]] - // CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[COPY]] + // CHECK: call void @"{{.*}}/runtime/internal/runtime.CStrCopy$outcome"({{.*}}ptr [[CSTRMEM]] // CHECK-NOT: alloca ptr, i64 // CHECK-NOT: alloca i8, i64 // CHECK: call void @__llgo_coro_worker_park_v1 diff --git a/cl/_testlibc/complex/in.go b/cl/_testlibc/complex/in.go index eee6d2e088..0e454cf700 100644 --- a/cl/_testlibc/complex/in.go +++ b/cl/_testlibc/complex/in.go @@ -30,4 +30,4 @@ func main() { // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: store ptr @main.f // CHECK: call ptr @"main.f$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 diff --git a/cl/_testlibc/sqlite/in.go b/cl/_testlibc/sqlite/in.go index e5e770f23d..de133512c8 100644 --- a/cl/_testlibc/sqlite/in.go +++ b/cl/_testlibc/sqlite/in.go @@ -18,7 +18,7 @@ func check(err sqlite.Errno) { // CHECK-LABEL: define ptr @"main.main$coro"( func main() { // CHECK: [[OPEN:%[0-9]+]] = call ptr @"github.com/goplus/lib/c/sqlite.OpenV2$coro"({{.*}}ptr @{{[0-9]+}}, i32 130, ptr null) - // CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[OPEN]] + // CHECK: call i1 @__llgo_coro_await_prepare_inline_v4({{.*}}ptr [[OPEN]] db, err := sqlite.OpenV2(c.Str(":memory:"), sqlite.OpenReadWrite|sqlite.OpenMemory, nil) check(err) diff --git a/cl/_testlibgo/bytes/in.go b/cl/_testlibgo/bytes/in.go index 0d76b41cb7..6b2dea1172 100644 --- a/cl/_testlibgo/bytes/in.go +++ b/cl/_testlibgo/bytes/in.go @@ -6,15 +6,14 @@ import ( ) // CHECK-LABEL: define ptr @"main.main$coro"( -// CHECK: call ptr @"{{.*}}/runtime/internal/runtime.AllocZ"(i64 40) -// CHECK: [[S2B:%[0-9]+]] = call ptr @"{{.*}}/runtime/internal/runtime.StringToBytes$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[S2B]] +// CHECK: alloca %bytes.Buffer +// CHECK: call void @"{{.*}}/runtime/internal/runtime.StringToBytes$outcome" // CHECK: [[WRITE:%[0-9]+]] = call ptr @"bytes.(*Buffer).Write$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[WRITE]] +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4({{.*}}ptr [[WRITE]] // CHECK: call ptr @"bytes.(*Buffer).WriteString$coro" -// CHECK: call ptr @"bytes.(*Buffer).Bytes$coro" -// CHECK: call ptr @"bytes.(*Buffer).String$coro" -// CHECK: call ptr @"bytes.EqualFold$coro" +// CHECK: call void @"bytes.(*Buffer).Bytes$outcome" +// CHECK: call void @"bytes.(*Buffer).String$outcome" +// CHECK: call void @"bytes.EqualFold$outcome" func main() { var b bytes.Buffer // A Buffer needs no initialization. b.Write([]byte("Hello ")) diff --git a/cl/_testlibgo/complex/in.go b/cl/_testlibgo/complex/in.go index 2d1ec47604..74b67c97f2 100644 --- a/cl/_testlibgo/complex/in.go +++ b/cl/_testlibgo/complex/in.go @@ -7,8 +7,9 @@ import ( // CHECK-LABEL: define ptr @"main.f$coro"( func f(c, z complex128) { - // CHECK: [[ABS:%[0-9]+]] = call ptr @"math/cmplx.Abs$coro" - // CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[ABS]] + // CHECK: call void @"math/cmplx.Abs$outcome" + // CHECK: [[PRINT:%[0-9]+]] = call ptr @"{{.*}}PrintFloat$coro" + // CHECK: call i1 @__llgo_coro_await_prepare_inline_v4({{.*}}ptr [[PRINT]] println("abs(3+4i):", cmplx.Abs(c)) // CHECK: extractvalue { double, double } %3, 0 // CHECK: extractvalue { double, double } %3, 1 diff --git a/cl/_testlibgo/errors/in.go b/cl/_testlibgo/errors/in.go index 157d099cb7..96a3d9a9b7 100644 --- a/cl/_testlibgo/errors/in.go +++ b/cl/_testlibgo/errors/in.go @@ -4,8 +4,7 @@ package main import "errors" // CHECK-LABEL: define ptr @"main.main$coro"( -// CHECK: [[NEW:%[0-9]+]] = call ptr @"errors.New$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[NEW]] +// CHECK: call void @"errors.New$outcome" // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.IfaceType" // CHECK: call void @__llgo_coro_panic_prepare_v1 func main() { diff --git a/cl/_testlibgo/mapzero/in.go b/cl/_testlibgo/mapzero/in.go index 76279570f4..2df5c0dbdb 100644 --- a/cl/_testlibgo/mapzero/in.go +++ b/cl/_testlibgo/mapzero/in.go @@ -12,7 +12,7 @@ func main() { }() // CHECK-LABEL: define ptr @"main.main$coro"( // CHECK: [[LOOKUP:%[0-9]+]] = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAccess1$coro"({{.*}}ptr @"map[_llgo_int]_llgo_int", ptr null, ptr {{%.*}}) - // CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[LOOKUP]] + // CHECK: call i1 @__llgo_coro_await_prepare_inline_v4({{.*}}ptr [[LOOKUP]] m := [0]map[int]int{}[a][0] print(m) } diff --git a/cl/_testlibgo/math/in.go b/cl/_testlibgo/math/in.go index a2edae41fb..49af78268c 100644 --- a/cl/_testlibgo/math/in.go +++ b/cl/_testlibgo/math/in.go @@ -7,10 +7,11 @@ import ( // CHECK-LABEL: define ptr @"main.main$coro"( func main() { - // CHECK: [[SQRT:%[0-9]+]] = call ptr @"math.Sqrt$coro"({{.*}}double 2.000000e+00) - // CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[SQRT]] - // CHECK: call ptr @"math.Abs$coro"({{.*}}double -1.200000e+00) - // CHECK: call ptr @"math.Ldexp$coro"({{.*}}double 1.200000e+00, i64 3) + // CHECK: call void @"math.Sqrt$outcome"({{.*}}double 2.000000e+00) + // CHECK: [[PRINT:%[0-9]+]] = call ptr @"{{.*}}PrintFloat$coro" + // CHECK: call i1 @__llgo_coro_await_prepare_inline_v4({{.*}}ptr [[PRINT]] + // CHECK: call void @"math.Abs$outcome"({{.*}}double -1.200000e+00) + // CHECK: call void @"math.Ldexp$outcome"({{.*}}double 1.200000e+00, i64 3) println(math.Sqrt(2)) println(math.Abs(-1.2)) println(math.Ldexp(1.2, 3)) diff --git a/cl/_testlibgo/mathbits/in.go b/cl/_testlibgo/mathbits/in.go index 86506a854e..938824e03f 100644 --- a/cl/_testlibgo/mathbits/in.go +++ b/cl/_testlibgo/mathbits/in.go @@ -7,9 +7,10 @@ import ( // CHECK-LABEL: define ptr @"main.main$coro"( func main() { - // CHECK: [[LEN:%[0-9]+]] = call ptr @"math/bits.Len8$coro"({{.*}}i8 20) - // CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[LEN]] - // CHECK: call ptr @"math/bits.OnesCount$coro"({{.*}}i64 20) + // CHECK: call void @"math/bits.Len8$outcome"({{.*}}i8 20) + // CHECK: [[PRINT:%[0-9]+]] = call ptr @"{{.*}}PrintInt$coro" + // CHECK: call i1 @__llgo_coro_await_prepare_inline_v4({{.*}}ptr [[PRINT]] + // CHECK: call i64 @"math/bits.OnesCount"(i64 20) println(bits.Len8(20)) println(bits.OnesCount(20)) } diff --git a/cl/_testlibgo/nettextproto/in.go b/cl/_testlibgo/nettextproto/in.go index a87d650ce1..e3654f2d53 100644 --- a/cl/_testlibgo/nettextproto/in.go +++ b/cl/_testlibgo/nettextproto/in.go @@ -6,6 +6,6 @@ import "net/textproto" // CHECK-LABEL: define ptr @"main.main$coro"( func main() { // CHECK: [[CANON:%[0-9]+]] = call ptr @"net/textproto.CanonicalMIMEHeaderKey$coro"({{.*}}%"{{.*}}/runtime/internal/runtime.String" { ptr @{{[0-9]+}}, i64 4 }) - // CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[CANON]] + // CHECK: call i1 @__llgo_coro_await_prepare_inline_v4({{.*}}ptr [[CANON]] println(textproto.CanonicalMIMEHeaderKey("host")) } diff --git a/cl/_testlibgo/os/in.go b/cl/_testlibgo/os/in.go index 0898a441f6..5144d5a7de 100644 --- a/cl/_testlibgo/os/in.go +++ b/cl/_testlibgo/os/in.go @@ -6,7 +6,7 @@ import "os" // CHECK-LABEL: define ptr @"main.main$coro"( func main() { // CHECK: [[GETWD:%[0-9]+]] = call ptr @"os.Getwd$coro"( - // CHECK: call void @__llgo_coro_await_prepare_v3({{.*}}ptr [[GETWD]] + // CHECK: call i1 @__llgo_coro_await_prepare_inline_v4({{.*}}ptr [[GETWD]] // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.IfaceType" // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.EfaceEqual$coro" wd, err := os.Getwd() diff --git a/cl/_testlibgo/sync/in.go b/cl/_testlibgo/sync/in.go index 14f826d61a..6c91c8b38b 100644 --- a/cl/_testlibgo/sync/in.go +++ b/cl/_testlibgo/sync/in.go @@ -26,7 +26,7 @@ func main() { // as the third physical parameter. // CHECK-LABEL: define ptr @"main.f$coro"( // CHECK: call ptr @"sync.(*Once).Do$coro"( -// CHECK: call void @__llgo_coro_await_prepare_v3( +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4( // CHECK: call i8 @llvm.coro.suspend( // CHECK-LABEL: define ptr @"main.f$1$coro"(ptr %0, ptr %1, ptr swiftself %2) diff --git a/cl/_testmeta/ifaceuse_basic/meta-expect.txt b/cl/_testmeta/ifaceuse_basic/meta-expect.txt index 9fb80dd2fc..f9bf582aaf 100644 --- a/cl/_testmeta/ifaceuse_basic/meta-expect.txt +++ b/cl/_testmeta/ifaceuse_basic/meta-expect.txt @@ -8,33 +8,32 @@ _llgo_main.T: *_llgo_main.T: _llgo_main.T github.com/goplus/llgo/runtime/internal/runtime.memequalptr -__llgo_coro_root_factory_descriptor_v1.c6527c229582d9177d331b3d11a81e32: - __llgo_coro_root_factory_v1.c6527c229582d9177d331b3d11a81e32 -__llgo_coro_root_factory_v1.c6527c229582d9177d331b3d11a81e32: +__llgo_coro_root_factory_descriptor_v1.dfc7f364c7c31c1996dcb4f150ed6934: + __llgo_coro_root_factory_v1.dfc7f364c7c31c1996dcb4f150ed6934 +__llgo_coro_root_factory_v1.dfc7f364c7c31c1996dcb4f150ed6934: main.main$coro -__llgo_coro_root_package_v1.42538989abc5c00ea9f807df5a483675: - __llgo_coro_root_package_v1.42538989abc5c00ea9f807df5a483675.entries -__llgo_coro_root_package_v1.42538989abc5c00ea9f807df5a483675.entries: - __llgo_coro_root_factory_descriptor_v1.c6527c229582d9177d331b3d11a81e32 +__llgo_coro_root_package_v1.fff8b72a1093cef85d3dcc7a8af92aa0: + __llgo_coro_root_package_v1.fff8b72a1093cef85d3dcc7a8af92aa0.entries +__llgo_coro_root_package_v1.fff8b72a1093cef85d3dcc7a8af92aa0.entries: + __llgo_coro_root_factory_descriptor_v1.dfc7f364c7c31c1996dcb4f150ed6934 _llgo_main.T: *_llgo_main.T github.com/goplus/llgo/runtime/internal/runtime.memequal0 llvm.compiler.used: - __llgo_coro_library_effect_v6.6e13a20588277ad1732abfdfc51410f8 + __llgo_coro_library_effect_v9.208ab9b5dc648747a50b0812e926e3fb llvm.used: - __llgo_coro_root_factory_descriptor_v1.c6527c229582d9177d331b3d11a81e32 - __llgo_coro_root_package_v1.42538989abc5c00ea9f807df5a483675 + __llgo_coro_root_factory_descriptor_v1.dfc7f364c7c31c1996dcb4f150ed6934 + __llgo_coro_root_package_v1.fff8b72a1093cef85d3dcc7a8af92aa0 main.init: main.init$guard main.main$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.c6527c229582d9177d331b3d11a81e32 + __llgo_coro_frame_descriptor_v1.dfc7f364c7c31c1996dcb4f150ed6934 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_run_decision_take_zero_v1 _llgo_main.T - github.com/goplus/llgo/runtime/internal/runtime.AllocU llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin @@ -43,10 +42,16 @@ main.main$coro: llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.sink +main.main$outcome: + _llgo_main.T + main.sink [UseIface] main.main$coro: _llgo_main.T +main.main$outcome: + _llgo_main.T diff --git a/cl/_testmeta/interface_anyonmous/meta-expect.txt b/cl/_testmeta/interface_anyonmous/meta-expect.txt index f78d1c18e9..7c1446efa8 100644 --- a/cl/_testmeta/interface_anyonmous/meta-expect.txt +++ b/cl/_testmeta/interface_anyonmous/meta-expect.txt @@ -20,13 +20,13 @@ _llgo_main.T: *_llgo_main.T: _llgo_main.T github.com/goplus/llgo/runtime/internal/runtime.memequalptr -__llgo$generated$promoted$M$llgo$promoted$v1$f2f2dcf9274acaf0798db4c1de30a59852a4900a47cd50e7b09cb3a3a4b98541$coro: +__llgo$generated$promoted$M$llgo$promoted$v1$27c8779fe34b886773f81fe1482bd844a3b900d9213cad5e5a4cdf2da74403e1$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.0f7a29275bdf5ec1cd250db850f60089 + __llgo_coro_frame_descriptor_v1.ee18086b9ceb5b1e08265034496e0c1a __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -38,15 +38,19 @@ __llgo$generated$promoted$M$llgo$promoted$v1$f2f2dcf9274acaf0798db4c1de30a59852a llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.T.M -__llgo$generated$promoted$N$llgo$promoted$v1$cc5403c28ab09255ae4cd4bed19f8d2ec5c007855d85e2f7653e6a36eccff769$coro: +__llgo$generated$promoted$M$llgo$promoted$v1$27c8779fe34b886773f81fe1482bd844a3b900d9213cad5e5a4cdf2da74403e1$outcome: + __llgo_coro_wrap_nil_payload_v1 + main.T.M +__llgo$generated$promoted$N$llgo$promoted$v1$9af7668ad08f5fa9c848b950fb758a2f57c43da843320bd1e0e8269954fccf1b$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.8b45e3942b56ba36d4e46de151b6b727 + __llgo_coro_frame_descriptor_v1.d7a3d6b7599f01b617d338f4bd9a06ea __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -58,44 +62,59 @@ __llgo$generated$promoted$N$llgo$promoted$v1$cc5403c28ab09255ae4cd4bed19f8d2ec5c llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.T.N -__llgo_coro_func_coro_v1.method-value.05cba5e398bf01cb.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo$generated$promoted$N$llgo$promoted$v1$cc5403c28ab09255ae4cd4bed19f8d2ec5c007855d85e2f7653e6a36eccff769$coro -__llgo_coro_func_coro_v1.method-value.20c8391a7b4db8c7.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo$generated$promoted$M$llgo$promoted$v1$f2f2dcf9274acaf0798db4c1de30a59852a4900a47cd50e7b09cb3a3a4b98541$coro -__llgo_coro_func_coro_v1.method.05cba5e398bf01cb.88c3d2383da6469b697cffacc8f592fd: - __llgo$generated$promoted$N$llgo$promoted$v1$cc5403c28ab09255ae4cd4bed19f8d2ec5c007855d85e2f7653e6a36eccff769$coro -__llgo_coro_func_coro_v1.method.20c8391a7b4db8c7.88c3d2383da6469b697cffacc8f592fd: - __llgo$generated$promoted$M$llgo$promoted$v1$f2f2dcf9274acaf0798db4c1de30a59852a4900a47cd50e7b09cb3a3a4b98541$coro -__llgo_coro_func_descriptor_v1.method-value.05cba5e398bf01cb.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo_coro_func_coro_v1.method-value.05cba5e398bf01cb.ce9a78a38c01b4e333f56897cb63d7bc -__llgo_coro_func_descriptor_v1.method-value.20c8391a7b4db8c7.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo_coro_func_coro_v1.method-value.20c8391a7b4db8c7.ce9a78a38c01b4e333f56897cb63d7bc -__llgo_coro_func_descriptor_v1.method-value.cfbc2b298c1d984e.c31f6a3d6adae06151afe0e079fd6339: - __llgo_coro_func_plain_v1.method-value.cfbc2b298c1d984e.c31f6a3d6adae06151afe0e079fd6339 -__llgo_coro_func_descriptor_v1.method-value.f606c1e3aa2440c5.c31f6a3d6adae06151afe0e079fd6339: - __llgo_coro_func_plain_v1.method-value.f606c1e3aa2440c5.c31f6a3d6adae06151afe0e079fd6339 -__llgo_coro_func_descriptor_v1.method.05cba5e398bf01cb.88c3d2383da6469b697cffacc8f592fd: - __llgo_coro_func_coro_v1.method.05cba5e398bf01cb.88c3d2383da6469b697cffacc8f592fd -__llgo_coro_func_descriptor_v1.method.20c8391a7b4db8c7.88c3d2383da6469b697cffacc8f592fd: - __llgo_coro_func_coro_v1.method.20c8391a7b4db8c7.88c3d2383da6469b697cffacc8f592fd -__llgo_coro_func_plain_v1.method-value.cfbc2b298c1d984e.c31f6a3d6adae06151afe0e079fd6339: +__llgo$generated$promoted$N$llgo$promoted$v1$9af7668ad08f5fa9c848b950fb758a2f57c43da843320bd1e0e8269954fccf1b$outcome: + __llgo_coro_wrap_nil_payload_v1 + main.T.N +__llgo_coro_func_coro_v1.method-value.254b10e3f24f38b5.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$N$llgo$promoted$v1$9af7668ad08f5fa9c848b950fb758a2f57c43da843320bd1e0e8269954fccf1b$coro +__llgo_coro_func_coro_v1.method-value.4451004d663f0f9a.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$M$llgo$promoted$v1$27c8779fe34b886773f81fe1482bd844a3b900d9213cad5e5a4cdf2da74403e1$coro +__llgo_coro_func_coro_v1.method.254b10e3f24f38b5.dfdace59aa77dc7749541c4da1cb15aa: + __llgo$generated$promoted$N$llgo$promoted$v1$9af7668ad08f5fa9c848b950fb758a2f57c43da843320bd1e0e8269954fccf1b$coro +__llgo_coro_func_coro_v1.method.4451004d663f0f9a.dfdace59aa77dc7749541c4da1cb15aa: + __llgo$generated$promoted$M$llgo$promoted$v1$27c8779fe34b886773f81fe1482bd844a3b900d9213cad5e5a4cdf2da74403e1$coro +__llgo_coro_func_descriptor_v1.method-value.254b10e3f24f38b5.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$N$llgo$promoted$v1$9af7668ad08f5fa9c848b950fb758a2f57c43da843320bd1e0e8269954fccf1b$coro + __llgo_coro_func_coro_v1.method-value.254b10e3f24f38b5.ab9126c81700848f6b2436efb97ef747 +__llgo_coro_func_descriptor_v1.method-value.4451004d663f0f9a.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$M$llgo$promoted$v1$27c8779fe34b886773f81fe1482bd844a3b900d9213cad5e5a4cdf2da74403e1$coro + __llgo_coro_func_coro_v1.method-value.4451004d663f0f9a.ab9126c81700848f6b2436efb97ef747 +__llgo_coro_func_descriptor_v1.method-value.5304e618428d6e21.779cffa94cfa288d5a1e6954a0b0a271: + __llgo_coro_func_plain_v1.method-value.5304e618428d6e21.779cffa94cfa288d5a1e6954a0b0a271 + main.T.M +__llgo_coro_func_descriptor_v1.method-value.bb498861951a9881.779cffa94cfa288d5a1e6954a0b0a271: + __llgo_coro_func_plain_v1.method-value.bb498861951a9881.779cffa94cfa288d5a1e6954a0b0a271 main.T.N -__llgo_coro_func_plain_v1.method-value.f606c1e3aa2440c5.c31f6a3d6adae06151afe0e079fd6339: +__llgo_coro_func_descriptor_v1.method.254b10e3f24f38b5.dfdace59aa77dc7749541c4da1cb15aa: + __llgo$generated$promoted$N$llgo$promoted$v1$9af7668ad08f5fa9c848b950fb758a2f57c43da843320bd1e0e8269954fccf1b$coro + __llgo_coro_func_coro_v1.method.254b10e3f24f38b5.dfdace59aa77dc7749541c4da1cb15aa +__llgo_coro_func_descriptor_v1.method.4451004d663f0f9a.dfdace59aa77dc7749541c4da1cb15aa: + __llgo$generated$promoted$M$llgo$promoted$v1$27c8779fe34b886773f81fe1482bd844a3b900d9213cad5e5a4cdf2da74403e1$coro + __llgo_coro_func_coro_v1.method.4451004d663f0f9a.dfdace59aa77dc7749541c4da1cb15aa +__llgo_coro_func_plain_v1.method-value.5304e618428d6e21.779cffa94cfa288d5a1e6954a0b0a271: main.T.M -__llgo_coro_method_raw_trap_v1.013ca3afc5e3f4cd984d738ad34b2c65: +__llgo_coro_func_plain_v1.method-value.bb498861951a9881.779cffa94cfa288d5a1e6954a0b0a271: + main.T.N +__llgo_coro_method_raw_trap_v1.7b747c323016c102c07c23e6844f2bf6: llvm.trap -__llgo_coro_method_raw_trap_v1.99adb610c64492ba7f4e441f633f8465: +__llgo_coro_method_raw_trap_v1.a148bf1b0892c861ccb34023fe975958: llvm.trap -__llgo_coro_root_factory_descriptor_v1.9b9acc219edfac966c955f6caf8dfe3f: - __llgo_coro_root_factory_v1.9b9acc219edfac966c955f6caf8dfe3f -__llgo_coro_root_factory_v1.9b9acc219edfac966c955f6caf8dfe3f: +__llgo_coro_root_factory_descriptor_v1.cf7f36679d6267d49eb07d1f70235945: + __llgo_coro_root_factory_v1.cf7f36679d6267d49eb07d1f70235945 +__llgo_coro_root_factory_v1.cf7f36679d6267d49eb07d1f70235945: main.main$coro -__llgo_coro_root_package_v1.674ed2f17726d03c98a3569baefb0fa5: - __llgo_coro_root_package_v1.674ed2f17726d03c98a3569baefb0fa5.entries -__llgo_coro_root_package_v1.674ed2f17726d03c98a3569baefb0fa5.entries: - __llgo_coro_root_factory_descriptor_v1.9b9acc219edfac966c955f6caf8dfe3f +__llgo_coro_root_package_v1.0f62c86a7efd61a38ea2544c11ab642f: + __llgo_coro_root_package_v1.0f62c86a7efd61a38ea2544c11ab642f.entries +__llgo_coro_root_package_v1.0f62c86a7efd61a38ea2544c11ab642f.entries: + __llgo_coro_root_factory_descriptor_v1.cf7f36679d6267d49eb07d1f70235945 +__llgo_static_itab.da57c1150fa5f8b8b0ee8029ae1e7eba: + __llgo_coro_func_descriptor_v1.method.254b10e3f24f38b5.dfdace59aa77dc7749541c4da1cb15aa + __llgo_coro_func_descriptor_v1.method.4451004d663f0f9a.dfdace59aa77dc7749541c4da1cb15aa + _llgo_iface$f14WsslTA1u5wwC83jLU0HU2u2mmAWxBVE38vPBbRAo + _llgo_main.T _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac: *_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac _llgo_iface$f14WsslTA1u5wwC83jLU0HU2u2mmAWxBVE38vPBbRAo: @@ -108,57 +127,66 @@ _llgo_main.T: *_llgo_main.T github.com/goplus/llgo/runtime/internal/runtime.memequal0 llvm.compiler.used: - __llgo_coro_library_effect_v6.4de903578f3c67c5b4208beb5f10ec98 + __llgo_coro_library_effect_v9.0fb92217a116c370a71536507e970008 llvm.used: - __llgo_coro_root_factory_descriptor_v1.9b9acc219edfac966c955f6caf8dfe3f - __llgo_coro_root_package_v1.674ed2f17726d03c98a3569baefb0fa5 + __llgo_coro_root_factory_descriptor_v1.cf7f36679d6267d49eb07d1f70235945 + __llgo_coro_root_package_v1.0f62c86a7efd61a38ea2544c11ab642f main.init: main.init$guard main.main$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.9b9acc219edfac966c955f6caf8dfe3f + __llgo_coro_frame_descriptor_v1.cf7f36679d6267d49eb07d1f70235945 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 - _llgo_iface$f14WsslTA1u5wwC83jLU0HU2u2mmAWxBVE38vPBbRAo - _llgo_main.T - github.com/goplus/llgo/runtime/internal/runtime.AllocU - github.com/goplus/llgo/runtime/internal/runtime.NewItab$coro + __llgo_static_itab.da57c1150fa5f8b8b0ee8029ae1e7eba llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.use$coro main.use$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.41b5b02f14f33ac9f7b7add910e2049d + __llgo_coro_frame_descriptor_v1.677a0120043993155485de0c97de1f83 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap [UseIface] @@ -172,11 +200,11 @@ main.use$coro: [MethodInfo] *_llgo_main.T: - 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.20c8391a7b4db8c7.88c3d2383da6469b697cffacc8f592fd __llgo_coro_func_descriptor_v1.method-value.20c8391a7b4db8c7.ce9a78a38c01b4e333f56897cb63d7bc - 1 N _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.05cba5e398bf01cb.88c3d2383da6469b697cffacc8f592fd __llgo_coro_func_descriptor_v1.method-value.05cba5e398bf01cb.ce9a78a38c01b4e333f56897cb63d7bc + 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.4451004d663f0f9a.dfdace59aa77dc7749541c4da1cb15aa __llgo_coro_func_descriptor_v1.method-value.4451004d663f0f9a.ab9126c81700848f6b2436efb97ef747 + 1 N _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.254b10e3f24f38b5.dfdace59aa77dc7749541c4da1cb15aa __llgo_coro_func_descriptor_v1.method-value.254b10e3f24f38b5.ab9126c81700848f6b2436efb97ef747 _llgo_main.T: - 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.20c8391a7b4db8c7.88c3d2383da6469b697cffacc8f592fd __llgo_coro_func_descriptor_v1.method-value.f606c1e3aa2440c5.c31f6a3d6adae06151afe0e079fd6339 - 1 N _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.05cba5e398bf01cb.88c3d2383da6469b697cffacc8f592fd __llgo_coro_func_descriptor_v1.method-value.cfbc2b298c1d984e.c31f6a3d6adae06151afe0e079fd6339 + 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.4451004d663f0f9a.dfdace59aa77dc7749541c4da1cb15aa __llgo_coro_func_descriptor_v1.method-value.5304e618428d6e21.779cffa94cfa288d5a1e6954a0b0a271 + 1 N _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.254b10e3f24f38b5.dfdace59aa77dc7749541c4da1cb15aa __llgo_coro_func_descriptor_v1.method-value.bb498861951a9881.779cffa94cfa288d5a1e6954a0b0a271 [InterfaceInfo] _llgo_iface$f14WsslTA1u5wwC83jLU0HU2u2mmAWxBVE38vPBbRAo: diff --git a/cl/_testmeta/interface_exported_var/meta-expect.txt b/cl/_testmeta/interface_exported_var/meta-expect.txt index 40e5e183c0..537c0178e2 100644 --- a/cl/_testmeta/interface_exported_var/meta-expect.txt +++ b/cl/_testmeta/interface_exported_var/meta-expect.txt @@ -1,86 +1,89 @@ [OrdinaryEdges] -__llgo$generated$promoted$AppendUint16$llgo$promoted$v1$041eca092cbad0b6ee570ed1c143d3c3fb5f8fc84b816700df575c0a9f6e7644$coro: - __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 +__llgo$generated$promoted$AppendUint16$llgo$promoted$v1$9a7807d83d8d8034fcc13583a42446ca874acab46dd9f7ba89a07dfa73a00b6b$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.70508222dc0e5b105cab1469ceef1b97 + __llgo_coro_frame_descriptor_v1.c0ddde913c32f7294b7210f6728d6963 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 - encoding/binary.littleEndian.AppendUint16$coro + encoding/binary.littleEndian.AppendUint16$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin llvm.coro.end llvm.coro.free llvm.coro.id - llvm.coro.promise llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use llvm.memset.p0.i64 llvm.trap -__llgo$generated$promoted$AppendUint32$llgo$promoted$v1$b4c14df6a45bb9af13c87f3bf217d829c196b1602b6eab526bd3a2f2681a86d8$coro: - __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 +__llgo$generated$promoted$AppendUint16$llgo$promoted$v1$9a7807d83d8d8034fcc13583a42446ca874acab46dd9f7ba89a07dfa73a00b6b$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.AppendUint16$outcome + llvm.memset.p0.i64 +__llgo$generated$promoted$AppendUint32$llgo$promoted$v1$680526cb56230b75d37345cbd0e04be79b2fb4c14d6de3a309b863bb8eeef715$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.ead3aa86623d680915a2c43315f0f7a2 + __llgo_coro_frame_descriptor_v1.93657cb95ccd29252782c54ba51bfbbb __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 - encoding/binary.littleEndian.AppendUint32$coro + encoding/binary.littleEndian.AppendUint32$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin llvm.coro.end llvm.coro.free llvm.coro.id - llvm.coro.promise llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use llvm.memset.p0.i64 llvm.trap -__llgo$generated$promoted$AppendUint64$llgo$promoted$v1$f15a7541a539d3f39e45f409ded3cd987cb29b41ba4b4e4f9202bd2de42da15b$coro: - __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 +__llgo$generated$promoted$AppendUint32$llgo$promoted$v1$680526cb56230b75d37345cbd0e04be79b2fb4c14d6de3a309b863bb8eeef715$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.AppendUint32$outcome + llvm.memset.p0.i64 +__llgo$generated$promoted$AppendUint64$llgo$promoted$v1$750731e201ea8dbd0d5a42675be68c0b10f435dc4f2a96a2d97b123b528c45ce$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.fbd2e79102d4688f00b339d58f38358e + __llgo_coro_frame_descriptor_v1.fe4a5722fab24e469dcb3b8e09ab18f5 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 - encoding/binary.littleEndian.AppendUint64$coro + encoding/binary.littleEndian.AppendUint64$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin llvm.coro.end llvm.coro.free llvm.coro.id - llvm.coro.promise llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use llvm.memset.p0.i64 llvm.trap -__llgo$generated$promoted$GoString$llgo$promoted$v1$39223b58e0231b30d8c33ab9b325b2d97b2232a8f2e6928dd355c623aa6ef6dd$coro: +__llgo$generated$promoted$AppendUint64$llgo$promoted$v1$750731e201ea8dbd0d5a42675be68c0b10f435dc4f2a96a2d97b123b528c45ce$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.AppendUint64$outcome + llvm.memset.p0.i64 +__llgo$generated$promoted$GoString$llgo$promoted$v1$8cb039c06a647d2d09872e46336ab1cacadb945cff4aaf8b45a0bdbcfaaeb077$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.61f8d3563705ff74c8ed3b71729d269e + __llgo_coro_frame_descriptor_v1.4497ab8ddf18416afb5f6e6a4c143a62 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -93,89 +96,96 @@ __llgo$generated$promoted$GoString$llgo$promoted$v1$39223b58e0231b30d8c33ab9b325 llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap -__llgo$generated$promoted$PutUint16$llgo$promoted$v1$11b9be6eaeb560ac498ef278586c21de6a5932baaf4acfedf970c368b0ec8663$coro: - __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 +__llgo$generated$promoted$GoString$llgo$promoted$v1$8cb039c06a647d2d09872e46336ab1cacadb945cff4aaf8b45a0bdbcfaaeb077$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.GoString +__llgo$generated$promoted$PutUint16$llgo$promoted$v1$a83d4307d6f99f196da77925f2ed95180ae1454820b813c6e9eca2fc569e5e12$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.7103732b6627d6fb2362edac7480c8ab + __llgo_coro_frame_descriptor_v1.5258110ca751c43401f972d162a85147 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 - encoding/binary.littleEndian.PutUint16$coro + encoding/binary.littleEndian.PutUint16$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin llvm.coro.end llvm.coro.free llvm.coro.id - llvm.coro.promise llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use llvm.memset.p0.i64 llvm.trap -__llgo$generated$promoted$PutUint32$llgo$promoted$v1$d79d58a8b8a6c0942648982c162128f1328d26f407ec23d94f14cac966ae1e43$coro: - __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 +__llgo$generated$promoted$PutUint16$llgo$promoted$v1$a83d4307d6f99f196da77925f2ed95180ae1454820b813c6e9eca2fc569e5e12$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.PutUint16$outcome + llvm.memset.p0.i64 +__llgo$generated$promoted$PutUint32$llgo$promoted$v1$cf7ac4e55015abe81328d2f8c1332af6e3368768488cb152849a4fbb184ad2c2$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.e20d950003d1c6a977d7a2cd75232068 + __llgo_coro_frame_descriptor_v1.6d4962aef1d100a50770d73a5ff9aaf4 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 - encoding/binary.littleEndian.PutUint32$coro + encoding/binary.littleEndian.PutUint32$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin llvm.coro.end llvm.coro.free llvm.coro.id - llvm.coro.promise llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use llvm.memset.p0.i64 llvm.trap -__llgo$generated$promoted$PutUint64$llgo$promoted$v1$af8a8f0b703981832d98349e358872f8150d64e97b32fc13981a4d2f6b6e67af$coro: - __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 +__llgo$generated$promoted$PutUint32$llgo$promoted$v1$cf7ac4e55015abe81328d2f8c1332af6e3368768488cb152849a4fbb184ad2c2$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.PutUint32$outcome + llvm.memset.p0.i64 +__llgo$generated$promoted$PutUint64$llgo$promoted$v1$86b466cc63f93e0262558ea3a2e7577c6c71a892d0b3911a2db7838724097746$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.3b956794511907432f67891d5df1a840 + __llgo_coro_frame_descriptor_v1.ac307f78c7b1c6b48d90288178c41caa __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 - encoding/binary.littleEndian.PutUint64$coro + encoding/binary.littleEndian.PutUint64$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin llvm.coro.end llvm.coro.free llvm.coro.id - llvm.coro.promise llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use llvm.memset.p0.i64 llvm.trap -__llgo$generated$promoted$String$llgo$promoted$v1$009a394ead2c7f12bf94a21d35f38a1e59bacf3f968f5cfd005567356a3619c7$coro: +__llgo$generated$promoted$PutUint64$llgo$promoted$v1$86b466cc63f93e0262558ea3a2e7577c6c71a892d0b3911a2db7838724097746$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.PutUint64$outcome + llvm.memset.p0.i64 +__llgo$generated$promoted$String$llgo$promoted$v1$6155c7e0d9ed51843644c973925123c86476e3bcbafe86dee2dcb6ba494e4882$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.1445ba6a8f24e45f854fe3670b64fe2f + __llgo_coro_frame_descriptor_v1.dbebcfb3b01992b957df76032cc95557 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -188,132 +198,147 @@ __llgo$generated$promoted$String$llgo$promoted$v1$009a394ead2c7f12bf94a21d35f38a llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap -__llgo$generated$promoted$Uint16$llgo$promoted$v1$6475424cb3b26e6b8423aa0b7e6deef53c28c4caa745f20ae7776ff9f60817d2$coro: - __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 +__llgo$generated$promoted$String$llgo$promoted$v1$6155c7e0d9ed51843644c973925123c86476e3bcbafe86dee2dcb6ba494e4882$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.String +__llgo$generated$promoted$Uint16$llgo$promoted$v1$2e716551bc5f9f5b7af752afa852af7f5ec57728677a755ab09a5ad7fe63cd90$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.d3eb48ad2d43fd13fb5525b3a028b9f9 + __llgo_coro_frame_descriptor_v1.15f6ecc2932f761c6d4e12a95a3220a5 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 - encoding/binary.littleEndian.Uint16$coro + encoding/binary.littleEndian.Uint16$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin llvm.coro.end llvm.coro.free llvm.coro.id - llvm.coro.promise llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use llvm.memset.p0.i64 llvm.trap -__llgo$generated$promoted$Uint32$llgo$promoted$v1$7c5974eda47b6aa08cf2e73219c1b921abaa5b69b8c6e6afa4c8eb94b97ce010$coro: - __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 +__llgo$generated$promoted$Uint16$llgo$promoted$v1$2e716551bc5f9f5b7af752afa852af7f5ec57728677a755ab09a5ad7fe63cd90$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.Uint16$outcome + llvm.memset.p0.i64 +__llgo$generated$promoted$Uint32$llgo$promoted$v1$954f1af1976d8ad8ee9ca51ba81d4ac1920ad2ca7769fbb5f7fc8767946a5772$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.6ad7bf8f6aa350b1eba107c9c08cbcd5 + __llgo_coro_frame_descriptor_v1.97e38831a61c437ef38bf7d7a98b31d4 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 - encoding/binary.littleEndian.Uint32$coro + encoding/binary.littleEndian.Uint32$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin llvm.coro.end llvm.coro.free llvm.coro.id - llvm.coro.promise llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use llvm.memset.p0.i64 llvm.trap -__llgo$generated$promoted$Uint64$llgo$promoted$v1$cb5c77caa530ff36b0ccad0f1fd423bddefb5910694947134833bd38719fd29c$coro: - __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 +__llgo$generated$promoted$Uint32$llgo$promoted$v1$954f1af1976d8ad8ee9ca51ba81d4ac1920ad2ca7769fbb5f7fc8767946a5772$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.Uint32$outcome + llvm.memset.p0.i64 +__llgo$generated$promoted$Uint64$llgo$promoted$v1$8768d5ca729c35c6bcd1cd1810d254ee8dc5632e615213c5caed4325e4c86458$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.81b0280c7820753ddb03e0a55c9ace20 + __llgo_coro_frame_descriptor_v1.0ef803d2685e8ac322ecb078de1613dd __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 - encoding/binary.littleEndian.Uint64$coro + encoding/binary.littleEndian.Uint64$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin llvm.coro.end llvm.coro.free llvm.coro.id - llvm.coro.promise llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use llvm.memset.p0.i64 llvm.trap -__llgo_coro_root_factory_descriptor_v1.639123a24f699abae5544726b2fd996c: - __llgo_coro_root_factory_v1.639123a24f699abae5544726b2fd996c -__llgo_coro_root_factory_descriptor_v1.bca57f5ea336623e7f2e01f3ee61125c: - __llgo_coro_root_factory_v1.bca57f5ea336623e7f2e01f3ee61125c -__llgo_coro_root_factory_v1.639123a24f699abae5544726b2fd996c: - main.init$coro -__llgo_coro_root_factory_v1.bca57f5ea336623e7f2e01f3ee61125c: +__llgo$generated$promoted$Uint64$llgo$promoted$v1$8768d5ca729c35c6bcd1cd1810d254ee8dc5632e615213c5caed4325e4c86458$outcome: + __llgo_coro_wrap_nil_payload_v1 + encoding/binary.littleEndian.Uint64$outcome + llvm.memset.p0.i64 +__llgo_coro_root_factory_descriptor_v1.263aed0acfe8f446da83ab9b9dd60263: + __llgo_coro_root_factory_v1.263aed0acfe8f446da83ab9b9dd60263 +__llgo_coro_root_factory_descriptor_v1.4b244222a5faf2813cf29378022de434: + __llgo_coro_root_factory_v1.4b244222a5faf2813cf29378022de434 +__llgo_coro_root_factory_v1.263aed0acfe8f446da83ab9b9dd60263: main.main$coro -__llgo_coro_root_package_v1.4910d025ad0707caf8ee0b0f692a55bb: - __llgo_coro_root_package_v1.4910d025ad0707caf8ee0b0f692a55bb.entries -__llgo_coro_root_package_v1.4910d025ad0707caf8ee0b0f692a55bb.entries: - __llgo_coro_root_factory_descriptor_v1.639123a24f699abae5544726b2fd996c - __llgo_coro_root_factory_descriptor_v1.bca57f5ea336623e7f2e01f3ee61125c +__llgo_coro_root_factory_v1.4b244222a5faf2813cf29378022de434: + main.init$coro +__llgo_coro_root_package_v1.6428d84f309ba96ab5f84f157a3ace4b: + __llgo_coro_root_package_v1.6428d84f309ba96ab5f84f157a3ace4b.entries +__llgo_coro_root_package_v1.6428d84f309ba96ab5f84f157a3ace4b.entries: + __llgo_coro_root_factory_descriptor_v1.263aed0acfe8f446da83ab9b9dd60263 + __llgo_coro_root_factory_descriptor_v1.4b244222a5faf2813cf29378022de434 llvm.compiler.used: - __llgo_coro_library_effect_v6.8e6d9ddca0cd187875ec97b56b4db7d5 + __llgo_coro_library_effect_v9.554f7344845cf6628284f6317c230322 llvm.used: - __llgo_coro_root_factory_descriptor_v1.639123a24f699abae5544726b2fd996c - __llgo_coro_root_factory_descriptor_v1.bca57f5ea336623e7f2e01f3ee61125c - __llgo_coro_root_package_v1.4910d025ad0707caf8ee0b0f692a55bb + __llgo_coro_root_factory_descriptor_v1.263aed0acfe8f446da83ab9b9dd60263 + __llgo_coro_root_factory_descriptor_v1.4b244222a5faf2813cf29378022de434 + __llgo_coro_root_package_v1.6428d84f309ba96ab5f84f157a3ace4b main.init$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.639123a24f699abae5544726b2fd996c + __llgo_coro_frame_descriptor_v1.4b244222a5faf2813cf29378022de434 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 encoding/binary.init$coro llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.init$guard main.main$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.bca57f5ea336623e7f2e01f3ee61125c + __llgo_coro_frame_descriptor_v1.263aed0acfe8f446da83ab9b9dd60263 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 encoding/binary.littleEndian.Uint16$coro @@ -321,11 +346,15 @@ main.main$coro: llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap diff --git a/cl/_testmeta/interface_generic/meta-expect.txt b/cl/_testmeta/interface_generic/meta-expect.txt index 681d40174c..e1f9f9b442 100644 --- a/cl/_testmeta/interface_generic/meta-expect.txt +++ b/cl/_testmeta/interface_generic/meta-expect.txt @@ -29,24 +29,30 @@ _llgo_main.Box[int]: *_llgo_main.Box[int]: _llgo_main.Box[int] github.com/goplus/llgo/runtime/internal/runtime.memequalptr -__llgo_coro_func_coro_v1.method-value.a5a6fa5f77b6e882.45c97951e85a0d0b5262cd67ca1838d7: +__llgo_coro_func_coro_v1.method-value.17993ef4d15c31b3.b00bb4f8ab797af5299936e72968e19e: main.(*Box[int]).Value$coro -__llgo_coro_func_coro_v1.method.a5a6fa5f77b6e882.3c1baa11c05cc96de3b33ee3f4f5036f: +__llgo_coro_func_coro_v1.method.17993ef4d15c31b3.94f9ceee1e642b161ef7d158ea7a6a74: main.(*Box[int]).Value$coro -__llgo_coro_func_descriptor_v1.method-value.a5a6fa5f77b6e882.45c97951e85a0d0b5262cd67ca1838d7: - __llgo_coro_func_coro_v1.method-value.a5a6fa5f77b6e882.45c97951e85a0d0b5262cd67ca1838d7 -__llgo_coro_func_descriptor_v1.method.a5a6fa5f77b6e882.3c1baa11c05cc96de3b33ee3f4f5036f: - __llgo_coro_func_coro_v1.method.a5a6fa5f77b6e882.3c1baa11c05cc96de3b33ee3f4f5036f -__llgo_coro_method_raw_trap_v1.ca540068256d7f55036a99572497eb0d: +__llgo_coro_func_descriptor_v1.method-value.17993ef4d15c31b3.b00bb4f8ab797af5299936e72968e19e: + __llgo_coro_func_coro_v1.method-value.17993ef4d15c31b3.b00bb4f8ab797af5299936e72968e19e + main.(*Box[int]).Value$coro +__llgo_coro_func_descriptor_v1.method.17993ef4d15c31b3.94f9ceee1e642b161ef7d158ea7a6a74: + __llgo_coro_func_coro_v1.method.17993ef4d15c31b3.94f9ceee1e642b161ef7d158ea7a6a74 + main.(*Box[int]).Value$coro +__llgo_coro_method_raw_trap_v1.e129d72c259c8ce0d8166002f54c83b4: llvm.trap -__llgo_coro_root_factory_descriptor_v1.b00fc2ef9e91e7ed1336cd6924988bbc: - __llgo_coro_root_factory_v1.b00fc2ef9e91e7ed1336cd6924988bbc -__llgo_coro_root_factory_v1.b00fc2ef9e91e7ed1336cd6924988bbc: +__llgo_coro_root_factory_descriptor_v1.7042acebeb78ec7f37f309cdf2247e6b: + __llgo_coro_root_factory_v1.7042acebeb78ec7f37f309cdf2247e6b +__llgo_coro_root_factory_v1.7042acebeb78ec7f37f309cdf2247e6b: main.main$coro -__llgo_coro_root_package_v1.6ac418a5dd66692fa6bf547dead4093b: - __llgo_coro_root_package_v1.6ac418a5dd66692fa6bf547dead4093b.entries -__llgo_coro_root_package_v1.6ac418a5dd66692fa6bf547dead4093b.entries: - __llgo_coro_root_factory_descriptor_v1.b00fc2ef9e91e7ed1336cd6924988bbc +__llgo_coro_root_package_v1.a22f1ba343333f1b4abcc8642e2ae1aa: + __llgo_coro_root_package_v1.a22f1ba343333f1b4abcc8642e2ae1aa.entries +__llgo_coro_root_package_v1.a22f1ba343333f1b4abcc8642e2ae1aa.entries: + __llgo_coro_root_factory_descriptor_v1.7042acebeb78ec7f37f309cdf2247e6b +__llgo_static_itab.d81035aa8516c1c235056809f89a2ad8: + *_llgo_main.Box[int] + __llgo_coro_func_descriptor_v1.method.17993ef4d15c31b3.94f9ceee1e642b161ef7d158ea7a6a74 + _llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8 _llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA: *_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA _llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA$out @@ -68,17 +74,17 @@ _llgo_main.Box[int]: github.com/goplus/llgo/cl/_testmeta/interface_generic.struct$lOhriNu2BrWBR2Mh8k-KggMYlAw0Wx-2ftE2_gNyubg$fields: _llgo_int llvm.compiler.used: - __llgo_coro_library_effect_v6.6664bffccac54aa484a6c05f10605231 + __llgo_coro_library_effect_v9.349a88354318875c85e801325f95241f llvm.used: - __llgo_coro_root_factory_descriptor_v1.b00fc2ef9e91e7ed1336cd6924988bbc - __llgo_coro_root_package_v1.6ac418a5dd66692fa6bf547dead4093b + __llgo_coro_root_factory_descriptor_v1.7042acebeb78ec7f37f309cdf2247e6b + __llgo_coro_root_package_v1.a22f1ba343333f1b4abcc8642e2ae1aa main.(*Box[int]).Value$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.aeefa27393feeef3458be2168a3f8093 + __llgo_coro_frame_descriptor_v1.c2afa8a78816f9f8b67736fc538acf3a __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc @@ -88,54 +94,65 @@ main.(*Box[int]).Value$coro: llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.init: main.init$guard main.main$coro: - *_llgo_main.Box[int] __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.b00fc2ef9e91e7ed1336cd6924988bbc + __llgo_coro_frame_descriptor_v1.7042acebeb78ec7f37f309cdf2247e6b __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 - _llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8 + __llgo_static_itab.d81035aa8516c1c235056809f89a2ad8 github.com/goplus/llgo/runtime/internal/runtime.AllocZ - github.com/goplus/llgo/runtime/internal/runtime.NewItab$coro llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.useInt$coro main.useInt$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.e0262b66e873bdf05fc62e4a9e1af8af + __llgo_coro_frame_descriptor_v1.47f2e10f4b0b5a229b4907f72073b3e7 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap [UseIface] @@ -148,7 +165,7 @@ main.useInt$coro: [MethodInfo] *_llgo_main.Box[int]: - 0 Value _llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA __llgo_coro_func_descriptor_v1.method.a5a6fa5f77b6e882.3c1baa11c05cc96de3b33ee3f4f5036f __llgo_coro_func_descriptor_v1.method-value.a5a6fa5f77b6e882.45c97951e85a0d0b5262cd67ca1838d7 + 0 Value _llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA __llgo_coro_func_descriptor_v1.method.17993ef4d15c31b3.94f9ceee1e642b161ef7d158ea7a6a74 __llgo_coro_func_descriptor_v1.method-value.17993ef4d15c31b3.b00bb4f8ab797af5299936e72968e19e [InterfaceInfo] _llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8: diff --git a/cl/_testmeta/interface_generic_crosspkg/api/meta-expect.txt b/cl/_testmeta/interface_generic_crosspkg/api/meta-expect.txt index 5088942412..7dcca32077 100644 --- a/cl/_testmeta/interface_generic_crosspkg/api/meta-expect.txt +++ b/cl/_testmeta/interface_generic_crosspkg/api/meta-expect.txt @@ -1,29 +1,35 @@ [OrdinaryEdges] github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/api.UseInt$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.043de7e03aff8f0b004da3f0458bd05f + __llgo_coro_frame_descriptor_v1.4b78d313a08d3f9f1a841d06e06c1515 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/api.init: github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/api.init$guard llvm.compiler.used: - __llgo_coro_library_effect_v6.7307013433e53503159643ed7558d35d + __llgo_coro_library_effect_v9.f31cf0fcc6701b8a0bc75e182f32e4f7 [UseIfaceMethod] github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/api.UseInt$coro: diff --git a/cl/_testmeta/interface_generic_crosspkg/meta-expect.txt b/cl/_testmeta/interface_generic_crosspkg/meta-expect.txt index 00f212540c..c960d48b4b 100644 --- a/cl/_testmeta/interface_generic_crosspkg/meta-expect.txt +++ b/cl/_testmeta/interface_generic_crosspkg/meta-expect.txt @@ -52,42 +52,51 @@ _llgo_string: *_llgo_string: _llgo_string github.com/goplus/llgo/runtime/internal/runtime.memequalptr -__llgo_coro_func_coro_v1.method-value.29eb060357d7a736.af113d4191fe9eae3d0593639f874651: +__llgo_coro_func_coro_v1.method-value.6bed1fbe712ba7e0.d2c90a5d813225420adb2cb46b92d6fe: + github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[string]).Value$coro +__llgo_coro_func_coro_v1.method-value.94a385c438b38d8d.53623eefcad4daa1f89a30d5c19e201e: + github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Value$coro +__llgo_coro_func_coro_v1.method-value.b59a474ef1c18bc7.d2c90a5d813225420adb2cb46b92d6fe: github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[string]).Drop$coro -__llgo_coro_func_coro_v1.method-value.4a794b448ada5e7e.12d52cbc7004cd8daa99877c5b48cb34: +__llgo_coro_func_coro_v1.method-value.bd5633db8b97e748.53623eefcad4daa1f89a30d5c19e201e: + github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Drop$coro +__llgo_coro_func_coro_v1.method.94a385c438b38d8d.94f9ceee1e642b161ef7d158ea7a6a74: github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Value$coro -__llgo_coro_func_coro_v1.method-value.4f4992be7488eb6e.af113d4191fe9eae3d0593639f874651: +__llgo_coro_func_descriptor_v1.method-value.6bed1fbe712ba7e0.d2c90a5d813225420adb2cb46b92d6fe: + __llgo_coro_func_coro_v1.method-value.6bed1fbe712ba7e0.d2c90a5d813225420adb2cb46b92d6fe github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[string]).Value$coro -__llgo_coro_func_coro_v1.method-value.5161df40a3f6522d.12d52cbc7004cd8daa99877c5b48cb34: +__llgo_coro_func_descriptor_v1.method-value.94a385c438b38d8d.53623eefcad4daa1f89a30d5c19e201e: + __llgo_coro_func_coro_v1.method-value.94a385c438b38d8d.53623eefcad4daa1f89a30d5c19e201e + github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Value$coro +__llgo_coro_func_descriptor_v1.method-value.b59a474ef1c18bc7.d2c90a5d813225420adb2cb46b92d6fe: + __llgo_coro_func_coro_v1.method-value.b59a474ef1c18bc7.d2c90a5d813225420adb2cb46b92d6fe + github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[string]).Drop$coro +__llgo_coro_func_descriptor_v1.method-value.bd5633db8b97e748.53623eefcad4daa1f89a30d5c19e201e: + __llgo_coro_func_coro_v1.method-value.bd5633db8b97e748.53623eefcad4daa1f89a30d5c19e201e github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Drop$coro -__llgo_coro_func_coro_v1.method.4a794b448ada5e7e.3c1baa11c05cc96de3b33ee3f4f5036f: +__llgo_coro_func_descriptor_v1.method.94a385c438b38d8d.94f9ceee1e642b161ef7d158ea7a6a74: + __llgo_coro_func_coro_v1.method.94a385c438b38d8d.94f9ceee1e642b161ef7d158ea7a6a74 github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Value$coro -__llgo_coro_func_descriptor_v1.method-value.29eb060357d7a736.af113d4191fe9eae3d0593639f874651: - __llgo_coro_func_coro_v1.method-value.29eb060357d7a736.af113d4191fe9eae3d0593639f874651 -__llgo_coro_func_descriptor_v1.method-value.4a794b448ada5e7e.12d52cbc7004cd8daa99877c5b48cb34: - __llgo_coro_func_coro_v1.method-value.4a794b448ada5e7e.12d52cbc7004cd8daa99877c5b48cb34 -__llgo_coro_func_descriptor_v1.method-value.4f4992be7488eb6e.af113d4191fe9eae3d0593639f874651: - __llgo_coro_func_coro_v1.method-value.4f4992be7488eb6e.af113d4191fe9eae3d0593639f874651 -__llgo_coro_func_descriptor_v1.method-value.5161df40a3f6522d.12d52cbc7004cd8daa99877c5b48cb34: - __llgo_coro_func_coro_v1.method-value.5161df40a3f6522d.12d52cbc7004cd8daa99877c5b48cb34 -__llgo_coro_func_descriptor_v1.method.4a794b448ada5e7e.3c1baa11c05cc96de3b33ee3f4f5036f: - __llgo_coro_func_coro_v1.method.4a794b448ada5e7e.3c1baa11c05cc96de3b33ee3f4f5036f -__llgo_coro_method_raw_trap_v1.20cb3bf8c1ddb3f52381e9cad2ffdbfa: +__llgo_coro_method_raw_trap_v1.72416a68672da495b33d046e772f4b75: llvm.trap -__llgo_coro_method_raw_trap_v1.a004b111b9a7caef2ec1e2c43c7ddf88: +__llgo_coro_method_raw_trap_v1.7f11223c141d65c92b3f7f28dcb9c254: llvm.trap -__llgo_coro_method_raw_trap_v1.a551e081876916393b495942515ada43: +__llgo_coro_method_raw_trap_v1.e6cf5082578b9ac34b4758fd195dbe38: llvm.trap -__llgo_coro_method_raw_trap_v1.edebc1e42fd6c8885c32b3db61eb66f7: +__llgo_coro_method_raw_trap_v1.eaa24971ef9f50fab26b76842dd4f7eb: llvm.trap -__llgo_coro_root_factory_descriptor_v1.9e4639ed80ff6ac79e8ba81bc0e1a711: - __llgo_coro_root_factory_v1.9e4639ed80ff6ac79e8ba81bc0e1a711 -__llgo_coro_root_factory_v1.9e4639ed80ff6ac79e8ba81bc0e1a711: +__llgo_coro_root_factory_descriptor_v1.0edbbbaf9927db6213cd2dee35a9538f: + __llgo_coro_root_factory_v1.0edbbbaf9927db6213cd2dee35a9538f +__llgo_coro_root_factory_v1.0edbbbaf9927db6213cd2dee35a9538f: main.main$coro -__llgo_coro_root_package_v1.92fd3e62ca218ce8a1969cd2b5ce1639: - __llgo_coro_root_package_v1.92fd3e62ca218ce8a1969cd2b5ce1639.entries -__llgo_coro_root_package_v1.92fd3e62ca218ce8a1969cd2b5ce1639.entries: - __llgo_coro_root_factory_descriptor_v1.9e4639ed80ff6ac79e8ba81bc0e1a711 +__llgo_coro_root_package_v1.1a40c860b4b54eb490bf75d4c00e59e1: + __llgo_coro_root_package_v1.1a40c860b4b54eb490bf75d4c00e59e1.entries +__llgo_coro_root_package_v1.1a40c860b4b54eb490bf75d4c00e59e1.entries: + __llgo_coro_root_factory_descriptor_v1.0edbbbaf9927db6213cd2dee35a9538f +__llgo_static_itab.d8c81beed6220446e1b767d928f3597f: + *_llgo_github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.Box[int] + __llgo_coro_func_descriptor_v1.method.94a385c438b38d8d.94f9ceee1e642b161ef7d158ea7a6a74 + _llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8 _llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA: *_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA _llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA$out @@ -121,13 +130,12 @@ _llgo_string: github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Drop$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.070ba4e409232ef4bfb7874ae908f2d4 + __llgo_coro_frame_descriptor_v1.91f93f4316a6601fcb5dcea1aa52a92b __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 _llgo_string - github.com/goplus/llgo/runtime/internal/runtime.AllocU llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin @@ -136,14 +144,17 @@ github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]) llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap +github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Drop$outcome: + _llgo_string github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Value$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.3ef233a8323b674d280cf87e646ef91f + __llgo_coro_frame_descriptor_v1.6de9fe3554349ebe09b56190dec75c8d __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc @@ -153,17 +164,17 @@ github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]) llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[string]).Drop$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.94d797f8dee4f1fa3148e39f7c26b6b4 + __llgo_coro_frame_descriptor_v1.852d85f2f5eb3745540cf939246d72cd __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 _llgo_string - github.com/goplus/llgo/runtime/internal/runtime.AllocU llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin @@ -172,14 +183,17 @@ github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[strin llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap +github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[string]).Drop$outcome: + _llgo_string github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[string]).Value$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.fb46e76d942af7ea61be5f6f0caef166 + __llgo_coro_frame_descriptor_v1.fa92d8db2ca5dcf58367699e17b8c505 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc @@ -189,47 +203,52 @@ github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[strin llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.struct$XNpHe-3-A25gBmHjYdF74H8M4k3Eik680huOzY6OtaU$fields: _llgo_string github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.struct$lOhriNu2BrWBR2Mh8k-KggMYlAw0Wx-2ftE2_gNyubg$fields: _llgo_int llvm.compiler.used: - __llgo_coro_library_effect_v6.c63a04e0f0f5ba44b461a7ccfc25e00c + __llgo_coro_library_effect_v9.e59e8cc4743350ee44585d2a25d65ada llvm.used: - __llgo_coro_root_factory_descriptor_v1.9e4639ed80ff6ac79e8ba81bc0e1a711 - __llgo_coro_root_package_v1.92fd3e62ca218ce8a1969cd2b5ce1639 + __llgo_coro_root_factory_descriptor_v1.0edbbbaf9927db6213cd2dee35a9538f + __llgo_coro_root_package_v1.1a40c860b4b54eb490bf75d4c00e59e1 main.init: github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/api.init github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.init main.init$guard main.main$coro: - *_llgo_github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.Box[int] *_llgo_github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.Box[string] __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 + __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.9e4639ed80ff6ac79e8ba81bc0e1a711 + __llgo_coro_frame_descriptor_v1.0edbbbaf9927db6213cd2dee35a9538f __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 - _llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8 + __llgo_static_itab.d8c81beed6220446e1b767d928f3597f github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/api.UseInt$coro - github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.NewIntBox$coro - github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.NewStringBox$coro - github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.UseStringBox$coro - github.com/goplus/llgo/runtime/internal/runtime.NewItab$coro + github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.NewIntBox$outcome + github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.NewStringBox$outcome + github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.UseStringBox$outcome github.com/goplus/llgo/runtime/internal/runtime.PrintByte$coro github.com/goplus/llgo/runtime/internal/runtime.PrintInt$coro llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use @@ -240,17 +259,21 @@ main.main$coro: [UseIface] github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Drop$coro: _llgo_string +github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[int]).Drop$outcome: + _llgo_string github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[string]).Drop$coro: _llgo_string +github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.(*Box[string]).Drop$outcome: + _llgo_string main.main$coro: *_llgo_github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.Box[int] *_llgo_github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.Box[string] [MethodInfo] *_llgo_github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.Box[int]: - 0 Drop _llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA __llgo_coro_method_raw_trap_v1.edebc1e42fd6c8885c32b3db61eb66f7 __llgo_coro_func_descriptor_v1.method-value.5161df40a3f6522d.12d52cbc7004cd8daa99877c5b48cb34 - 1 Value _llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA __llgo_coro_func_descriptor_v1.method.4a794b448ada5e7e.3c1baa11c05cc96de3b33ee3f4f5036f __llgo_coro_func_descriptor_v1.method-value.4a794b448ada5e7e.12d52cbc7004cd8daa99877c5b48cb34 + 0 Drop _llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA __llgo_coro_method_raw_trap_v1.eaa24971ef9f50fab26b76842dd4f7eb __llgo_coro_func_descriptor_v1.method-value.bd5633db8b97e748.53623eefcad4daa1f89a30d5c19e201e + 1 Value _llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA __llgo_coro_func_descriptor_v1.method.94a385c438b38d8d.94f9ceee1e642b161ef7d158ea7a6a74 __llgo_coro_func_descriptor_v1.method-value.94a385c438b38d8d.53623eefcad4daa1f89a30d5c19e201e *_llgo_github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.Box[string]: - 0 Drop _llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to __llgo_coro_method_raw_trap_v1.a004b111b9a7caef2ec1e2c43c7ddf88 __llgo_coro_func_descriptor_v1.method-value.29eb060357d7a736.af113d4191fe9eae3d0593639f874651 - 1 Value _llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to __llgo_coro_method_raw_trap_v1.a551e081876916393b495942515ada43 __llgo_coro_func_descriptor_v1.method-value.4f4992be7488eb6e.af113d4191fe9eae3d0593639f874651 + 0 Drop _llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to __llgo_coro_method_raw_trap_v1.e6cf5082578b9ac34b4758fd195dbe38 __llgo_coro_func_descriptor_v1.method-value.b59a474ef1c18bc7.d2c90a5d813225420adb2cb46b92d6fe + 1 Value _llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to __llgo_coro_method_raw_trap_v1.72416a68672da495b33d046e772f4b75 __llgo_coro_func_descriptor_v1.method-value.6bed1fbe712ba7e0.d2c90a5d813225420adb2cb46b92d6fe diff --git a/cl/_testmeta/interface_generic_crosspkg/model/meta-expect.txt b/cl/_testmeta/interface_generic_crosspkg/model/meta-expect.txt index 8c8f694f18..5de00224e2 100644 --- a/cl/_testmeta/interface_generic_crosspkg/model/meta-expect.txt +++ b/cl/_testmeta/interface_generic_crosspkg/model/meta-expect.txt @@ -2,9 +2,9 @@ github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.NewIntBox$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.bc67a5d02f8d348f1ac782587c736537 + __llgo_coro_frame_descriptor_v1.8337f2521f777dd678dbfe55843a1e12 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_run_decision_take_zero_v1 github.com/goplus/llgo/runtime/internal/runtime.AllocZ llvm.coro.align.i64 @@ -15,13 +15,16 @@ github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.NewIntBox$c llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap +github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.NewIntBox$outcome: + github.com/goplus/llgo/runtime/internal/runtime.AllocZ github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.NewStringBox$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.dd1d6beb1e46e23662e87458db6f5fb2 + __llgo_coro_frame_descriptor_v1.d16058f627b8fed50a658448216fde88 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_run_decision_take_zero_v1 github.com/goplus/llgo/runtime/internal/runtime.AllocZ llvm.coro.align.i64 @@ -32,14 +35,17 @@ github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.NewStringBo llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap +github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.NewStringBox$outcome: + github.com/goplus/llgo/runtime/internal/runtime.AllocZ github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.UseStringBox$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.d9feb00c1d92f8f3123ff791e39fc165 + __llgo_coro_frame_descriptor_v1.27f024396d385b154b09917e1d3ee8f5 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc @@ -49,9 +55,10 @@ github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.UseStringBo llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.init: github.com/goplus/llgo/cl/_testmeta/interface_generic_crosspkg/model.init$guard llvm.compiler.used: - __llgo_coro_library_effect_v6.ac84e08d25f9c252f9569bc27031da97 + __llgo_coro_library_effect_v9.193790f9099cf3611aeeeebc9dd8808f diff --git a/cl/_testmeta/interface_imported/api/meta-expect.txt b/cl/_testmeta/interface_imported/api/meta-expect.txt index 6dc1587b85..dd69fc425c 100644 --- a/cl/_testmeta/interface_imported/api/meta-expect.txt +++ b/cl/_testmeta/interface_imported/api/meta-expect.txt @@ -1,11 +1,11 @@ [OrdinaryEdges] -__llgo$generated$promoted$Close$llgo$promoted$v1$77575336b69e7eac563cd474c1c4b6cfce8992a2ca19cdb50fb669058dfbb395$coro: +__llgo$generated$promoted$Close$llgo$promoted$v1$99ecc0384df167e852f57195384c7142b1e255037df2db2c23f6defe6db377ff$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.713d7ca7292bd9add7e74aace6fc4349 + __llgo_coro_frame_descriptor_v1.93980eb480dcf849e3db244c155240dc __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -18,14 +18,18 @@ __llgo$generated$promoted$Close$llgo$promoted$v1$77575336b69e7eac563cd474c1c4b6c llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap -__llgo$generated$promoted$Read$llgo$promoted$v1$dfcfeef340532e0df942cabc1157784ab1bd8f8bcab83246687af39fe0d8a164$coro: +__llgo$generated$promoted$Close$llgo$promoted$v1$99ecc0384df167e852f57195384c7142b1e255037df2db2c23f6defe6db377ff$outcome: + __llgo_coro_wrap_nil_payload_v1 + github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source.Close +__llgo$generated$promoted$Read$llgo$promoted$v1$88cb386361a8853c4f9177ef33616451223a619c8119e5d797370bb0c81dca0d$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.863d624b1d6227fca13a64da6a86d9c8 + __llgo_coro_frame_descriptor_v1.4a7f2c0bc225bc79cd573d16131d24bb __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -38,9 +42,13 @@ __llgo$generated$promoted$Read$llgo$promoted$v1$dfcfeef340532e0df942cabc1157784a llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap +__llgo$generated$promoted$Read$llgo$promoted$v1$88cb386361a8853c4f9177ef33616451223a619c8119e5d797370bb0c81dca0d$outcome: + __llgo_coro_wrap_nil_payload_v1 + github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source.Read github.com/goplus/llgo/cl/_testmeta/interface_imported/api.init: github.com/goplus/llgo/cl/_testmeta/interface_imported/api.init$guard llvm.compiler.used: - __llgo_coro_library_effect_v6.00cd9083226ff505e874b69adef84218 + __llgo_coro_library_effect_v9.f818e9affa2aab9d4b5261b58188d851 diff --git a/cl/_testmeta/interface_imported/meta-expect.txt b/cl/_testmeta/interface_imported/meta-expect.txt index ae0f0c1322..0929099e36 100644 --- a/cl/_testmeta/interface_imported/meta-expect.txt +++ b/cl/_testmeta/interface_imported/meta-expect.txt @@ -76,13 +76,13 @@ _llgo_uint8: []_llgo_uint8: *[]_llgo_uint8 _llgo_uint8 -__llgo$generated$promoted$Close$llgo$promoted$v1$77575336b69e7eac563cd474c1c4b6cfce8992a2ca19cdb50fb669058dfbb395$coro: +__llgo$generated$promoted$Close$llgo$promoted$v1$99ecc0384df167e852f57195384c7142b1e255037df2db2c23f6defe6db377ff$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.713d7ca7292bd9add7e74aace6fc4349 + __llgo_coro_frame_descriptor_v1.93980eb480dcf849e3db244c155240dc __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -95,14 +95,18 @@ __llgo$generated$promoted$Close$llgo$promoted$v1$77575336b69e7eac563cd474c1c4b6c llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap -__llgo$generated$promoted$Read$llgo$promoted$v1$dfcfeef340532e0df942cabc1157784ab1bd8f8bcab83246687af39fe0d8a164$coro: +__llgo$generated$promoted$Close$llgo$promoted$v1$99ecc0384df167e852f57195384c7142b1e255037df2db2c23f6defe6db377ff$outcome: + __llgo_coro_wrap_nil_payload_v1 + github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source.Close +__llgo$generated$promoted$Read$llgo$promoted$v1$88cb386361a8853c4f9177ef33616451223a619c8119e5d797370bb0c81dca0d$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.863d624b1d6227fca13a64da6a86d9c8 + __llgo_coro_frame_descriptor_v1.4a7f2c0bc225bc79cd573d16131d24bb __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -115,39 +119,52 @@ __llgo$generated$promoted$Read$llgo$promoted$v1$dfcfeef340532e0df942cabc1157784a llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap -__llgo_coro_func_coro_v1.method-value.89565cde18061fcb.8ea442e3b07b81cec2ec43a73593d91c: - __llgo$generated$promoted$Read$llgo$promoted$v1$dfcfeef340532e0df942cabc1157784ab1bd8f8bcab83246687af39fe0d8a164$coro -__llgo_coro_func_coro_v1.method-value.c7d006f1057bd875.9d42abe2265192cf6f8139d3be7b3d9c: - __llgo$generated$promoted$Close$llgo$promoted$v1$77575336b69e7eac563cd474c1c4b6cfce8992a2ca19cdb50fb669058dfbb395$coro -__llgo_coro_func_coro_v1.method.89565cde18061fcb.03b183a61ec5112a0c2ca62c6769aa13: - __llgo$generated$promoted$Read$llgo$promoted$v1$dfcfeef340532e0df942cabc1157784ab1bd8f8bcab83246687af39fe0d8a164$coro -__llgo_coro_func_descriptor_v1.method-value.360174cb867701ba.d2ee7bb3b5efb1775e27e7d978d69ee2: - __llgo_coro_func_plain_v1.method-value.360174cb867701ba.d2ee7bb3b5efb1775e27e7d978d69ee2 -__llgo_coro_func_descriptor_v1.method-value.89565cde18061fcb.8ea442e3b07b81cec2ec43a73593d91c: - __llgo_coro_func_coro_v1.method-value.89565cde18061fcb.8ea442e3b07b81cec2ec43a73593d91c -__llgo_coro_func_descriptor_v1.method-value.a5678790966cb1d1.eb59df75dfb0c7ee5000515d306e7f42: - __llgo_coro_func_plain_v1.method-value.a5678790966cb1d1.eb59df75dfb0c7ee5000515d306e7f42 -__llgo_coro_func_descriptor_v1.method-value.c7d006f1057bd875.9d42abe2265192cf6f8139d3be7b3d9c: - __llgo_coro_func_coro_v1.method-value.c7d006f1057bd875.9d42abe2265192cf6f8139d3be7b3d9c -__llgo_coro_func_descriptor_v1.method.89565cde18061fcb.03b183a61ec5112a0c2ca62c6769aa13: - __llgo_coro_func_coro_v1.method.89565cde18061fcb.03b183a61ec5112a0c2ca62c6769aa13 -__llgo_coro_func_plain_v1.method-value.360174cb867701ba.d2ee7bb3b5efb1775e27e7d978d69ee2: +__llgo$generated$promoted$Read$llgo$promoted$v1$88cb386361a8853c4f9177ef33616451223a619c8119e5d797370bb0c81dca0d$outcome: + __llgo_coro_wrap_nil_payload_v1 + github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source.Read +__llgo_coro_func_coro_v1.method-value.813f1c609efbe05e.cf5f18a9405d20ba527bbf3d7b58ed9e: + __llgo$generated$promoted$Close$llgo$promoted$v1$99ecc0384df167e852f57195384c7142b1e255037df2db2c23f6defe6db377ff$coro +__llgo_coro_func_coro_v1.method-value.87246b06502506df.2ee345674abd6c8f85b9346f35a78393: + __llgo$generated$promoted$Read$llgo$promoted$v1$88cb386361a8853c4f9177ef33616451223a619c8119e5d797370bb0c81dca0d$coro +__llgo_coro_func_coro_v1.method.87246b06502506df.4d25c34df33c89c9ccfeb5a8d99020e1: + __llgo$generated$promoted$Read$llgo$promoted$v1$88cb386361a8853c4f9177ef33616451223a619c8119e5d797370bb0c81dca0d$coro +__llgo_coro_func_descriptor_v1.method-value.10301dec6b39c9e5.0783ccc0a5482fb46f2ecad0a6696be3: + __llgo_coro_func_plain_v1.method-value.10301dec6b39c9e5.0783ccc0a5482fb46f2ecad0a6696be3 + github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source.Read +__llgo_coro_func_descriptor_v1.method-value.813f1c609efbe05e.cf5f18a9405d20ba527bbf3d7b58ed9e: + __llgo$generated$promoted$Close$llgo$promoted$v1$99ecc0384df167e852f57195384c7142b1e255037df2db2c23f6defe6db377ff$coro + __llgo_coro_func_coro_v1.method-value.813f1c609efbe05e.cf5f18a9405d20ba527bbf3d7b58ed9e +__llgo_coro_func_descriptor_v1.method-value.87246b06502506df.2ee345674abd6c8f85b9346f35a78393: + __llgo$generated$promoted$Read$llgo$promoted$v1$88cb386361a8853c4f9177ef33616451223a619c8119e5d797370bb0c81dca0d$coro + __llgo_coro_func_coro_v1.method-value.87246b06502506df.2ee345674abd6c8f85b9346f35a78393 +__llgo_coro_func_descriptor_v1.method-value.fae7959d9dedc84c.c49deabf2f7c663128c37f267289cc7b: + __llgo_coro_func_plain_v1.method-value.fae7959d9dedc84c.c49deabf2f7c663128c37f267289cc7b + github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source.Close +__llgo_coro_func_descriptor_v1.method.87246b06502506df.4d25c34df33c89c9ccfeb5a8d99020e1: + __llgo$generated$promoted$Read$llgo$promoted$v1$88cb386361a8853c4f9177ef33616451223a619c8119e5d797370bb0c81dca0d$coro + __llgo_coro_func_coro_v1.method.87246b06502506df.4d25c34df33c89c9ccfeb5a8d99020e1 +__llgo_coro_func_plain_v1.method-value.10301dec6b39c9e5.0783ccc0a5482fb46f2ecad0a6696be3: github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source.Read -__llgo_coro_func_plain_v1.method-value.a5678790966cb1d1.eb59df75dfb0c7ee5000515d306e7f42: +__llgo_coro_func_plain_v1.method-value.fae7959d9dedc84c.c49deabf2f7c663128c37f267289cc7b: github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source.Close -__llgo_coro_method_raw_trap_v1.688751ef13194b3436ea9621d266ddb8: +__llgo_coro_method_raw_trap_v1.2e4cef437638ce20a8ef38c7b102a19d: llvm.trap -__llgo_coro_method_raw_trap_v1.9805988801d4f3e11bf64357a7ca8d0b: +__llgo_coro_method_raw_trap_v1.59751227089b5130143a23f36db9f187: llvm.trap -__llgo_coro_root_factory_descriptor_v1.8b9e796543a46e0aeb6e163564e408ed: - __llgo_coro_root_factory_v1.8b9e796543a46e0aeb6e163564e408ed -__llgo_coro_root_factory_v1.8b9e796543a46e0aeb6e163564e408ed: +__llgo_coro_root_factory_descriptor_v1.e170b1b687c4c68ef58ae05e997c4790: + __llgo_coro_root_factory_v1.e170b1b687c4c68ef58ae05e997c4790 +__llgo_coro_root_factory_v1.e170b1b687c4c68ef58ae05e997c4790: main.main$coro -__llgo_coro_root_package_v1.9b11fa455b7e79a2166d0e179452c5a7: - __llgo_coro_root_package_v1.9b11fa455b7e79a2166d0e179452c5a7.entries -__llgo_coro_root_package_v1.9b11fa455b7e79a2166d0e179452c5a7.entries: - __llgo_coro_root_factory_descriptor_v1.8b9e796543a46e0aeb6e163564e408ed +__llgo_coro_root_package_v1.b900a9b63ccb40d702b2d56c5effb165: + __llgo_coro_root_package_v1.b900a9b63ccb40d702b2d56c5effb165.entries +__llgo_coro_root_package_v1.b900a9b63ccb40d702b2d56c5effb165.entries: + __llgo_coro_root_factory_descriptor_v1.e170b1b687c4c68ef58ae05e997c4790 +__llgo_static_itab.7399341c7262464298a396c77f007600: + __llgo_coro_func_descriptor_v1.method.87246b06502506df.4d25c34df33c89c9ccfeb5a8d99020e1 + _llgo_github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source + _llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw _llgo_error: *_llgo_error _llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU$imethods @@ -192,58 +209,67 @@ _llgo_uint8: *_llgo_uint8 github.com/goplus/llgo/runtime/internal/runtime.memequal8 llvm.compiler.used: - __llgo_coro_library_effect_v6.b26fda3f8a23c5987edada4dfa74d5cd + __llgo_coro_library_effect_v9.1f2f2a2fc3c0f6a1fb060d1124bcb97b llvm.used: - __llgo_coro_root_factory_descriptor_v1.8b9e796543a46e0aeb6e163564e408ed - __llgo_coro_root_package_v1.9b11fa455b7e79a2166d0e179452c5a7 + __llgo_coro_root_factory_descriptor_v1.e170b1b687c4c68ef58ae05e997c4790 + __llgo_coro_root_package_v1.b900a9b63ccb40d702b2d56c5effb165 main.init: github.com/goplus/llgo/cl/_testmeta/interface_imported/api.init main.init$guard main.main$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.8b9e796543a46e0aeb6e163564e408ed + __llgo_coro_frame_descriptor_v1.e170b1b687c4c68ef58ae05e997c4790 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 - _llgo_github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source - _llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw - github.com/goplus/llgo/runtime/internal/runtime.AllocU - github.com/goplus/llgo/runtime/internal/runtime.NewItab$coro + __llgo_static_itab.7399341c7262464298a396c77f007600 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.use$coro main.use$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.feeaf59960e65aefa09ed83c079fc82d + __llgo_coro_frame_descriptor_v1.d4f47381314d65855d0603905f455d0b __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap [UseIface] @@ -256,11 +282,11 @@ main.use$coro: [MethodInfo] *_llgo_github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source: - 0 Close _llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w __llgo_coro_method_raw_trap_v1.9805988801d4f3e11bf64357a7ca8d0b __llgo_coro_func_descriptor_v1.method-value.c7d006f1057bd875.9d42abe2265192cf6f8139d3be7b3d9c - 1 Read _llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk __llgo_coro_func_descriptor_v1.method.89565cde18061fcb.03b183a61ec5112a0c2ca62c6769aa13 __llgo_coro_func_descriptor_v1.method-value.89565cde18061fcb.8ea442e3b07b81cec2ec43a73593d91c + 0 Close _llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w __llgo_coro_method_raw_trap_v1.2e4cef437638ce20a8ef38c7b102a19d __llgo_coro_func_descriptor_v1.method-value.813f1c609efbe05e.cf5f18a9405d20ba527bbf3d7b58ed9e + 1 Read _llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk __llgo_coro_func_descriptor_v1.method.87246b06502506df.4d25c34df33c89c9ccfeb5a8d99020e1 __llgo_coro_func_descriptor_v1.method-value.87246b06502506df.2ee345674abd6c8f85b9346f35a78393 _llgo_github.com/goplus/llgo/cl/_testmeta/interface_imported/api.Source: - 0 Close _llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w __llgo_coro_method_raw_trap_v1.9805988801d4f3e11bf64357a7ca8d0b __llgo_coro_func_descriptor_v1.method-value.a5678790966cb1d1.eb59df75dfb0c7ee5000515d306e7f42 - 1 Read _llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk __llgo_coro_func_descriptor_v1.method.89565cde18061fcb.03b183a61ec5112a0c2ca62c6769aa13 __llgo_coro_func_descriptor_v1.method-value.360174cb867701ba.d2ee7bb3b5efb1775e27e7d978d69ee2 + 0 Close _llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w __llgo_coro_method_raw_trap_v1.2e4cef437638ce20a8ef38c7b102a19d __llgo_coro_func_descriptor_v1.method-value.fae7959d9dedc84c.c49deabf2f7c663128c37f267289cc7b + 1 Read _llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk __llgo_coro_func_descriptor_v1.method.87246b06502506df.4d25c34df33c89c9ccfeb5a8d99020e1 __llgo_coro_func_descriptor_v1.method-value.10301dec6b39c9e5.0783ccc0a5482fb46f2ecad0a6696be3 [InterfaceInfo] _llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw: diff --git a/cl/_testmeta/interface_named/meta-expect.txt b/cl/_testmeta/interface_named/meta-expect.txt index c95cca336f..4af3f4e6e7 100644 --- a/cl/_testmeta/interface_named/meta-expect.txt +++ b/cl/_testmeta/interface_named/meta-expect.txt @@ -20,13 +20,13 @@ _llgo_main.T: *_llgo_main.T: _llgo_main.T github.com/goplus/llgo/runtime/internal/runtime.memequalptr -__llgo$generated$promoted$M$llgo$promoted$v1$ceb90b48dcd4976d47cb3927750572fdb30ae5fd1621b21eeba01b39f6b970d2$coro: +__llgo$generated$promoted$M$llgo$promoted$v1$31df88eec168d597bf9f5938455d76b4657afe36729f06db3af788ee5ce6db6d$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.8f75e9b0603f29cf7b2b76a826c3e558 + __llgo_coro_frame_descriptor_v1.6084274502049029c081b489c33b7377 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -38,30 +38,41 @@ __llgo$generated$promoted$M$llgo$promoted$v1$ceb90b48dcd4976d47cb3927750572fdb30 llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.T.M -__llgo_coro_func_coro_v1.method-value.be146b35d5c61a73.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo$generated$promoted$M$llgo$promoted$v1$ceb90b48dcd4976d47cb3927750572fdb30ae5fd1621b21eeba01b39f6b970d2$coro -__llgo_coro_func_coro_v1.method.be146b35d5c61a73.88c3d2383da6469b697cffacc8f592fd: - __llgo$generated$promoted$M$llgo$promoted$v1$ceb90b48dcd4976d47cb3927750572fdb30ae5fd1621b21eeba01b39f6b970d2$coro -__llgo_coro_func_descriptor_v1.method-value.be146b35d5c61a73.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo_coro_func_coro_v1.method-value.be146b35d5c61a73.ce9a78a38c01b4e333f56897cb63d7bc -__llgo_coro_func_descriptor_v1.method-value.dd8ed7d13c1dbb06.c31f6a3d6adae06151afe0e079fd6339: - __llgo_coro_func_plain_v1.method-value.dd8ed7d13c1dbb06.c31f6a3d6adae06151afe0e079fd6339 -__llgo_coro_func_descriptor_v1.method.be146b35d5c61a73.88c3d2383da6469b697cffacc8f592fd: - __llgo_coro_func_coro_v1.method.be146b35d5c61a73.88c3d2383da6469b697cffacc8f592fd -__llgo_coro_func_plain_v1.method-value.dd8ed7d13c1dbb06.c31f6a3d6adae06151afe0e079fd6339: +__llgo$generated$promoted$M$llgo$promoted$v1$31df88eec168d597bf9f5938455d76b4657afe36729f06db3af788ee5ce6db6d$outcome: + __llgo_coro_wrap_nil_payload_v1 + main.T.M +__llgo_coro_func_coro_v1.method-value.3936c64fd961c1e8.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$M$llgo$promoted$v1$31df88eec168d597bf9f5938455d76b4657afe36729f06db3af788ee5ce6db6d$coro +__llgo_coro_func_coro_v1.method.3936c64fd961c1e8.dfdace59aa77dc7749541c4da1cb15aa: + __llgo$generated$promoted$M$llgo$promoted$v1$31df88eec168d597bf9f5938455d76b4657afe36729f06db3af788ee5ce6db6d$coro +__llgo_coro_func_descriptor_v1.method-value.3936c64fd961c1e8.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$M$llgo$promoted$v1$31df88eec168d597bf9f5938455d76b4657afe36729f06db3af788ee5ce6db6d$coro + __llgo_coro_func_coro_v1.method-value.3936c64fd961c1e8.ab9126c81700848f6b2436efb97ef747 +__llgo_coro_func_descriptor_v1.method-value.62ebe99e7fb7c5a7.779cffa94cfa288d5a1e6954a0b0a271: + __llgo_coro_func_plain_v1.method-value.62ebe99e7fb7c5a7.779cffa94cfa288d5a1e6954a0b0a271 main.T.M -__llgo_coro_method_raw_trap_v1.281036aee5086b6099bd7e05790dc74a: +__llgo_coro_func_descriptor_v1.method.3936c64fd961c1e8.dfdace59aa77dc7749541c4da1cb15aa: + __llgo$generated$promoted$M$llgo$promoted$v1$31df88eec168d597bf9f5938455d76b4657afe36729f06db3af788ee5ce6db6d$coro + __llgo_coro_func_coro_v1.method.3936c64fd961c1e8.dfdace59aa77dc7749541c4da1cb15aa +__llgo_coro_func_plain_v1.method-value.62ebe99e7fb7c5a7.779cffa94cfa288d5a1e6954a0b0a271: + main.T.M +__llgo_coro_method_raw_trap_v1.ac540c985af4feaa573c104df2dbb054: llvm.trap -__llgo_coro_root_factory_descriptor_v1.d6fd970d5a0ed3621b79b83902df24cb: - __llgo_coro_root_factory_v1.d6fd970d5a0ed3621b79b83902df24cb -__llgo_coro_root_factory_v1.d6fd970d5a0ed3621b79b83902df24cb: +__llgo_coro_root_factory_descriptor_v1.11a69e0182f1d3be74877684bf530817: + __llgo_coro_root_factory_v1.11a69e0182f1d3be74877684bf530817 +__llgo_coro_root_factory_v1.11a69e0182f1d3be74877684bf530817: main.main$coro -__llgo_coro_root_package_v1.63a089ebb5df9ee29230679f02a257f7: - __llgo_coro_root_package_v1.63a089ebb5df9ee29230679f02a257f7.entries -__llgo_coro_root_package_v1.63a089ebb5df9ee29230679f02a257f7.entries: - __llgo_coro_root_factory_descriptor_v1.d6fd970d5a0ed3621b79b83902df24cb +__llgo_coro_root_package_v1.87a074714e639ca6015c13c2c1499956: + __llgo_coro_root_package_v1.87a074714e639ca6015c13c2c1499956.entries +__llgo_coro_root_package_v1.87a074714e639ca6015c13c2c1499956.entries: + __llgo_coro_root_factory_descriptor_v1.11a69e0182f1d3be74877684bf530817 +__llgo_static_itab.460ddb7c3d94c0a89f3b08f0d2c65f65: + __llgo_coro_func_descriptor_v1.method.3936c64fd961c1e8.dfdace59aa77dc7749541c4da1cb15aa + _llgo_iface$anEWstLioBmxcO9rxTXClbAzDIEQLw2tApwq0mcSt88 + _llgo_main.T _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac: *_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac _llgo_iface$anEWstLioBmxcO9rxTXClbAzDIEQLw2tApwq0mcSt88: @@ -74,57 +85,66 @@ _llgo_main.T: *_llgo_main.T github.com/goplus/llgo/runtime/internal/runtime.memequal0 llvm.compiler.used: - __llgo_coro_library_effect_v6.4f151082bd3faca4d91a6a716bc15b16 + __llgo_coro_library_effect_v9.fbb2c65660e2ac20c8d334452bd539a6 llvm.used: - __llgo_coro_root_factory_descriptor_v1.d6fd970d5a0ed3621b79b83902df24cb - __llgo_coro_root_package_v1.63a089ebb5df9ee29230679f02a257f7 + __llgo_coro_root_factory_descriptor_v1.11a69e0182f1d3be74877684bf530817 + __llgo_coro_root_package_v1.87a074714e639ca6015c13c2c1499956 main.init: main.init$guard main.main$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.d6fd970d5a0ed3621b79b83902df24cb + __llgo_coro_frame_descriptor_v1.11a69e0182f1d3be74877684bf530817 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 - _llgo_iface$anEWstLioBmxcO9rxTXClbAzDIEQLw2tApwq0mcSt88 - _llgo_main.T - github.com/goplus/llgo/runtime/internal/runtime.AllocU - github.com/goplus/llgo/runtime/internal/runtime.NewItab$coro + __llgo_static_itab.460ddb7c3d94c0a89f3b08f0d2c65f65 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.use$coro main.use$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.c7dd2eb1d1dd0cfdd5fc6663b2a6ad04 + __llgo_coro_frame_descriptor_v1.8401e1ded26e01a210e012b7751a5eb8 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap [UseIface] @@ -137,9 +157,9 @@ main.use$coro: [MethodInfo] *_llgo_main.T: - 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.be146b35d5c61a73.88c3d2383da6469b697cffacc8f592fd __llgo_coro_func_descriptor_v1.method-value.be146b35d5c61a73.ce9a78a38c01b4e333f56897cb63d7bc + 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.3936c64fd961c1e8.dfdace59aa77dc7749541c4da1cb15aa __llgo_coro_func_descriptor_v1.method-value.3936c64fd961c1e8.ab9126c81700848f6b2436efb97ef747 _llgo_main.T: - 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.be146b35d5c61a73.88c3d2383da6469b697cffacc8f592fd __llgo_coro_func_descriptor_v1.method-value.dd8ed7d13c1dbb06.c31f6a3d6adae06151afe0e079fd6339 + 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.3936c64fd961c1e8.dfdace59aa77dc7749541c4da1cb15aa __llgo_coro_func_descriptor_v1.method-value.62ebe99e7fb7c5a7.779cffa94cfa288d5a1e6954a0b0a271 [InterfaceInfo] _llgo_iface$anEWstLioBmxcO9rxTXClbAzDIEQLw2tApwq0mcSt88: diff --git a/cl/_testmeta/interface_unexported/meta-expect.txt b/cl/_testmeta/interface_unexported/meta-expect.txt index bd340de657..e06581d1dc 100644 --- a/cl/_testmeta/interface_unexported/meta-expect.txt +++ b/cl/_testmeta/interface_unexported/meta-expect.txt @@ -20,13 +20,13 @@ _llgo_main.T: *github.com/goplus/llgo/cl/_testmeta/interface_unexported.iface$SE5y-KS93u1u9p1qAf9LRB1hncS44rJIq27_JZbIQVo: github.com/goplus/llgo/cl/_testmeta/interface_unexported.iface$SE5y-KS93u1u9p1qAf9LRB1hncS44rJIq27_JZbIQVo github.com/goplus/llgo/runtime/internal/runtime.memequalptr -__llgo$generated$promoted$m$llgo$promoted$v1$b7049221551bdc3a2ee593e21be566777686854a41682b91c8aaceaf75e1e6eb$coro: +__llgo$generated$promoted$m$llgo$promoted$v1$31962497174a4887ea6027db7b39b6268955a456b79ea0f427e2e9d5da53da2e$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.d4accdbd01e25579d68cd241dda4afe7 + __llgo_coro_frame_descriptor_v1.7c59fb56cf726ad465147d9464b453de __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -38,30 +38,41 @@ __llgo$generated$promoted$m$llgo$promoted$v1$b7049221551bdc3a2ee593e21be56677768 llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.T.m -__llgo_coro_func_coro_v1.method-value.c910f1e9d7a2f96f.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo$generated$promoted$m$llgo$promoted$v1$b7049221551bdc3a2ee593e21be566777686854a41682b91c8aaceaf75e1e6eb$coro -__llgo_coro_func_coro_v1.method.c910f1e9d7a2f96f.88c3d2383da6469b697cffacc8f592fd: - __llgo$generated$promoted$m$llgo$promoted$v1$b7049221551bdc3a2ee593e21be566777686854a41682b91c8aaceaf75e1e6eb$coro -__llgo_coro_func_descriptor_v1.method-value.996fb415065d3791.c31f6a3d6adae06151afe0e079fd6339: - __llgo_coro_func_plain_v1.method-value.996fb415065d3791.c31f6a3d6adae06151afe0e079fd6339 -__llgo_coro_func_descriptor_v1.method-value.c910f1e9d7a2f96f.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo_coro_func_coro_v1.method-value.c910f1e9d7a2f96f.ce9a78a38c01b4e333f56897cb63d7bc -__llgo_coro_func_descriptor_v1.method.c910f1e9d7a2f96f.88c3d2383da6469b697cffacc8f592fd: - __llgo_coro_func_coro_v1.method.c910f1e9d7a2f96f.88c3d2383da6469b697cffacc8f592fd -__llgo_coro_func_plain_v1.method-value.996fb415065d3791.c31f6a3d6adae06151afe0e079fd6339: +__llgo$generated$promoted$m$llgo$promoted$v1$31962497174a4887ea6027db7b39b6268955a456b79ea0f427e2e9d5da53da2e$outcome: + __llgo_coro_wrap_nil_payload_v1 + main.T.m +__llgo_coro_func_coro_v1.method-value.ef1007bdf6d56581.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$m$llgo$promoted$v1$31962497174a4887ea6027db7b39b6268955a456b79ea0f427e2e9d5da53da2e$coro +__llgo_coro_func_coro_v1.method.ef1007bdf6d56581.dfdace59aa77dc7749541c4da1cb15aa: + __llgo$generated$promoted$m$llgo$promoted$v1$31962497174a4887ea6027db7b39b6268955a456b79ea0f427e2e9d5da53da2e$coro +__llgo_coro_func_descriptor_v1.method-value.b34f2f2710454b22.779cffa94cfa288d5a1e6954a0b0a271: + __llgo_coro_func_plain_v1.method-value.b34f2f2710454b22.779cffa94cfa288d5a1e6954a0b0a271 main.T.m -__llgo_coro_method_raw_trap_v1.83f9558243615b975391b9a6593780bf: +__llgo_coro_func_descriptor_v1.method-value.ef1007bdf6d56581.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$m$llgo$promoted$v1$31962497174a4887ea6027db7b39b6268955a456b79ea0f427e2e9d5da53da2e$coro + __llgo_coro_func_coro_v1.method-value.ef1007bdf6d56581.ab9126c81700848f6b2436efb97ef747 +__llgo_coro_func_descriptor_v1.method.ef1007bdf6d56581.dfdace59aa77dc7749541c4da1cb15aa: + __llgo$generated$promoted$m$llgo$promoted$v1$31962497174a4887ea6027db7b39b6268955a456b79ea0f427e2e9d5da53da2e$coro + __llgo_coro_func_coro_v1.method.ef1007bdf6d56581.dfdace59aa77dc7749541c4da1cb15aa +__llgo_coro_func_plain_v1.method-value.b34f2f2710454b22.779cffa94cfa288d5a1e6954a0b0a271: + main.T.m +__llgo_coro_method_raw_trap_v1.fd6c78428e4b4fd63e0875ab78a64cc9: llvm.trap -__llgo_coro_root_factory_descriptor_v1.221a5b156039cccb2275d864d19c95bc: - __llgo_coro_root_factory_v1.221a5b156039cccb2275d864d19c95bc -__llgo_coro_root_factory_v1.221a5b156039cccb2275d864d19c95bc: +__llgo_coro_root_factory_descriptor_v1.50c4fbe81971480741a099a112304ace: + __llgo_coro_root_factory_v1.50c4fbe81971480741a099a112304ace +__llgo_coro_root_factory_v1.50c4fbe81971480741a099a112304ace: main.main$coro -__llgo_coro_root_package_v1.54e7c381c08e6c5231f403d93dc56156: - __llgo_coro_root_package_v1.54e7c381c08e6c5231f403d93dc56156.entries -__llgo_coro_root_package_v1.54e7c381c08e6c5231f403d93dc56156.entries: - __llgo_coro_root_factory_descriptor_v1.221a5b156039cccb2275d864d19c95bc +__llgo_coro_root_package_v1.30ecefdceab3ff5f86c89c1bd7a4efc2: + __llgo_coro_root_package_v1.30ecefdceab3ff5f86c89c1bd7a4efc2.entries +__llgo_coro_root_package_v1.30ecefdceab3ff5f86c89c1bd7a4efc2.entries: + __llgo_coro_root_factory_descriptor_v1.50c4fbe81971480741a099a112304ace +__llgo_static_itab.2e200ff8859eb81ce08d8fdd320c7cbb: + __llgo_coro_func_descriptor_v1.method.ef1007bdf6d56581.dfdace59aa77dc7749541c4da1cb15aa + _llgo_main.T + github.com/goplus/llgo/cl/_testmeta/interface_unexported.iface$SE5y-KS93u1u9p1qAf9LRB1hncS44rJIq27_JZbIQVo _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac: *_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac _llgo_main.T: @@ -74,57 +85,66 @@ github.com/goplus/llgo/cl/_testmeta/interface_unexported.iface$SE5y-KS93u1u9p1qA github.com/goplus/llgo/cl/_testmeta/interface_unexported.iface$SE5y-KS93u1u9p1qAf9LRB1hncS44rJIq27_JZbIQVo$imethods: _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac llvm.compiler.used: - __llgo_coro_library_effect_v6.762a131e74c805849fcd76587125f587 + __llgo_coro_library_effect_v9.2ec582da05dcf0d26237d81b248aa065 llvm.used: - __llgo_coro_root_factory_descriptor_v1.221a5b156039cccb2275d864d19c95bc - __llgo_coro_root_package_v1.54e7c381c08e6c5231f403d93dc56156 + __llgo_coro_root_factory_descriptor_v1.50c4fbe81971480741a099a112304ace + __llgo_coro_root_package_v1.30ecefdceab3ff5f86c89c1bd7a4efc2 main.init: main.init$guard main.main$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.221a5b156039cccb2275d864d19c95bc + __llgo_coro_frame_descriptor_v1.50c4fbe81971480741a099a112304ace __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 - _llgo_main.T - github.com/goplus/llgo/cl/_testmeta/interface_unexported.iface$SE5y-KS93u1u9p1qAf9LRB1hncS44rJIq27_JZbIQVo - github.com/goplus/llgo/runtime/internal/runtime.AllocU - github.com/goplus/llgo/runtime/internal/runtime.NewItab$coro + __llgo_static_itab.2e200ff8859eb81ce08d8fdd320c7cbb llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.use$coro main.use$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.f926f525f21881b662c93651db3a3aed + __llgo_coro_frame_descriptor_v1.389f82c0452fbafd5ccc6ab999601f2b __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap [UseIface] @@ -137,9 +157,9 @@ main.use$coro: [MethodInfo] *_llgo_main.T: - 0 main.m _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.c910f1e9d7a2f96f.88c3d2383da6469b697cffacc8f592fd __llgo_coro_func_descriptor_v1.method-value.c910f1e9d7a2f96f.ce9a78a38c01b4e333f56897cb63d7bc + 0 main.m _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.ef1007bdf6d56581.dfdace59aa77dc7749541c4da1cb15aa __llgo_coro_func_descriptor_v1.method-value.ef1007bdf6d56581.ab9126c81700848f6b2436efb97ef747 _llgo_main.T: - 0 main.m _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.c910f1e9d7a2f96f.88c3d2383da6469b697cffacc8f592fd __llgo_coro_func_descriptor_v1.method-value.996fb415065d3791.c31f6a3d6adae06151afe0e079fd6339 + 0 main.m _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_func_descriptor_v1.method.ef1007bdf6d56581.dfdace59aa77dc7749541c4da1cb15aa __llgo_coro_func_descriptor_v1.method-value.b34f2f2710454b22.779cffa94cfa288d5a1e6954a0b0a271 [InterfaceInfo] github.com/goplus/llgo/cl/_testmeta/interface_unexported.iface$SE5y-KS93u1u9p1qAf9LRB1hncS44rJIq27_JZbIQVo: diff --git a/cl/_testmeta/methodinfo_imported/meta-expect.txt b/cl/_testmeta/methodinfo_imported/meta-expect.txt index fc1189d072..c1ca768c90 100644 --- a/cl/_testmeta/methodinfo_imported/meta-expect.txt +++ b/cl/_testmeta/methodinfo_imported/meta-expect.txt @@ -1,31 +1,33 @@ [OrdinaryEdges] -__llgo_coro_root_factory_descriptor_v1.040f9e7d8f3b704641dbfcfa24143f1f: - __llgo_coro_root_factory_v1.040f9e7d8f3b704641dbfcfa24143f1f -__llgo_coro_root_factory_descriptor_v1.ceaadd22940763468d30b2e97725b52e: - __llgo_coro_root_factory_v1.ceaadd22940763468d30b2e97725b52e -__llgo_coro_root_factory_v1.040f9e7d8f3b704641dbfcfa24143f1f: +__llgo_coro_root_factory_descriptor_v1.0eddab38efa319180982a879473e8886: + __llgo_coro_root_factory_v1.0eddab38efa319180982a879473e8886 +__llgo_coro_root_factory_descriptor_v1.2571e4eb67f7c8ca3bc0c295522edcb9: + __llgo_coro_root_factory_v1.2571e4eb67f7c8ca3bc0c295522edcb9 +__llgo_coro_root_factory_v1.0eddab38efa319180982a879473e8886: main.main$coro -__llgo_coro_root_factory_v1.ceaadd22940763468d30b2e97725b52e: +__llgo_coro_root_factory_v1.2571e4eb67f7c8ca3bc0c295522edcb9: main.init$coro -__llgo_coro_root_package_v1.a26699e638ee763118a1d4991ecd57a5: - __llgo_coro_root_package_v1.a26699e638ee763118a1d4991ecd57a5.entries -__llgo_coro_root_package_v1.a26699e638ee763118a1d4991ecd57a5.entries: - __llgo_coro_root_factory_descriptor_v1.040f9e7d8f3b704641dbfcfa24143f1f - __llgo_coro_root_factory_descriptor_v1.ceaadd22940763468d30b2e97725b52e +__llgo_coro_root_package_v1.90f6136d7da8c90701144a73d9e8e948: + __llgo_coro_root_package_v1.90f6136d7da8c90701144a73d9e8e948.entries +__llgo_coro_root_package_v1.90f6136d7da8c90701144a73d9e8e948.entries: + __llgo_coro_root_factory_descriptor_v1.0eddab38efa319180982a879473e8886 + __llgo_coro_root_factory_descriptor_v1.2571e4eb67f7c8ca3bc0c295522edcb9 llvm.compiler.used: - __llgo_coro_library_effect_v6.c80e133b52a5e2617aa48a13f6acf1f4 + __llgo_coro_library_effect_v9.3ac9d41c83e30836bd73bd3b84b3f46f llvm.used: - __llgo_coro_root_factory_descriptor_v1.040f9e7d8f3b704641dbfcfa24143f1f - __llgo_coro_root_factory_descriptor_v1.ceaadd22940763468d30b2e97725b52e - __llgo_coro_root_package_v1.a26699e638ee763118a1d4991ecd57a5 + __llgo_coro_root_factory_descriptor_v1.0eddab38efa319180982a879473e8886 + __llgo_coro_root_factory_descriptor_v1.2571e4eb67f7c8ca3bc0c295522edcb9 + __llgo_coro_root_package_v1.90f6136d7da8c90701144a73d9e8e948 main.init$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.ceaadd22940763468d30b2e97725b52e + __llgo_coro_frame_descriptor_v1.2571e4eb67f7c8ca3bc0c295522edcb9 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 bytes.init$coro @@ -33,33 +35,43 @@ main.init$coro: llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.init$guard main.main$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 + __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.040f9e7d8f3b704641dbfcfa24143f1f + __llgo_coro_frame_descriptor_v1.0eddab38efa319180982a879473e8886 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 bytes.(*Buffer).Read$coro - bytes.NewBuffer$coro + bytes.NewBuffer$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend llvm.fake.use diff --git a/cl/_testmeta/reflect_dynamic/meta-expect.txt b/cl/_testmeta/reflect_dynamic/meta-expect.txt index 9f50902c9c..6c6a0f7619 100644 --- a/cl/_testmeta/reflect_dynamic/meta-expect.txt +++ b/cl/_testmeta/reflect_dynamic/meta-expect.txt @@ -15,13 +15,13 @@ _llgo_main.T: *_llgo_main.T: _llgo_main.T github.com/goplus/llgo/runtime/internal/runtime.memequalptr -__llgo$generated$promoted$M$llgo$promoted$v1$e52e5f77502425aad582181672dcf7f254f492a46223476208dd7a006188cebd$coro: +__llgo$generated$promoted$M$llgo$promoted$v1$d4c1da4f3f36da19c9cac90397f6d8aad4ce4ffb44ad254b178d5b4230a65694$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.c2a1423f03900ef61ad3893c2c2536b7 + __llgo_coro_frame_descriptor_v1.ec6b60f24597eddf172e804f85516bca __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -33,109 +33,134 @@ __llgo$generated$promoted$M$llgo$promoted$v1$e52e5f77502425aad582181672dcf7f254f llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.T.M -__llgo_coro_func_coro_v1.method-value.171fd009577c79a9.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo$generated$promoted$M$llgo$promoted$v1$e52e5f77502425aad582181672dcf7f254f492a46223476208dd7a006188cebd$coro -__llgo_coro_func_descriptor_v1.method-value.171fd009577c79a9.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo_coro_func_coro_v1.method-value.171fd009577c79a9.ce9a78a38c01b4e333f56897cb63d7bc -__llgo_coro_func_descriptor_v1.method-value.9100133ead0fa5db.c31f6a3d6adae06151afe0e079fd6339: - __llgo_coro_func_plain_v1.method-value.9100133ead0fa5db.c31f6a3d6adae06151afe0e079fd6339 -__llgo_coro_func_plain_v1.method-value.9100133ead0fa5db.c31f6a3d6adae06151afe0e079fd6339: +__llgo$generated$promoted$M$llgo$promoted$v1$d4c1da4f3f36da19c9cac90397f6d8aad4ce4ffb44ad254b178d5b4230a65694$outcome: + __llgo_coro_wrap_nil_payload_v1 + main.T.M +__llgo_coro_func_coro_v1.method-value.8d3f2235c35efdd4.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$M$llgo$promoted$v1$d4c1da4f3f36da19c9cac90397f6d8aad4ce4ffb44ad254b178d5b4230a65694$coro +__llgo_coro_func_descriptor_v1.method-value.7ed56f3bc0a6aca6.779cffa94cfa288d5a1e6954a0b0a271: + __llgo_coro_func_plain_v1.method-value.7ed56f3bc0a6aca6.779cffa94cfa288d5a1e6954a0b0a271 + main.T.M +__llgo_coro_func_descriptor_v1.method-value.8d3f2235c35efdd4.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$M$llgo$promoted$v1$d4c1da4f3f36da19c9cac90397f6d8aad4ce4ffb44ad254b178d5b4230a65694$coro + __llgo_coro_func_coro_v1.method-value.8d3f2235c35efdd4.ab9126c81700848f6b2436efb97ef747 +__llgo_coro_func_plain_v1.method-value.7ed56f3bc0a6aca6.779cffa94cfa288d5a1e6954a0b0a271: main.T.M -__llgo_coro_method_raw_trap_v1.b455c1ebb135882dfce57450803d67cf: +__llgo_coro_method_raw_trap_v1.552f3a420e6a3e21ee856cf91f43cab8: llvm.trap -__llgo_coro_root_factory_descriptor_v1.2c9b4f0f2cfeff46a330f246ac1f7ebf: - __llgo_coro_root_factory_v1.2c9b4f0f2cfeff46a330f246ac1f7ebf -__llgo_coro_root_factory_descriptor_v1.560b5802e3ce55965dc7beaab01dc0ab: - __llgo_coro_root_factory_v1.560b5802e3ce55965dc7beaab01dc0ab -__llgo_coro_root_factory_v1.2c9b4f0f2cfeff46a330f246ac1f7ebf: - main.init$coro -__llgo_coro_root_factory_v1.560b5802e3ce55965dc7beaab01dc0ab: +__llgo_coro_root_factory_descriptor_v1.c3fe93343fc052319543592911f54a96: + __llgo_coro_root_factory_v1.c3fe93343fc052319543592911f54a96 +__llgo_coro_root_factory_descriptor_v1.f4dbcf35138eca16df3c1d82b433fc56: + __llgo_coro_root_factory_v1.f4dbcf35138eca16df3c1d82b433fc56 +__llgo_coro_root_factory_v1.c3fe93343fc052319543592911f54a96: main.main$coro -__llgo_coro_root_package_v1.7aefdf4cceb269f43da3576a1aa99545: - __llgo_coro_root_package_v1.7aefdf4cceb269f43da3576a1aa99545.entries -__llgo_coro_root_package_v1.7aefdf4cceb269f43da3576a1aa99545.entries: - __llgo_coro_root_factory_descriptor_v1.2c9b4f0f2cfeff46a330f246ac1f7ebf - __llgo_coro_root_factory_descriptor_v1.560b5802e3ce55965dc7beaab01dc0ab +__llgo_coro_root_factory_v1.f4dbcf35138eca16df3c1d82b433fc56: + main.init$coro +__llgo_coro_root_package_v1.21513b5edf3df759d46e89b0d8d36974: + __llgo_coro_root_package_v1.21513b5edf3df759d46e89b0d8d36974.entries +__llgo_coro_root_package_v1.21513b5edf3df759d46e89b0d8d36974.entries: + __llgo_coro_root_factory_descriptor_v1.c3fe93343fc052319543592911f54a96 + __llgo_coro_root_factory_descriptor_v1.f4dbcf35138eca16df3c1d82b433fc56 _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac: *_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac _llgo_main.T: *_llgo_main.T github.com/goplus/llgo/runtime/internal/runtime.memequal0 llvm.compiler.used: - __llgo_coro_library_effect_v6.56ff74f657d38e3fbc36e79ff1f5b954 + __llgo_coro_library_effect_v9.de20493391fa20646f540b0188360d20 llvm.used: - __llgo_coro_root_factory_descriptor_v1.2c9b4f0f2cfeff46a330f246ac1f7ebf - __llgo_coro_root_factory_descriptor_v1.560b5802e3ce55965dc7beaab01dc0ab - __llgo_coro_root_package_v1.7aefdf4cceb269f43da3576a1aa99545 + __llgo_coro_root_factory_descriptor_v1.c3fe93343fc052319543592911f54a96 + __llgo_coro_root_factory_descriptor_v1.f4dbcf35138eca16df3c1d82b433fc56 + __llgo_coro_root_package_v1.21513b5edf3df759d46e89b0d8d36974 main.init$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.2c9b4f0f2cfeff46a330f246ac1f7ebf + __llgo_coro_frame_descriptor_v1.f4dbcf35138eca16df3c1d82b433fc56 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.init$guard reflect.init$coro main.main$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.560b5802e3ce55965dc7beaab01dc0ab + __llgo_coro_frame_descriptor_v1.c3fe93343fc052319543592911f54a96 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.use$coro main.use$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 + __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.680c52f0597f5aeb9aaffbe5642adf2f + __llgo_coro_frame_descriptor_v1.7fdeec0d7f0411234abc79f3dde28537 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 _llgo_main.T - github.com/goplus/llgo/runtime/internal/runtime.AllocU - github.com/goplus/llgo/runtime/internal/runtime.PopCallerLocationFrame$coro - github.com/goplus/llgo/runtime/internal/runtime.PushCallerLocationFrame$coro - github.com/goplus/llgo/runtime/internal/runtime.RecordPanicLocation$coro + github.com/goplus/llgo/runtime/internal/runtime.PopCallerLocationFrame$outcome + github.com/goplus/llgo/runtime/internal/runtime.PushCallerLocationFrame$outcome + github.com/goplus/llgo/runtime/internal/runtime.RecordPanicLocation$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use + llvm.memset.p0.i64 llvm.trap reflect.Value.MethodByName$coro reflect.ValueOf$coro @@ -146,9 +171,9 @@ main.use$coro: [MethodInfo] *_llgo_main.T: - 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.b455c1ebb135882dfce57450803d67cf __llgo_coro_func_descriptor_v1.method-value.171fd009577c79a9.ce9a78a38c01b4e333f56897cb63d7bc + 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.552f3a420e6a3e21ee856cf91f43cab8 __llgo_coro_func_descriptor_v1.method-value.8d3f2235c35efdd4.ab9126c81700848f6b2436efb97ef747 _llgo_main.T: - 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.b455c1ebb135882dfce57450803d67cf __llgo_coro_func_descriptor_v1.method-value.9100133ead0fa5db.c31f6a3d6adae06151afe0e079fd6339 + 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.552f3a420e6a3e21ee856cf91f43cab8 __llgo_coro_func_descriptor_v1.method-value.7ed56f3bc0a6aca6.779cffa94cfa288d5a1e6954a0b0a271 [Reflect] main.use$coro diff --git a/cl/_testmeta/reflect_named/meta-expect.txt b/cl/_testmeta/reflect_named/meta-expect.txt index e69d05ff8f..3104a1074f 100644 --- a/cl/_testmeta/reflect_named/meta-expect.txt +++ b/cl/_testmeta/reflect_named/meta-expect.txt @@ -15,13 +15,13 @@ _llgo_main.T: *_llgo_main.T: _llgo_main.T github.com/goplus/llgo/runtime/internal/runtime.memequalptr -__llgo$generated$promoted$M$llgo$promoted$v1$1d664f43ba5bd4a803aff06dbb913d256cce41cb71a63faa5fe012e744f9cc67$coro: +__llgo$generated$promoted$M$llgo$promoted$v1$14ecd2c189808837dc676864b052f3657ac0ab704f563021e078a57abd6c5cb5$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.dd4ab1643e1ee5d9d372d064e15c9ac8 + __llgo_coro_frame_descriptor_v1.cc729155e8e9285b9baca0ad74e12f0e __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -33,15 +33,19 @@ __llgo$generated$promoted$M$llgo$promoted$v1$1d664f43ba5bd4a803aff06dbb913d256cc llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.T.M -__llgo$generated$promoted$m$llgo$promoted$v1$f11d59da0b2839dd845098254bf972b13707f1a953dbdb01c39fb9b131e451b2$coro: +__llgo$generated$promoted$M$llgo$promoted$v1$14ecd2c189808837dc676864b052f3657ac0ab704f563021e078a57abd6c5cb5$outcome: + __llgo_coro_wrap_nil_payload_v1 + main.T.M +__llgo$generated$promoted$m$llgo$promoted$v1$b82c7ccb92b7c5c3cb902a2421033679c26c9f0b1ae353dac0a065b8d94c3a6d$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.0ee0c0aee0f8a2922354d876c1e933e7 + __llgo_coro_frame_descriptor_v1.caa73ce734f42d5fc4b1f0e1cb3823b6 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 __llgo_coro_wrap_nil_payload_v1 @@ -53,97 +57,117 @@ __llgo$generated$promoted$m$llgo$promoted$v1$f11d59da0b2839dd845098254bf972b1370 llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.T.m -__llgo_coro_func_coro_v1.method-value.6c8129e3a0a94c41.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo$generated$promoted$m$llgo$promoted$v1$f11d59da0b2839dd845098254bf972b13707f1a953dbdb01c39fb9b131e451b2$coro -__llgo_coro_func_coro_v1.method-value.7eb39daba0de5f0c.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo$generated$promoted$M$llgo$promoted$v1$1d664f43ba5bd4a803aff06dbb913d256cce41cb71a63faa5fe012e744f9cc67$coro -__llgo_coro_func_descriptor_v1.method-value.1a7f7fc69088cda8.c31f6a3d6adae06151afe0e079fd6339: - __llgo_coro_func_plain_v1.method-value.1a7f7fc69088cda8.c31f6a3d6adae06151afe0e079fd6339 -__llgo_coro_func_descriptor_v1.method-value.6c8129e3a0a94c41.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo_coro_func_coro_v1.method-value.6c8129e3a0a94c41.ce9a78a38c01b4e333f56897cb63d7bc -__llgo_coro_func_descriptor_v1.method-value.7eb39daba0de5f0c.ce9a78a38c01b4e333f56897cb63d7bc: - __llgo_coro_func_coro_v1.method-value.7eb39daba0de5f0c.ce9a78a38c01b4e333f56897cb63d7bc -__llgo_coro_func_descriptor_v1.method-value.fc5e3b988045793d.c31f6a3d6adae06151afe0e079fd6339: - __llgo_coro_func_plain_v1.method-value.fc5e3b988045793d.c31f6a3d6adae06151afe0e079fd6339 -__llgo_coro_func_plain_v1.method-value.1a7f7fc69088cda8.c31f6a3d6adae06151afe0e079fd6339: +__llgo$generated$promoted$m$llgo$promoted$v1$b82c7ccb92b7c5c3cb902a2421033679c26c9f0b1ae353dac0a065b8d94c3a6d$outcome: + __llgo_coro_wrap_nil_payload_v1 + main.T.m +__llgo_coro_func_coro_v1.method-value.954c9d9e49f8dee9.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$m$llgo$promoted$v1$b82c7ccb92b7c5c3cb902a2421033679c26c9f0b1ae353dac0a065b8d94c3a6d$coro +__llgo_coro_func_coro_v1.method-value.e0a2a04458923c77.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$M$llgo$promoted$v1$14ecd2c189808837dc676864b052f3657ac0ab704f563021e078a57abd6c5cb5$coro +__llgo_coro_func_descriptor_v1.method-value.0c64f063f4a29ddb.779cffa94cfa288d5a1e6954a0b0a271: + __llgo_coro_func_plain_v1.method-value.0c64f063f4a29ddb.779cffa94cfa288d5a1e6954a0b0a271 main.T.m -__llgo_coro_func_plain_v1.method-value.fc5e3b988045793d.c31f6a3d6adae06151afe0e079fd6339: +__llgo_coro_func_descriptor_v1.method-value.7867ba42c0fc8399.779cffa94cfa288d5a1e6954a0b0a271: + __llgo_coro_func_plain_v1.method-value.7867ba42c0fc8399.779cffa94cfa288d5a1e6954a0b0a271 main.T.M -__llgo_coro_method_raw_trap_v1.2dfd569f3adc24093441039e317711c8: +__llgo_coro_func_descriptor_v1.method-value.954c9d9e49f8dee9.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$m$llgo$promoted$v1$b82c7ccb92b7c5c3cb902a2421033679c26c9f0b1ae353dac0a065b8d94c3a6d$coro + __llgo_coro_func_coro_v1.method-value.954c9d9e49f8dee9.ab9126c81700848f6b2436efb97ef747 +__llgo_coro_func_descriptor_v1.method-value.e0a2a04458923c77.ab9126c81700848f6b2436efb97ef747: + __llgo$generated$promoted$M$llgo$promoted$v1$14ecd2c189808837dc676864b052f3657ac0ab704f563021e078a57abd6c5cb5$coro + __llgo_coro_func_coro_v1.method-value.e0a2a04458923c77.ab9126c81700848f6b2436efb97ef747 +__llgo_coro_func_plain_v1.method-value.0c64f063f4a29ddb.779cffa94cfa288d5a1e6954a0b0a271: + main.T.m +__llgo_coro_func_plain_v1.method-value.7867ba42c0fc8399.779cffa94cfa288d5a1e6954a0b0a271: + main.T.M +__llgo_coro_method_raw_trap_v1.33f0dbd5d697dc5f0e5720a4b709e78d: llvm.trap -__llgo_coro_method_raw_trap_v1.4c594ddf5aa65bd4f6277ec2fc0bcb71: +__llgo_coro_method_raw_trap_v1.4b7802572739b661e00b79e0b82a661d: llvm.trap -__llgo_coro_root_factory_descriptor_v1.840f0aa6299cff42861dec96000de074: - __llgo_coro_root_factory_v1.840f0aa6299cff42861dec96000de074 -__llgo_coro_root_factory_descriptor_v1.e28a2062e8830b60022a95dd661c3b5b: - __llgo_coro_root_factory_v1.e28a2062e8830b60022a95dd661c3b5b -__llgo_coro_root_factory_v1.840f0aa6299cff42861dec96000de074: - main.init$coro -__llgo_coro_root_factory_v1.e28a2062e8830b60022a95dd661c3b5b: +__llgo_coro_root_factory_descriptor_v1.4cfa46fd6a871fc0fb8e2c11f48dbc21: + __llgo_coro_root_factory_v1.4cfa46fd6a871fc0fb8e2c11f48dbc21 +__llgo_coro_root_factory_descriptor_v1.7952d7bc811a5b63b2d31fd9d691d9b1: + __llgo_coro_root_factory_v1.7952d7bc811a5b63b2d31fd9d691d9b1 +__llgo_coro_root_factory_v1.4cfa46fd6a871fc0fb8e2c11f48dbc21: main.main$coro -__llgo_coro_root_package_v1.816fb39c3ea1f95e503d41d8eead3071: - __llgo_coro_root_package_v1.816fb39c3ea1f95e503d41d8eead3071.entries -__llgo_coro_root_package_v1.816fb39c3ea1f95e503d41d8eead3071.entries: - __llgo_coro_root_factory_descriptor_v1.840f0aa6299cff42861dec96000de074 - __llgo_coro_root_factory_descriptor_v1.e28a2062e8830b60022a95dd661c3b5b +__llgo_coro_root_factory_v1.7952d7bc811a5b63b2d31fd9d691d9b1: + main.init$coro +__llgo_coro_root_package_v1.c4514ffb9e65b788b563f7645eaf55a7: + __llgo_coro_root_package_v1.c4514ffb9e65b788b563f7645eaf55a7.entries +__llgo_coro_root_package_v1.c4514ffb9e65b788b563f7645eaf55a7.entries: + __llgo_coro_root_factory_descriptor_v1.4cfa46fd6a871fc0fb8e2c11f48dbc21 + __llgo_coro_root_factory_descriptor_v1.7952d7bc811a5b63b2d31fd9d691d9b1 _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac: *_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac _llgo_main.T: *_llgo_main.T github.com/goplus/llgo/runtime/internal/runtime.memequal0 llvm.compiler.used: - __llgo_coro_library_effect_v6.2709e6b709d4aea67c8960edaf0e9d5a + __llgo_coro_library_effect_v9.2794e540e3c0b186c7bde81247266fa1 llvm.used: - __llgo_coro_root_factory_descriptor_v1.840f0aa6299cff42861dec96000de074 - __llgo_coro_root_factory_descriptor_v1.e28a2062e8830b60022a95dd661c3b5b - __llgo_coro_root_package_v1.816fb39c3ea1f95e503d41d8eead3071 + __llgo_coro_root_factory_descriptor_v1.4cfa46fd6a871fc0fb8e2c11f48dbc21 + __llgo_coro_root_factory_descriptor_v1.7952d7bc811a5b63b2d31fd9d691d9b1 + __llgo_coro_root_package_v1.c4514ffb9e65b788b563f7645eaf55a7 main.init$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.840f0aa6299cff42861dec96000de074 + __llgo_coro_frame_descriptor_v1.7952d7bc811a5b63b2d31fd9d691d9b1 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.init$guard reflect.init$coro main.main$coro: __llgo_coro_await_consume_v1 - __llgo_coro_await_prepare_v3 + __llgo_coro_await_inline_destroy_consume_v4 + __llgo_coro_await_inline_finish_v2 + __llgo_coro_await_prepare_inline_v4 __llgo_coro_complete_prepare_v2 __llgo_coro_fault_prepare_v1 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.e28a2062e8830b60022a95dd661c3b5b + __llgo_coro_frame_descriptor_v1.4cfa46fd6a871fc0fb8e2c11f48dbc21 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_panic_prepare_v1 __llgo_coro_run_decision_take_zero_v1 _llgo_main.T - github.com/goplus/llgo/runtime/internal/runtime.AllocU - github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData$coro + github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData$outcome llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin + llvm.coro.destroy + llvm.coro.done llvm.coro.end llvm.coro.free llvm.coro.id llvm.coro.promise + llvm.coro.resume llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use + llvm.memset.p0.i64 llvm.trap reflect.TypeOf$coro @@ -159,11 +183,11 @@ main.main$coro: [MethodInfo] *_llgo_main.T: - 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.2dfd569f3adc24093441039e317711c8 __llgo_coro_func_descriptor_v1.method-value.7eb39daba0de5f0c.ce9a78a38c01b4e333f56897cb63d7bc - 1 main.m _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.4c594ddf5aa65bd4f6277ec2fc0bcb71 __llgo_coro_func_descriptor_v1.method-value.6c8129e3a0a94c41.ce9a78a38c01b4e333f56897cb63d7bc + 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.4b7802572739b661e00b79e0b82a661d __llgo_coro_func_descriptor_v1.method-value.e0a2a04458923c77.ab9126c81700848f6b2436efb97ef747 + 1 main.m _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.33f0dbd5d697dc5f0e5720a4b709e78d __llgo_coro_func_descriptor_v1.method-value.954c9d9e49f8dee9.ab9126c81700848f6b2436efb97ef747 _llgo_main.T: - 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.2dfd569f3adc24093441039e317711c8 __llgo_coro_func_descriptor_v1.method-value.fc5e3b988045793d.c31f6a3d6adae06151afe0e079fd6339 - 1 main.m _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.4c594ddf5aa65bd4f6277ec2fc0bcb71 __llgo_coro_func_descriptor_v1.method-value.1a7f7fc69088cda8.c31f6a3d6adae06151afe0e079fd6339 + 0 M _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.4b7802572739b661e00b79e0b82a661d __llgo_coro_func_descriptor_v1.method-value.7867ba42c0fc8399.779cffa94cfa288d5a1e6954a0b0a271 + 1 main.m _llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac __llgo_coro_method_raw_trap_v1.33f0dbd5d697dc5f0e5720a4b709e78d __llgo_coro_func_descriptor_v1.method-value.0c64f063f4a29ddb.779cffa94cfa288d5a1e6954a0b0a271 [InterfaceInfo] github.com/goplus/llgo/runtime/internal/lib/reflect.iface$mD8cc0P9iPHqG1cgYNbFpshv9b41oJ45HmjD5KeBlWw: diff --git a/cl/_testmeta/typechildren_basic/meta-expect.txt b/cl/_testmeta/typechildren_basic/meta-expect.txt index 01bb27962e..44e89d6255 100644 --- a/cl/_testmeta/typechildren_basic/meta-expect.txt +++ b/cl/_testmeta/typechildren_basic/meta-expect.txt @@ -32,14 +32,14 @@ _llgo_string: *_llgo_string: _llgo_string github.com/goplus/llgo/runtime/internal/runtime.memequalptr -__llgo_coro_root_factory_descriptor_v1.8e7286d3fb2e877452a71a7e8e142afc: - __llgo_coro_root_factory_v1.8e7286d3fb2e877452a71a7e8e142afc -__llgo_coro_root_factory_v1.8e7286d3fb2e877452a71a7e8e142afc: +__llgo_coro_root_factory_descriptor_v1.735cd69e68431e7a9330d55371988227: + __llgo_coro_root_factory_v1.735cd69e68431e7a9330d55371988227 +__llgo_coro_root_factory_v1.735cd69e68431e7a9330d55371988227: main.main$coro -__llgo_coro_root_package_v1.02e5ae238854b66dc913581f9da6ff18: - __llgo_coro_root_package_v1.02e5ae238854b66dc913581f9da6ff18.entries -__llgo_coro_root_package_v1.02e5ae238854b66dc913581f9da6ff18.entries: - __llgo_coro_root_factory_descriptor_v1.8e7286d3fb2e877452a71a7e8e142afc +__llgo_coro_root_package_v1.4ff5c42e5a09c77f118b8a510b8cf11b: + __llgo_coro_root_package_v1.4ff5c42e5a09c77f118b8a510b8cf11b.entries +__llgo_coro_root_package_v1.4ff5c42e5a09c77f118b8a510b8cf11b.entries: + __llgo_coro_root_factory_descriptor_v1.735cd69e68431e7a9330d55371988227 _llgo_int: *_llgo_int github.com/goplus/llgo/runtime/internal/runtime.memequal64 @@ -60,21 +60,20 @@ _llgo_struct$Z-8Mj1VAYg5xS_jUvJKfmUcA_2fP_OEHpanbgA_46rE$fields: _llgo_int _llgo_main.Inner llvm.compiler.used: - __llgo_coro_library_effect_v6.3915b734a7ca075d21cecdc003bb6b58 + __llgo_coro_library_effect_v9.03dfbc0f7de1820caffe779169530e3c llvm.used: - __llgo_coro_root_factory_descriptor_v1.8e7286d3fb2e877452a71a7e8e142afc - __llgo_coro_root_package_v1.02e5ae238854b66dc913581f9da6ff18 + __llgo_coro_root_factory_descriptor_v1.735cd69e68431e7a9330d55371988227 + __llgo_coro_root_package_v1.4ff5c42e5a09c77f118b8a510b8cf11b main.init: main.init$guard main.main$coro: __llgo_coro_complete_prepare_v2 __llgo_coro_frame_alloc_v1 - __llgo_coro_frame_descriptor_v1.8e7286d3fb2e877452a71a7e8e142afc + __llgo_coro_frame_descriptor_v1.735cd69e68431e7a9330d55371988227 __llgo_coro_frame_free_v1 - __llgo_coro_frame_publish_v1 + __llgo_coro_frame_publish_v3 __llgo_coro_run_decision_take_zero_v1 _llgo_main.Outer - github.com/goplus/llgo/runtime/internal/runtime.AllocU llvm.coro.align.i64 llvm.coro.alloc llvm.coro.begin @@ -83,10 +82,16 @@ main.main$coro: llvm.coro.id llvm.coro.size.i64 llvm.coro.suspend + llvm.fake.use llvm.trap main.use +main.main$outcome: + _llgo_main.Outer + main.use [UseIface] main.main$coro: _llgo_main.Outer +main.main$outcome: + _llgo_main.Outer diff --git a/cl/_testrt/tpunsafe/in.go b/cl/_testrt/tpunsafe/in.go index eb445281de..271fe28a8d 100644 --- a/cl/_testrt/tpunsafe/in.go +++ b/cl/_testrt/tpunsafe/in.go @@ -44,34 +44,34 @@ func (m *M[T]) check(align, offset1, offset2 uintptr) { // CHECK-LABEL: define ptr @"main.main$coro"(ptr %0, ptr %1){{.*}} { // CHECK: call ptr @"main.(*M[bool]).check$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"main.(*M[int64]).check$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK-LABEL: define linkonce ptr @"main.(*M[bool]).check$coro"(ptr %0, ptr %1, ptr %2, i64 %3, i64 %4, i64 %5){{.*}} { // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK-LABEL: define linkonce ptr @"main.(*M[int64]).check$coro"(ptr %0, ptr %1, ptr %2, i64 %3, i64 %4, i64 %5){{.*}} { // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 // CHECK: call ptr @"{{.*}}/runtime/internal/runtime.PrintUint$coro" -// CHECK: call void @__llgo_coro_await_prepare_v3 +// CHECK: call i1 @__llgo_coro_await_prepare_inline_v4 From dcf1f81db71dd6936e79e19ddeace79705e1c356 Mon Sep 17 00:00:00 2001 From: Li Jie Date: Sat, 15 Aug 2026 01:36:59 +0800 Subject: [PATCH 3/4] docs(coro): record fused await performance checkpoint --- doc/coro-ir-design.md | 11 +++++---- doc/coro-performance-baseline.md | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/doc/coro-ir-design.md b/doc/coro-ir-design.md index 1b67fa28ef..0d1ac309ea 100644 --- a/doc/coro-ir-design.md +++ b/doc/coro-ir-design.md @@ -799,8 +799,9 @@ defer/recover/主动Goexit producer需要统一cleanup transaction;function va ```text frame create/publish spawn begin/commit -await prepare -await inline execute/commit +await prepare/inline select +await inline finish +await destroy/consume or resumed consume operation prepare/park run-decision take result reconcile/take/discard @@ -810,19 +811,19 @@ frame final suspend/free 新增 timer、poll、host 或 worker source不应要求增加 IR opcode;只有出现新的语言控制语义或跨层ownership contract时才扩展 IR schema。 -`await inline execute/commit`不是第二种call recipe。ProgramIR/physical plan仍只选择一次managed child await;统一emitter在现有`await prepare -> await consume`之间插入一个target-neutral eager hook和条件suspend。它必须满足以下gate: +inline await不是第二种call recipe。ProgramIR/physical plan仍只选择一次managed child await;统一emitter先用一个runtime transaction完成completion arm和bounded inline选择,再在生成的静态caller中发出`llvm.coro.resume/done`。同步完成时,caller发出`llvm.coro.destroy`,随后由一个runtime transaction完成physical destroy receipt、parent reactivate和completion consume;真实suspend或depth refusal则stack-cut,并在scheduler恢复parent后使用同一个slow consume。fast和slow status通过一个frame slot汇合到唯一的completion switch。它必须满足以下gate: - hook参数由编译时已知的`G/parent/child`直接注入,不从函数地址或handle反向提取; - fast与slow路径使用同一个child body、result slots、completion status和cleanup CFG; - slow路径只有在所有nested native resume完全unwind后才允许scheduler dispatch; - immediate child必须是exact parent completion edge,leaf ancestry每一边都由frame header与completion record共同证明; -- depth bound只允许fail-open到原有scheduler await,不允许改变pending transaction; +- depth bound只允许留下规范的`pendingAwait`并fail-open到原有scheduler路径,不允许产生第二份或半提交transaction; - 同步完成热路径只能做O(1) direct-edge/depth归纳检查;完整ancestry audit留在真实suspend、event和foreign边界; - panic/defer/recover/Goexit、task cancellation、preemption、dynamic dispatch和foreign handoff必须各有native E2E gate; - native与wasm pre-/post-CoroSplit都必须证明条件suspend仍存在,不能把eager路径错误优化成保留host stack的continuation; - physical descriptor digest和required runtime root必须包含hook identity,package/archive不能只保存旧await ABI摘要。 -runtime core只返回`Declined/Started/Suspend/Destroy`状态并维护frame ownership;`llvm.coro.resume/done/destroy`仍只存在于target runtime adapter。因而WASM、RTOS和baremetal可以使用相同状态机,只需提供各自已有的handle intrinsic与executor入口,不引入pthread、libuv或BDWGC依赖。 +runtime core只返回`Declined/Started/Suspend/Destroy`状态并维护frame/completion ownership;`llvm.coro.resume/done/destroy`只存在于编译器生成的caller,使LLVM 22能够看见完整静态handle lifetime并执行frame elision。因而WASM、RTOS和baremetal可以复用同一状态机和同一LLVM lowering,只需提供各自的executor/event入口,不引入pthread、libuv或BDWGC依赖。 compiler/runtime内部ABI可以进一步直接传稳定 `Frame*` 或等价 `FrameRef`。当前frame allocation已经在LLVM storage前保存back-pointer,但 `PrepareAwait/Complete/Yield/Park/ParkSet` 仍按handle在线性frame链中执行 `findFrame`。深structured-await链会把本应O(1)的transition变成线性查找。 diff --git a/doc/coro-performance-baseline.md b/doc/coro-performance-baseline.md index a6e8aebaf5..95b4830a68 100644 --- a/doc/coro-performance-baseline.md +++ b/doc/coro-performance-baseline.md @@ -1848,3 +1848,43 @@ parent failed 1 of 20 isolated runs with the same bare `abort trap`, while the candidate reproduced a similar rate. It does not exercise the deferred syscall path, so this checkpoint does not claim to fix or regress that independent native-fleet race. + +### Fused synchronous child-transaction checkpoint + +The 2026-08-15 LLVM 22-only candidate starts at merge +`6d3d11fd6feda125382d57780d03a57571454370` and reduces the dominant +synchronous managed-child transaction without adding a second call recipe. The +compiler-visible ABI now combines completion preparation with bounded inline +selection, and combines the allocation-elided physical-destroy receipt with +parent reactivation and terminal completion consumption. Generated code still +owns `llvm.coro.resume/done/destroy`, so LLVM retains the complete static handle +lifetime. A real yield/park, depth refusal, dynamic frame, panic/recover, +Goexit, cancellation, or retained panic trace uses the existing fully checked +transactions. + +The old common path performed separate prepare, begin, physical-destroy commit, +logical-destroy commit, and completion-consume calls. The new common path uses +prepare/inline-select, finish, and destroy/consume calls. Both the genuinely +resumed path and the fused path store one status slot and enter the same outcome +switch; cancellation retains its separate exactly-once consume edge. + +The parent and candidate were built from the same `io_workload` source with +independent caches, full LTO, stripped output, Go 1.26.5, and LLVM 22.1.8 on +Darwin arm64. Nine 5,000-operation standard-file runs produced these stable +hardware-counter medians: + +| Metric | parent | fused candidate | delta | +| --- | ---: | ---: | ---: | +| retired instructions | 1,244,109,625 | 1,153,042,521 | -7.32% | +| cycles | 449,759,850 | 442,010,131 | -1.72% | +| stripped file bytes | 7,797,952 | 7,667,072 | -130,880 (-1.68%) | +| Mach-O `__text` bytes | 4,152,648 | 4,073,188 | -79,460 (-1.91%) | + +The retired-instruction ranges were 1,238,650,207--1,250,721,649 for the +parent and 1,142,367,052--1,163,670,472 for the candidate. Wall-clock file +timings remained noisy on the shared host, so this checkpoint does not claim a +stable wall-time percentage. Small actual-execution gates pass for standard +file I/O, direct file syscalls, a sole-M blocking pipe whose writer first parks +on a real timer, and loopback TCP. Runtime-core tests cover allocation-elided +and dynamic destruction, panic/recover compatibility, slow yield, nesting, and +the depth-bound scheduler fallback. From 4c7e116612d59d6d6ecd50d56b930a6cc0b56e68 Mon Sep 17 00:00:00 2001 From: Li Jie Date: Sat, 15 Aug 2026 01:41:40 +0800 Subject: [PATCH 4/4] fix(coro): keep runtime source islands independent --- .../internal/runtime/coro_panic_payload.go | 21 +++++++++++++++++++ runtime/internal/runtime/coro_run_slice.go | 16 -------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/runtime/internal/runtime/coro_panic_payload.go b/runtime/internal/runtime/coro_panic_payload.go index 479f77876f..aa37a0d7a2 100644 --- a/runtime/internal/runtime/coro_panic_payload.go +++ b/runtime/internal/runtime/coro_panic_payload.go @@ -119,6 +119,27 @@ func __llgo_coro_await_prepare_inline_v4(g, parent, child unsafe.Pointer, mode u } } +// __llgo_coro_await_inline_destroy_consume_v4 consumes the child outcome while +// its exact destroy receipt is still adjacent to generated llvm.coro.destroy. +// Panic/recover fallbacks may stage an old retained trace for release, so this +// payload adapter owns that final allocation handoff as part of the same ABI. +// +//export __llgo_coro_await_inline_destroy_consume_v4 +func __llgo_coro_await_inline_destroy_consume_v4(g, parent, child, typeOut, dataOut unsafe.Pointer) uint32 { + if typeOut == nil || dataOut == nil { + coroRuntimeAbort("invalid coroutine inline child outcome output") + } + task := (*coro.G)(g) + snapshot, ok := coro.CommitInlineAwaitPhysicalDestroyCompiler(task, parent, child) + if !ok { + coroRuntimeAbort("invalid coroutine inline physical child completion") + } + coroReleaseDiscardedPanicTraceV1(task) + *(*unsafe.Pointer)(typeOut) = snapshot.TypeWord + *(*unsafe.Pointer)(dataOut) = snapshot.DataWord + return uint32(snapshot.Status) +} + // __llgo_coro_recover_take_v1 implements one syntactic recover in the active // physical frame. A valid but non-direct call writes a nil empty interface; // malformed scheduler ownership aborts instead of consulting legacy TLS. diff --git a/runtime/internal/runtime/coro_run_slice.go b/runtime/internal/runtime/coro_run_slice.go index 1539ec8a17..545d6e9ac4 100644 --- a/runtime/internal/runtime/coro_run_slice.go +++ b/runtime/internal/runtime/coro_run_slice.go @@ -60,22 +60,6 @@ func __llgo_coro_await_inline_finish_v2(g, parent, child unsafe.Pointer, done bo } } -//export __llgo_coro_await_inline_destroy_consume_v4 -func __llgo_coro_await_inline_destroy_consume_v4(g, parent, child, typeOut, dataOut unsafe.Pointer) uint32 { - if typeOut == nil || dataOut == nil { - coroRuntimeAbort("invalid coroutine inline child outcome output") - } - task := (*coro.G)(g) - snapshot, ok := coro.CommitInlineAwaitPhysicalDestroyCompiler(task, parent, child) - if !ok { - coroRuntimeAbort("invalid coroutine inline physical child completion") - } - coroReleaseDiscardedPanicTraceV1(task) - *(*unsafe.Pointer)(typeOut) = snapshot.TypeWord - *(*unsafe.Pointer)(dataOut) = snapshot.DataWord - return uint32(snapshot.Status) -} - type coroProgramLifecycleV1 uint8 const (