| const F32.Constants | [src] |
| Bias | s32 | |
| ExpBits | s32 | |
| Inf | f32 | |
| MantBits | s32 | |
| Max | f32 | |
| Min | f32 | |
| NaN | f32 | |
| NegInf | f32 | |
| Bias | s32 | |
| ExpBits | s32 | |
| Inf | f64 | |
| MantBits | s32 | |
| Max | f64 | |
| Min | f64 | |
| NaN | f64 | |
| NegInf | f64 | |
| MaxErrors | s32 | Maximum nested errors. |
| MaxTraces | s32 | Maximum error traces. |
| Max | s16 | |
| Min | s16 | |
| Max | s32 | |
| Min | s32 | |
| Max | s64 | |
| Min | s64 | |
| Max | s8 | |
| Min | s8 | |
| SafetyAll | u32 | |
| SafetyBool | u32 | |
| SafetyBoundCheck | u32 | |
| SafetyDynCast | u32 | |
| SafetyMath | u32 | |
| SafetyMemory | u32 | |
| SafetyNaN | u32 | |
| SafetyNone | u32 | |
| SafetyNullCheck | u32 | |
| SafetyOverflow | u32 | |
| SafetySwitch | u32 | |
| SafetyUnreachable | u32 | |
| Max | u16 | |
| Min | u16 | |
| Max | u32 | |
| Min | u32 | |
| Max | u64 | |
| Min | u64 | |
| Max | u8 | Max u8 value. |
| Min | u8 | Min u8 value. |
| func @abs | [src] |
| func @acos | [src] |
| func @alloc | [src] |
Returns a system allocated memory block of size bytes.
Use @free to release the allocated memory.
| func @args | [src] |
| func @as | [src] |
| func @asin | [src] |
| func @assert | [src] |
Panic if the expression is false. Typically used in tests.
| func @atan | [src] |
| func @atan2 | [src] |
| func @atomadd | [src] |
Atomic add.
| func @atomand | [src] |
Atomic and.
| func @atomcmpxchg | [src] |
Atomic 'compare and exchange'.
| func @atomor | [src] |
Atomic or.
| func @atomxchg | [src] |
Atomic exchange.
| func @atomxor | [src] |
Atomic xor.
| func @bitcountlz | [src] |
Returns the index+1 of the first set bit, starting from the left (msb). 0 if all zero.
| func @bitcountnz | [src] |
Count the number of bits set to 1.
| func @bitcounttz | [src] |
Returns the index+1 of the first set bit, starting from right (lsb). 0 if all zero.
| func @breakpoint | [src] |
Stop a bytecode execution, and launch the bytecode debugger.
| func @bytecode | [src] |
Returns true is the current execution is bytecode.
| func @byteswap | [src] |
Reverses the order of bytes in an integer.
| func @ceil | [src] |
| func @compiler | [src] |
Returns an ICompiler interface to communicate with the compiler.
| func @compilererror | [src] |
Raise a compiler error at the given source location.
| func @compilerwarning | [src] |
Raise a compiler warning at the given source location.
| func @cos | [src] |
| func @cosh | [src] |
| func @dbgalloc | [src] |
| func @err | [src] |
Returns the current raised error, or null if none.
| func @exp | [src] |
| func @exp2 | [src] |
| func @floor | [src] |
| func @free | [src] |
Free a system memory block allocated with @alloc.
| func @getcontext | [src] |
Get the current thread context.
| func @gvtd | [src] |
Returns the list of all global variables.
| func @is | [src] |
| func @log | [src] |
| func @log10 | [src] |
| func @log2 | [src] |
| func @max | [src] |
| func @memcmp | [src] |
Compare two memory blocks, and returns -1, 0 if equal, or 1.
| func @memcpy | [src] |
Copy one memory block to another address.
| func @memmove | [src] |
Move one memory block to another address.
| func @memset | [src] |
Set all bytes of a given memory block to value.
| func @min | [src] |
| func @modules | [src] |
Returns the list of all loaded modules.
| func @muladd | [src] |
Returns '(val1 * val2) + val3'.
| func @panic | [src] |
Stop the execution and panic.
| func @pinfos | [src] |
Get information about the current process.
| func @pow | [src] |
| func @print | [src] |
Basic print to console function.
| func @realloc | [src] |
Realloc a system memory block allocated with @alloc.
| func @rol | [src] |
Rotate bits left.
| func @ror | [src] |
Rotate bits right.
| func @round | [src] |
| func @rtflags | [src] |
| func @setcontext | [src] |
Replace the current thread context.
| func @sin | [src] |
| func @sinh | [src] |
| func @sqrt | [src] |
| func @strcmp | [src] |
Compare two zero terminated strings, and returns -1, 0 if equal, or 1.
| func @stringcmp | [src] |
Compares two strings, and returns true if they are equal.
| func @strlen | [src] |
Returns the length of the given 0 terminated string.
| func @sysalloc | [src] |
| func @tableof | [src] |
| func @tan | [src] |
| func @tanh | [src] |
| func @trunc | [src] |
| func @typecmp | [src] |
| namespace Swag |
| AllocatorRequest | Represents the request for a given allocator. |
| Attribute | |
| AttributeParam | |
| BaseError | This is the base of all errors. |
| BuildCfg | The current module build configuration. |
| BuildCfgBackendLLVM | LLVM backend specific options. |
| BuildCfgBackendSCBE | SCBE backend specific options. |
| BuildCfgGenDoc | This contains all options when generating documentation. |
| CVaList | |
| CompilerMessage | A message received in a #message function. |
| Context | Thread context as returned by [@context]. |
| DebugAllocator | |
| DebugAllocatorFooter | Will be put just after the returned address. |
| DebugAllocatorHeader | Will be put just before the returned address. |
| ErrorValue | Store a throw error information. |
| Gvtd | Defined a global variable that needs to be dropped when exiting. |
| Interface | |
| Module | Defined some information about a loaded module. |
| ProcessInfos | Defined some information about the current process. |
| ScratchAllocator | |
| SourceCodeLocation | Represent a part of a source code file. |
| SystemAllocator | |
| SystemError | An error raised by the system. |
| TypeInfo | Will be available for all types. |
| TypeInfoAlias | |
| TypeInfoArray | |
| TypeInfoCodeBlock | |
| TypeInfoEnum | |
| TypeInfoFunc | |
| TypeInfoGeneric | |
| TypeInfoNamespace | |
| TypeInfoNative | |
| TypeInfoPointer | |
| TypeInfoSlice | |
| TypeInfoStruct | |
| TypeInfoVariadic | |
| TypeValue | Represents a value, like a function parameter or an enum value. |
| AllocatorMode | The mode of an AllocatorRequest. |
| AttributeUsage | |
| Backend | The type of backend to use. |
| BuildCfgBackendKind | The kind of native backend to generate. |
| BuildCfgBackendOptim | These are the optimization levels for the backend. |
| BuildCfgBackendSubKind | The native backend sub category. |
| BuildCfgByteCodeOptim | These are the optimization levels for the bytecode. |
| BuildCfgDocKind | |
| CompilerMsgKind | The kind of message in CompilerMessage. |
| CompilerMsgMask | The type of message you want to retreive in a #message function. |
| ContextFlags | |
| ExceptionKind | |
| RuntimeFlags | |
| TargetArch | Target processor. |
| TargetOs | The OS to target when generating native code. |
| TypeCmpFlags | |
| TypeInfoFlags | Flags in each TypeInfo. |
| TypeInfoKind | The kind of the typeinfo. |
| TypeInfoNativeKind | The native type if the type is... native. |
| TypeValueFlags | |
| WarningLevel | Warning behavior for Warning attribute. |
| Align | |
| AttrMulti | |
| AttrUsage | Hardcoded usage. |
| CalleeReturn | A return in the following inlined function must be done in the callee context. |
| CanOverflow | |
| Compiler | The following function or variable is only defined at compile time. |
| Complete | The following switch must be complete. |
| ConstExpr | Can be executed at compile time. |
| Deprecated | The following definition is deprecated and should not be used. |
| Discardable | The following function accepts that the called does not use its return value. |
| EnumFlags | The following enum is a set of flags. |
| EnumIndex | The following enum can be used to index arrays without casting. |
| ExportType | |
| Foreign | The following function is foreign (imported). |
| Global | |
| Implicit | Can force an opCast special function to work as implicit. |
| Incomplete | The following switch is incomplete. |
| Inline | Force a function to be inlined. |
| Macro | The following function is a macro. |
| Match | |
| Mixin | The following function is a mixin. |
| NoCopy | The following struct should never be copied. |
| NoDoc | Do not generate documentation. |
| NoDuplicate | The following enum can't have duplicated values. |
| NoInline | Never inline the following function. |
| NoPrint | Disable @print. |
| NotGeneric | The following function is forced to not be generic, even if defined inside a generic struct. |
| Offset | Struct field member relocation. |
| Opaque | When exporting the following struct,: not export its content. |
| Optimize | Enable/Disable a given function optimization. |
| Overload | The following function can be overloaded. |
| Pack | struct packing information. |
| PlaceHolder | An empty function will be generated. |
| PrintAsm | On a function, this will print the associated asm code (only in SCBE backend). |
| PrintBc | On a function or a struct, this will print the associated generated bytecode (after bytecode optimizations). |
| PrintBcGen | On a function or a struct, this will print the associated generated bytecode (right after generation, without bytecode optimizations). |
| Safety | Enable/Disable one or more safety checks. |
| Sanity | Do not make a sanity pass. |
| Strict | |
| Tls | Put the following global variable in the tls segment. |
| Using | |
| Warning | Change the behavior of a given warning or list of warnings. |
| attr Swag.Align | [src] |
| enum Swag.AllocatorMode | [src] |
The mode of an AllocatorRequest.
| Alloc | Allocate a block of memory. |
| Free | Free a block of memory. |
| Realloc | Reallocate a block of memory. |
| FreeAll | Free all memory allocated with the underlying allocator (ff possible). |
| AssertIsAllocated | The allocator must assert if the address is not currently allocated (if possible). |
| struct Swag.AllocatorRequest | [src] |
Represents the request for a given allocator.
| callerLoc | Swag.SourceCodeLocation | The caller code, to help tracking leaks. Optional. |
| hint | string | A hint message, to help tracking leaks. Optional. |
| address | *void | The returned address or the address to deal with. |
| size | u64 | The requested size or the size to deal with. |
| oldSize | u64 | When reallocating. |
| mode | Swag.AllocatorMode | Alloc, free, reallocate... |
| alignment | u32 | Alignment constraint. |
To allocate:
To free:
To reallocate:
See IAllocator
| attr Swag.AttrMulti | [src] |
| attr Swag.AttrUsage | [src] |
Hardcoded usage.
| struct Swag.Attribute | [src] |
| type | const *Swag.TypeInfo | |
| params | const [..] Swag.AttributeParam | Attribute parameters. |
| struct Swag.AttributeParam | [src] |
| name | string | Name of the attribute parameter. |
| value | any | Optional default value. |
| enum Swag.AttributeUsage | [src] |
| Enum | Attribute can be used on an enum. |
| EnumValue | Attribute can be used on an enum value. |
| StructVariable | Attribute can be used on an struct member. |
| GlobalVariable | Attribute can be used on a global variable. |
| Variable | Attribute can be used on any variable. |
| Struct | Attribute can be used on a struct. |
| Function | Attribute can be used on a function. |
| FunctionParameter | Attribute can be used on a struct parameter. |
| File | Attribute can be used with #global. |
| Constant | Attribute can be used on a constant. |
| Multi | Attribute can be used more than once. |
| Gen | |
| All |
| enum Swag.Backend | [src] |
The type of backend to use.
| ByteCode | Bytecode. |
| SCBE | SCBE backend (SwagCustomBackEnd). |
| LLVM | LLVM backend. |
| struct Swag.BaseError | [src] |
This is the base of all errors.
| message | string |
| struct Swag.BuildCfg | [src] |
The current module build configuration.
| moduleVersion | u32 | The module version. |
| moduleRevision | u32 | The module revision. |
| moduleBuildNum | u32 | The module build value. |
| moduleNamespace | string | The namespace name of the module. |
| embeddedImports | bool | Module should embed all its dependencies. |
| tempAllocatorCapacity | s32 | Default capacity of the temp allocator (in bytes). |
| errorAllocatorCapacity | u32 | Default capacity of the error allocator (in bytes). |
| safetyGuards | u16 | Activate specific safety checks. |
| sanity | bool | Make a sanity pass. |
| debugAllocator | bool | Use Swag.DebugAllocator by default. |
| debugAllocatorCaptureStack | bool | Capture the call stack for each allocation. |
| debugAllocatorLeaks | bool | Detect memory leaks. |
| errorStackTrace | bool | Add stack trace in case a throw is raised. |
| warnAsErrors | string | Force some warnings to be treated as errors. Format is "WrnXXXX|WrnXXXX...". |
| warnAsWarning | string | Override warnAsErrors, restoring warnings as warnings. |
| warnAsDisabled | string | Disable some specific warnings. |
| warnDefaultDisabled | bool | All warnings are disabled, except those specified above. |
| warnDefaultErrors | bool | All warnings are treated as errors, except those specified above. |
| byteCodeOptimizeLevel | Swag.BuildCfgByteCodeOptim | Optimization level of bytecode [0, 1 or 2]. |
| byteCodeEmitAssume | bool | assume will panic if an error is raised. |
| byteCodeInline | bool | Enable bytecode inlining with #[Swag.Inline]. |
| byteCodeAutoInline | bool | Automatic inlining of some other functions. |
| backendKind | Swag.BuildCfgBackendKind | Backend type (executable, dynamic lib...). |
| backendSubKind | Swag.BuildCfgBackendSubKind | Backend sub kind. |
| backendDebugInformations | bool | Output debug information if true. |
| backendDebugInline | bool | Generate specific line information for inline code. |
| backendOptimize | Swag.BuildCfgBackendOptim | Backend optimization level. |
| backendNumCU | u32 | |
| linkerArgs | string | Additional linker arguments. |
| backendLLVM | Swag.BuildCfgBackendLLVM | Specific LLVM options. |
| backendSCBE | Swag.BuildCfgBackendSCBE | Specific SCBE options. |
| repoPath | string | Repository access path to the module. |
| resAppIcoFileName | string | For an executable, the associated icon file name. |
| resAppName | string | For an executable, the associated application name. |
| resAppDescription | string | For an executable, the associated application description. |
| resAppCompany | string | For an executable, the associated company name. |
| resAppCopyright | string | For an executable, the associated copyright notice. |
| genDoc | Swag.BuildCfgGenDoc | Parameters for document generation. |
See ICompiler
| enum Swag.BuildCfgBackendKind | [src] |
The kind of native backend to generate.
| None | Nothing. |
| Export | The module is an export module which does not have its own code. |
| Executable | The module needs to be compiled to an executable application. |
| Library | The module needs to be compiled as a library. |
| struct Swag.BuildCfgBackendLLVM | [src] |
LLVM backend specific options.
| outputIR | bool | Output IR in a file. |
| fpMathFma | bool | true in release. |
| fpMathNoNaN | bool | true in release. |
| fpMathNoInf | bool | true in release. |
| fpMathNoSignedZero | bool | true in release. |
| fpMathUnsafe | bool | |
| fpMathApproxFunc | bool |
| enum Swag.BuildCfgBackendOptim | [src] |
These are the optimization levels for the backend.
| O0 | No optimization. |
| O1 | Optimizations level 1. |
| O2 | Optimizations level 2. |
| O3 | Optimizations level 3. |
| Os | Optim for size level 1. |
| Oz | Optim for size level 2. |
| struct Swag.BuildCfgBackendSCBE | [src] |
SCBE backend specific options.
| unrollMemLimit | u32 | Maximum number of bytes to unroll memset/cpy in optimize mode. |
| enum Swag.BuildCfgBackendSubKind | [src] |
The native backend sub category.
| Default | |
| Console |
Under windows, by default, the application will be compiled to make a windowed application. But you can change it and force the application to behave like a console one.
| enum Swag.BuildCfgByteCodeOptim | [src] |
These are the optimization levels for the bytecode.
| O0 | No optimization. |
| O1 | Optimizations level 1. |
| O2 | Optimizations level 2. |
| O3 | Optimizations level 3. |
| enum Swag.BuildCfgDocKind | [src] |
| None | Do not generate documentation for that module. |
| Api | Generate 'api like' documentation. |
| Examples | Generate 'examples like' documentation. |
| Pages | Generate one page per file. |
| struct Swag.BuildCfgGenDoc | [src] |
This contains all options when generating documentation.
| kind | Swag.BuildCfgDocKind | The kind of documentation to generate. |
| outputName | string | The name of the output file (without extension). |
| outputExtension | string | The output extension. |
| titleToc | string | Title for the table of content. |
| titleContent | string | Title for the main document content. |
| css | string | The css file to include in generated documentations. |
| icon | string | The icon path of the page. |
| startHead | string | Content to insert at the start of the <head> section. |
| endHead | string | Content to insert at the end of the <head> section. |
| startBody | string | Content to insert at the start of the <body> section. |
| endBody | string | Content to insert at the end of the <body> section. |
| morePages | string | Additional external file pages to process (separated with ;). |
| quoteIconNote | string | The icon for the note blockquote. |
| quoteIconTip | string | The icon for the tip blockquote. |
| quoteIconWarning | string | The icon for the warning blockquote. |
| quoteIconAttention | string | The icon for the attention blockquote. |
| quoteIconExample | string | The icon for the example blockquote. |
| quoteTitleNote | string | The title for the note blockquote. |
| quoteTitleTip | string | The title for the tip blockquote. |
| quoteTitleWarning | string | The title for the warning blockquote. |
| quoteTitleAttention | string | The title for the attention blockquote. |
| quoteTitleExample | string | The title for the example blockquote. |
| syntaxDefaultColor | u32 | Code syntax default color (if not colorized). |
| syntaxColorLum | f32 | Code syntax color luminosity in range ]0, 1]. |
| hasFontAwesome | bool | Generate a reference to the FontAwesome script (icons). |
| hasStyleSection | bool | Generate a default <style> section. |
| hasSwagWatermark | bool | Generate a swag watermark at the bottom of each page. |
| struct Swag.CVaList | [src] |
| buf | [2048] u8 |
| attr Swag.CalleeReturn | [src] |
A return in the following inlined function must be done in the callee context.
| attr Swag.CanOverflow | [src] |
| attr Swag.Compiler | [src] |
The following function or variable is only defined at compile time.
| struct Swag.CompilerMessage | [src] |
A message received in a #message function.
| moduleName | string | Name of the module for which the message is sent. |
| name | string | Depends on kind. |
| type | const *Swag.TypeInfo | Depends on kind. |
| kind | Swag.CompilerMsgKind | Kind of the message. |
In a #message function, you can retreive the associated message by calling getMessage of the interface returned by @compiler
| enum Swag.CompilerMsgKind | [src] |
The kind of message in CompilerMessage.
| PassAfterSemantic | Called once the program semantic has been done. |
| PassBeforeRunByteCode | Called just before running bytecode. |
| PassBeforeOutput | Called just before generating the native code. |
| PassAllDone | Called when everything has be done. |
| SemFunctions | Called for each function in the module. |
| SemTypes | Called for each type in the module. |
| SemGlobals | Called for each global variable in the module. |
| AttributeGen |
| enum Swag.CompilerMsgMask | [src] |
The type of message you want to retreive in a #message function.
| PassAfterSemantic | |
| PassBeforeRun | |
| PassBeforeOutput | |
| PassAllDone | |
| SemFunctions | |
| SemTypes | |
| SemGlobals | |
| AttributeGen | |
| All |
The function could be called for more than one reason, as this is a mask.
| attr Swag.Complete | [src] |
The following switch must be complete.
| attr Swag.ConstExpr | [src] |
Can be executed at compile time.
| struct Swag.Context | [src] |
Thread context as returned by [@context].
| allocator | Swag.IAllocator | The current allocator interface. |
| flags | Swag.ContextFlags | Context flags. |
| tempAllocator | Swag.ScratchAllocator | A temporary allocator for the user. |
| errorAllocator | Swag.ScratchAllocator | A temporary allocator to store the error values. |
| debugAllocator | *void | If defined, the used debug allocator. |
| runtimeFlags | Swag.RuntimeFlags | As initialized by the runtime. |
| user0 | u64 | For user usage. |
| user1 | u64 | For user usage. |
| user2 | u64 | For user usage. |
| user3 | u64 | For user usage. |
| traces | [32] const *Swag.SourceCodeLocation | Stack trace, in case of errors. |
| errors | [32] Swag.ErrorValue | All errors. |
| exceptionLoc | Swag.SourceCodeLocation | When an exception is raised, this is the code location. |
| exceptionParams | [4] const *void | When an exception is raised, this are the parameters. |
| panic | func(string, Swag.SourceCodeLocation) | A function to call if there's a panic. |
| curError | any | The current raised error returns by @err. |
| errorIndex | u32 | Number of errors in the array. |
| traceIndex | u32 | Number of traces in the array. |
| hasError | u32 | <> 0 if an error is raised. |
| enum Swag.ContextFlags | [src] |
| None | |
| Test | |
| ByteCode |
| struct Swag.DebugAllocator | [src] |
| allocator | Swag.IAllocator | |
| mutex | MutexRW | |
| firstAlloc | *Swag.DebugAllocatorHeader | First allocated block. |
| firstFree | *Swag.DebugAllocatorHeader | First freed block. |
| lastFree | *Swag.DebugAllocatorHeader | Last freed block. |
| sizeAlloc | u64 | Total allocated memory, in bytes. |
| sizeFree | u64 | Total of free blocks in quarantine. |
| countAlloc | u32 | Number of allocated blocks. |
| nextId | u32 | The next allocated id to assign. |
| maxFreeSize | u64 | Maximum total size (in kbs) of free blocks in quarantine. |
| breakOnAllocId | u32 | Will @assert when the current allocation id reaches that value. |
| showMaxLeaks | u32 | Maximum number of memory leaks to show. |
| captureAllocStack | bool | For each allocation, capture stack. |
| detectLeaks | bool | Detect memory leaks if true. |
| assertIsAllocated | This function will assert if the given user address is not conform to an allocated block. |
| checkAllMemory | Check all allocated blocks. |
| checkIsAllocated | |
| checkIsFreed | |
| memAlign | |
| printDisplaySize | |
| printLeaks | Output to the console the list of all allocated blocks (leaks). |
| setup | Setup the allocator. |
| opDrop |
| func IAllocator.alloc | [src] |
| func IAllocator.free | [src] |
| func IAllocator.releaseLast | [src] |
| func IAllocator.req | [src] |
| func DebugAllocator.assertIsAllocated | [src] |
This function will assert if the given user address is not conform to an allocated block.
| func DebugAllocator.checkAllMemory | [src] |
Check all allocated blocks.
| func DebugAllocator.checkIsAllocated | [src] |
| func DebugAllocator.checkIsFreed | [src] |
| func DebugAllocator.memAlign | [src] |
| func DebugAllocator.opDrop | [src] |
| func DebugAllocator.printDisplaySize | [src] |
| func DebugAllocator.printLeaks | [src] |
Output to the console the list of all allocated blocks (leaks).
| func DebugAllocator.setup | [src] |
Setup the allocator.
| [src] |
Will be put just after the returned address.
| magic | u32 |
| struct Swag.DebugAllocatorHeader | [src] |
Will be put just before the returned address.
| loc | Swag.SourceCodeLocation | |
| allocAddr | [*] void | |
| allocSize | u64 | |
| userSize | u64 | |
| hint | string | |
| prev | *Swag.DebugAllocatorHeader | |
| next | *Swag.DebugAllocatorHeader | |
| stack | [16] *void | |
| stackCount | u32 | |
| magic | u32 | |
| allocId | u32 |
| attr Swag.Deprecated | [src] |
The following definition is deprecated and should not be used.
| attr Swag.Discardable | [src] |
The following function accepts that the called does not use its return value.
| attr Swag.EnumFlags | [src] |
The following enum is a set of flags.
| attr Swag.EnumIndex | [src] |
The following enum can be used to index arrays without casting.
| struct Swag.ErrorValue | [src] |
Store a throw error information.
| value | any | Error value (or null). |
| pushUsedAlloc | u32 | Internal. |
| pushTraceIndex | u32 | Internal. |
| pushHasError | u32 | Internal. |
| padding | u32 |
| enum Swag.ExceptionKind | [src] |
| Panic | |
| Error | |
| Warning |
| attr Swag.ExportType | [src] |
| namespace Swag.F32 |
| namespace Swag.F64 |
| attr Swag.Foreign | [src] |
The following function is foreign (imported).
| attr Swag.Global | [src] |
| struct Swag.Gvtd | [src] |
Defined a global variable that needs to be dropped when exiting.
| ptr | *void | Pointer to the global variable memory. |
| opDrop | func(*void) | The opDrop function to call when the process must exit. |
| sizeOf | u32 | Size of one element. |
| count | u32 | Number of elements to drop. |
| interface Swag.IAllocator | [src] |
| req | func(*Swag.IAllocator, *Swag.AllocatorRequest) |
| interface Swag.ICompiler | [src] |
This is the interface to communicate with the compiler.
| getMessage | func(*Swag.ICompiler)->const *Swag.CompilerMessage | |
| getBuildCfg | func(*Swag.ICompiler)->*Swag.BuildCfg | |
| compileString | func(*Swag.ICompiler, string) |
The intrinsic @compiler will return that interface at compile-time, and null at runtime.
| attr Swag.Implicit | [src] |
Can force an opCast special function to work as implicit.
| attr Swag.Incomplete | [src] |
The following switch is incomplete.
| attr Swag.Inline | [src] |
Force a function to be inlined.
| struct Swag.Interface | [src] |
| obj | *void | Pointer to the associated struct instance. |
| itable | const [*] [*] void | Pointer to the virtual table. |
| attr Swag.Macro | [src] |
The following function is a macro.
| attr Swag.Match | [src] |
| attr Swag.Mixin | [src] |
The following function is a mixin.
| struct Swag.Module | [src] |
Defined some information about a loaded module.
| name | string | Name of the module. |
| types | const [..] const *Swag.TypeInfo | All exported types. |
| attr Swag.NoCopy | [src] |
The following struct should never be copied.
| attr Swag.NoDoc | [src] |
Do not generate documentation.
| attr Swag.NoDuplicate | [src] |
The following enum can't have duplicated values.
| attr Swag.NoInline | [src] |
Never inline the following function.
This is a hint for the llvm backend.
| attr Swag.NoPrint | [src] |
Disable @print.
| attr Swag.NotGeneric | [src] |
The following function is forced to not be generic, even if defined inside a generic struct.
| attr Swag.Offset | [src] |
Struct field member relocation.
The field offset in the struct should be the same as the variable name
| attr Swag.Opaque | [src] |
When exporting the following struct,: not export its content.
| attr Swag.Optimize | [src] |
Enable/Disable a given function optimization.
Options are:
| bytecode | Enable/Disable bytecode optimization for the function |
| backend | Enable/Disable backend machine code optimization for the function (llvm only) |
If what is null or empty, every options will be affected.
| attr Swag.Overload | [src] |
The following function can be overloaded.
| attr Swag.Pack | [src] |
struct packing information.
| attr Swag.PlaceHolder | [src] |
An empty function will be generated.
| attr Swag.PrintAsm | [src] |
On a function, this will print the associated asm code (only in SCBE backend).
| attr Swag.PrintBc | [src] |
On a function or a struct, this will print the associated generated bytecode (after bytecode optimizations).
| attr Swag.PrintBcGen | [src] |
On a function or a struct, this will print the associated generated bytecode (right after generation, without bytecode optimizations).
| struct Swag.ProcessInfos | [src] |
Defined some information about the current process.
| modules | const [..] Swag.Module | The list of all modules. |
| args | string | The application arguments, as returned by @args. |
| enum Swag.RuntimeFlags | [src] |
| Zero | |
| FromCompiler |
| namespace Swag.S16 |
| namespace Swag.S32 |
| namespace Swag.S64 |
| namespace Swag.S8 |
| attr Swag.Safety | [src] |
Enable/Disable one or more safety checks.
For example:
Safety checks are:
| boundcheck | Check out of bound access |
| overflow | Check type conversion lost of bits or precision |
| math | Various math checks (like a negative @sqrt) |
| switch | Check an invalid case in a #[Swag.Complete] switch |
| unreachable | Panic if an @unreachable instruction is executed |
| any | Panic if a cast from a any variable does not match the real underlying type |
| bool | Panic if a bool does not have a valid value (true or false) |
| nan | Panic if a nan is used in a float arithmetic operation |
| sanity | Do a sanity check (per function) |
| null | Panic on dereferencing some null pointers |
If what is null or empty, every options are will be affected.
| attr Swag.Sanity | [src] |
Do not make a sanity pass.
| struct Swag.ScratchAllocator | [src] |
| allocator | Swag.IAllocator | |
| block | [*] u8 | |
| capacity | u64 | |
| used | u64 | |
| maxUsed | u64 | |
| firstLeak | *void | |
| totalLeak | u64 | |
| maxLeak | u64 |
| align | Adapt the value depending on the requested alignment. |
| alloc | Allocate a block. |
| free | Free a block, if possible. |
| freeAll | Release all memory. |
| release | Release the allocated block. |
| setCapacity | This will call release prior to changing the capacity, so this must be called at an early stage. |
| func IAllocator.alloc | [src] |
| func IAllocator.free | [src] |
| func IAllocator.req | [src] |
| struct ScratchAllocator.LeakHeader | [src] |
| prev | *Swag.ScratchAllocator.LeakHeader | |
| next | *Swag.ScratchAllocator.LeakHeader | |
| size | u64 |
| func ScratchAllocator.align | [src] |
Adapt the value depending on the requested alignment.
| func ScratchAllocator.alloc | [src] |
Allocate a block.
| func ScratchAllocator.free | [src] |
Free a block, if possible.
| func ScratchAllocator.freeAll | [src] |
Release all memory.
| func ScratchAllocator.release | [src] |
Release the allocated block.
| func ScratchAllocator.setCapacity | [src] |
This will call release prior to changing the capacity, so this must be called at an early stage.
| struct Swag.SourceCodeLocation | [src] |
Represent a part of a source code file.
| fileName | string | Full path name of the source file. |
| funcName | string | Name of the function. |
| lineStart | u32 | Start line (starts at 0). |
| colStart | u32 | Start column. |
| lineEnd | u32 | End line. |
| colEnd | u32 | End column. |
This is typically what will be returned by #curlocation or #callerlocation.
| attr Swag.Strict | [src] |
| struct Swag.SystemAllocator | [src] |
| func IAllocator.free | [src] |
| func IAllocator.req | [src] |
| struct Swag.SystemError | [src] |
An error raised by the system.
| using base | Swag.BaseError | |
| errorID | u64 |
| enum Swag.TargetArch | [src] |
Target processor.
| X86_64 |
| enum Swag.TargetOs | [src] |
The OS to target when generating native code.
| Windows | Windows 10/11. |
| Linux | Linux (unsupported). |
| MaxOSX | MacOS (unsupported). |
| attr Swag.Tls | [src] |
Put the following global variable in the tls segment.
A copy of the variable will be available for each thread.
| enum Swag.TypeCmpFlags | [src] |
| Strict | |
| CastAny | |
| UnScoped |
| struct Swag.TypeInfo | [src] |
Will be available for all types.
| fullname | string | The full scoped name of the type. |
| name | string | The unscoped name. |
| sizeof | u32 | Size in bytes. |
| crc | u32 | A unique CRC to identify the type. |
| flags | Swag.TypeInfoFlags | Some additional flags. |
| kind | Swag.TypeInfoKind | The kind of the type. |
| padding | [3] u8 |
| struct Swag.TypeInfoAlias | [src] |
| using base | Swag.TypeInfo | |
| rawType | const *Swag.TypeInfo | The underlying type. |
| struct Swag.TypeInfoArray | [src] |
| using base | Swag.TypeInfo | |
| pointedType | const *Swag.TypeInfo | The underlying type. |
| finalType | const *Swag.TypeInfo | If this is an array with multiple dimensions, this will be the final type. |
| count | u64 | Number of elements in the array. |
| totalCount | u64 | The total number of elements in case this has multiple dimensions. |
| struct Swag.TypeInfoCodeBlock | [src] |
| using base | Swag.TypeInfo | |
| rawType | const *Swag.TypeInfo | The underlying type. |
| struct Swag.TypeInfoEnum | [src] |
| using base | Swag.TypeInfo | |
| values | const [..] Swag.TypeValue | All the values. |
| rawType | const *Swag.TypeInfo | The underlying enum type. |
| attributes | const [..] Swag.Attribute | All the attributes. |
| enum Swag.TypeInfoFlags | [src] |
Flags in each TypeInfo.
| Zero | |
| PointerTypeInfo | This is a pointer to a TypeInfo struct. |
| Integer | This is a native integer. |
| Float | This is a native float. |
| Unsigned | This is a native unsigned integer. |
| HasPostCopy | This is a struct with a opPostCopy. |
| HasPostMove | This is a struct with a opPostMove. |
| HasDrop | This is a struct with a opDrop. |
| Strict | This is a alias with the Swag.Strict attribute. |
| CanCopy | This is a struct that can be copied. |
| Tuple | This is a tuple. |
| CString | This is a cstring. |
| Generic | This is a generic type. |
| PointerRef | This is a reference. |
| PointerMoveRef | This is a move reference. |
| PointerArithmetic | This is a pointer to multiple values. |
| Character | This is a 32 bits character. |
| Const | This is const. |
| Nullable | This is a nullable type. |
| struct Swag.TypeInfoFunc | [src] |
| using base | Swag.TypeInfo | |
| generics | const [..] Swag.TypeValue | Generic parameters. |
| parameters | const [..] Swag.TypeValue | Parameters. |
| returnType | const *Swag.TypeInfo | The return type, or null. |
| attributes | const [..] Swag.Attribute | All the attributes. |
| struct Swag.TypeInfoGeneric | [src] |
| using base | Swag.TypeInfo | |
| rawType | const *Swag.TypeInfo |
| enum Swag.TypeInfoKind | [src] |
The kind of the typeinfo.
| Invalid | |
| Native | The typeinfo is a TypeInfoNative. See TypeInfoNativeKind for the underlying type. |
| Namespace | The typeinfo is a TypeInfoNamespace. |
| Enum | The typeinfo is a TypeInfoEnum. |
| Func | The typeinfo is a TypeInfoFunc. |
| Lambda | The typeinfo is a TypeInfoFunc, but this is a lambda or a func. |
| Pointer | The typeinfo is a TypeInfoPointer. |
| Array | The typeinfo is a TypeInfoArray. |
| Slice | The typeinfo is a TypeInfoSlice. |
| TypeListTuple | The typeinfo is a TypeInfoStruct. |
| TypeListArray | The typeinfo is a TypeInfoArray. |
| Variadic | The typeinfo is a TypeInfoVariadic. |
| TypedVariadic | The typeinfo is a TypeInfoVariadic. |
| CVariadic | The typeinfo is a TypeInfoVariadic. |
| Struct | The typeinfo is a TypeInfoStruct. |
| Generic | The typeinfo is a TypeInfoGeneric. |
| Alias | The typeinfo is a TypeInfoAlias. |
| CodeBlock | The typeinfo is a TypeInfoCodeBlock. |
| Interface | The typeinfo is a TypeInfoStruct, but this is an interface. |
| Attribute | The typeinfo is a TypeInfoFunc, but this is an attribute. |
| struct Swag.TypeInfoNamespace | [src] |
| using base | Swag.TypeInfo |
| struct Swag.TypeInfoNative | [src] |
| using base | Swag.TypeInfo | |
| nativeKind | Swag.TypeInfoNativeKind |
| enum Swag.TypeInfoNativeKind | [src] |
The native type if the type is... native.
| Void | |
| S8 | |
| S16 | |
| S32 | |
| S64 | |
| U8 | |
| U16 | |
| U32 | |
| U64 | |
| F32 | |
| F64 | |
| Bool | |
| Rune | |
| String | |
| Any | |
| CString | |
| Undefined |
If the kind of the type is TypeInfoKind.Native, then this is the real native type.
| struct Swag.TypeInfoPointer | [src] |
| using base | Swag.TypeInfo | |
| pointedType | const *Swag.TypeInfo | The pointed type. |
| struct Swag.TypeInfoSlice | [src] |
| using base | Swag.TypeInfo | |
| pointedType | const *Swag.TypeInfo | The underlying type. |
| struct Swag.TypeInfoStruct | [src] |
| using base | Swag.TypeInfo | |
| opInit | func(*void) | Pointer to the function to initialize an instance of that struct. |
| opDrop | func(*void) | Pointer to the function to drop an instance of that struct. |
| opPostCopy | func(*void) | Pointer to the function to call after a copy. |
| opPostMove | func(*void) | Pointer to the function to call after a move. |
| structName | string | User name of the struct. |
| fromGeneric | const *Swag.TypeInfo | If it comes from a generic instantiation, this is the original generic struct. |
| generics | const [..] Swag.TypeValue | Generic parameters. |
| fields | const [..] Swag.TypeValue | All the fields. |
| usingFields | const [..] Swag.TypeValue | All the fields marked with using. |
| methods | const [..] Swag.TypeValue | All the methods, if exported. |
| interfaces | const [..] Swag.TypeValue | All the interfaces. |
| attributes | const [..] Swag.Attribute | All the attributes. |
| struct Swag.TypeInfoVariadic | [src] |
| using base | Swag.TypeInfo | |
| rawType | const *Swag.TypeInfo | The underlying type. |
| struct Swag.TypeValue | [src] |
Represents a value, like a function parameter or an enum value.
| name | string | Name of the value. |
| pointedType | const *Swag.TypeInfo | Type of the value. |
| value | const *void | Pointer to the constant value. |
| attributes | const [..] Swag.Attribute | Associated attributes. |
| offset | u32 | Offset, in bytes. |
| crc | u32 | Unique CRC. |
| flags | Swag.TypeValueFlags | Associated flags. |
| padding | u32 |
| enum Swag.TypeValueFlags | [src] |
| Zero | |
| AutoName | |
| HasUsing |
| namespace Swag.U16 |
| namespace Swag.U32 |
| namespace Swag.U64 |
| namespace Swag.U8 |
| attr Swag.Using | [src] |
| attr Swag.Warning | [src] |
Change the behavior of a given warning or list of warnings.
For example:
You can also change the warning behaviors for the whole module in your BuildCfg
| enum Swag.WarningLevel | [src] |
Warning behavior for Warning attribute.
| Enable | Enable the given warning. |
| Disable | Disable the given warning. |
| Error | Force the given warning to be raised as an error. |