Commit 9820c8d
[dart2wasm] Avoid array allocation when ending json object
When the json parser sees the end of a json object (i.e. the '}') it
currently creates a growable array in `popContainer()` but at the call
site it doesn't need the growable array, so it just gets the wasm array
and the length out.
We can avoid this array allocation by just directly accessing the
current container wasm array & length.
Change-Id: Ib66a3ddf98934c3c083347ff41c93ed4de2eeaf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409960
Commit-Queue: Martin Kustermann <[email protected]>
Reviewed-by: Ömer Ağacan <[email protected]>1 parent 75cda04 commit 9820c8d
1 file changed
+7
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | 164 | | |
175 | 165 | | |
176 | 166 | | |
| |||
220 | 210 | | |
221 | 211 | | |
222 | 212 | | |
223 | | - | |
224 | | - | |
225 | 213 | | |
226 | | - | |
227 | | - | |
| 214 | + | |
| 215 | + | |
228 | 216 | | |
| 217 | + | |
229 | 218 | | |
230 | 219 | | |
231 | 220 | | |
| |||
242 | 231 | | |
243 | 232 | | |
244 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
245 | 238 | | |
246 | 239 | | |
247 | 240 | | |
| |||
0 commit comments