public class com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest
super_class: java.lang.Object
{
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest;
public void testHttp();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: new com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS
dup
ldc "https://unpkg.com/@esm/ms"
ldc "export const foo = 41;"
invokespecial com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 1: aload 1
ldc "import {foo} from 'https://unpkg.com/@esm/ms'; foo;"
invokestatic com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest.assertFsLoads:(Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
astore 2
start local 2 2: ldc 41
aload 2
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
3: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.uriSpecifiers:Ljava/util/Set;
ldc "https://unpkg.com/@esm/ms"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
4: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.stringSpecifiers:Ljava/util/Set;
ldc "https://unpkg.com/@esm/ms"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest;
1 6 1 fs Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;
2 6 2 v Lorg/graalvm/polyglot/Value;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testFile();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: new com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS
dup
ldc "file://path-to-something"
ldc "export const foo = 42;"
invokespecial com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 1: aload 1
ldc "import {foo} from 'file://path-to-something'; foo;"
invokestatic com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest.assertFsLoads:(Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
astore 2
start local 2 2: ldc 42
aload 2
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
3: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.uriSpecifiers:Ljava/util/Set;
ldc "file://path-to-something"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
4: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.stringSpecifiers:Ljava/util/Set;
ldc "file://path-to-something"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest;
1 6 1 fs Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;
2 6 2 v Lorg/graalvm/polyglot/Value;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testPath();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: new com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS
dup
ldc "/path"
ldc "export const foo = 43;"
invokespecial com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 1: aload 1
ldc "import {foo} from '/path'; foo;"
invokestatic com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest.assertFsLoads:(Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
astore 2
start local 2 2: ldc 43
aload 2
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
3: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.stringSpecifiers:Ljava/util/Set;
ldc "/path"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
4: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.uriSpecifiers:Ljava/util/Set;
ldc "/path"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest;
1 6 1 fs Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;
2 6 2 v Lorg/graalvm/polyglot/Value;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testBareModuleSpecifier();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: new com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS
dup
ldc "foobar"
ldc "export const foo = 43;"
invokespecial com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 1: aload 1
ldc "import {foo} from 'foobar'; foo;"
invokestatic com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest.assertFsLoads:(Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
astore 2
start local 2 2: ldc 43
aload 2
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
3: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.stringSpecifiers:Ljava/util/Set;
ldc "foobar"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
4: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.uriSpecifiers:Ljava/util/Set;
ldc "foobar"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest;
1 6 1 fs Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;
2 6 2 v Lorg/graalvm/polyglot/Value;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testWithUriSpecifierAndReferrer();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=1
start local 0 0: new com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS
dup
ldc "https://unpkg.com/@esm/ms"
ldc "export const foo = 41;"
invokespecial com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 1: ldc "tmp-test"
ldc ".mjs"
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createTempFile:(Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
astore 2
start local 2 2: aload 2
ldc "import {foo} from 'https://unpkg.com/@esm/ms'; foo;"
invokestatic java.util.Collections.singletonList:(Ljava/lang/Object;)Ljava/util/List;
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.file.Files.write:(Ljava/nio/file/Path;Ljava/lang/Iterable;[Ljava/nio/file/OpenOption;)Ljava/nio/file/Path;
pop
3: aload 1
aload 2
invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
invokestatic com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest.assertFsLoads:(Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;Ljava/io/File;)Lorg/graalvm/polyglot/Value;
astore 3
start local 3 4: ldc 41
aload 3
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
5: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.uriSpecifiers:Ljava/util/Set;
ldc "https://unpkg.com/@esm/ms"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
6: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS.stringSpecifiers:Ljava/util/Set;
ldc "https://unpkg.com/@esm/ms"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
7: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest;
1 8 1 fs Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;
2 8 2 sourceFile Ljava/nio/file/Path;
4 8 3 v Lorg/graalvm/polyglot/Value;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testBareModuleCommonJsEmulation();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=1
start local 0 0: new com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$CommonJsTracingTestFs
dup
ldc "foobar"
ldc "export const foo = 43;"
invokespecial com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$CommonJsTracingTestFs.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 1: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
astore 2
start local 2 2: aload 2
ldc "js.commonjs-require"
ldc "true"
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
3: aload 2
ldc "js.commonjs-require-cwd"
ldc "/some/user/folder"
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: iconst_0
anewarray java.lang.String
invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
getstatic org.graalvm.polyglot.PolyglotAccess.ALL:Lorg/graalvm/polyglot/PolyglotAccess;
invokevirtual org.graalvm.polyglot.Context$Builder.allowPolyglotAccess:(Lorg/graalvm/polyglot/PolyglotAccess;)Lorg/graalvm/polyglot/Context$Builder;
iconst_1
invokevirtual org.graalvm.polyglot.Context$Builder.allowIO:(Z)Lorg/graalvm/polyglot/Context$Builder;
aload 1
invokevirtual org.graalvm.polyglot.Context$Builder.fileSystem:(Lorg/graalvm/polyglot/io/FileSystem;)Lorg/graalvm/polyglot/Context$Builder;
iconst_1
invokevirtual org.graalvm.polyglot.Context$Builder.allowExperimentalOptions:(Z)Lorg/graalvm/polyglot/Context$Builder;
aload 2
invokevirtual org.graalvm.polyglot.Context$Builder.options:(Ljava/util/Map;)Lorg/graalvm/polyglot/Context$Builder;
invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
astore 3
start local 3 5: aload 3
ldc "js"
ldc "import {foo} from 'foobar'; foo;"
ldc "test.mjs"
invokestatic org.graalvm.polyglot.Source.newBuilder:(Ljava/lang/String;Ljava/lang/CharSequence;Ljava/lang/String;)Lorg/graalvm/polyglot/Source$Builder;
invokevirtual org.graalvm.polyglot.Source$Builder.build:()Lorg/graalvm/polyglot/Source;
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
astore 4
start local 4 6: ldc 43
aload 4
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
7: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$CommonJsTracingTestFs.stringSpecifiers:Ljava/util/Set;
ldc "foobar"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
8: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$CommonJsTracingTestFs.uriSpecifiers:Ljava/util/Set;
ldc "foobar"
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertFalse:(Z)V
9: aload 1
getfield com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$CommonJsTracingTestFs.paths:Ljava/util/List;
ldc "foobar"
invokeinterface java.util.List.contains:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
10: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest;
1 11 1 fs Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$CommonJsTracingTestFs;
2 11 2 options Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
5 11 3 cx Lorg/graalvm/polyglot/Context;
6 11 4 v Lorg/graalvm/polyglot/Value;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
org.junit.Test()
private static org.graalvm.polyglot.Value assertFsLoads(com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS, java.io.File);
descriptor: (Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;Ljava/io/File;)Lorg/graalvm/polyglot/Value;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: iconst_0
anewarray java.lang.String
invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
iconst_1
invokevirtual org.graalvm.polyglot.Context$Builder.allowIO:(Z)Lorg/graalvm/polyglot/Context$Builder;
aload 0
invokevirtual org.graalvm.polyglot.Context$Builder.fileSystem:(Lorg/graalvm/polyglot/io/FileSystem;)Lorg/graalvm/polyglot/Context$Builder;
invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
astore 2
start local 2 1: aload 2
ldc "js"
aload 1
invokestatic org.graalvm.polyglot.Source.newBuilder:(Ljava/lang/String;Ljava/io/File;)Lorg/graalvm/polyglot/Source$Builder;
invokevirtual org.graalvm.polyglot.Source$Builder.build:()Lorg/graalvm/polyglot/Source;
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 fs Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;
0 2 1 file Ljava/io/File;
1 2 2 cx Lorg/graalvm/polyglot/Context;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fs
file
private static org.graalvm.polyglot.Value assertFsLoads(com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS, java.lang.String);
descriptor: (Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: iconst_0
anewarray java.lang.String
invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
iconst_1
invokevirtual org.graalvm.polyglot.Context$Builder.allowIO:(Z)Lorg/graalvm/polyglot/Context$Builder;
aload 0
invokevirtual org.graalvm.polyglot.Context$Builder.fileSystem:(Lorg/graalvm/polyglot/io/FileSystem;)Lorg/graalvm/polyglot/Context$Builder;
invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
astore 2
start local 2 1: aload 2
ldc "js"
aload 1
ldc "test.mjs"
invokestatic org.graalvm.polyglot.Source.newBuilder:(Ljava/lang/String;Ljava/lang/CharSequence;Ljava/lang/String;)Lorg/graalvm/polyglot/Source$Builder;
invokevirtual org.graalvm.polyglot.Source$Builder.build:()Lorg/graalvm/polyglot/Source;
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 fs Lcom/oracle/truffle/js/test/builtins/ImportWithCustomFsTest$TestFS;
0 2 1 testSrc Ljava/lang/String;
1 2 2 cx Lorg/graalvm/polyglot/Context;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fs
testSrc
}
SourceFile: "ImportWithCustomFsTest.java"
NestMembers:
com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$CommonJsTracingTestFs com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS
InnerClasses:
private CommonJsTracingTestFs = com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$CommonJsTracingTestFs of com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest
protected TestFS = com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest$TestFS of com.oracle.truffle.js.test.builtins.ImportWithCustomFsTest
public final Builder = org.graalvm.polyglot.Context$Builder of org.graalvm.polyglot.Context
public Builder = org.graalvm.polyglot.Source$Builder of org.graalvm.polyglot.Source