Skip to content

Commit d2b3b3d

Browse files
committed
Call the first argument of AlwaysInlinedMethodNode consistently callerFrame
1 parent 17febdf commit d2b3b3d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/java/org/truffleruby/core/module/ModuleNodes.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ protected Object appendFeatures(RubyModule features, RubyModule target,
394394
public abstract static class GeneratedReaderNode extends AlwaysInlinedMethodNode {
395395

396396
@Specialization(limit = "getCacheLimit()")
397-
protected Object reader(Frame frame, RubyDynamicObject self, Object[] args, Object block, RootCallTarget target,
397+
protected Object reader(
398+
Frame callerFrame, RubyDynamicObject self, Object[] args, Object block, RootCallTarget target,
398399
@CachedLibrary("self") DynamicObjectLibrary objectLibrary) {
399400
// Or a subclass of RubyRootNode with an extra field?
400401
final String ivarName = RubyRootNode.of(target).getSharedMethodInfo().getNotes();
@@ -404,7 +405,7 @@ protected Object reader(Frame frame, RubyDynamicObject self, Object[] args, Obje
404405
}
405406

406407
@Specialization(guards = "!isRubyDynamicObject(self)")
407-
protected Object notObject(Frame frame, Object self, Object[] args, Object block, RootCallTarget target) {
408+
protected Object notObject(Frame callerFrame, Object self, Object[] args, Object block, RootCallTarget target) {
408409
return nil;
409410
}
410411

@@ -417,7 +418,8 @@ protected int getCacheLimit() {
417418
public abstract static class GeneratedWriterNode extends AlwaysInlinedMethodNode {
418419

419420
@Specialization(guards = "!rubyLibrary.isFrozen(self)")
420-
protected Object writer(Frame frame, RubyDynamicObject self, Object[] args, Object block, RootCallTarget target,
421+
protected Object writer(
422+
Frame callerFrame, RubyDynamicObject self, Object[] args, Object block, RootCallTarget target,
421423
@CachedLibrary(limit = "getRubyLibraryCacheLimit()") RubyLibrary rubyLibrary,
422424
@Cached WriteObjectFieldNode writeObjectFieldNode) {
423425
final String ivarName = RubyRootNode.of(target).getSharedMethodInfo().getNotes();
@@ -429,7 +431,7 @@ protected Object writer(Frame frame, RubyDynamicObject self, Object[] args, Obje
429431
}
430432

431433
@Specialization(guards = "rubyLibrary.isFrozen(self)")
432-
protected Object frozen(Frame frame, Object self, Object[] args, Object block, RootCallTarget target,
434+
protected Object frozen(Frame callerFrame, Object self, Object[] args, Object block, RootCallTarget target,
433435
@CachedLibrary(limit = "getRubyLibraryCacheLimit()") RubyLibrary rubyLibrary,
434436
@CachedContext(RubyLanguage.class) RubyContext context) {
435437
throw new RaiseException(context, context.getCoreExceptions().frozenError(self, this));

0 commit comments

Comments
 (0)