Skip to content

Commit bb1609c

Browse files
committed
baseline
1 parent 3146f8f commit bb1609c

File tree

91 files changed

+6407
-10990
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+6407
-10990
lines changed

src/builtins.ts

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ import {
4848
getConstValueI64Low,
4949
getConstValueI32,
5050
getConstValueF32,
51-
getConstValueF64,
52-
getBinaryOp,
53-
getBinaryLeft,
54-
getBinaryRight
51+
getConstValueF64
5552
} from "./module";
5653

5754
import {
@@ -60,14 +57,11 @@ import {
6057
Class,
6158
Field,
6259
Global,
63-
DecoratorFlags,
64-
Local,
65-
Program
60+
DecoratorFlags
6661
} from "./program";
6762

6863
import {
69-
FlowFlags,
70-
Flow
64+
FlowFlags
7165
} from "./flow";
7266

7367
import {
@@ -478,10 +472,18 @@ export namespace BuiltinSymbols {
478472
export const memory_grow = "~lib/memory/memory.grow";
479473
export const memory_copy = "~lib/memory/memory.copy";
480474
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";
481478

482479
// 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";
485487

486488
// std/typedarray.ts
487489
export const Int8Array = "~lib/typedarray/Int8Array";
@@ -495,6 +497,12 @@ export namespace BuiltinSymbols {
495497
export const Uint8ClampedArray = "~lib/typedarray/Uint8ClampedArray";
496498
export const Float32Array = "~lib/typedarray/Float32Array";
497499
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";
498506
}
499507

500508
/** Compiles a call to a built-in function. */
@@ -3607,15 +3615,15 @@ export function compileCall(
36073615

36083616
// === Internal runtime =======================================================================
36093617

3610-
case BuiltinSymbols.CLASSID: {
3618+
case BuiltinSymbols.classId: {
36113619
let type = evaluateConstantType(compiler, typeArguments, operands, reportNode);
36123620
compiler.currentType = Type.u32;
36133621
if (!type) return module.createUnreachable();
36143622
let classReference = type.classReference;
36153623
if (!classReference) return module.createUnreachable();
36163624
return module.createI32(classReference.id);
36173625
}
3618-
case BuiltinSymbols.ITERATEROOTS: {
3626+
case BuiltinSymbols.iterateRoots: {
36193627
if (
36203628
checkTypeAbsent(typeArguments, reportNode, prototype) |
36213629
checkArgsRequired(operands, 1, reportNode, compiler)

src/codegen/array.ts

Lines changed: 0 additions & 281 deletions
This file was deleted.

0 commit comments

Comments
 (0)