Commit 824a359
committed
Copy variable table manager from non-Object parents
There's a few changes here to support Data types and their
subclasses:
* Always copy the variable table manager from parent to child,
unless the parent is Object. This ensures that Data type
subclasses still see the same accessors and likely makes sense
for most other classes that inherit instance variables.
* Fix the definition sequence for Data fields to specialize and
properly use the field-based accessors rather than the growable
varTable accessors. This maintains a compact store for Data
fields where previously the object was specialized but variables
still were stored in varTable.
This relates to and partially fixes some root causes of the Data
type subclass issues reported in #9241.
There are other concerns with this structure of Data, however,
since it may use accessors from the parent in the child (rather
than the cloned versions for the child). We need a larger overhaul
of both Data and how the variable table manager is propagated from
parents to children (previously no propagation happened and all
child classes re-discovered their own instance variables).1 parent 84538f1 commit 824a359
3 files changed
Lines changed: 21 additions & 20 deletions
File tree
- core/src/main/java/org/jruby
- runtime/ivars
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
553 | | - | |
554 | 553 | | |
555 | 554 | | |
556 | 555 | | |
| |||
1073 | 1072 | | |
1074 | 1073 | | |
1075 | 1074 | | |
1076 | | - | |
| 1075 | + | |
1077 | 1076 | | |
1078 | 1077 | | |
1079 | 1078 | | |
| |||
1083 | 1082 | | |
1084 | 1083 | | |
1085 | 1084 | | |
1086 | | - | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
1087 | 1090 | | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
| 1091 | + | |
| 1092 | + | |
1091 | 1093 | | |
1092 | 1094 | | |
1093 | 1095 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | 405 | | |
413 | 406 | | |
414 | 407 | | |
| |||
417 | 410 | | |
418 | 411 | | |
419 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
420 | 425 | | |
421 | 426 | | |
422 | 427 | | |
| |||
427 | 432 | | |
428 | 433 | | |
429 | 434 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | 435 | | |
437 | 436 | | |
438 | 437 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
548 | | - | |
| 548 | + | |
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| |||
0 commit comments