mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-26 21:21:54 +00:00
changetype builtin; some namespace parsing; more stdlib ideas; compiler options for asc
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
|
@ -1,7 +1,7 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
@ -37,6 +37,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -6,7 +6,6 @@
|
||||
(global $binary/f (mut f32) (f32.const 0))
|
||||
(global $binary/F (mut f64) (f64.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
|
@ -5,8 +5,8 @@
|
||||
(global $binary/I (mut i64) (i64.const 0))
|
||||
(global $binary/f (mut f32) (f32.const 0))
|
||||
(global $binary/F (mut f64) (f64.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
@ -840,6 +840,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -7,7 +7,6 @@
|
||||
(global $builtins/F (mut f64) (f64.const 0))
|
||||
(global $builtins/s (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
|
@ -6,8 +6,8 @@
|
||||
(global $builtins/b (mut i32) (i32.const 0))
|
||||
(global $builtins/F (mut f64) (f64.const 0))
|
||||
(global $builtins/s (mut i32) (i32.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
@ -1083,6 +1083,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -1,8 +1,8 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(import "env" "external" (func $declare/external))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "external" (func $declare/external))
|
||||
(export "memory" (memory $0))
|
||||
)
|
||||
@ -30,6 +30,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -1,7 +1,6 @@
|
||||
(module
|
||||
(type $iv (func (param i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "loopDo" (func $do/loopDo))
|
||||
(export "loopDoInDo" (func $do/loopDoInDo))
|
||||
(export "memory" (memory $0))
|
||||
|
@ -1,7 +1,7 @@
|
||||
(module
|
||||
(type $iv (func (param i32)))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "loopDo" (func $do/loopDo))
|
||||
(export "loopDoInDo" (func $do/loopDoInDo))
|
||||
(export "memory" (memory $0))
|
||||
@ -75,6 +75,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -4,7 +4,6 @@
|
||||
(global $enum/NonConstant.ZERO (mut i32) (i32.const 0))
|
||||
(global $enum/NonConstant.ONE (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
|
@ -4,7 +4,6 @@
|
||||
(global $enum/NonConstant.ZERO (mut i32) (i32.const 0))
|
||||
(global $enum/NonConstant.ONE (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $enum/getZero (; 0 ;) (type $i) (result i32)
|
||||
|
@ -15,8 +15,8 @@
|
||||
(global $enum/Mixed.FOUR i32 (i32.const 4))
|
||||
(global $enum/NonConstant.ZERO (mut i32) (i32.const 0))
|
||||
(global $enum/NonConstant.ONE (mut i32) (i32.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $enum/getZero (; 0 ;) (type $i) (result i32)
|
||||
@ -60,6 +60,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -3,7 +3,6 @@
|
||||
(global $export/a i32 (i32.const 1))
|
||||
(global $export/b i32 (i32.const 2))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "add" (func $export/add))
|
||||
(export "renamed_sub" (func $export/sub))
|
||||
(export "a" (global $export/a))
|
||||
|
@ -13,3 +13,8 @@ export const a: i32 = 1;
|
||||
const b: i32 = 2;
|
||||
|
||||
export { b as renamed_b };
|
||||
|
||||
/* export namespace ns {
|
||||
function one(): void {}
|
||||
export function two(): void {}
|
||||
} */
|
||||
|
@ -2,8 +2,8 @@
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(global $export/a i32 (i32.const 1))
|
||||
(global $export/b i32 (i32.const 2))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "add" (func $export/add))
|
||||
(export "renamed_sub" (func $export/sub))
|
||||
(export "a" (global $export/a))
|
||||
@ -50,6 +50,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -2,7 +2,6 @@
|
||||
(type $v (func))
|
||||
(global $for/i (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
|
@ -1,8 +1,8 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(global $for/i (mut i32) (i32.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
@ -171,6 +171,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -5,7 +5,6 @@
|
||||
(global $game-of-life/h (mut i32) (i32.const 0))
|
||||
(global $game-of-life/s (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "init" (func $game-of-life/init))
|
||||
(export "step" (func $game-of-life/step))
|
||||
(export "memory" (memory $0))
|
||||
|
@ -4,8 +4,8 @@
|
||||
(global $game-of-life/w (mut i32) (i32.const 0))
|
||||
(global $game-of-life/h (mut i32) (i32.const 0))
|
||||
(global $game-of-life/s (mut i32) (i32.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "init" (func $game-of-life/init))
|
||||
(export "step" (func $game-of-life/step))
|
||||
(export "memory" (memory $0))
|
||||
@ -332,6 +332,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -1,7 +1,6 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "ifThenElse" (func $if/ifThenElse))
|
||||
(export "ifThen" (func $if/ifThen))
|
||||
(export "ifThenElseBlock" (func $if/ifThenElse))
|
||||
|
@ -1,7 +1,7 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "ifThenElse" (func $if/ifThenElse))
|
||||
(export "ifThen" (func $if/ifThen))
|
||||
(export "ifThenElseBlock" (func $if/ifThenElseBlock))
|
||||
@ -70,6 +70,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -2,7 +2,6 @@
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
|
@ -2,7 +2,6 @@
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
|
@ -3,8 +3,8 @@
|
||||
(type $v (func))
|
||||
(global $export/a i32 (i32.const 1))
|
||||
(global $export/b i32 (i32.const 2))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
@ -62,6 +62,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -1,7 +1,6 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
|
@ -1,7 +1,7 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
@ -163,6 +163,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -5,7 +5,6 @@
|
||||
(global $logical/f (mut f32) (f32.const 0))
|
||||
(global $logical/F (mut f64) (f64.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
|
@ -4,8 +4,8 @@
|
||||
(global $logical/I (mut i64) (i64.const 0))
|
||||
(global $logical/f (mut f32) (f32.const 0))
|
||||
(global $logical/F (mut f64) (f64.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
@ -291,6 +291,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -4,7 +4,6 @@
|
||||
(global $export/a i32 (i32.const 1))
|
||||
(global $export/b i32 (i32.const 2))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "add" (func $export/add))
|
||||
(export "renamed_sub" (func $export/sub))
|
||||
(export "renamed_a" (global $export/a))
|
||||
|
@ -3,8 +3,8 @@
|
||||
(type $v (func))
|
||||
(global $export/a i32 (i32.const 1))
|
||||
(global $export/b i32 (i32.const 2))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "add" (func $export/add))
|
||||
(export "renamed_sub" (func $export/sub))
|
||||
(export "renamed_a" (global $export/a))
|
||||
@ -68,6 +68,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -1,7 +1,6 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "doSwitch" (func $switch/doSwitch))
|
||||
(export "doSwitchDefaultFirst" (func $switch/doSwitchDefaultFirst))
|
||||
(export "doSwitchDefaultOmitted" (func $switch/doSwitchDefaultOmitted))
|
||||
|
@ -1,7 +1,7 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "doSwitch" (func $switch/doSwitch))
|
||||
(export "doSwitchDefaultFirst" (func $switch/doSwitchDefaultFirst))
|
||||
(export "doSwitchDefaultOmitted" (func $switch/doSwitchDefaultOmitted))
|
||||
@ -169,6 +169,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -2,7 +2,6 @@
|
||||
(type $v (func))
|
||||
(global $ternary/a (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
|
@ -1,8 +1,8 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(global $ternary/a (mut i32) (i32.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
@ -57,6 +57,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -6,7 +6,6 @@
|
||||
(type $iv (func (param i32)))
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "control$construct" (func $tlsf/control$construct))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
|
@ -6,7 +6,6 @@
|
||||
(type $iv (func (param i32)))
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "control$construct" (func $tlsf/control$construct))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
|
@ -21,8 +21,8 @@
|
||||
(global $tlsf/CONTROL$SL_BITMAP_OFFSET i32 (i32.const 20))
|
||||
(global $tlsf/SL_INDEX_COUNT i32 (i32.const 32))
|
||||
(global $tlsf/CONTROL$BLOCKS_OFFSET i32 (i32.const 112))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "control$construct" (func $tlsf/control$construct))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
@ -352,6 +352,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -5,7 +5,6 @@
|
||||
(global $unary/f (mut f32) (f32.const 0))
|
||||
(global $unary/F (mut f64) (f64.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
|
@ -4,8 +4,8 @@
|
||||
(global $unary/I (mut i64) (i64.const 0))
|
||||
(global $unary/f (mut f32) (f32.const 0))
|
||||
(global $unary/F (mut f64) (f64.const 0))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
@ -657,6 +657,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
@ -1,7 +1,6 @@
|
||||
(module
|
||||
(type $iv (func (param i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "loopWhile" (func $while/loopWhile))
|
||||
(export "loopWhileInWhile" (func $while/loopWhileInWhile))
|
||||
(export "memory" (memory $0))
|
||||
|
@ -1,7 +1,7 @@
|
||||
(module
|
||||
(type $iv (func (param i32)))
|
||||
(global $HEAP_START i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08\00\00\00")
|
||||
(export "loopWhile" (func $while/loopWhile))
|
||||
(export "loopWhileInWhile" (func $while/loopWhileInWhile))
|
||||
(export "memory" (memory $0))
|
||||
@ -84,6 +84,7 @@
|
||||
reinterpret
|
||||
select
|
||||
sizeof
|
||||
changetype
|
||||
isNaN
|
||||
isFinite
|
||||
assert
|
||||
|
Reference in New Issue
Block a user