50
50
@ SuppressFBWarnings ("IS" )
51
51
public abstract class FrameAndVariablesSendingNode extends RubyContextNode {
52
52
53
- @ Child protected FrameOrVariablesReadingNode sendingNode ;
53
+ @ Child protected FrameOrVariablesReadingNode readingNode ;
54
54
55
55
public boolean sendingFrames () {
56
- if (sendingNode == null ) {
56
+ if (readingNode == null ) {
57
57
return false ;
58
58
} else {
59
- return sendingNode .sendingFrame ();
59
+ return readingNode .sendingFrame ();
60
60
}
61
61
}
62
62
63
- if (sendingNode != null ) {
64
- sendingNode .startSending (variables , frame );
65
63
private synchronized void startSending (Reads variables , Reads frame ) {
64
+ if (readingNode != null ) {
65
+ readingNode .startSending (variables , frame );
66
66
} else if (variables == Reads .SELF && frame == Reads .NOTHING ) {
67
- sendingNode = insert (GetSpecialVariableStorage .create ());
67
+ readingNode = insert (GetSpecialVariableStorage .create ());
68
68
} else if (variables == Reads .NOTHING && frame == Reads .SELF ) {
69
- sendingNode = insert (new ReadOwnFrameNode ());
69
+ readingNode = insert (new ReadOwnFrameNode ());
70
70
} else if (variables == Reads .CALLER && frame == Reads .NOTHING ) {
71
- sendingNode = insert (new ReadCallerFrameNode ());
71
+ readingNode = insert (new ReadCallerFrameNode ());
72
72
} else if (variables == Reads .NOTHING && frame == Reads .CALLER ) {
73
- sendingNode = insert (new ReadCallerVariablesNode ());
73
+ readingNode = insert (new ReadCallerVariablesNode ());
74
74
}
75
75
}
76
76
@@ -94,10 +94,10 @@ public void startSendingOwnVariables() {
94
94
}
95
95
96
96
public Object getFrameOrStorageIfRequired (Frame frame ) {
97
- if (sendingNode == null ) {
97
+ if (readingNode == null ) {
98
98
return null ;
99
99
} else {
100
- return sendingNode .execute (frame );
100
+ return readingNode .execute (frame );
101
101
}
102
102
}
103
103
0 commit comments