File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/main/java/org/truffleruby Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ public Hashing getHashing() {
533
533
534
534
public RubyLanguage getLanguageSlow () {
535
535
CompilerAsserts .neverPartOfCompilation (
536
- "@CachedLanguage or a final field in the node should be used so the RubyLanguage instance is constant in PE code" );
536
+ "Use getLanguage() or @CachedLanguage instead, so the RubyLanguage instance is constant in PE code" );
537
537
return language ;
538
538
}
539
539
Original file line number Diff line number Diff line change 14
14
import java .util .concurrent .atomic .AtomicLong ;
15
15
import java .util .concurrent .locks .ReentrantLock ;
16
16
17
+ import com .oracle .truffle .api .CompilerAsserts ;
17
18
import com .oracle .truffle .api .CompilerDirectives ;
18
19
import com .oracle .truffle .api .instrumentation .AllocationReporter ;
19
20
import com .oracle .truffle .api .object .Shape ;
@@ -327,10 +328,12 @@ protected void disposeContext(RubyContext context) {
327
328
}
328
329
329
330
public static RubyContext getCurrentContext () {
331
+ CompilerAsserts .neverPartOfCompilation ("Use getContext() or @CachedContext instead in PE code" );
330
332
return getCurrentContext (RubyLanguage .class );
331
333
}
332
334
333
335
public static RubyLanguage getCurrentLanguage () {
336
+ CompilerAsserts .neverPartOfCompilation ("Use getLanguage() or @CachedLanguage instead in PE code" );
334
337
return getCurrentLanguage (RubyLanguage .class );
335
338
}
336
339
You can’t perform that action at this time.
0 commit comments