File tree Expand file tree Collapse file tree 5 files changed +8
-12
lines changed
src/main/java/org/truffleruby Expand file tree Collapse file tree 5 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ public static final class ThreadLocalState {
230
230
private final LanguageArray <Assumption > globalVariableNeverAliasedAssumptions = new LanguageArray <>(
231
231
globalVariablesMap ,
232
232
Assumption []::new ,
233
- () -> Truffle . getRuntime (). createAssumption ("global variable was never aliased: " ));
233
+ () -> Assumption . create ("global variable was never aliased: " ));
234
234
235
235
private static final RubyObjectType objectType = new RubyObjectType ();
236
236
Original file line number Diff line number Diff line change 14
14
import java .util .function .Consumer ;
15
15
16
16
import com .oracle .truffle .api .Assumption ;
17
- import com .oracle .truffle .api .Truffle ;
18
17
19
18
import org .truffleruby .RubyLanguage ;
20
19
import org .truffleruby .core .CoreLibrary ;
@@ -139,7 +138,7 @@ public interface ContextGetClass {
139
138
}
140
139
141
140
private Assumption registerAssumption (ContextGetClass classGetter , String className , String methodName ) {
142
- final Assumption assumption = Truffle . getRuntime (). createAssumption ("inlined " + className + "#" + methodName );
141
+ final Assumption assumption = Assumption . create ("inlined " + className + "#" + methodName );
143
142
classAssumptionsToRegister .add ((cl ) -> classGetter .apply (cl ).fields .registerAssumption (methodName , assumption ));
144
143
return assumption ;
145
144
}
Original file line number Diff line number Diff line change 13
13
import org .truffleruby .language .methods .InternalMethod ;
14
14
15
15
import com .oracle .truffle .api .Assumption ;
16
- import com .oracle .truffle .api .Truffle ;
17
16
import org .truffleruby .language .methods .SharedMethodInfo ;
18
17
19
18
public final class MethodEntry {
@@ -23,12 +22,12 @@ public final class MethodEntry {
23
22
24
23
public MethodEntry (InternalMethod method ) {
25
24
assert method != null ;
26
- this .assumption = Truffle . getRuntime (). createAssumption ("method is not overridden:" );
25
+ this .assumption = Assumption . create ("method is not overridden:" );
27
26
this .method = method ;
28
27
}
29
28
30
29
public MethodEntry () {
31
- this .assumption = Truffle . getRuntime (). createAssumption ("method is not defined:" );
30
+ this .assumption = Assumption . create ("method is not defined:" );
32
31
this .method = null ;
33
32
}
34
33
Original file line number Diff line number Diff line change 10
10
package org .truffleruby .language .constants ;
11
11
12
12
import com .oracle .truffle .api .Assumption ;
13
- import com .oracle .truffle .api .Truffle ;
14
13
import org .truffleruby .core .module .RubyModule ;
15
14
import org .truffleruby .language .RubyConstant ;
16
15
import org .truffleruby .language .methods .SharedMethodInfo ;
@@ -21,12 +20,12 @@ public class ConstantEntry {
21
20
private final RubyConstant constant ;
22
21
23
22
public ConstantEntry (RubyConstant constant ) {
24
- this .assumption = Truffle . getRuntime (). createAssumption ("constant is not overridden:" );
23
+ this .assumption = Assumption . create ("constant is not overridden:" );
25
24
this .constant = constant ;
26
25
}
27
26
28
27
public ConstantEntry () {
29
- this .assumption = Truffle . getRuntime (). createAssumption ("constant is not defined:" );
28
+ this .assumption = Assumption . create ("constant is not defined:" );
30
29
this .constant = null ;
31
30
}
32
31
Original file line number Diff line number Diff line change 15
15
import java .util .concurrent .atomic .AtomicInteger ;
16
16
17
17
import com .oracle .truffle .api .Assumption ;
18
- import com .oracle .truffle .api .Truffle ;
19
18
import org .truffleruby .Layouts ;
20
19
import com .oracle .truffle .api .CompilerDirectives ;
21
20
import com .oracle .truffle .api .frame .FrameSlotKind ;
@@ -159,8 +158,8 @@ public static FrameDescriptor.Builder newFrameDescriptorBuilder(ParentFrameDescr
159
158
// We need to access this Assumption from the FrameDescriptor,
160
159
// and there is no way to get a RootNode from a FrameDescriptor, so we store it in the descriptor info.
161
160
// We do not store it as slot info for footprint, to avoid needing an info array per FrameDescriptor.
162
- final Assumption doesNotNeedSpecialVariableStorageAssumption = Truffle . getRuntime ()
163
- .createAssumption (SpecialVariableStorage .ASSUMPTION_NAME );
161
+ final Assumption doesNotNeedSpecialVariableStorageAssumption = Assumption
162
+ .create (SpecialVariableStorage .ASSUMPTION_NAME );
164
163
builder .info (doesNotNeedSpecialVariableStorageAssumption );
165
164
}
166
165
You can’t perform that action at this time.
0 commit comments