Commit f534c13
committed
[dart2js, ddc] Slightly quicker 'as' checks for primitve types
We have special methods in the rti library for checks like `as int`
and `as String?`. dart2js uses these when the type is known. This
change installs them on the `_as` property, so that we get a small
performance boost from calling a direct method rather than the `_as`
method calling the `_is` method.
Change-Id: Ia40a2fc7791f38590655a9b249fd9c36fb45369e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407604
Reviewed-by: Nicholas Shahan <[email protected]>1 parent 81f7324 commit f534c13
File tree
1 file changed
+23
-0
lines changed1 file changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1444 | 1467 | | |
1445 | 1468 | | |
1446 | 1469 | | |
| |||
0 commit comments