@@ -48,10 +48,7 @@ import {
48
48
getConstValueI64Low ,
49
49
getConstValueI32 ,
50
50
getConstValueF32 ,
51
- getConstValueF64 ,
52
- getBinaryOp ,
53
- getBinaryLeft ,
54
- getBinaryRight
51
+ getConstValueF64
55
52
} from "./module" ;
56
53
57
54
import {
@@ -60,14 +57,11 @@ import {
60
57
Class ,
61
58
Field ,
62
59
Global ,
63
- DecoratorFlags ,
64
- Local ,
65
- Program
60
+ DecoratorFlags
66
61
} from "./program" ;
67
62
68
63
import {
69
- FlowFlags ,
70
- Flow
64
+ FlowFlags
71
65
} from "./flow" ;
72
66
73
67
import {
@@ -478,10 +472,18 @@ export namespace BuiltinSymbols {
478
472
export const memory_grow = "~lib/memory/memory.grow" ;
479
473
export const memory_copy = "~lib/memory/memory.copy" ;
480
474
export const memory_fill = "~lib/memory/memory.fill" ;
475
+ export const memory_allocate = "~lib/memory/memory.allocate" ;
476
+ export const memory_free = "~lib/memory/memory.free" ;
477
+ export const memory_reset = "~lib/memory/memory.reset" ;
481
478
482
479
// std/runtime.ts
483
- export const CLASSID = "~lib/runtime/CLASSID" ;
484
- export const ITERATEROOTS = "~lib/runtime/ITERATEROOTS" ;
480
+ export const classId = "~lib/runtime/classId" ;
481
+ export const iterateRoots = "~lib/runtime/iterateRoots" ;
482
+ export const allocate = "~lib/runtime/allocate" ;
483
+ export const reallocate = "~lib/runtime/reallocate" ;
484
+ export const register = "~lib/runtime/register" ;
485
+ export const discard = "~lib/runtime/discard" ;
486
+ export const makeArray = "~lib/runtime/makeArray" ;
485
487
486
488
// std/typedarray.ts
487
489
export const Int8Array = "~lib/typedarray/Int8Array" ;
@@ -495,6 +497,12 @@ export namespace BuiltinSymbols {
495
497
export const Uint8ClampedArray = "~lib/typedarray/Uint8ClampedArray" ;
496
498
export const Float32Array = "~lib/typedarray/Float32Array" ;
497
499
export const Float64Array = "~lib/typedarray/Float64Array" ;
500
+
501
+ // compiler generated
502
+ export const started = "~lib/started" ;
503
+ export const argc = "~lib/argc" ;
504
+ export const setargc = "~lib/setargc" ;
505
+ export const capabilities = "~lib/capabilities" ;
498
506
}
499
507
500
508
/** Compiles a call to a built-in function. */
@@ -3607,15 +3615,15 @@ export function compileCall(
3607
3615
3608
3616
// === Internal runtime =======================================================================
3609
3617
3610
- case BuiltinSymbols . CLASSID : {
3618
+ case BuiltinSymbols . classId : {
3611
3619
let type = evaluateConstantType ( compiler , typeArguments , operands , reportNode ) ;
3612
3620
compiler . currentType = Type . u32 ;
3613
3621
if ( ! type ) return module . createUnreachable ( ) ;
3614
3622
let classReference = type . classReference ;
3615
3623
if ( ! classReference ) return module . createUnreachable ( ) ;
3616
3624
return module . createI32 ( classReference . id ) ;
3617
3625
}
3618
- case BuiltinSymbols . ITERATEROOTS : {
3626
+ case BuiltinSymbols . iterateRoots : {
3619
3627
if (
3620
3628
checkTypeAbsent ( typeArguments , reportNode , prototype ) |
3621
3629
checkArgsRequired ( operands , 1 , reportNode , compiler )
0 commit comments