sun::codegen::CodegenState::ReceiverGuard

sun::codegen::CodegenState::ReceiverGuard

struct · Source (opens in a new tab)

struct sun::codegen::CodegenState::ReceiverGuard

Restores the receiver — this and the owning class — on the way out.

Used where a class definition emits the bodies of its own methods.

Public Functions

ReceiverGuard

ReceiverGuard(CodegenState &s)

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

sun::codegen::CodegenState::ReceiverGuard::ReceiverGuard(CodegenState &s)

Saves the active method receiver for restoration when the guard leaves scope.

Related: CodegenState

ReceiverGuard(const ReceiverGuard &)=delete

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

sun::codegen::CodegenState::ReceiverGuard::ReceiverGuard(const ReceiverGuard &)=delete

Saves the active method receiver for restoration when the guard leaves scope.

operator=

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

ReceiverGuard & sun::codegen::CodegenState::ReceiverGuard::operator=(const ReceiverGuard &)=delete

Disallows assignment so ownership and object identity cannot be duplicated.

Related: ReceiverGuard

~ReceiverGuard

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

sun::codegen::CodegenState::ReceiverGuard::~ReceiverGuard()

Restores the previous method receiver when the guard leaves scope.

Public Fields

savedClass

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

std::shared_ptr<sun::types::ClassType> sun::codegen::CodegenState::ReceiverGuard::savedClass

No documentation comment.

Related: sun::types::ClassType

savedThisPtr

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

llvm::Value* sun::codegen::CodegenState::ReceiverGuard::savedThisPtr

No documentation comment.

state

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

CodegenState& sun::codegen::CodegenState::ReceiverGuard::state

No documentation comment.

Related: CodegenState