Initial GC integration (#196)

This commit is contained in:
Daniel Wirtz
2018-08-02 18:23:02 +02:00
committed by GitHub
parent 671121bf70
commit dc0f271fc2
139 changed files with 7370 additions and 5016 deletions

View File

@ -14,7 +14,7 @@
(data (i32.const 24) "\12\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s")
(export "memory" (memory $0))
(start $start)
(func $~lib/string/String#get:lengthUTF8 (; 1 ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/string/String#get:lengthUTF8 (; 1 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -160,7 +160,7 @@
)
(get_local $1)
)
(func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/allocator/arena/__memory_allocate (; 2 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -246,12 +246,7 @@
)
(i32.const 0)
)
(func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32)
(call $~lib/allocator/arena/__memory_allocate
(get_local $0)
)
)
(func $~lib/string/String#toUTF8 (; 4 ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/string/String#toUTF8 (; 3 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -260,7 +255,7 @@
(local $6 i32)
(local $7 i32)
(set_local $5
(call $~lib/memory/memory.allocate
(call $~lib/allocator/arena/__memory_allocate
(call $~lib/string/String#get:lengthUTF8
(get_local $0)
)
@ -537,15 +532,10 @@
)
(get_local $5)
)
(func $~lib/allocator/arena/__memory_free (; 5 ;) (type $iv) (param $0 i32)
(func $~lib/allocator/arena/__memory_free (; 4 ;) (; has Stack IR ;) (type $iv) (param $0 i32)
(nop)
)
(func $~lib/memory/memory.free (; 6 ;) (type $iv) (param $0 i32)
(call $~lib/allocator/arena/__memory_free
(get_local $0)
)
)
(func $start (; 7 ;) (type $v)
(func $start (; 5 ;) (; has Stack IR ;) (type $v)
(set_global $~lib/allocator/arena/startOffset
(i32.const 64)
)
@ -761,7 +751,7 @@
(unreachable)
)
)
(call $~lib/memory/memory.free
(call $~lib/allocator/arena/__memory_free
(get_global $std/string-utf8/ptr)
)
)