fix rogue releases

This commit is contained in:
dcode 2019-05-21 00:38:48 +02:00
parent 3e480d9423
commit 1cbf3fc885
27 changed files with 53330 additions and 54655 deletions

View File

@ -2201,16 +2201,16 @@ export class Compiler extends DiagnosticEmitter {
var stmts = new Array<ExpressionRef>(); var stmts = new Array<ExpressionRef>();
this.performAutoreleases(flow, stmts); this.performAutoreleases(flow, stmts);
this.finishAutoreleases(flow, stmts); this.finishAutoreleases(flow, stmts);
if (returnType.isManaged) {
// Make sure that the return value is retained for the caller // Make sure that the return value is retained for the caller
if (!this.skippedAutoreleases.has(expr)) expr = this.makeRetain(expr); if (returnType.isManaged && !this.skippedAutoreleases.has(expr)) expr = this.makeRetain(expr);
if (stmts.length) {
let temp = flow.getAndFreeTempLocal(returnType, false); if (stmts.length) {
stmts.unshift( let temp = flow.getAndFreeTempLocal(returnType, false);
module.createSetLocal(temp.index, expr) stmts.unshift(
); module.createSetLocal(temp.index, expr)
expr = module.createGetLocal(temp.index, returnType.toNativeType()); );
} expr = module.createGetLocal(temp.index, returnType.toNativeType());
} }
flow.freeScopedLocals(); flow.freeScopedLocals();
@ -6622,22 +6622,22 @@ export class Compiler extends DiagnosticEmitter {
clearFlags: bool = true clearFlags: bool = true
): ExpressionRef { ): ExpressionRef {
if (!stmts) stmts = new Array<ExpressionRef>(); if (!stmts) stmts = new Array<ExpressionRef>();
stmts.push(
this.module.createNop()
);
var lengthBefore = stmts.length;
this.performAutoreleases(flow, stmts, clearFlags); this.performAutoreleases(flow, stmts, clearFlags);
if (stmts.length) { if (stmts.length > lengthBefore) {
let nativeType = valueType.toNativeType(); let nativeType = valueType.toNativeType();
let temp = flow.getAndFreeTempLocal(valueType, !flow.canOverflow(valueExpr, valueType)); let temp = flow.getAndFreeTempLocal(valueType, !flow.canOverflow(valueExpr, valueType));
let module = this.module; let module = this.module;
stmts.unshift( stmts[lengthBefore - 1] = module.createSetLocal(temp.index, valueExpr); // nop -> set
module.createSetLocal(temp.index, valueExpr),
);
stmts.push( stmts.push(
module.createGetLocal(temp.index, nativeType) module.createGetLocal(temp.index, nativeType) // append get
); );
return module.createBlock(null, stmts, nativeType); return module.createBlock(null, stmts, nativeType);
} else if (stmts.length) { } else if (stmts.length > 1) {
stmts.push( stmts[lengthBefore - 1] = valueExpr; // nop -> value
valueExpr
);
return this.module.createBlock(null, stmts, valueType.toNativeType()); return this.module.createBlock(null, stmts, valueType.toNativeType());
} }
return valueExpr; return valueExpr;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1835,7 +1835,6 @@
) )
(func $start:rc/logical-and-mismatch (; 23 ;) (type $FUNCSIG$v) (func $start:rc/logical-and-mismatch (; 23 ;) (type $FUNCSIG$v)
(local $0 i32) (local $0 i32)
(local $1 i32)
i32.const 0 i32.const 0
call $rc/logical-and-mismatch/Ref#constructor call $rc/logical-and-mismatch/Ref#constructor
global.set $rc/logical-and-mismatch/gloRef global.set $rc/logical-and-mismatch/gloRef
@ -1843,12 +1842,10 @@
call $rc/logical-and-mismatch/getRef call $rc/logical-and-mismatch/getRef
local.tee $0 local.tee $0
if (result i32) if (result i32)
global.get $rc/logical-and-mismatch/gloRef
call $~lib/rt/purerc/__retain
local.set $1
local.get $0 local.get $0
call $~lib/rt/purerc/__release call $~lib/rt/purerc/__release
local.get $1 global.get $rc/logical-and-mismatch/gloRef
call $~lib/rt/purerc/__retain
else else
local.get $0 local.get $0
end end
@ -1873,11 +1870,9 @@
call $rc/logical-and-mismatch/getRef call $rc/logical-and-mismatch/getRef
local.tee $0 local.tee $0
if (result i32) if (result i32)
call $rc/logical-and-mismatch/getRef
local.set $1
local.get $0 local.get $0
call $~lib/rt/purerc/__release call $~lib/rt/purerc/__release
local.get $1 call $rc/logical-and-mismatch/getRef
else else
local.get $0 local.get $0
end end

View File

@ -1835,7 +1835,6 @@
) )
(func $start:rc/logical-or-mismatch (; 23 ;) (type $FUNCSIG$v) (func $start:rc/logical-or-mismatch (; 23 ;) (type $FUNCSIG$v)
(local $0 i32) (local $0 i32)
(local $1 i32)
i32.const 0 i32.const 0
call $rc/logical-or-mismatch/Ref#constructor call $rc/logical-or-mismatch/Ref#constructor
global.set $rc/logical-or-mismatch/gloRef global.set $rc/logical-or-mismatch/gloRef
@ -1845,12 +1844,10 @@
if (result i32) if (result i32)
local.get $0 local.get $0
else else
global.get $rc/logical-or-mismatch/gloRef
call $~lib/rt/purerc/__retain
local.set $1
local.get $0 local.get $0
call $~lib/rt/purerc/__release call $~lib/rt/purerc/__release
local.get $1 global.get $rc/logical-or-mismatch/gloRef
call $~lib/rt/purerc/__retain
end end
local.set $0 local.set $0
local.get $0 local.get $0
@ -1875,11 +1872,9 @@
if (result i32) if (result i32)
local.get $0 local.get $0
else else
call $rc/logical-or-mismatch/getRef
local.set $1
local.get $0 local.get $0
call $~lib/rt/purerc/__release call $~lib/rt/purerc/__release
local.get $1 call $rc/logical-or-mismatch/getRef
end end
local.set $0 local.set $0
local.get $0 local.get $0

View File

@ -1835,7 +1835,6 @@
) )
(func $start:rc/logical-or-mismatch (; 23 ;) (type $FUNCSIG$v) (func $start:rc/logical-or-mismatch (; 23 ;) (type $FUNCSIG$v)
(local $0 i32) (local $0 i32)
(local $1 i32)
i32.const 0 i32.const 0
call $rc/logical-or-mismatch/Ref#constructor call $rc/logical-or-mismatch/Ref#constructor
global.set $rc/logical-or-mismatch/gloRef global.set $rc/logical-or-mismatch/gloRef
@ -1845,12 +1844,10 @@
if (result i32) if (result i32)
local.get $0 local.get $0
else else
global.get $rc/logical-or-mismatch/gloRef
call $~lib/rt/purerc/__retain
local.set $1
local.get $0 local.get $0
call $~lib/rt/purerc/__release call $~lib/rt/purerc/__release
local.get $1 global.get $rc/logical-or-mismatch/gloRef
call $~lib/rt/purerc/__retain
end end
local.set $0 local.set $0
local.get $0 local.get $0
@ -1875,11 +1872,9 @@
if (result i32) if (result i32)
local.get $0 local.get $0
else else
call $rc/logical-or-mismatch/getRef
local.set $1
local.get $0 local.get $0
call $~lib/rt/purerc/__release call $~lib/rt/purerc/__release
local.get $1 call $rc/logical-or-mismatch/getRef
end end
local.set $0 local.set $0
local.get $0 local.get $0

View File

@ -2,32 +2,45 @@
(type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32)))
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$v (func))
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\10\00\00\00\1a") (data (i32.const 8) "^\00\00\00\01\00\00\00\10\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y\00")
(data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 120) "\1a\00\00\00\01\00\00\00\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00")
(data (i32.const 56) "\10") (data (i32.const 168) "$\00\00\00\01\00\00\00\10\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00")
(data (i32.const 72) "\10\00\00\00\1c") (data (i32.const 224) "\00\00\00\00\01\00\00\00\10\00\00\00\00\00\00\00")
(data (i32.const 88) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") (data (i32.const 240) "\1c\00\00\00\01\00\00\00\10\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00")
(data (i32.const 120) "\10\00\00\00\08") (data (i32.const 288) "\08\00\00\00\01\00\00\00\10\00\00\00\08\00\00\00n\00u\00l\00l\00")
(data (i32.const 136) "n\00u\00l\00l") (table $0 1 funcref)
(elem (i32.const 0) $null)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess))
(export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess)) (export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess))
(export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall))
(export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess))
(export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall))
(func $~lib/array/Array<~lib/array/Array<i32>>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/array/Array<~lib/array/Array<i32>>#__unchecked_get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0
i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
i32.load
call $~lib/rt/stub/__retain
)
(func $~lib/array/Array<~lib/array/Array<i32>>#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1 local.get $1
local.get $0 local.get $0
i32.load offset=12 i32.load offset=12
i32.ge_u i32.ge_u
if if
i32.const 0
i32.const 24 i32.const 24
i32.const 96 i32.const 136
i32.const 97
i32.const 45 i32.const 45
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
@ -39,13 +52,18 @@
i32.shr_u i32.shr_u
i32.ge_u i32.ge_u
if if
i32.const 0 i32.const 184
i32.const 24 i32.const 136
i32.const 99 i32.const 100
i32.const 61 i32.const 61
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
end end
local.get $0
local.get $1
call $~lib/array/Array<~lib/array/Array<i32>>#__unchecked_get
)
(func $~lib/array/Array<i32>#__unchecked_get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0 local.get $0
i32.load offset=4 i32.load offset=4
local.get $1 local.get $1
@ -54,158 +72,375 @@
i32.add i32.add
i32.load i32.load
) )
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<i32>#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
i32.const 1 local.get $1
local.get $0 local.get $0
i32.load offset=8 i32.load offset=8
i32.const 2 i32.const 2
i32.shr_u i32.shr_u
i32.ge_u i32.ge_u
if if
i32.const 0 i32.const 184
i32.const 24 i32.const 136
i32.const 99 i32.const 100
i32.const 61 i32.const 61
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
end end
local.get $0
local.get $1
call $~lib/array/Array<i32>#__unchecked_get
)
(func $std/array-access/i32ArrayArrayElementAccess (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0
i32.const 0
call $~lib/array/Array<~lib/array/Array<i32>>#__get
local.tee $1
i32.const 1
call $~lib/array/Array<i32>#__get
local.set $2
local.get $1
call $~lib/rt/stub/__release
local.get $0
call $~lib/rt/stub/__release
local.get $2
)
(func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0 local.get $0
i32.load offset=4 i32.load offset=4
i32.const 4 local.get $1
i32.const 2
i32.shl
i32.add i32.add
i32.load i32.load
call $~lib/rt/stub/__retain
) )
(func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<~lib/string/String>#__get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
local.get $0 local.get $0
i32.const 0 i32.load offset=12
call $~lib/array/Array<~lib/array/Array<i32>>#__get i32.ge_u
call $~lib/array/Array<i32>#__get if
i32.const 24
i32.const 136
i32.const 97
i32.const 45
call $~lib/builtins/abort
unreachable
end
local.get $1
local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 184
i32.const 136
i32.const 100
i32.const 61
call $~lib/builtins/abort
unreachable
end
local.get $0
local.get $1
call $~lib/array/Array<~lib/string/String>#__unchecked_get
) )
(func $std/array-access/stringArrayPropertyAccess (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/string/String#get:length (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.const 0
call $~lib/array/Array<~lib/array/Array<i32>>#__get
i32.const 16 i32.const 16
i32.sub i32.sub
i32.load offset=4 i32.load offset=12
i32.const 1 i32.const 1
i32.shr_u i32.shr_u
) )
(func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $std/array-access/stringArrayPropertyAccess (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $3 i32) (local $1 i32)
(local $2 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0
i32.const 0
call $~lib/array/Array<~lib/string/String>#__get
local.tee $1
call $~lib/string/String#get:length
local.set $2
local.get $1
call $~lib/rt/stub/__release
local.get $0
call $~lib/rt/stub/__release
local.get $2
)
(func $~lib/util/string/compareImpl (; 10 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $2
call $~lib/rt/stub/__retain
drop
i32.const 0
local.set $5
local.get $0
local.get $1 local.get $1
i32.const 1 i32.const 1
i32.shl i32.shl
local.get $0
i32.add i32.add
local.set $0 local.set $6
i32.const 72 local.get $2
local.set $1 local.get $3
loop $continue|0 i32.const 1
local.get $2 i32.shl
if (result i32) i32.add
local.get $0 local.set $7
i32.load16_u block $break|0
local.get $1 loop $continue|0
i32.load16_u local.get $4
i32.sub if (result i32)
local.tee $3 local.get $6
i32.eqz i32.load16_u
else local.get $7
i32.const 0 i32.load16_u
end i32.sub
if local.tee $5
local.get $2 i32.eqz
i32.const 1 else
i32.sub i32.const 0
local.set $2 end
local.get $0 if
i32.const 2 local.get $4
i32.add i32.const 1
local.set $0 i32.sub
local.get $1 local.set $4
i32.const 2 local.get $6
i32.add i32.const 2
local.set $1 i32.add
br $continue|0 local.set $6
local.get $7
i32.const 2
i32.add
local.set $7
br $continue|0
end
end end
end end
local.get $3 local.get $5
) local.set $8
(func $~lib/string/String#startsWith (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
local.get $0 local.get $0
call $~lib/rt/stub/__release
local.get $2
call $~lib/rt/stub/__release
local.get $8
)
(func $~lib/string/String#startsWith (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
local.get $1
call $~lib/rt/stub/__retain
drop
local.get $0
i32.const 0
i32.ne
i32.eqz i32.eqz
if if
i32.const 0 i32.const 0
i32.const 88 i32.const 256
i32.const 178 i32.const 171
i32.const 4 i32.const 4
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
end end
i32.const 60
i32.load
i32.const 1
i32.shr_u
local.tee $1
local.set $2
local.get $1 local.get $1
i32.const 0 i32.const 0
i32.eq
if
i32.const 304
local.get $1
call $~lib/rt/stub/__retainRelease
local.set $1
end
local.get $2
local.set $3
local.get $0 local.get $0
i32.const 16 call $~lib/string/String#get:length
i32.sub local.set $4
i32.load offset=4 local.get $3
i32.const 1 local.tee $5
i32.shr_u
local.tee $1
i32.const 0 i32.const 0
local.get $1 local.tee $6
local.get $5
local.get $6
i32.gt_s
select
local.tee $5
local.get $4
local.tee $6
local.get $5
local.get $6
i32.lt_s i32.lt_s
select select
local.tee $3 local.set $7
i32.add
local.get $1 local.get $1
call $~lib/string/String#get:length
local.set $8
local.get $8
local.get $7
i32.add
local.get $4
i32.gt_s i32.gt_s
if if
i32.const 0 i32.const 0
local.set $5
local.get $1
call $~lib/rt/stub/__release
local.get $5
return return
end end
local.get $0 local.get $0
local.get $3 local.get $7
local.get $2 local.get $1
i32.const 0
local.get $8
call $~lib/util/string/compareImpl call $~lib/util/string/compareImpl
i32.eqz i32.eqz
local.set $5
local.get $1
call $~lib/rt/stub/__release
local.get $5
) )
(func $std/array-access/stringArrayMethodCall (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayMethodCall (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0 local.get $0
i32.const 0 i32.const 0
call $~lib/array/Array<~lib/array/Array<i32>>#__get call $~lib/array/Array<~lib/string/String>#__get
local.tee $1
i32.const 240
i32.const 0
call $~lib/string/String#startsWith call $~lib/string/String#startsWith
) local.set $2
(func $std/array-access/stringArrayArrayPropertyAccess (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $1
call $~lib/rt/stub/__release
local.get $0
call $~lib/rt/stub/__release
local.get $2
)
(func $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__unchecked_get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0 local.get $0
i32.const 0
call $~lib/array/Array<~lib/array/Array<i32>>#__get
i32.const 1
call $~lib/array/Array<~lib/array/Array<i32>>#__get
i32.const 16
i32.sub
i32.load offset=4 i32.load offset=4
i32.const 1 local.get $1
i32.shr_u i32.const 2
i32.shl
i32.add
i32.load
call $~lib/rt/stub/__retain
) )
(func $std/array-access/stringArrayArrayMethodCall (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
local.get $0
i32.load offset=12
i32.ge_u
if
i32.const 24
i32.const 136
i32.const 97
i32.const 45
call $~lib/builtins/abort
unreachable
end
local.get $1
local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 184
i32.const 136
i32.const 100
i32.const 61
call $~lib/builtins/abort
unreachable
end
local.get $0
local.get $1
call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__unchecked_get
)
(func $std/array-access/stringArrayArrayPropertyAccess (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0 local.get $0
i32.const 0 i32.const 0
call $~lib/array/Array<~lib/array/Array<i32>>#__get call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get
local.tee $1
i32.const 1 i32.const 1
call $~lib/array/Array<~lib/array/Array<i32>>#__get call $~lib/array/Array<~lib/string/String>#__get
call $~lib/string/String#startsWith local.tee $2
call $~lib/string/String#get:length
local.set $3
local.get $1
call $~lib/rt/stub/__release
local.get $2
call $~lib/rt/stub/__release
local.get $0
call $~lib/rt/stub/__release
local.get $3
) )
(func $null (; 10 ;) (type $FUNCSIG$v) (func $std/array-access/stringArrayArrayMethodCall (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0
i32.const 0
call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get
local.tee $1
i32.const 1
call $~lib/array/Array<~lib/string/String>#__get
local.tee $2
i32.const 240
i32.const 0
call $~lib/string/String#startsWith
local.set $3
local.get $1
call $~lib/rt/stub/__release
local.get $2
call $~lib/rt/stub/__release
local.get $0
call $~lib/rt/stub/__release
local.get $3
)
(func $~lib/rt/stub/__retain (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
)
(func $~lib/rt/stub/__retainRelease (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0
)
(func $~lib/rt/stub/__release (; 19 ;) (type $FUNCSIG$vi) (param $0 i32)
nop nop
) )
(func $null (; 20 ;) (type $FUNCSIG$v)
)
) )

View File

@ -4,16 +4,18 @@
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32)))
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$v (func)) (type $FUNCSIG$v (func))
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 8) "^\00\00\00\01\00\00\00\10\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y\00")
(data (i32.const 56) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 120) "\1a\00\00\00\01\00\00\00\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00")
(data (i32.const 72) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") (data (i32.const 168) "$\00\00\00\01\00\00\00\10\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00")
(data (i32.const 120) "\10\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") (data (i32.const 224) "\00\00\00\00\01\00\00\00\10\00\00\00\00\00\00\00")
(data (i32.const 240) "\1c\00\00\00\01\00\00\00\10\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00")
(data (i32.const 288) "\08\00\00\00\01\00\00\00\10\00\00\00\08\00\00\00n\00u\00l\00l\00")
(table $0 1 funcref) (table $0 1 funcref)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
(global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16))
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess))
(export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess)) (export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess))
@ -28,6 +30,7 @@
i32.shl i32.shl
i32.add i32.add
i32.load i32.load
call $~lib/rt/stub/__retain
) )
(func $~lib/array/Array<~lib/array/Array<i32>>#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/array/Array<~lib/array/Array<i32>>#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1 local.get $1
@ -35,9 +38,9 @@
i32.load offset=12 i32.load offset=12
i32.ge_u i32.ge_u
if if
i32.const 0
i32.const 24 i32.const 24
i32.const 96 i32.const 136
i32.const 97
i32.const 45 i32.const 45
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
@ -49,9 +52,9 @@
i32.shr_u i32.shr_u
i32.ge_u i32.ge_u
if if
i32.const 0 i32.const 184
i32.const 24 i32.const 136
i32.const 99 i32.const 100
i32.const 61 i32.const 61
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
@ -77,9 +80,9 @@
i32.shr_u i32.shr_u
i32.ge_u i32.ge_u
if if
i32.const 0 i32.const 184
i32.const 24 i32.const 136
i32.const 99 i32.const 100
i32.const 61 i32.const 61
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
@ -89,11 +92,23 @@
call $~lib/array/Array<i32>#__unchecked_get call $~lib/array/Array<i32>#__unchecked_get
) )
(func $std/array-access/i32ArrayArrayElementAccess (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/i32ArrayArrayElementAccess (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0 local.get $0
i32.const 0 i32.const 0
call $~lib/array/Array<~lib/array/Array<i32>>#__get call $~lib/array/Array<~lib/array/Array<i32>>#__get
local.tee $1
i32.const 1 i32.const 1
call $~lib/array/Array<i32>#__get call $~lib/array/Array<i32>#__get
local.set $2
local.get $1
call $~lib/rt/stub/__release
local.get $0
call $~lib/rt/stub/__release
local.get $2
) )
(func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0 local.get $0
@ -103,6 +118,7 @@
i32.shl i32.shl
i32.add i32.add
i32.load i32.load
call $~lib/rt/stub/__retain
) )
(func $~lib/array/Array<~lib/string/String>#__get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/array/Array<~lib/string/String>#__get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1 local.get $1
@ -110,9 +126,9 @@
i32.load offset=12 i32.load offset=12
i32.ge_u i32.ge_u
if if
i32.const 0
i32.const 24 i32.const 24
i32.const 96 i32.const 136
i32.const 97
i32.const 45 i32.const 45
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
@ -124,9 +140,9 @@
i32.shr_u i32.shr_u
i32.ge_u i32.ge_u
if if
i32.const 0 i32.const 184
i32.const 24 i32.const 136
i32.const 99 i32.const 100
i32.const 61 i32.const 61
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
@ -137,22 +153,41 @@
) )
(func $~lib/string/String#get:length (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/string/String#get:length (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
global.get $~lib/util/runtime/HEADER_SIZE i32.const 16
i32.sub i32.sub
i32.load offset=4 i32.load offset=12
i32.const 1 i32.const 1
i32.shr_u i32.shr_u
) )
(func $std/array-access/stringArrayPropertyAccess (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayPropertyAccess (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0 local.get $0
i32.const 0 i32.const 0
call $~lib/array/Array<~lib/string/String>#__get call $~lib/array/Array<~lib/string/String>#__get
local.tee $1
call $~lib/string/String#get:length call $~lib/string/String#get:length
local.set $2
local.get $1
call $~lib/rt/stub/__release
local.get $0
call $~lib/rt/stub/__release
local.get $2
) )
(func $~lib/util/string/compareImpl (; 10 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (func $~lib/util/string/compareImpl (; 10 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(local $5 i32) (local $5 i32)
(local $6 i32) (local $6 i32)
(local $7 i32) (local $7 i32)
(local $8 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $2
call $~lib/rt/stub/__retain
drop
i32.const 0 i32.const 0
local.set $5 local.set $5
local.get $0 local.get $0
@ -182,25 +217,29 @@
i32.const 0 i32.const 0
end end
if if
block local.get $4
local.get $4 i32.const 1
i32.const 1 i32.sub
i32.sub local.set $4
local.set $4 local.get $6
local.get $6 i32.const 2
i32.const 2 i32.add
i32.add local.set $6
local.set $6 local.get $7
local.get $7 i32.const 2
i32.const 2 i32.add
i32.add local.set $7
local.set $7
end
br $continue|0 br $continue|0
end end
end end
end end
local.get $5 local.get $5
local.set $8
local.get $0
call $~lib/rt/stub/__release
local.get $2
call $~lib/rt/stub/__release
local.get $8
) )
(func $~lib/string/String#startsWith (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/string/String#startsWith (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
@ -209,14 +248,17 @@
(local $6 i32) (local $6 i32)
(local $7 i32) (local $7 i32)
(local $8 i32) (local $8 i32)
local.get $1
call $~lib/rt/stub/__retain
drop
local.get $0 local.get $0
i32.const 0 i32.const 0
i32.ne i32.ne
i32.eqz i32.eqz
if if
i32.const 0 i32.const 0
i32.const 88 i32.const 256
i32.const 178 i32.const 171
i32.const 4 i32.const 4
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
@ -225,7 +267,9 @@
i32.const 0 i32.const 0
i32.eq i32.eq
if if
i32.const 136 i32.const 304
local.get $1
call $~lib/rt/stub/__retainRelease
local.set $1 local.set $1
end end
local.get $2 local.get $2
@ -259,6 +303,10 @@
i32.gt_s i32.gt_s
if if
i32.const 0 i32.const 0
local.set $5
local.get $1
call $~lib/rt/stub/__release
local.get $5
return return
end end
local.get $0 local.get $0
@ -268,14 +316,30 @@
local.get $8 local.get $8
call $~lib/util/string/compareImpl call $~lib/util/string/compareImpl
i32.eqz i32.eqz
local.set $5
local.get $1
call $~lib/rt/stub/__release
local.get $5
) )
(func $std/array-access/stringArrayMethodCall (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayMethodCall (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0 local.get $0
i32.const 0 i32.const 0
call $~lib/array/Array<~lib/string/String>#__get call $~lib/array/Array<~lib/string/String>#__get
i32.const 72 local.tee $1
i32.const 240
i32.const 0 i32.const 0
call $~lib/string/String#startsWith call $~lib/string/String#startsWith
local.set $2
local.get $1
call $~lib/rt/stub/__release
local.get $0
call $~lib/rt/stub/__release
local.get $2
) )
(func $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__unchecked_get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__unchecked_get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0 local.get $0
@ -285,6 +349,7 @@
i32.shl i32.shl
i32.add i32.add
i32.load i32.load
call $~lib/rt/stub/__retain
) )
(func $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1 local.get $1
@ -292,9 +357,9 @@
i32.load offset=12 i32.load offset=12
i32.ge_u i32.ge_u
if if
i32.const 0
i32.const 24 i32.const 24
i32.const 96 i32.const 136
i32.const 97
i32.const 45 i32.const 45
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
@ -306,9 +371,9 @@
i32.shr_u i32.shr_u
i32.ge_u i32.ge_u
if if
i32.const 0 i32.const 184
i32.const 24 i32.const 136
i32.const 99 i32.const 100
i32.const 61 i32.const 61
call $~lib/builtins/abort call $~lib/builtins/abort
unreachable unreachable
@ -318,23 +383,64 @@
call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__unchecked_get call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__unchecked_get
) )
(func $std/array-access/stringArrayArrayPropertyAccess (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayArrayPropertyAccess (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0 local.get $0
i32.const 0 i32.const 0
call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get
local.tee $1
i32.const 1 i32.const 1
call $~lib/array/Array<~lib/string/String>#__get call $~lib/array/Array<~lib/string/String>#__get
local.tee $2
call $~lib/string/String#get:length call $~lib/string/String#get:length
local.set $3
local.get $1
call $~lib/rt/stub/__release
local.get $2
call $~lib/rt/stub/__release
local.get $0
call $~lib/rt/stub/__release
local.get $3
) )
(func $std/array-access/stringArrayArrayMethodCall (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayArrayMethodCall (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
local.get $0
call $~lib/rt/stub/__retain
drop
local.get $0 local.get $0
i32.const 0 i32.const 0
call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get
local.tee $1
i32.const 1 i32.const 1
call $~lib/array/Array<~lib/string/String>#__get call $~lib/array/Array<~lib/string/String>#__get
i32.const 72 local.tee $2
i32.const 240
i32.const 0 i32.const 0
call $~lib/string/String#startsWith call $~lib/string/String#startsWith
local.set $3
local.get $1
call $~lib/rt/stub/__release
local.get $2
call $~lib/rt/stub/__release
local.get $0
call $~lib/rt/stub/__release
local.get $3
) )
(func $null (; 17 ;) (type $FUNCSIG$v) (func $~lib/rt/stub/__retain (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
)
(func $~lib/rt/stub/__retainRelease (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0
)
(func $~lib/rt/stub/__release (; 19 ;) (type $FUNCSIG$vi) (param $0 i32)
nop
)
(func $null (; 20 ;) (type $FUNCSIG$v)
) )
) )

View File

@ -1,5 +1,6 @@
{ {
"asc_flags": [ "asc_flags": [
"--runtime none" "--runtime half",
"--use ASC_RTRACE=1"
] ]
} }

File diff suppressed because it is too large Load Diff

View File

@ -38,3 +38,10 @@ assert(dynamicArrayRef.length == 3);
class RefWithCtor { constructor() {} } class RefWithCtor { constructor() {} }
var dynamicArrayRefWithCtor: RefWithCtor[] = [new RefWithCtor(), new RefWithCtor(), new RefWithCtor()]; var dynamicArrayRefWithCtor: RefWithCtor[] = [new RefWithCtor(), new RefWithCtor(), new RefWithCtor()];
assert(dynamicArrayRefWithCtor.length == 3); assert(dynamicArrayRefWithCtor.length == 3);
// Unleak globals
__release(changetype<usize>(emptyArrayI32));
__release(changetype<usize>(dynamicArrayI8));
__release(changetype<usize>(dynamicArrayI32));
__release(changetype<usize>(dynamicArrayRef));
__release(changetype<usize>(dynamicArrayRefWithCtor));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -980,6 +980,5 @@ class Ref { constructor() {} }
assert(subarrU32.toString() == "1"); assert(subarrU32.toString() == "1");
} }
// Unleak globals that'd otherwise retain a reference // Unleak globals
__release(changetype<usize>(arr));
arr = changetype<i32[]>(0);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -302,6 +302,6 @@ export function getString(): string {
return str; return str;
} }
// Unleak // Unleak globals
str = changetype<string>(0); __release(changetype<usize>(str));

File diff suppressed because it is too large Load Diff

View File

@ -3,22 +3,16 @@
(type $FUNCSIG$v (func)) (type $FUNCSIG$v (func))
(import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\10\00\00\00\1a") (data (i32.const 8) "\1a\00\00\00\01\00\00\00\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00")
(data (i32.const 24) "z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t") (data (i32.const 56) "\1a\00\00\00\01\00\00\00\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00")
(data (i32.const 56) "\10\00\00\00\1a") (data (i32.const 104) "\0e\00\00\00\01\00\00\00\10\00\00\00\0e\00\00\00o\00n\00e\00_\00i\00n\00t\00")
(data (i32.const 72) "z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t") (data (i32.const 136) "\0e\00\00\00\01\00\00\00\10\00\00\00\0e\00\00\00t\00w\00o\00_\00i\00n\00t\00")
(data (i32.const 104) "\10\00\00\00\0e") (data (i32.const 168) "\12\00\00\00\01\00\00\00\10\00\00\00\12\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00")
(data (i32.const 120) "o\00n\00e\00_\00i\00n\00t") (data (i32.const 208) "\10\00\00\00\01\00\00\00\10\00\00\00\10\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00")
(data (i32.const 136) "\10\00\00\00\0e") (data (i32.const 240) "\10\00\00\00\01\00\00\00\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00")
(data (i32.const 152) "t\00w\00o\00_\00i\00n\00t") (data (i32.const 272) "\10\00\00\00\01\00\00\00\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00")
(data (i32.const 168) "\10\00\00\00\12") (table $0 1 funcref)
(data (i32.const 184) "t\00h\00r\00e\00e\00_\00i\00n\00t") (elem (i32.const 0) $null)
(data (i32.const 208) "\10\00\00\00\10")
(data (i32.const 224) "f\00o\00u\00r\00_\00i\00n\00t")
(data (i32.const 240) "\10\00\00\00\10")
(data (i32.const 256) "f\00i\00v\00e\00_\00i\00n\00t")
(data (i32.const 272) "\10\00\00\00\10")
(data (i32.const 288) "f\00i\00v\00e\00_\00d\00b\00l")
(global $~lib/started (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0))
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "main" (func $std/trace/main)) (export "main" (func $std/trace/main))
@ -92,12 +86,14 @@
global.get $~lib/started global.get $~lib/started
i32.eqz i32.eqz
if if
call $start:std/trace call $start
i32.const 1 i32.const 1
global.set $~lib/started global.set $~lib/started
end end
) )
(func $null (; 3 ;) (type $FUNCSIG$v) (func $start (; 3 ;) (type $FUNCSIG$v)
nop call $start:std/trace
)
(func $null (; 4 ;) (type $FUNCSIG$v)
) )
) )

