- Notifications
You must be signed in to change notification settings - Fork 670
/
Copy pathruntime-stub-export.debug.wat
225 lines (225 loc) · 5.19 KB
/
runtime-stub-export.debug.wat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
(module
(type$0 (func (parami32i32)))
(type$1 (func (parami32)))
(type$2 (func (parami32) (resulti32)))
(type$3 (func))
(type$4 (func (parami32i32i32i32)))
(type$5 (func (parami32i32) (resulti32)))
(import"env""abort" (func$~lib/builtins/abort (parami32i32i32i32)))
(global$~lib/rt/stub/startOffset (muti32) (i32.const0))
(global$~lib/rt/stub/offset (muti32) (i32.const0))
(global$~lib/rt/__rtti_basei32 (i32.const144))
(global$~lib/memory/__heap_basei32 (i32.const164))
(memory$01)
(data$0 (i32.const12) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00\00t\00o\00o\00\00l\00a\00r\00g\00e\00\00\00\00\00")
(data$1 (i32.const76) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00s\00t\00u\00b\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
(data$2 (i32.const144) "\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
(table$011funcref)
(elem$0 (i32.const1))
(export"__new" (func$~lib/rt/stub/__new))
(export"__pin" (func$~lib/rt/stub/__pin))
(export"__unpin" (func$~lib/rt/stub/__unpin))
(export"__collect" (func$~lib/rt/stub/__collect))
(export"__rtti_base" (global$~lib/rt/__rtti_base))
(export"memory" (memory$0))
(start$~start)
(func$~lib/rt/stub/maybeGrowMemory (param$newOffseti32)
(local$pagesBeforei32)
(local$maxOffseti32)
(local$pagesNeededi32)
(local$4i32)
(local$5i32)
(local$pagesWantedi32)
memory.size
local.set$pagesBefore
local.get$pagesBefore
i32.const16
i32.shl
i32.const15
i32.add
i32.const15
i32.const-1
i32.xor
i32.and
local.set$maxOffset
local.get$newOffset
local.get$maxOffset
i32.gt_u
if
local.get$newOffset
local.get$maxOffset
i32.sub
i32.const65535
i32.add
i32.const65535
i32.const-1
i32.xor
i32.and
i32.const16
i32.shr_u
local.set$pagesNeeded
local.get$pagesBefore
local.tee$4
local.get$pagesNeeded
local.tee$5
local.get$4
local.get$5
i32.gt_s
select
local.set$pagesWanted
local.get$pagesWanted
memory.grow
i32.const0
i32.lt_s
if
local.get$pagesNeeded
memory.grow
i32.const0
i32.lt_s
if
unreachable
end
end
end
local.get$newOffset
global.set$~lib/rt/stub/offset
)
(func$~lib/rt/common/BLOCK#set:mmInfo (param$thisi32) (param$mmInfoi32)
local.get$this
local.get$mmInfo
i32.store
)
(func$~lib/rt/stub/__alloc (param$sizei32) (resulti32)
(local$blocki32)
(local$ptri32)
(local$size|3i32)
(local$payloadSizei32)
local.get$size
i32.const1073741820
i32.gt_u
if
i32.const32
i32.const96
i32.const33
i32.const29
call$~lib/builtins/abort
unreachable
end
global.get$~lib/rt/stub/offset
local.set$block
global.get$~lib/rt/stub/offset
i32.const4
i32.add
local.set$ptr
block$~lib/rt/stub/computeSize|inlined.0 (resulti32)
local.get$size
local.set$size|3
local.get$size|3
i32.const4
i32.add
i32.const15
i32.add
i32.const15
i32.const-1
i32.xor
i32.and
i32.const4
i32.sub
br$~lib/rt/stub/computeSize|inlined.0
end
local.set$payloadSize
local.get$ptr
local.get$payloadSize
i32.add
call$~lib/rt/stub/maybeGrowMemory
local.get$block
local.get$payloadSize
call$~lib/rt/common/BLOCK#set:mmInfo
local.get$ptr
return
)
(func$~lib/rt/common/OBJECT#set:gcInfo (param$thisi32) (param$gcInfoi32)
local.get$this
local.get$gcInfo
i32.storeoffset=4
)
(func$~lib/rt/common/OBJECT#set:gcInfo2 (param$thisi32) (param$gcInfo2i32)
local.get$this
local.get$gcInfo2
i32.storeoffset=8
)
(func$~lib/rt/common/OBJECT#set:rtId (param$thisi32) (param$rtIdi32)
local.get$this
local.get$rtId
i32.storeoffset=12
)
(func$~lib/rt/common/OBJECT#set:rtSize (param$thisi32) (param$rtSizei32)
local.get$this
local.get$rtSize
i32.storeoffset=16
)
(func$~lib/rt/stub/__new (param$sizei32) (param$idi32) (resulti32)
(local$ptri32)
(local$objecti32)
local.get$size
i32.const1073741804
i32.gt_u
if
i32.const32
i32.const96
i32.const86
i32.const30
call$~lib/builtins/abort
unreachable
end
i32.const16
local.get$size
i32.add
call$~lib/rt/stub/__alloc
local.set$ptr
local.get$ptr
i32.const4
i32.sub
local.set$object
local.get$object
i32.const0
call$~lib/rt/common/OBJECT#set:gcInfo
local.get$object
i32.const0
call$~lib/rt/common/OBJECT#set:gcInfo2
local.get$object
local.get$id
call$~lib/rt/common/OBJECT#set:rtId
local.get$object
local.get$size
call$~lib/rt/common/OBJECT#set:rtSize
local.get$ptr
i32.const16
i32.add
return
)
(func$~lib/rt/stub/__pin (param$ptri32) (resulti32)
local.get$ptr
return
)
(func$~lib/rt/stub/__unpin (param$ptri32)
)
(func$~lib/rt/stub/__collect
)
(func$~start
global.get$~lib/memory/__heap_base
i32.const4
i32.add
i32.const15
i32.add
i32.const15
i32.const-1
i32.xor
i32.and
i32.const4
i32.sub
global.set$~lib/rt/stub/startOffset
global.get$~lib/rt/stub/startOffset
global.set$~lib/rt/stub/offset
)
)