Commit 1105b43
authored
Optimize Promise data structures. (#3768)
This patch reworks several structures:
- Fulfill and reject reactions are combined into one collection. The values in this collection
are compressed: a capability followed by an optional fulfill and reject functions.
- Fulfill and reject reactions are directly stored, no need to allocate an object for them.
- The job queue directly stores its items, this saves a pointer to the value, and the
callback is replaced by an uint8 type.
- Promise status and already resolved is stored in extra_info.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com1 parent 1774cca commit 1105b43
8 files changed
Lines changed: 298 additions & 300 deletions
File tree
- jerry-core
- api
- ecma
- base
- operations
- jcontext
- lit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 79 | + | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
1616 | 1615 | | |
1617 | 1616 | | |
1618 | 1617 | | |
1619 | | - | |
| 1618 | + | |
1620 | 1619 | | |
1621 | 1620 | | |
1622 | 1621 | | |
1623 | 1622 | | |
1624 | 1623 | | |
1625 | 1624 | | |
1626 | | - | |
| 1625 | + | |
1627 | 1626 | | |
1628 | 1627 | | |
1629 | 1628 | | |
| |||
3331 | 3330 | | |
3332 | 3331 | | |
3333 | 3332 | | |
3334 | | - | |
3335 | | - | |
3336 | | - | |
| 3333 | + | |
| 3334 | + | |
3337 | 3335 | | |
3338 | | - | |
3339 | | - | |
| 3336 | + | |
3340 | 3337 | | |
3341 | 3338 | | |
3342 | 3339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
276 | 277 | | |
277 | | - | |
| 278 | + | |
278 | 279 | | |
279 | | - | |
280 | | - | |
281 | | - | |
| 280 | + | |
282 | 281 | | |
283 | | - | |
| 282 | + | |
284 | 283 | | |
285 | | - | |
286 | | - | |
287 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
288 | 288 | | |
289 | | - | |
290 | | - | |
291 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| |||
1145 | 1146 | | |
1146 | 1147 | | |
1147 | 1148 | | |
1148 | | - | |
1149 | | - | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
1150 | 1153 | | |
1151 | 1154 | | |
1152 | 1155 | | |
| |||
0 commit comments