mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-14 08:25:02 +01:00
cleanup
This commit is contained in:
parent
9ece18a48a
commit
9f3e728e79
4 changed files with 9 additions and 25 deletions
|
|
@ -443,8 +443,6 @@ export const BUILTINS = [
|
|||
"__i64_store",
|
||||
"__i32_load",
|
||||
"__i64_load",
|
||||
"__string_ptr",
|
||||
"__string_len",
|
||||
"__memory_size",
|
||||
"__memory_grow",
|
||||
"__i32_extend_to_i64_u",
|
||||
|
|
|
|||
|
|
@ -740,24 +740,6 @@ function lowerExpr(
|
|||
instrs.push({ kind: "i64.store", imm: {} });
|
||||
break exprKind;
|
||||
}
|
||||
case "__string_ptr": {
|
||||
assertArgs(1);
|
||||
lowerExpr(fcx, instrs, expr.args[0]);
|
||||
// ptr, len
|
||||
instrs.push({ kind: "drop" });
|
||||
// ptr
|
||||
break exprKind;
|
||||
}
|
||||
case "__string_len": {
|
||||
assertArgs(1);
|
||||
lowerExpr(fcx, instrs, expr.args[0]);
|
||||
// ptr, len
|
||||
instrs.push({ kind: "i32.const", imm: 0n });
|
||||
// ptr, len, 0
|
||||
instrs.push({ kind: "select" });
|
||||
// len
|
||||
break exprKind;
|
||||
}
|
||||
case "__memory_size": {
|
||||
assertArgs(0);
|
||||
instrs.push({ kind: "memory.size" });
|
||||
|
|
|
|||
10
src/index.ts
10
src/index.ts
|
|
@ -28,7 +28,15 @@ function uwu() = (
|
|||
/*-1*/
|
||||
);
|
||||
|
||||
function eat(a: A) = ;
|
||||
type B = {
|
||||
a: (Int, Int, Int, Int, Int),
|
||||
};
|
||||
|
||||
function test(b: B) = (
|
||||
b.a;
|
||||
);
|
||||
|
||||
function eat(a: A) =;
|
||||
`;
|
||||
|
||||
function main() {
|
||||
|
|
|
|||
|
|
@ -77,10 +77,6 @@ function typeOfBuiltinValue(name: BuiltinName, span: Span): Ty {
|
|||
return mkTyFn([TY_I32], TY_I32);
|
||||
case "__i64_load":
|
||||
return mkTyFn([TY_I32], TY_INT);
|
||||
case "__string_ptr":
|
||||
return mkTyFn([TY_STRING], TY_I32);
|
||||
case "__string_len":
|
||||
return mkTyFn([TY_STRING], TY_I32);
|
||||
case "__memory_size":
|
||||
return mkTyFn([], TY_I32);
|
||||
case "__memory_grow":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue