Commit 7079662
miranov25
Add Phase 6a: Object method calls and property access
Extends C++ backend to support calling methods and accessing properties
on C++ objects, enabling expressions like particle.Pt() and vec.fX.
Included components:
- MethodCallNode code generation with const T& parameter passing
- PropertyAccessNode code generation for public data members
- CLASS_HEADERS registry for automatic header inclusion
- Support for TObject-derived and non-TObject classes
Test classes validated:
- TParticle: GetPx(), GetPy(), GetPz(), Pt(), Eta(), Phi()
- TLorentzVector: Px(), Py(), Pz(), E(), Pt(), M()
- TVector3: X(), Y(), Z(), Mag(), Theta(), Phi()
- TString: Length(), IsNull() (non-TObject class)
- TObjString: GetName() (TObject string wrapper)
Design decisions:
- Const reference passing for all object arguments
- Methods with arguments raise UNSUPPORTED_OP (Phase 6a+)
- Unknown classes generate code without header (let C++ catch errors)
Tests: 353 passing (1 skipped - flaky gInterpreter.Calc parallel execution,
functionality verified by RDataFrame integration test)
Reviewed by: GPT, Gemini, Claude
Prepares infrastructure for Phase 6b (RVec operations) and 6c (private members).1 parent 7dccaeb commit 7079662
4 files changed
Lines changed: 1262 additions & 26 deletions
File tree
- UTILS/dfextensions/RDataFrameDSL
- RDataFrameDSL
- tests
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| 196 | + | |
195 | 197 | | |
Lines changed: 124 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
146 | 171 | | |
147 | 172 | | |
148 | 173 | | |
| |||
265 | 290 | | |
266 | 291 | | |
267 | 292 | | |
268 | | - | |
| 293 | + | |
269 | 294 | | |
270 | 295 | | |
271 | 296 | | |
| |||
282 | 307 | | |
283 | 308 | | |
284 | 309 | | |
285 | | - | |
| 310 | + | |
286 | 311 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
292 | 318 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
| 319 | + | |
| 320 | + | |
299 | 321 | | |
| 322 | + | |
300 | 323 | | |
301 | 324 | | |
302 | 325 | | |
303 | | - | |
304 | | - | |
| 326 | + | |
| 327 | + | |
305 | 328 | | |
306 | 329 | | |
307 | | - | |
| 330 | + | |
308 | 331 | | |
309 | 332 | | |
310 | 333 | | |
311 | | - | |
312 | | - | |
| 334 | + | |
| 335 | + | |
313 | 336 | | |
314 | 337 | | |
315 | 338 | | |
| |||
338 | 361 | | |
339 | 362 | | |
340 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
341 | 370 | | |
342 | 371 | | |
343 | 372 | | |
| |||
369 | 398 | | |
370 | 399 | | |
371 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
372 | 405 | | |
373 | 406 | | |
374 | 407 | | |
| |||
527 | 560 | | |
528 | 561 | | |
529 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
530 | 629 | | |
531 | 630 | | |
532 | 631 | | |
| |||
576 | 675 | | |
577 | 676 | | |
578 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
579 | 685 | | |
580 | 686 | | |
581 | 687 | | |
| |||
Lines changed: 34 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1109 | 1109 | | |
1110 | 1110 | | |
1111 | 1111 | | |
1112 | | - | |
1113 | | - | |
| 1112 | + | |
| 1113 | + | |
1114 | 1114 | | |
1115 | 1115 | | |
1116 | 1116 | | |
| |||
1122 | 1122 | | |
1123 | 1123 | | |
1124 | 1124 | | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1125 | 1148 | | |
1126 | 1149 | | |
1127 | 1150 | | |
1128 | 1151 | | |
1129 | | - | |
| 1152 | + | |
1130 | 1153 | | |
1131 | | - | |
1132 | | - | |
| 1154 | + | |
| 1155 | + | |
1133 | 1156 | | |
1134 | 1157 | | |
1135 | 1158 | | |
| |||
1140 | 1163 | | |
1141 | 1164 | | |
1142 | 1165 | | |
1143 | | - | |
1144 | | - | |
| 1166 | + | |
1145 | 1167 | | |
1146 | | - | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
1147 | 1173 | | |
1148 | 1174 | | |
1149 | 1175 | | |
| |||
0 commit comments