sun::runtime

namespace · Source (opens in a new tab)

Describes compiler-prepared address indexes used by allocation-free reporting.

Allocation-free exception transport shared by generated code.

Declares the allocation-free trace capture shared by current-stack and exception reporting.

Shares the source-index layout between object emission and runtime lookup.

Captures bounded traces into caller-owned storage.

Provides fixed-field views of the complete structs generated for Sun code.

Thread storage: [target + padding] [unwind header] [value header] [frames] Catch storage: [value header] [frames]

Generated structs include inline frame arrays. These C++ views omit those arrays so one precompiled runtime supports every configured capacity. Frame capacity comes from the linked program, not from sizeof these views. The base record lives for the thread's lifetime. Destructor records live on the stack until their nested propagation finishes. Taking an exception moves its payload and populated frames into catch storage and clears the source type.

Structs

Functions

captureStackTrace

public · function · Source (opens in a new tab)

void sun::runtime::captureStackTrace(StackTrace &trace, std::uintptr_t callerReturnAddress) noexcept

Captures frames from the requested caller into the trailing address storage.

Related: StackTrace

visitExceptionSource

public · function · Source (opens in a new tab)

bool sun::runtime::visitExceptionSource(std::uintptr_t address, ExceptionFrameVisitor visitor, void *context) noexcept

Resolves an address without allocation; invokes the visitor for each inline frame.

Related: ExceptionFrameVisitor

Variables

exceptionClass

public · variable · Source (opens in a new tab)

std::uint64_t sun::runtime::exceptionClass = 0x53554e0045584300ULL

No documentation comment.

exceptionPayloadCapacity

public · variable · Source (opens in a new tab)

std::size_t sun::runtime::exceptionPayloadCapacity =
    sun::abi::exceptions::payloadCapacity

No documentation comment.

Related: sun::abi::exceptions::payloadCapacity

reportNameLimit

public · variable · Source (opens in a new tab)

std::size_t sun::runtime::reportNameLimit = 160

No documentation comment.

reportWorkspaceSize

public · variable · Source (opens in a new tab)

std::size_t sun::runtime::reportWorkspaceSize = 32 * 1024

No documentation comment.

Enums

TraceStatus

public · enum · Source (opens in a new tab)

enum class sun::runtime::TraceStatus : std::uint32_t

Distinguishes a depth limit from an incomplete or intentionally disabled walk.

Complete

Complete = 0

No documentation comment.

Truncated

Truncated = 1

No documentation comment.

Partial

Partial = 2

No documentation comment.

Unavailable

Unavailable = 3

No documentation comment.

Disabled

Disabled = 4

No documentation comment.

Type Aliases

ExceptionFrameVisitor

public · typedef · Source (opens in a new tab)

using sun::runtime::ExceptionFrameVisitor =  void (*)(const ExceptionFrameView&,
                                       void*) noexcept

Formats resolved metadata while its owning module remains registered.

Related: ExceptionFrameView