Commit 30d1e9f
TO_BOOL optimizations
Summary:
There's a number of optimizations that can be applied to `TO_BOOL`.
If we're doing a `LOAD_CONST` and then `TO_BOOL` it can be calculated statically.
If we're doing a compare then there's a special form that ensures a bool is pushed instead of doing the conversion in the byte code.
Reviewed By: alexmalyshev
Differential Revision: D80763700
fbshipit-source-id: 4ad34ff26055b4ddb1ec7c3c9184d3bb2d9112dc1 parent 41f4b91 commit 30d1e9f
1 file changed
+24
-1
lines changedLines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
764 | | - | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
765 | 775 | | |
766 | 776 | | |
767 | 777 | | |
| |||
887 | 897 | | |
888 | 898 | | |
889 | 899 | | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
890 | 912 | | |
891 | 913 | | |
892 | 914 | | |
893 | 915 | | |
894 | 916 | | |
895 | 917 | | |
896 | 918 | | |
| 919 | + | |
897 | 920 | | |
0 commit comments