Commit 97ae862
committed
Root specialized object classloader at JRuby classloader
The classes generated here need to be visible to other classes
loaded and generated by JRuby, such as Ruby classes that implement
Java interfaces. If the specialized class and a Java interface to
implement come from different classloader hierarchies, the JVM
classloading subsystem will be unable to resolve the impl class.
The fix here makes the RubyObjectSpecializer per-runtime, so the
specialized classes live within the standard JRubyClassLoader
hierarchy, visible to other classes loaded and generated by Ruby
code at runtime.
An additional fix will pre-generate the first 50 specialized
object classes, which will also fix the same issue (they will load
into the same classloader as JRuby itself) and avoid re-generating
these classes for each runtime instance.
Fixes jruby#8412.1 parent fe763ca commit 97ae862
File tree
3 files changed
+27
-17
lines changed- core/src/main/java/org/jruby
- specialized
3 files changed
+27
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
346 | 350 | | |
347 | 351 | | |
348 | 352 | | |
| |||
2619 | 2623 | | |
2620 | 2624 | | |
2621 | 2625 | | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
2622 | 2630 | | |
2623 | 2631 | | |
2624 | 2632 | | |
| |||
5547 | 5555 | | |
5548 | 5556 | | |
5549 | 5557 | | |
| 5558 | + | |
| 5559 | + | |
| 5560 | + | |
5550 | 5561 | | |
5551 | 5562 | | |
5552 | 5563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
Lines changed: 15 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 44 | | |
49 | | - | |
50 | 45 | | |
51 | 46 | | |
52 | 47 | | |
| |||
60 | 55 | | |
61 | 56 | | |
62 | 57 | | |
63 | | - | |
64 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
65 | 62 | | |
66 | 63 | | |
67 | | - | |
| 64 | + | |
68 | 65 | | |
69 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
111 | | - | |
| 110 | + | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
115 | | - | |
| 114 | + | |
116 | 115 | | |
117 | 116 | | |
118 | 117 | | |
| |||
124 | 123 | | |
125 | 124 | | |
126 | 125 | | |
127 | | - | |
| 126 | + | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
| |||
155 | 154 | | |
156 | 155 | | |
157 | 156 | | |
158 | | - | |
| 157 | + | |
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
| |||
264 | 263 | | |
265 | 264 | | |
266 | 265 | | |
267 | | - | |
268 | | - | |
| 266 | + | |
| 267 | + | |
269 | 268 | | |
270 | 269 | | |
271 | 270 | | |
| |||
0 commit comments