Skip to content

Commit 0489187

Browse files
committed
Renamed field to avoid obvious confusion
1 parent 01607d7 commit 0489187

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

src/main/java/org/truffleruby/RubyContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ protected boolean patch(Env newEnv) {
319319
.getConstant("TO_RUN_AT_INIT")
320320
.getValue();
321321
for (Object proc : ArrayOperations.toIterable((RubyArray) toRunAtInit)) {
322-
final Source source = ((RubyProc) proc).method
322+
final Source source = ((RubyProc) proc).declaringMethod
323323
.getSharedMethodInfo()
324324
.getSourceSection()
325325
.getSource();

src/main/java/org/truffleruby/core/proc/ProcNodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected RubyProc procSpecial(VirtualFrame frame, RubyClass procClass, Object[]
123123
block.callTarget,
124124
block.declarationFrame,
125125
block.declarationVariables,
126-
block.method,
126+
block.declaringMethod,
127127
block.frameOnStackMarker,
128128
block.declarationContext);
129129

@@ -161,7 +161,7 @@ protected RubyProc dup(RubyProc proc) {
161161
proc.callTarget,
162162
proc.declarationFrame,
163163
proc.declarationVariables,
164-
proc.method,
164+
proc.declaringMethod,
165165
proc.frameOnStackMarker,
166166
proc.declarationContext);
167167

src/main/java/org/truffleruby/core/proc/ProcOperations.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private static Object[] packArguments(RubyProc proc, ArgumentsDescriptor descrip
3333
return RubyArguments.pack(
3434
proc.declarationFrame,
3535
null,
36-
proc.method,
36+
proc.declaringMethod,
3737
proc.frameOnStackMarker,
3838
getSelf(proc),
3939
nil,
@@ -106,7 +106,7 @@ public static RubyProc convertBlock(RubyContext context, RubyLanguage language,
106106
block.callTargets,
107107
block.declarationFrame,
108108
block.declarationVariables,
109-
block.method,
109+
block.declaringMethod,
110110
type == ProcType.PROC ? block.frameOnStackMarker : null,
111111
block.declarationContext);
112112
}

src/main/java/org/truffleruby/core/proc/RubyProc.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class RubyProc extends RubyDynamicObject implements ObjectGraphNode {
4141
// Accessed for calling a RubyProc
4242
public final RootCallTarget callTarget;
4343
public final MaterializedFrame declarationFrame;
44-
public final InternalMethod method;
44+
public final InternalMethod declaringMethod;
4545
public final FrameOnStackMarker frameOnStackMarker;
4646
public final DeclarationContext declarationContext;
4747
// Not accessed for calling a RubyProc
@@ -63,7 +63,7 @@ public RubyProc(
6363
RootCallTarget callTarget,
6464
MaterializedFrame declarationFrame,
6565
SpecialVariableStorage declarationVariables,
66-
InternalMethod method,
66+
InternalMethod declaringMethod,
6767
FrameOnStackMarker frameOnStackMarker,
6868
DeclarationContext declarationContext) {
6969
super(rubyClass, shape);
@@ -74,7 +74,7 @@ public RubyProc(
7474
this.callTarget = callTarget;
7575
this.declarationFrame = declarationFrame;
7676
this.declarationVariables = declarationVariables;
77-
this.method = method;
77+
this.declaringMethod = declaringMethod;
7878
this.frameOnStackMarker = frameOnStackMarker;
7979
this.declarationContext = declarationContext;
8080
}
@@ -91,15 +91,15 @@ public RubyProc withArity(Arity newArity, ArgumentDescriptor[] newArgumentDescri
9191
callTarget,
9292
declarationFrame,
9393
declarationVariables,
94-
method,
94+
declaringMethod,
9595
frameOnStackMarker,
9696
declarationContext);
9797
}
9898

9999
@Override
100100
public void getAdjacentObjects(Set<Object> reachable) {
101101
ObjectGraph.getObjectsInFrame(declarationFrame, reachable);
102-
ObjectGraph.addProperty(reachable, method);
102+
ObjectGraph.addProperty(reachable, declaringMethod);
103103
}
104104

105105
public boolean isLambda() {

src/main/java/org/truffleruby/extra/TruffleGraalNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ protected RubyProc copyCapturedLocals(RubyProc proc) {
131131
newCallTarget,
132132
newDeclarationFrame,
133133
variables,
134-
proc.method,
134+
proc.declaringMethod,
135135
proc.frameOnStackMarker,
136136
proc.declarationContext);
137137

src/main/java/org/truffleruby/language/methods/InternalMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static InternalMethod fromProc(
6767
return new InternalMethod(
6868
context,
6969
sharedMethodInfo,
70-
proc.method.getLexicalScope(),
70+
proc.declaringMethod.getLexicalScope(),
7171
declarationContext,
7272
name,
7373
declaringModule,

src/main/java/org/truffleruby/language/yield/CallBlockNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private Object[] packArguments(DeclarationContext declarationContext, RubyProc b
9999
return RubyArguments.pack(
100100
block.declarationFrame,
101101
null,
102-
block.method,
102+
block.declaringMethod,
103103
declarationContext,
104104
block.frameOnStackMarker,
105105
self,

0 commit comments

Comments
 (0)