Commit e6bb7d0
committed
[JSC] Do not check Cell / WebAssemblyGCObject types when incoming static type proves it
https://bugs.webkit.org/show_bug.cgi?id=297638
rdar://158734753
Reviewed by Justin Michaud.
Now input types are propagated well, and we can easily remove
unnecessary cell checks / WebAssemblyGCObject checks based on the proven
types of the input value. This patch adds definitelyIsCellOrNull and
definitelyIsWasmGCObjectOrNull, and using them to remove unnecessary
checks in wasm RefTest / RefCast.
* Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::emitRefTestOrCast):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::emitRefTestOrCast):
* Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp:
(JSC::Wasm::Type::definitelyIsCellOrNull const):
(JSC::Wasm::Type::definitelyIsWasmGCObjectOrNull const):
* Source/JavaScriptCore/wasm/generateWasmOpsHeader.py:
Canonical link: https://commits.webkit.org/298961@main1 parent 4911982 commit e6bb7d0
File tree
4 files changed
+76
-17
lines changed- Source/JavaScriptCore/wasm
4 files changed
+76
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2404 | 2404 | | |
2405 | 2405 | | |
2406 | 2406 | | |
2407 | | - | |
2408 | | - | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
2409 | 2411 | | |
2410 | 2412 | | |
2411 | 2413 | | |
| |||
2416 | 2418 | | |
2417 | 2419 | | |
2418 | 2420 | | |
2419 | | - | |
2420 | | - | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
2421 | 2425 | | |
2422 | 2426 | | |
2423 | 2427 | | |
| |||
2432 | 2436 | | |
2433 | 2437 | | |
2434 | 2438 | | |
2435 | | - | |
2436 | | - | |
2437 | | - | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
2438 | 2443 | | |
2439 | 2444 | | |
2440 | 2445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3697 | 3697 | | |
3698 | 3698 | | |
3699 | 3699 | | |
3700 | | - | |
3701 | | - | |
3702 | | - | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
3703 | 3706 | | |
3704 | 3707 | | |
3705 | 3708 | | |
| |||
3711 | 3714 | | |
3712 | 3715 | | |
3713 | 3716 | | |
3714 | | - | |
3715 | | - | |
3716 | | - | |
| 3717 | + | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
3717 | 3723 | | |
3718 | 3724 | | |
3719 | 3725 | | |
| |||
3730 | 3736 | | |
3731 | 3737 | | |
3732 | 3738 | | |
3733 | | - | |
3734 | | - | |
3735 | | - | |
3736 | | - | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
3737 | 3745 | | |
3738 | 3746 | | |
3739 | 3747 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
1179 | 1221 | | |
1180 | 1222 | | |
1181 | 1223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
279 | 283 | | |
280 | 284 | | |
281 | 285 | | |
| |||
0 commit comments