Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

curchain_b source realm

Package curchain\_b is the terminal hop in the multi-level cross-call chain test helpers. It prints the full captured...

Overview

Package curchain_b is the terminal hop in the multi-level cross-call chain test helpers. It prints the full captured chain visible from this realm, and asserts parity with unsafe.CurrentRealm() / unsafe.PreviousRealm() at the cross-callee position.

Functions 1

func B

crossing Action
1func B(cur realm)
source

B is a crossing function that prints the captured chain reached via .Previous() walks and asserts parity with unsafe.CurrentRealm() / unsafe.PreviousRealm() at the cross-callee position. The chain-root case is covered separately by zrealm_cur_parity.

Chain layout for callsite main -> curchain_a.A -> curchain_b.B:

Example
1cur                  = B
2cur.Previous()       = A
3cur.Previous()^2     = main
4cur.Previous()^3     = EOA origin (PkgPath() == "")
5cur.Previous()^4     = panics (origin has no further previous)

Imports 1

  • chain/runtime/unsafe stdlib

Source Files 2