mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 09:21:35 +00:00
Fix game-of-life example inconsistencies; Fix ternary expression issues in void contexts and variable statements; Simplify HEAP_BASE handling
This commit is contained in:
@ -47,25 +47,6 @@ import {
|
||||
OperatorKind
|
||||
} from "./program";
|
||||
|
||||
/** Compiles a get of a built-in global. */
|
||||
export function compileGetConstant(
|
||||
compiler: Compiler,
|
||||
global: Global,
|
||||
reportNode: Node
|
||||
): ExpressionRef {
|
||||
switch (global.internalName) {
|
||||
case "HEAP_BASE": { // never inlined for linking purposes
|
||||
compiler.currentType = compiler.options.usizeType;
|
||||
return compiler.module.createGetGlobal("HEAP_BASE", compiler.currentType.toNativeType());
|
||||
}
|
||||
}
|
||||
compiler.error(
|
||||
DiagnosticCode.Operation_not_supported,
|
||||
reportNode.range
|
||||
);
|
||||
return compiler.module.createUnreachable();
|
||||
}
|
||||
|
||||
/** Compiles a call to a built-in function. */
|
||||
export function compileCall(
|
||||
compiler: Compiler,
|
||||
|
Reference in New Issue
Block a user