File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/main/java/org/truffleruby Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 49
49
import org .truffleruby .language .constants .ConstantEntry ;
50
50
import org .truffleruby .language .constants .GetConstantNode ;
51
51
import org .truffleruby .language .control .RaiseException ;
52
- import org .truffleruby .language .library .RubyLibrary ;
53
52
import org .truffleruby .language .library .RubyStringLibrary ;
54
53
import org .truffleruby .language .loader .ReentrantLockFreeingMap ;
55
54
import org .truffleruby .language .methods .InternalMethod ;
@@ -245,7 +244,7 @@ public void initCopy(RubyModule from) {
245
244
}
246
245
247
246
public void checkFrozen (RubyContext context , Node currentNode ) {
248
- if (context .getCoreLibrary () != null && RubyLibrary . getUncached (). isFrozen ( rubyModule )) {
247
+ if (context .getCoreLibrary () != null && rubyModule . isFrozenUncached ( )) {
249
248
String name ;
250
249
Object receiver = rubyModule ;
251
250
if (rubyModule instanceof RubyClass ) {
Original file line number Diff line number Diff line change 9
9
*/
10
10
package org .truffleruby .language ;
11
11
12
+ import com .oracle .truffle .api .CompilerAsserts ;
12
13
import com .oracle .truffle .api .interop .StopIterationException ;
13
14
import com .oracle .truffle .api .interop .UnknownKeyException ;
14
15
import org .truffleruby .RubyContext ;
20
21
import org .truffleruby .core .cast .ToLongNode ;
21
22
import org .truffleruby .core .kernel .KernelNodes ;
22
23
import org .truffleruby .core .klass .RubyClass ;
24
+ import org .truffleruby .core .range .RubyRange ;
25
+ import org .truffleruby .core .string .RubyString ;
23
26
import org .truffleruby .core .string .StringUtils ;
24
27
import org .truffleruby .interop .ForeignToRubyArgumentsNode ;
25
28
import org .truffleruby .interop .ForeignToRubyNode ;
@@ -114,6 +117,12 @@ public boolean isFrozen(
114
117
@ CachedLibrary ("this" ) DynamicObjectLibrary objLib ) {
115
118
return (objLib .getShapeFlags (this ) & FROZEN ) != 0 ;
116
119
}
120
+
121
+ public boolean isFrozenUncached () {
122
+ CompilerAsserts .neverPartOfCompilation ("Use RubyLibrary instead in PE code" );
123
+ assert !(this instanceof RubyString ) && !(this instanceof RubyRange );
124
+ return (getShape ().getFlags () & FROZEN ) != 0 ;
125
+ }
117
126
// endregion
118
127
119
128
// region InteropLibrary messages
You can’t perform that action at this time.
0 commit comments