|
20 | 20 | import java.util.Map;
|
21 | 21 | import java.util.concurrent.locks.ReentrantLock;
|
22 | 22 |
|
23 |
| -import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; |
24 | 23 | import org.jcodings.Encoding;
|
25 | 24 | import org.jcodings.specific.UTF8Encoding;
|
26 | 25 | import org.truffleruby.RubyContext;
|
|
40 | 39 | import org.truffleruby.language.RubyConstant;
|
41 | 40 | import org.truffleruby.language.control.RaiseException;
|
42 | 41 | import org.truffleruby.language.dispatch.DispatchNode;
|
43 |
| -import org.truffleruby.language.globals.GlobalVariables; |
44 | 42 | import org.truffleruby.language.library.RubyStringLibrary;
|
45 | 43 | import org.truffleruby.platform.NativeConfiguration;
|
46 | 44 | import org.truffleruby.platform.Platform;
|
@@ -79,8 +77,6 @@ public class FeatureLoader {
|
79 | 77 | private NativeFunction getcwd;
|
80 | 78 | private static final int PATH_MAX = 1024; // jnr-posix hard codes this value
|
81 | 79 |
|
82 |
| - @CompilationFinal private RubyArray loadedFeatures = null; |
83 |
| - |
84 | 80 | private static final String[] EXTENSIONS = new String[]{ TruffleRuby.EXTENSION, RubyLanguage.CEXT_EXTENSION };
|
85 | 81 |
|
86 | 82 | public FeatureLoader(RubyContext context, RubyLanguage language) {
|
@@ -491,13 +487,4 @@ public Object loadCExtLibrary(String feature, String path, Node currentNode) {
|
491 | 487 | Metrics.printTime("after-load-cext-" + feature);
|
492 | 488 | }
|
493 | 489 | }
|
494 |
| - |
495 |
| - public Object getLoadedFeaturesLock() { |
496 |
| - if (loadedFeatures == null) { |
497 |
| - CompilerDirectives.transferToInterpreterAndInvalidate(); |
498 |
| - GlobalVariables globals = context.getCoreLibrary().globalVariables; |
499 |
| - loadedFeatures = (RubyArray) globals.getStorage("$LOADED_FEATURES").getValue(); |
500 |
| - } |
501 |
| - return loadedFeatures; |
502 |
| - } |
503 | 490 | }
|
0 commit comments