|
10 | 10 | package org.truffleruby.core.range;
|
11 | 11 |
|
12 | 12 | import com.oracle.truffle.api.dsl.Bind;
|
| 13 | +import com.oracle.truffle.api.dsl.GenerateCached; |
| 14 | +import com.oracle.truffle.api.dsl.GenerateInline; |
13 | 15 | import com.oracle.truffle.api.dsl.GenerateUncached;
|
14 | 16 | import com.oracle.truffle.api.dsl.NeverDefault;
|
| 17 | +import com.oracle.truffle.api.nodes.Node; |
15 | 18 | import com.oracle.truffle.api.profiles.InlinedConditionProfile;
|
16 | 19 | import com.oracle.truffle.api.profiles.InlinedLoopConditionProfile;
|
17 | 20 | import com.oracle.truffle.api.profiles.LoopConditionProfile;
|
@@ -468,20 +471,22 @@ public abstract static class RangeAllocateNode extends CoreMethodNode {
|
468 | 471 | @Specialization
|
469 | 472 | protected RubyObjectRange allocate(RubyClass rubyClass,
|
470 | 473 | @Cached AllocateNode allocateNode) {
|
471 |
| - return allocateNode.execute(rubyClass); |
| 474 | + return allocateNode.execute(this, rubyClass); |
472 | 475 | }
|
473 | 476 | }
|
474 | 477 |
|
475 | 478 | @GenerateUncached
|
| 479 | + @GenerateInline |
| 480 | + @GenerateCached(false) |
476 | 481 | public abstract static class AllocateNode extends RubyBaseNode {
|
477 | 482 |
|
478 |
| - public abstract RubyObjectRange execute(RubyClass rubyClass); |
| 483 | + public abstract RubyObjectRange execute(Node node, RubyClass rubyClass); |
479 | 484 |
|
480 | 485 | @Specialization
|
481 |
| - protected RubyObjectRange allocate(RubyClass rubyClass) { |
482 |
| - final Shape shape = getLanguage().objectRangeShape; |
| 486 | + protected static RubyObjectRange allocate(Node node, RubyClass rubyClass) { |
| 487 | + final Shape shape = getLanguage(node).objectRangeShape; |
483 | 488 | final RubyObjectRange range = new RubyObjectRange(rubyClass, shape, false, nil, nil, false);
|
484 |
| - AllocationTracing.trace(range, this); |
| 489 | + AllocationTracing.trace(range, node); |
485 | 490 | return range;
|
486 | 491 | }
|
487 | 492 | }
|
|
0 commit comments