sun::semantic_analysis::PortableDeclarationKey

sun::semantic_analysis::PortableDeclarationKey

class · Source (opens in a new tab)

class sun::semantic_analysis::PortableDeclarationKey

An opaque declaration identifier shared across compiler sessions.

Functions

PortableDeclarationKey

PortableDeclarationKey(std::string encoded)

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

sun::semantic_analysis::PortableDeclarationKey::PortableDeclarationKey(std::string encoded)

Stores an encoded declaration identity that can cross compilation sessions.

PortableDeclarationKey()=default

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

sun::semantic_analysis::PortableDeclarationKey::PortableDeclarationKey()=default

Construct an unset key for declarations not yet assigned an artifact.

Public Functions

assignOriginals

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

void sun::semantic_analysis::PortableDeclarationKey::assignOriginals(const sun::ast::ExprAST &root, DeclarationTable &table, const std::string &artifactHash)

Assign source ordinals at the artifact boundary, excluding imported trees.

Related: sun::ast::ExprAST, DeclarationTable

empty

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

bool sun::semantic_analysis::PortableDeclarationKey::empty() const

Report whether the portable identity has been established.

encoding

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

const std::string & sun::semantic_analysis::PortableDeclarationKey::encoding() const

Return the canonical printable identity.

fromDeclaration

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

PortableDeclarationKey sun::semantic_analysis::PortableDeclarationKey::fromDeclaration(DeclarationId id, const DeclarationTable &table)

Derive a key from assigned source keys and concrete specialization inputs.

Related: PortableDeclarationKey, DeclarationId, DeclarationTable

fromString

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

PortableDeclarationKey sun::semantic_analysis::PortableDeclarationKey::fromString(const std::string &value)

Retain an artifact identifier unchanged; reject an unset identifier.

Related: PortableDeclarationKey

generated

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

PortableDeclarationKey sun::semantic_analysis::PortableDeclarationKey::generated(const PortableDeclarationKey &origin, const std::string &role, uint64_t slot)

Identify a generated declaration by a stable role within its origin.

Related: PortableDeclarationKey

inInstance

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

PortableDeclarationKey sun::semantic_analysis::PortableDeclarationKey::inInstance(const PortableDeclarationKey &origin, const PortableDeclarationKey &instance)

Identify a declaration cloned within one specific enclosing instance.

Related: PortableDeclarationKey

operator<

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

bool sun::semantic_analysis::PortableDeclarationKey::operator<(const PortableDeclarationKey &other) const

Order opaque identifiers for use in sorted containers.

Related: PortableDeclarationKey

operator==

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

bool sun::semantic_analysis::PortableDeclarationKey::operator==(const PortableDeclarationKey &other) const

Compares the stored values for equality.

Related: PortableDeclarationKey

original

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

PortableDeclarationKey sun::semantic_analysis::PortableDeclarationKey::original(const std::string &bundleHash, uint64_t declarationNumber)

Identify an original declaration in a content-addressed artifact.

Related: PortableDeclarationKey

specialization

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

PortableDeclarationKey sun::semantic_analysis::PortableDeclarationKey::specialization(const PortableDeclarationKey &origin, const std::vector< PortableTypeKey > &arguments, const std::optional< std::vector< PortableTypeKey > > &variadicArguments=std::nullopt)

Identify an instance by its template and concrete argument types.

Related: PortableDeclarationKey, PortableTypeKey

symbol

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

std::string sun::semantic_analysis::PortableDeclarationKey::symbol(const std::string &role) const

Derive a linker symbol for one explicitly named emission role.

Private Fields

encoded_

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

std::string sun::semantic_analysis::PortableDeclarationKey::encoded_

No documentation comment.