Skip to content
← Back

src/semantic/dotnet/assembly_references.ghul

1
namespace Semantic.DotNet is
2
// What an emitted assembly reference records for each referenced
3
// assembly: the version and public key token of the assembly that was
4
// actually loaded under that name. The emitter asks when it first
5
// writes a reference to an assembly, so an assembly nothing refers to
6
// gets no row, and nothing from one compile carries into the next.
7
class REFERENCED_ASSEMBLIES(
8
_loaded_version: (string) -> string?,
9
_loaded_public_key_token: (string) -> ubyte[]?
10
) is
11
// For a name no loaded assembly answers to.
12
DEFAULT_VERSION: string static => "8:0:0:0"
13
14
version_of(name: string) -> string =>
15
_loaded_version(name) ?? DEFAULT_VERSION
16
17
public_key_token_of(name: string) -> ubyte[]? =>
18
_loaded_public_key_token(name)
19
si
20
si