@@ -87,26 +87,28 @@ protected void addToList(ExtensionCallStack stack, ValueWrapper object) {
87
87
}
88
88
}
89
89
90
+ @ GenerateInline
91
+ @ GenerateCached (false )
90
92
public abstract static class RunMarkOnExitNode extends RubyBaseNode {
91
93
92
- public abstract void execute (ExtensionCallStack stack );
94
+ public abstract void execute (Node node , ExtensionCallStack stack );
93
95
94
96
@ Specialization (guards = "!stack.hasMarkObjects()" )
95
- void nothingToMark (ExtensionCallStack stack ) {
97
+ static void nothingToMark (ExtensionCallStack stack ) {
96
98
// Do nothing.
97
99
}
98
100
99
101
@ Specialization (guards = "stack.hasSingleMarkObject()" )
100
- void markSingleObject (ExtensionCallStack stack ,
101
- @ Cached @ Shared DispatchNode callNode ) {
102
+ static void markSingleObject (Node node , ExtensionCallStack stack ,
103
+ @ Cached ( inline = false ) @ Shared DispatchNode callNode ) {
102
104
ValueWrapper value = stack .getSingleMarkObject ();
103
- callNode .call (getContext ().getCoreLibrary ().truffleCExtModule , "run_marker" , value .getObject ());
105
+ callNode .call (getContext (node ).getCoreLibrary ().truffleCExtModule , "run_marker" , value .getObject ());
104
106
}
105
107
106
108
@ TruffleBoundary
107
109
@ Specialization (guards = { "stack.hasMarkObjects()" , "!stack.hasSingleMarkObject()" })
108
- void marksToRun (ExtensionCallStack stack ,
109
- @ Cached @ Shared DispatchNode callNode ) {
110
+ static void marksToRun (Node node , ExtensionCallStack stack ,
111
+ @ Cached ( inline = false ) @ Shared DispatchNode callNode ) {
110
112
// Run the markers...
111
113
var valuesForMarking = stack .getMarkOnExitObjects ();
112
114
// Push a new stack frame because we should
@@ -115,17 +117,11 @@ void marksToRun(ExtensionCallStack stack,
115
117
stack .push (false , nil , nil );
116
118
try {
117
119
for (var value : valuesForMarking ) {
118
- callNode .call (getContext ().getCoreLibrary ().truffleCExtModule , "run_marker" , value .getObject ());
120
+ callNode .call (getContext (node ).getCoreLibrary ().truffleCExtModule , "run_marker" , value .getObject ());
119
121
}
120
122
} finally {
121
123
stack .pop ();
122
124
}
123
125
}
124
-
125
-
126
- @ NeverDefault
127
- public static RunMarkOnExitNode create () {
128
- return MarkingServiceNodesFactory .RunMarkOnExitNodeGen .create ();
129
- }
130
126
}
131
127
}
0 commit comments