Commit 63ec471
committed
Respect singleton handles in codegen
Add a singleton_has_handle flag to MappedClass and initialize it when mapping classes. Compute is_singleton in TypeMapper and avoid requiring an instance handle for methods of true singletons by adjusting needs_instance_handle logic. In generator, compute has_handle_classes (any class that is not a singleton or a singleton that has a handle) and expose it in the file context as has_handle_classes. These changes make handle/FFI generation aware of singleton classes that do not require instance handles.1 parent 14a0ac7 commit 63ec471
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
692 | 693 | | |
693 | 694 | | |
694 | 695 | | |
| 696 | + | |
695 | 697 | | |
696 | 698 | | |
697 | 699 | | |
| |||
751 | 753 | | |
752 | 754 | | |
753 | 755 | | |
754 | | - | |
| 756 | + | |
755 | 757 | | |
756 | 758 | | |
757 | 759 | | |
| |||
774 | 776 | | |
775 | 777 | | |
776 | 778 | | |
| 779 | + | |
777 | 780 | | |
778 | 781 | | |
779 | 782 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| 195 | + | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
| |||
0 commit comments