View File

@ -3,14 +3,14 @@
(type $FUNCSIG$v (func)) (type $FUNCSIG$v (func))
(import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00") (data (i32.const 8) "\1a\00\00\00\01\00\00\00\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00")
(data (i32.const 56) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00") (data (i32.const 56) "\1a\00\00\00\01\00\00\00\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00")
(data (i32.const 104) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00o\00n\00e\00_\00i\00n\00t\00") (data (i32.const 104) "\0e\00\00\00\01\00\00\00\10\00\00\00\0e\00\00\00o\00n\00e\00_\00i\00n\00t\00")
(data (i32.const 136) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00t\00w\00o\00_\00i\00n\00t\00") (data (i32.const 136) "\0e\00\00\00\01\00\00\00\10\00\00\00\0e\00\00\00t\00w\00o\00_\00i\00n\00t\00")
(data (i32.const 168) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00") (data (i32.const 168) "\12\00\00\00\01\00\00\00\10\00\00\00\12\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00")
(data (i32.const 208) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00") (data (i32.const 208) "\10\00\00\00\01\00\00\00\10\00\00\00\10\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00")
(data (i32.const 240) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00") (data (i32.const 240) "\10\00\00\00\01\00\00\00\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00")
(data (i32.const 272) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00") (data (i32.const 272) "\10\00\00\00\01\00\00\00\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00")
(table $0 1 funcref) (table $0 1 funcref)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
(global $~lib/started (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0))

View File

@ -1,5 +1,6 @@
{ {
"asc_flags": [ "asc_flags": [
"--runtime none" "--runtime half",
"--use ASC_RTRACE=1"
] ]
} }

File diff suppressed because one or more lines are too long

View File

@ -442,7 +442,6 @@ testArrayForEach<Uint64Array, u64>();
testArrayForEach<Float32Array, f32>(); testArrayForEach<Float32Array, f32>();
testArrayForEach<Float64Array, f64>(); testArrayForEach<Float64Array, f64>();
var testArrayReverseValues: i32[] = [1, 2, 3, 4, 5, 6, 7, 8, 9]; var testArrayReverseValues: i32[] = [1, 2, 3, 4, 5, 6, 7, 8, 9];
function testArrayReverse<TArray extends TypedArray<T>, T extends number>(): void { function testArrayReverse<TArray extends TypedArray<T>, T extends number>(): void {
var values = testArrayReverseValues; var values = testArrayReverseValues;
@ -480,3 +479,5 @@ testArrayReverse<Int64Array, i64>();
testArrayReverse<Uint64Array, u64>(); testArrayReverse<Uint64Array, u64>();
testArrayReverse<Float32Array, f32>(); testArrayReverse<Float32Array, f32>();
testArrayReverse<Float64Array, f64>(); testArrayReverse<Float64Array, f64>();
@start export function main(): void {}

File diff suppressed because one or more lines are too long