sun::codegen::intrinsics::IntrinsicsGenerator
class · Source (opens in a new tab)
class sun::codegen::intrinsics::IntrinsicsGeneratorEmits every intrinsic and built-in call.
Holds the thread helpers it needs for _spawn and _thread_join; everything else it reaches through the shared state or the visitor it was given.
Public Functions
- IntrinsicsGenerator
- codegenAccept
- codegenAcceptFd
- codegenAddressOfIntrinsic
- codegenAtomicCmpxchgIntrinsic
- codegenAtomicFenceIntrinsic
- codegenAtomicFetchOpIntrinsic
- codegenAtomicLoadIntrinsic
- codegenAtomicStoreIntrinsic
- codegenBind
- codegenBindIPv4
- codegenBitcastIntrinsic
- codegenBswapIntrinsic
- codegenBuiltin
- codegenConnect
- codegenConnectIPv4
- codegenConvertIntrinsic
- codegenCountZerosIntrinsic
- codegenDeinitIntrinsic
- codegenEnumFromIntIntrinsic
- codegenFileClose
- codegenFileOpen
- codegenFileRead
- codegenFileWrite
- codegenFreeIntrinsic
- codegenFstat
- codegenFsync
- codegenFtruncate
- codegenFutexWaitIntrinsic
- codegenFutexWakeIntrinsic
- codegenGetSockNameIPv4
- codegenGetSockOpt
- codegenInitIntrinsic
- codegenIsIntrinsic
- codegenListen
- codegenLoadI64Intrinsic
- codegenLoadIntrinsic
- codegenLseek
- codegenMallocIntrinsic
- codegenMemcpyIntrinsic
- codegenMemmoveIntrinsic
- codegenMemsetIntrinsic
- codegenMkdir
- codegenMulHiU64Intrinsic
- codegenPrintBytes
- codegenPrintChar
- codegenPrintF64
- codegenPrintI32
- codegenPrintI64
- codegenPrintNewline
- codegenPrintString
- codegenPrintU64
- codegenPtrAsRawIntrinsic
- codegenPtrOffsetIntrinsic
- codegenRead
- codegenRecv
- codegenRecvFromIPv4
- codegenRename
- codegenRmdir
- codegenSend
- codegenSendToIPv4
- codegenSetSockOpt
- codegenShutdown
- codegenSizeofIntrinsic
- codegenSocket
- codegenSpawnIntrinsic
- codegenStoreI64Intrinsic
- codegenStoreIntrinsic
- codegenTargetIsIntrinsic
- codegenThreadJoinIntrinsic
- codegenToRefIntrinsic
- codegenUnlink
- codegenWrite
- getThreadContextStruct
- isBuiltinFunction
- operator=
IntrinsicsGenerator
IntrinsicsGenerator(const IntrinsicsGenerator &)=delete
public · function · Source (opens in a new tab)
sun::codegen::intrinsics::IntrinsicsGenerator::IntrinsicsGenerator(const IntrinsicsGenerator &)=deleteBinds built-in operation generation to the shared visitor and state.
IntrinsicsGenerator(sun::codegen::CodegenState &state, sun::codegen::CodegenVisitor &gen)
public · function · Source (opens in a new tab)
sun::codegen::intrinsics::IntrinsicsGenerator::IntrinsicsGenerator(sun::codegen::CodegenState &state, sun::codegen::CodegenVisitor &gen)Binds built-in operation generation to the shared visitor and state.
Related: sun::codegen::CodegenState, sun::codegen::CodegenVisitor
codegenAccept
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenAccept(const CallExprAST &expr)Emits code to accept an incoming socket connection.
Related: CallExprAST
codegenAcceptFd
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenAcceptFd(const CallExprAST &expr)Emits code to accept a connection and return its descriptor.
Related: CallExprAST
codegenAddressOfIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenAddressOfIntrinsic(const std::vector< std::unique_ptr< ExprAST > > &args)Emits LLVM code that obtains the address of a value.
Related: ExprAST
codegenAtomicCmpxchgIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenAtomicCmpxchgIntrinsic(const CallExprAST &expr, unsigned bitWidth, bool signedValues, const char *name)Atomic intrinsics (in atomic.cpp).
Emits compare-and-exchange for one supported atomic integer width.
Related: CallExprAST, atomic.cpp
codegenAtomicFenceIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenAtomicFenceIntrinsic(const CallExprAST &expr, bool acquire)Emits an atomic fence using the requested memory ordering.
Emits an explicit acquire or release fence.
Related: CallExprAST
codegenAtomicFetchOpIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenAtomicFetchOpIntrinsic(const CallExprAST &expr, unsigned bitWidth, bool signedValues, bool subtract, const char *name)Emits an atomic read-modify-write operation and returns its previous value.
Emits fetch-add or fetch-sub for one supported atomic integer width.
Related: CallExprAST
codegenAtomicLoadIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenAtomicLoadIntrinsic(const CallExprAST &expr, unsigned bitWidth, const char *name)Emits an atomic load using the requested memory ordering.
Emits an acquire load for one supported atomic integer width.
Related: CallExprAST
codegenAtomicStoreIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenAtomicStoreIntrinsic(const CallExprAST &expr, unsigned bitWidth, bool signedValues, const char *name)Emits an atomic store using the requested memory ordering.
Emits a release store for one supported atomic integer width.
Related: CallExprAST
codegenBind
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenBind(const CallExprAST &expr)Emits code to bind a socket to a local address.
Related: CallExprAST
codegenBindIPv4
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenBindIPv4(const CallExprAST &expr)High-level IPv4 socket helpers (build sockaddr_in internally).
Related: CallExprAST
codegenBitcastIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenBitcastIntrinsic(TypePtr targetType, const std::vector< std::unique_ptr< ExprAST > > &args)Emits LLVM code that reinterprets a value with the requested representation.
codegenBswapIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenBswapIntrinsic(const CallExprAST &expr, unsigned bitWidth)Shared by _bswap_u16, _bswap_u32 and _bswap_u64.
Related: CallExprAST
codegenBuiltin
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenBuiltin(const std::string &name, const CallExprAST &expr)Emits LLVM code that dispatches a recognized built-in operation.
Related: CallExprAST
codegenConnect
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenConnect(const CallExprAST &expr)Emits code to connect a socket to a remote address.
Related: CallExprAST
codegenConnectIPv4
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenConnectIPv4(const CallExprAST &expr)Emits code to connect to an IPv4 address.
Related: CallExprAST
codegenConvertIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenConvertIntrinsic(TypePtr targetType, const std::vector< std::unique_ptr< ExprAST > > &args)Emits LLVM code that converts a value to the requested type.
codegenCountZerosIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenCountZerosIntrinsic(const CallExprAST &expr, bool leading)Emits LLVM code that counts leading or trailing zero bits.
Related: CallExprAST
codegenDeinitIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenDeinitIntrinsic(TypePtr typeArg, const std::vector< std::unique_ptr< ExprAST > > &args)Emits LLVM code that destroys a value in supplied storage.
codegenEnumFromIntIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenEnumFromIntIntrinsic(const sun::ast::GenericCallAST &expr)Decode an integer as an enum, returning None for unknown values.
Related: sun::ast::GenericCallAST
codegenFileClose
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenFileClose(const CallExprAST &expr)Emits code to close a file handle.
Related: CallExprAST
codegenFileOpen
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenFileOpen(const CallExprAST &expr)File I/O built-ins.
Related: CallExprAST
codegenFileRead
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenFileRead(const CallExprAST &expr)Emits code to read bytes from a file handle.
Related: CallExprAST
codegenFileWrite
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenFileWrite(const CallExprAST &expr)Emits code to write bytes to a file handle.
Related: CallExprAST
codegenFreeIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenFreeIntrinsic(const CallExprAST &expr)Emits LLVM code that releases raw memory.
Related: CallExprAST
codegenFstat
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenFstat(const CallExprAST &expr)Emits code to read metadata for an open file.
Related: CallExprAST
codegenFsync
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenFsync(const CallExprAST &expr)Emits code to flush a file to persistent storage.
Related: CallExprAST
codegenFtruncate
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenFtruncate(const CallExprAST &expr)Emits code to change the length of a file.
Related: CallExprAST
codegenFutexWaitIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenFutexWaitIntrinsic(const CallExprAST &expr)Futex intrinsics (in atomic.cpp).
Related: CallExprAST, atomic.cpp
codegenFutexWakeIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenFutexWakeIntrinsic(const CallExprAST &expr)Emits LLVM code that wakes threads waiting on a futex.
Related: CallExprAST
codegenGetSockNameIPv4
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenGetSockNameIPv4(const CallExprAST &expr)Emits code to read the local IPv4 socket address.
Related: CallExprAST
codegenGetSockOpt
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenGetSockOpt(const CallExprAST &expr)Emits code to read a socket option.
Related: CallExprAST
codegenInitIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenInitIntrinsic(TypePtr typeArg, const std::vector< std::unique_ptr< ExprAST > > &args, const std::vector< sun::semantic_analysis::ArgConversion > &conversions, sun::semantic_analysis::DeclarationId constructor)Emits LLVM code that constructs a value in supplied storage.
Related: TypePtr, ExprAST, sun::semantic_analysis::ArgConversion, sun::semantic_analysis::DeclarationId
codegenIsIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenIsIntrinsic(const TypePtr &target, const std::vector< std::unique_ptr< ExprAST > > &args)Emits LLVM code that tests whether a value matches a type.
codegenListen
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenListen(const CallExprAST &expr)Emits code to start listening for socket connections.
Related: CallExprAST
codegenLoadI64Intrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenLoadI64Intrinsic(const CallExprAST &expr)Emits code to load a wide integer from an address.
Related: CallExprAST
codegenLoadIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenLoadIntrinsic(TypePtr typeArg, const std::vector< std::unique_ptr< ExprAST > > &args)Emits LLVM code that loads a typed value from an address.
codegenLseek
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenLseek(const CallExprAST &expr)Extended file I/O built-ins.
Related: CallExprAST
codegenMallocIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenMallocIntrinsic(const CallExprAST &expr)Emits LLVM code that allocates raw memory.
Related: CallExprAST
codegenMemcpyIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenMemcpyIntrinsic(const CallExprAST &expr)Emits LLVM code that copies a range of memory bytes.
Related: CallExprAST
codegenMemmoveIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenMemmoveIntrinsic(const CallExprAST &expr)Emit a byte copy that permits overlapping source and destination.
Related: CallExprAST
codegenMemsetIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenMemsetIntrinsic(const CallExprAST &expr)Emits LLVM code that fills a range of memory bytes.
Related: CallExprAST
codegenMkdir
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenMkdir(const CallExprAST &expr)Emits code to create a directory.
Related: CallExprAST
codegenMulHiU64Intrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenMulHiU64Intrinsic(const CallExprAST &expr)Bit intrinsics (in intrinsics/bits.cpp).
Related: CallExprAST, intrinsics/bits.cpp
codegenPrintBytes
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenPrintBytes(const CallExprAST &expr)Emits code to write a byte sequence to standard output.
Related: CallExprAST
codegenPrintChar
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenPrintChar(const CallExprAST &expr)Emits code to write a character to standard output.
Related: CallExprAST
codegenPrintF64
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenPrintF64(const CallExprAST &expr)Emits code to print a floating-point value.
Related: CallExprAST
codegenPrintI32
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenPrintI32(const CallExprAST &expr)Print built-ins.
Related: CallExprAST
codegenPrintI64
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenPrintI64(const CallExprAST &expr)Emits code to print a signed integer.
Related: CallExprAST
codegenPrintNewline
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenPrintNewline()Emits code to write a newline to standard output.
codegenPrintString
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenPrintString(const CallExprAST &expr)Emits code to write a string to standard output.
Related: CallExprAST
codegenPrintU64
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenPrintU64(const CallExprAST &expr)Emits code to print an unsigned integer.
Related: CallExprAST
codegenPtrAsRawIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenPtrAsRawIntrinsic(const std::vector< std::unique_ptr< ExprAST > > &args)Emits LLVM code that exposes an address as a raw pointer.
Related: ExprAST
codegenPtrOffsetIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenPtrOffsetIntrinsic(const CallExprAST &expr)Emits LLVM code that advances a pointer by a byte offset.
Related: CallExprAST
codegenRead
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenRead(const CallExprAST &expr)Emits code to read bytes from a file descriptor.
Related: CallExprAST
codegenRecv
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenRecv(const CallExprAST &expr)Emits code to receive bytes from a socket.
Related: CallExprAST
codegenRecvFromIPv4
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenRecvFromIPv4(const CallExprAST &expr)Emits code to receive a datagram and its IPv4 sender address.
Related: CallExprAST
codegenRename
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenRename(const CallExprAST &expr)Emits code to rename a filesystem entry.
Related: CallExprAST
codegenRmdir
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenRmdir(const CallExprAST &expr)Emits code to remove an empty directory.
Related: CallExprAST
codegenSend
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenSend(const CallExprAST &expr)Emits code to send bytes through a socket.
Related: CallExprAST
codegenSendToIPv4
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenSendToIPv4(const CallExprAST &expr)Emits code to send a datagram to an IPv4 address.
Related: CallExprAST
codegenSetSockOpt
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenSetSockOpt(const CallExprAST &expr)Emits code to change a socket option.
Related: CallExprAST
codegenShutdown
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenShutdown(const CallExprAST &expr)Emits code to shut down socket communication.
Related: CallExprAST
codegenSizeofIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenSizeofIntrinsic(TypePtr typeArg)Generic intrinsics codegen (in intrinsics/generic.cpp).
Related: TypePtr, intrinsics/generic.cpp
codegenSocket
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenSocket(const CallExprAST &expr)Network socket built-ins.
Related: CallExprAST
codegenSpawnIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenSpawnIntrinsic(const TypePtr &lambdaSunType, const TypePtr &contextPtrType, const std::vector< std::unique_ptr< ExprAST > > &args, const std::vector< sun::semantic_analysis::ArgConversion > &conversions)Generates IR for _spawn<F>(fn, args...).
param
contextPtrType: Pointer type of the shared thread context.
Builds the thread context on the heap — it must outlive this frame — moves the arguments into an argument block beside it, and starts the thread on a trampoline built for this lambda's signature. Hands back the context pointer; stdlib spawn wraps that in the Thread<T> handle that owns it, so the thread is joined when that handle is dropped.
param
-
lambdaSunType: The lambda type F was inferred as. -
args: The lambda followed by the arguments to move into the thread. -
conversions: One ArgConversion per entry ofargs.
return: The thread context pointer.
Related: TypePtr, ExprAST, sun::semantic_analysis::ArgConversion, ArgConversion
codegenStoreI64Intrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenStoreI64Intrinsic(const CallExprAST &expr)Emits code to store a wide integer at an address.
Related: CallExprAST
codegenStoreIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenStoreIntrinsic(TypePtr typeArg, const std::vector< std::unique_ptr< ExprAST > > &args)Emits LLVM code that stores a typed value at an address.
codegenTargetIsIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenTargetIsIntrinsic(const CallExprAST &expr)Target intrinsics (in builtins.cpp).
Related: CallExprAST, builtins.cpp
codegenThreadJoinIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenThreadJoinIntrinsic(const TypePtr &resultType, const std::vector< std::unique_ptr< ExprAST > > &args, bool dropResult)Generates IR for _thread_join<T>(ctx) and _thread_join_drop<T>(ctx).
Blocks until the thread has exited, then releases its context. Reading the result out of the slot is a move: the caller takes over whatever it owns. With dropResult nobody is taking it, so what the slot holds is dropped in place first — freeing the slot alone would release the result's own bytes and nothing they point at.
param
-
resultType: Sun type of the thread's result (T in Thread<T>). -
args: The thread context, as a single argument. -
dropResult: Drop the result rather than hand it back.
return: The thread's result, or a non-null placeholder for void.
codegenToRefIntrinsic
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenToRefIntrinsic(const std::vector< std::unique_ptr< ExprAST > > &args)Emits LLVM code that turns a pointer into a borrowed reference.
Related: ExprAST
codegenUnlink
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenUnlink(const CallExprAST &expr)Emits code to remove a filesystem entry.
Related: CallExprAST
codegenWrite
public · function · Source (opens in a new tab)
Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegenWrite(const CallExprAST &expr)Emits code to write bytes to a file descriptor.
Related: CallExprAST
getThreadContextStruct
public · function · Source (opens in a new tab)
StructType * sun::codegen::intrinsics::IntrinsicsGenerator::getThreadContextStruct(const TypePtr &contextPtrType)The LLVM layout of std.thread.ThreadContext, read off the raw_ptr type semantic analysis resolved rather than synthesized here, so there is one definition of it and codegen never spells the class's name.
Related: TypePtr
isBuiltinFunction
public · function · Source (opens in a new tab)
bool sun::codegen::intrinsics::IntrinsicsGenerator::isBuiltinFunction(const std::string &name)Built-in intrinsics (libc calls; see intrinsics/libc.h).
The registry and dispatcher live in src/codegen/intrinsics/builtins.cpp; the codegen methods below live in the per-area files beside it.
Related: intrinsics/libc.h, src/codegen/intrinsics/builtins.cpp
operator=
public · function · Source (opens in a new tab)
IntrinsicsGenerator & sun::codegen::intrinsics::IntrinsicsGenerator::operator=(const IntrinsicsGenerator &)=deleteDisallows assignment so ownership and object identity cannot be duplicated.
Related: IntrinsicsGenerator
Private Functions
codegen
private · function · Source (opens in a new tab)
llvm::Value * sun::codegen::intrinsics::IntrinsicsGenerator::codegen(const ExprAST &expr)Emit a nested expression by handing it back to the main dispatcher.
Related: ExprAST
scopes
private · function · Source (opens in a new tab)
sun::codegen::scopes::ScopeManager & sun::codegen::intrinsics::IntrinsicsGenerator::scopes()The scope stack, for the intrinsics that drop a value in place.
Related: sun::codegen::scopes::ScopeManager
Private Fields
ctx
private · variable · Source (opens in a new tab)
sun::codegen::CodegenContext& sun::codegen::intrinsics::IntrinsicsGenerator::ctxNo documentation comment.
Related: sun::codegen::CodegenContext
gen_
private · variable · Source (opens in a new tab)
sun::codegen::CodegenVisitor& sun::codegen::intrinsics::IntrinsicsGenerator::gen_No documentation comment.
Related: sun::codegen::CodegenVisitor
module
private · variable · Source (opens in a new tab)
llvm::Module* sun::codegen::intrinsics::IntrinsicsGenerator::moduleNo documentation comment.
state_
private · variable · Source (opens in a new tab)
sun::codegen::CodegenState& sun::codegen::intrinsics::IntrinsicsGenerator::state_No documentation comment.
Related: sun::codegen::CodegenState
threadUtils
private · variable · Source (opens in a new tab)
ThreadUtils sun::codegen::intrinsics::IntrinsicsGenerator::threadUtilsNo documentation comment.
Related: ThreadUtils
typeResolver
private · variable · Source (opens in a new tab)
sun::codegen::LLVMTypeResolver& sun::codegen::intrinsics::IntrinsicsGenerator::typeResolverNo documentation comment.
Related: sun::codegen::LLVMTypeResolver