@@ -61,13 +61,19 @@ fn members_from_base_class_are_available_in_subclasses() {
61
61
entry:
62
62
%self = alloca %__vtable_foo*, align 8
63
63
store %__vtable_foo* %0, %__vtable_foo** %self, align 8
64
+ %deref = load %__vtable_foo*, %__vtable_foo** %self, align 8
65
+ %__body = getelementptr inbounds %__vtable_foo, %__vtable_foo* %deref, i32 0, i32 0
66
+ store void (%foo*)* @foo, void (%foo*)** %__body, align 8
64
67
ret void
65
68
}
66
69
67
70
define void @__init___vtable_bar(%__vtable_bar* %0) {
68
71
entry:
69
72
%self = alloca %__vtable_bar*, align 8
70
73
store %__vtable_bar* %0, %__vtable_bar** %self, align 8
74
+ %deref = load %__vtable_bar*, %__vtable_bar** %self, align 8
75
+ %__body = getelementptr inbounds %__vtable_bar, %__vtable_bar* %deref, i32 0, i32 0
76
+ store void (%bar*)* @bar, void (%bar*)** %__body, align 8
71
77
ret void
72
78
}
73
79
@@ -218,20 +224,29 @@ fn write_to_parent_variable_qualified_access() {
218
224
entry:
219
225
%self = alloca %__vtable_fb*, align 8
220
226
store %__vtable_fb* %0, %__vtable_fb** %self, align 8
227
+ %deref = load %__vtable_fb*, %__vtable_fb** %self, align 8
228
+ %__body = getelementptr inbounds %__vtable_fb, %__vtable_fb* %deref, i32 0, i32 0
229
+ store void (%fb*)* @fb, void (%fb*)** %__body, align 8
221
230
ret void
222
231
}
223
232
224
233
define void @__init___vtable_fb2(%__vtable_fb2* %0) {
225
234
entry:
226
235
%self = alloca %__vtable_fb2*, align 8
227
236
store %__vtable_fb2* %0, %__vtable_fb2** %self, align 8
237
+ %deref = load %__vtable_fb2*, %__vtable_fb2** %self, align 8
238
+ %__body = getelementptr inbounds %__vtable_fb2, %__vtable_fb2* %deref, i32 0, i32 0
239
+ store void (%fb2*)* @fb2, void (%fb2*)** %__body, align 8
228
240
ret void
229
241
}
230
242
231
243
define void @__init___vtable_foo(%__vtable_foo* %0) {
232
244
entry:
233
245
%self = alloca %__vtable_foo*, align 8
234
246
store %__vtable_foo* %0, %__vtable_foo** %self, align 8
247
+ %deref = load %__vtable_foo*, %__vtable_foo** %self, align 8
248
+ %__body = getelementptr inbounds %__vtable_foo, %__vtable_foo* %deref, i32 0, i32 0
249
+ store void (%foo*)* @foo, void (%foo*)** %__body, align 8
235
250
ret void
236
251
}
237
252
@@ -442,7 +457,10 @@ fn write_to_parent_variable_in_instance() {
442
457
%self = alloca %__vtable_foo*, align 8
443
458
store %__vtable_foo* %0, %__vtable_foo** %self, align 8
444
459
%deref = load %__vtable_foo*, %__vtable_foo** %self, align 8
445
- %baz = getelementptr inbounds %__vtable_foo, %__vtable_foo* %deref, i32 0, i32 1
460
+ %__body = getelementptr inbounds %__vtable_foo, %__vtable_foo* %deref, i32 0, i32 0
461
+ store void (%foo*)* @foo, void (%foo*)** %__body, align 8
462
+ %deref1 = load %__vtable_foo*, %__vtable_foo** %self, align 8
463
+ %baz = getelementptr inbounds %__vtable_foo, %__vtable_foo* %deref1, i32 0, i32 1
446
464
store void (%foo*)* @foo__baz, void (%foo*)** %baz, align 8
447
465
ret void
448
466
}
@@ -452,7 +470,10 @@ fn write_to_parent_variable_in_instance() {
452
470
%self = alloca %__vtable_bar*, align 8
453
471
store %__vtable_bar* %0, %__vtable_bar** %self, align 8
454
472
%deref = load %__vtable_bar*, %__vtable_bar** %self, align 8
455
- %baz = getelementptr inbounds %__vtable_bar, %__vtable_bar* %deref, i32 0, i32 1
473
+ %__body = getelementptr inbounds %__vtable_bar, %__vtable_bar* %deref, i32 0, i32 0
474
+ store void (%bar*)* @bar, void (%bar*)** %__body, align 8
475
+ %deref1 = load %__vtable_bar*, %__vtable_bar** %self, align 8
476
+ %baz = getelementptr inbounds %__vtable_bar, %__vtable_bar* %deref1, i32 0, i32 1
456
477
store void (%foo*)* @foo__baz, void (%foo*)** %baz, align 8
457
478
ret void
458
479
}
@@ -654,20 +675,29 @@ fn array_in_parent_generated() {
654
675
entry:
655
676
%self = alloca %__vtable_grandparent*, align 8
656
677
store %__vtable_grandparent* %0, %__vtable_grandparent** %self, align 8
678
+ %deref = load %__vtable_grandparent*, %__vtable_grandparent** %self, align 8
679
+ %__body = getelementptr inbounds %__vtable_grandparent, %__vtable_grandparent* %deref, i32 0, i32 0
680
+ store void (%grandparent*)* @grandparent, void (%grandparent*)** %__body, align 8
657
681
ret void
658
682
}
659
683
660
684
define void @__init___vtable_parent(%__vtable_parent* %0) {
661
685
entry:
662
686
%self = alloca %__vtable_parent*, align 8
663
687
store %__vtable_parent* %0, %__vtable_parent** %self, align 8
688
+ %deref = load %__vtable_parent*, %__vtable_parent** %self, align 8
689
+ %__body = getelementptr inbounds %__vtable_parent, %__vtable_parent* %deref, i32 0, i32 0
690
+ store void (%parent*)* @parent, void (%parent*)** %__body, align 8
664
691
ret void
665
692
}
666
693
667
694
define void @__init___vtable_child(%__vtable_child* %0) {
668
695
entry:
669
696
%self = alloca %__vtable_child*, align 8
670
697
store %__vtable_child* %0, %__vtable_child** %self, align 8
698
+ %deref = load %__vtable_child*, %__vtable_child** %self, align 8
699
+ %__body = getelementptr inbounds %__vtable_child, %__vtable_child* %deref, i32 0, i32 0
700
+ store void (%child*)* @child, void (%child*)** %__body, align 8
671
701
ret void
672
702
}
673
703
@@ -881,20 +911,29 @@ fn complex_array_access_generated() {
881
911
entry:
882
912
%self = alloca %__vtable_grandparent*, align 8
883
913
store %__vtable_grandparent* %0, %__vtable_grandparent** %self, align 8
914
+ %deref = load %__vtable_grandparent*, %__vtable_grandparent** %self, align 8
915
+ %__body = getelementptr inbounds %__vtable_grandparent, %__vtable_grandparent* %deref, i32 0, i32 0
916
+ store void (%grandparent*)* @grandparent, void (%grandparent*)** %__body, align 8
884
917
ret void
885
918
}
886
919
887
920
define void @__init___vtable_parent(%__vtable_parent* %0) {
888
921
entry:
889
922
%self = alloca %__vtable_parent*, align 8
890
923
store %__vtable_parent* %0, %__vtable_parent** %self, align 8
924
+ %deref = load %__vtable_parent*, %__vtable_parent** %self, align 8
925
+ %__body = getelementptr inbounds %__vtable_parent, %__vtable_parent* %deref, i32 0, i32 0
926
+ store void (%parent*)* @parent, void (%parent*)** %__body, align 8
891
927
ret void
892
928
}
893
929
894
930
define void @__init___vtable_child(%__vtable_child* %0) {
895
931
entry:
896
932
%self = alloca %__vtable_child*, align 8
897
933
store %__vtable_child* %0, %__vtable_child** %self, align 8
934
+ %deref = load %__vtable_child*, %__vtable_child** %self, align 8
935
+ %__body = getelementptr inbounds %__vtable_child, %__vtable_child* %deref, i32 0, i32 0
936
+ store void (%child*)* @child, void (%child*)** %__body, align 8
898
937
ret void
899
938
}
900
939
@@ -1114,10 +1153,13 @@ fn this_in_method_call_chain() {
1114
1153
%self = alloca %__vtable_FB_Test*, align 8
1115
1154
store %__vtable_FB_Test* %0, %__vtable_FB_Test** %self, align 8
1116
1155
%deref = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1117
- %Step = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 1
1118
- store void (%FB_Test*)* @FB_Test__Step , void (%FB_Test*)** %Step , align 8
1156
+ %__body = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 0
1157
+ store void (%FB_Test*)* @FB_Test , void (%FB_Test*)** %__body , align 8
1119
1158
%deref1 = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1120
- %Increment = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref1, i32 0, i32 2
1159
+ %Step = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref1, i32 0, i32 1
1160
+ store void (%FB_Test*)* @FB_Test__Step, void (%FB_Test*)** %Step, align 8
1161
+ %deref2 = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1162
+ %Increment = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref2, i32 0, i32 2
1121
1163
store void (%FB_Test*)* @FB_Test__Increment, void (%FB_Test*)** %Increment, align 8
1122
1164
ret void
1123
1165
}
@@ -1224,7 +1266,10 @@ fn this_in_method_and_body_in_function_block() {
1224
1266
%self = alloca %__vtable_FB_Test*, align 8
1225
1267
store %__vtable_FB_Test* %0, %__vtable_FB_Test** %self, align 8
1226
1268
%deref = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1227
- %GetVal = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 1
1269
+ %__body = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 0
1270
+ store void (%FB_Test*)* @FB_Test, void (%FB_Test*)** %__body, align 8
1271
+ %deref1 = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1272
+ %GetVal = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref1, i32 0, i32 1
1228
1273
store i16 (%FB_Test*)* @FB_Test__GetVal, i16 (%FB_Test*)** %GetVal, align 8
1229
1274
ret void
1230
1275
}
@@ -1369,7 +1414,10 @@ fn pass_this_to_method() {
1369
1414
%self = alloca %__vtable_FB_Test*, align 8
1370
1415
store %__vtable_FB_Test* %0, %__vtable_FB_Test** %self, align 8
1371
1416
%deref = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1372
- %foo = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 1
1417
+ %__body = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 0
1418
+ store void (%FB_Test*)* @FB_Test, void (%FB_Test*)** %__body, align 8
1419
+ %deref1 = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1420
+ %foo = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref1, i32 0, i32 1
1373
1421
store void (%FB_Test*)* @FB_Test__foo, void (%FB_Test*)** %foo, align 8
1374
1422
ret void
1375
1423
}
@@ -1379,7 +1427,10 @@ fn pass_this_to_method() {
1379
1427
%self = alloca %__vtable_FB_Test2*, align 8
1380
1428
store %__vtable_FB_Test2* %0, %__vtable_FB_Test2** %self, align 8
1381
1429
%deref = load %__vtable_FB_Test2*, %__vtable_FB_Test2** %self, align 8
1382
- %bar = getelementptr inbounds %__vtable_FB_Test2, %__vtable_FB_Test2* %deref, i32 0, i32 1
1430
+ %__body = getelementptr inbounds %__vtable_FB_Test2, %__vtable_FB_Test2* %deref, i32 0, i32 0
1431
+ store void (%FB_Test2*)* @FB_Test2, void (%FB_Test2*)** %__body, align 8
1432
+ %deref1 = load %__vtable_FB_Test2*, %__vtable_FB_Test2** %self, align 8
1433
+ %bar = getelementptr inbounds %__vtable_FB_Test2, %__vtable_FB_Test2* %deref1, i32 0, i32 1
1383
1434
store i16 (%FB_Test2*, %FB_Test*)* @FB_Test2__bar, i16 (%FB_Test2*, %FB_Test*)** %bar, align 8
1384
1435
ret void
1385
1436
}
@@ -1514,7 +1565,10 @@ fn this_with_shadowed_variable() {
1514
1565
%self = alloca %__vtable_FB_Test*, align 8
1515
1566
store %__vtable_FB_Test* %0, %__vtable_FB_Test** %self, align 8
1516
1567
%deref = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1517
- %shadow_val = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 1
1568
+ %__body = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 0
1569
+ store void (%FB_Test*)* @FB_Test, void (%FB_Test*)** %__body, align 8
1570
+ %deref1 = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1571
+ %shadow_val = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref1, i32 0, i32 1
1518
1572
store void (%FB_Test*)* @FB_Test__shadow_val, void (%FB_Test*)** %shadow_val, align 8
1519
1573
ret void
1520
1574
}
@@ -1613,6 +1667,9 @@ fn this_calling_function_and_passing_this() {
1613
1667
entry:
1614
1668
%self = alloca %__vtable_FB_Test*, align 8
1615
1669
store %__vtable_FB_Test* %0, %__vtable_FB_Test** %self, align 8
1670
+ %deref = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1671
+ %__body = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 0
1672
+ store void (%FB_Test*)* @FB_Test, void (%FB_Test*)** %__body, align 8
1616
1673
ret void
1617
1674
}
1618
1675
@@ -1760,13 +1817,16 @@ fn this_in_property_and_calling_method() {
1760
1817
%self = alloca %__vtable_FB_Test*, align 8
1761
1818
store %__vtable_FB_Test* %0, %__vtable_FB_Test** %self, align 8
1762
1819
%deref = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1763
- %DoubleX = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 1
1764
- store i16 (%FB_Test*)* @FB_Test__DoubleX, i16 (%FB_Test*)** %DoubleX , align 8
1820
+ %__body = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 0
1821
+ store void (%FB_Test*)* @FB_Test, void (%FB_Test*)** %__body , align 8
1765
1822
%deref1 = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1766
- %__get_Value = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref1, i32 0, i32 2
1767
- store i16 (%FB_Test*)* @FB_Test____get_Value , i16 (%FB_Test*)** %__get_Value , align 8
1823
+ %DoubleX = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref1, i32 0, i32 1
1824
+ store i16 (%FB_Test*)* @FB_Test__DoubleX , i16 (%FB_Test*)** %DoubleX , align 8
1768
1825
%deref2 = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1769
- %__set_Value = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref2, i32 0, i32 3
1826
+ %__get_Value = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref2, i32 0, i32 2
1827
+ store i16 (%FB_Test*)* @FB_Test____get_Value, i16 (%FB_Test*)** %__get_Value, align 8
1828
+ %deref3 = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1829
+ %__set_Value = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref3, i32 0, i32 3
1770
1830
store void (%FB_Test*, i16)* @FB_Test____set_Value, void (%FB_Test*, i16)** %__set_Value, align 8
1771
1831
ret void
1772
1832
}
@@ -1864,7 +1924,10 @@ fn this_with_self_pointer() {
1864
1924
%self = alloca %__vtable_FB_Test*, align 8
1865
1925
store %__vtable_FB_Test* %0, %__vtable_FB_Test** %self, align 8
1866
1926
%deref = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1867
- %InitRef = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 1
1927
+ %__body = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref, i32 0, i32 0
1928
+ store void (%FB_Test*)* @FB_Test, void (%FB_Test*)** %__body, align 8
1929
+ %deref1 = load %__vtable_FB_Test*, %__vtable_FB_Test** %self, align 8
1930
+ %InitRef = getelementptr inbounds %__vtable_FB_Test, %__vtable_FB_Test* %deref1, i32 0, i32 1
1868
1931
store void (%FB_Test*)* @FB_Test__InitRef, void (%FB_Test*)** %InitRef, align 8
1869
1932
ret void
1870
1933
}
@@ -1946,6 +2009,9 @@ fn this_in_variable_initialization() {
1946
2009
entry:
1947
2010
%self = alloca %__vtable_FB*, align 8
1948
2011
store %__vtable_FB* %0, %__vtable_FB** %self, align 8
2012
+ %deref = load %__vtable_FB*, %__vtable_FB** %self, align 8
2013
+ %__body = getelementptr inbounds %__vtable_FB, %__vtable_FB* %deref, i32 0, i32 0
2014
+ store void (%FB*)* @FB, void (%FB*)** %__body, align 8
1949
2015
ret void
1950
2016
}
1951
2017
@@ -2030,6 +2096,9 @@ fn this_in_action_in_functionblock() {
2030
2096
entry:
2031
2097
%self = alloca %__vtable_fb*, align 8
2032
2098
store %__vtable_fb* %0, %__vtable_fb** %self, align 8
2099
+ %deref = load %__vtable_fb*, %__vtable_fb** %self, align 8
2100
+ %__body = getelementptr inbounds %__vtable_fb, %__vtable_fb* %deref, i32 0, i32 0
2101
+ store void (%fb*)* @fb, void (%fb*)** %__body, align 8
2033
2102
ret void
2034
2103
}
2035
2104
@@ -2117,7 +2186,10 @@ fn this_calling_functionblock_body_from_method() {
2117
2186
%self = alloca %__vtable_fb*, align 8
2118
2187
store %__vtable_fb* %0, %__vtable_fb** %self, align 8
2119
2188
%deref = load %__vtable_fb*, %__vtable_fb** %self, align 8
2120
- %foo = getelementptr inbounds %__vtable_fb, %__vtable_fb* %deref, i32 0, i32 1
2189
+ %__body = getelementptr inbounds %__vtable_fb, %__vtable_fb* %deref, i32 0, i32 0
2190
+ store void (%fb*)* @fb, void (%fb*)** %__body, align 8
2191
+ %deref1 = load %__vtable_fb*, %__vtable_fb** %self, align 8
2192
+ %foo = getelementptr inbounds %__vtable_fb, %__vtable_fb* %deref1, i32 0, i32 1
2121
2193
store i16 (%fb*)* @fb__foo, i16 (%fb*)** %foo, align 8
2122
2194
ret void
2123
2195
}
0 commit comments