/external/turbine/java/com/google/turbine/binder/ |
D | Binder.java | 51 import com.google.turbine.binder.sym.ClassSymbol; 78 SimpleEnv<ClassSymbol, SourceBoundClass> ienv = bindSourceBoundClasses(preProcessedUnits); in bind() 80 ImmutableSet<ClassSymbol> syms = ienv.asMap().keySet(); in bind() 88 CompoundEnv<ClassSymbol, BytecodeBoundClass> classPathEnv = in bind() 99 SimpleEnv<ClassSymbol, PackageSourceBoundClass> psenv = bindPackagesResult.classes; in bind() 102 Env<ClassSymbol, SourceHeaderBoundClass> henv = bindHierarchy(log, syms, psenv, classPathEnv); in bind() 104 Env<ClassSymbol, SourceTypeBoundClass> tenv = in bind() 109 CompoundEnv.<ClassSymbol, HeaderBoundClass>of(classPathEnv).append(henv)); in bind() 115 syms, tenv, CompoundEnv.<ClassSymbol, TypeBoundClass>of(classPathEnv).append(tenv)); in bind() 118 syms, tenv, CompoundEnv.<ClassSymbol, TypeBoundClass>of(classPathEnv).append(tenv)); in bind() [all …]
|
D | Resolve.java | 28 import com.google.turbine.binder.sym.ClassSymbol; 43 public static ClassSymbol resolve( in resolve() 44 Env<ClassSymbol, ? extends HeaderBoundClass> env, in resolve() argument 45 ClassSymbol origin, in resolve() 46 ClassSymbol sym, in resolve() 51 private static ClassSymbol resolve( in resolve() 52 Env<ClassSymbol, ? extends HeaderBoundClass> env, in resolve() argument 53 ClassSymbol origin, in resolve() 54 ClassSymbol sym, in resolve() 56 Set<ClassSymbol> seen) { in resolve() [all …]
|
D | HierarchyBinder.java | 28 import com.google.turbine.binder.sym.ClassSymbol; 43 ClassSymbol origin, in bind() 45 Env<ClassSymbol, ? extends HeaderBoundClass> env) { in bind() argument 50 private final ClassSymbol origin; 52 private final Env<ClassSymbol, ? extends HeaderBoundClass> env; 56 ClassSymbol origin, in HierarchyBinder() 58 Env<ClassSymbol, ? extends HeaderBoundClass> env) { in HierarchyBinder() argument 68 ClassSymbol superclass; in bind() 74 superclass = ClassSymbol.ENUM; in bind() 79 superclass = !origin.equals(ClassSymbol.OBJECT) ? ClassSymbol.OBJECT : null; in bind() [all …]
|
D | ClassPathBinder.java | 30 import com.google.turbine.binder.sym.ClassSymbol; 53 Map<ClassSymbol, BytecodeBoundClass> transitive = new LinkedHashMap<>(); in bindClasspath() 54 Map<ClassSymbol, BytecodeBoundClass> map = new HashMap<>(); in bindClasspath() 56 Env<ClassSymbol, BytecodeBoundClass> benv = in bindClasspath() 57 new Env<ClassSymbol, BytecodeBoundClass>() { in bindClasspath() 59 public BytecodeBoundClass get(ClassSymbol sym) { in bindClasspath() 70 for (Map.Entry<ClassSymbol, BytecodeBoundClass> entry : transitive.entrySet()) { in bindClasspath() 71 ClassSymbol symbol = entry.getKey(); in bindClasspath() 74 SimpleEnv<ClassSymbol, BytecodeBoundClass> env = new SimpleEnv<>(ImmutableMap.copyOf(map)); in bindClasspath() 79 public Env<ClassSymbol, BytecodeBoundClass> env() { in bindClasspath() [all …]
|
D | CanonicalTypeBinder.java | 28 import com.google.turbine.binder.sym.ClassSymbol; 44 ClassSymbol sym, SourceTypeBoundClass base, Env<ClassSymbol, TypeBoundClass> env) { in bind() argument 91 Env<ClassSymbol, TypeBoundClass> env, in fields() argument 92 ClassSymbol sym, in fields() 111 Env<ClassSymbol, TypeBoundClass> env, in methods() argument 112 ClassSymbol sym, in methods() 146 Env<ClassSymbol, TypeBoundClass> env, in param() argument 147 ClassSymbol sym, in param() 159 Env<ClassSymbol, TypeBoundClass> env, in typeParameters() argument 160 ClassSymbol sym, in typeParameters() [all …]
|
D | CtSymClassBinder.java | 31 import com.google.turbine.binder.sym.ClassSymbol; 52 Map<ClassSymbol, BytecodeBoundClass> map = new HashMap<>(); in bind() 54 Env<ClassSymbol, BytecodeBoundClass> benv = in bind() 55 new Env<ClassSymbol, BytecodeBoundClass>() { in bind() 57 public BytecodeBoundClass get(ClassSymbol sym) { in bind() 82 ClassSymbol sym = new ClassSymbol(name.substring(idx + 1, name.length() - ".sig".length())); in bind() 90 SimpleEnv<ClassSymbol, BytecodeBoundClass> env = new SimpleEnv<>(ImmutableMap.copyOf(map)); in bind() 95 public Env<ClassSymbol, BytecodeBoundClass> env() { in bind()
|
D | JimageClassBinder.java | 38 import com.google.turbine.binder.sym.ClassSymbol; 96 private final Table<String, String, ClassSymbol> packageClassesBySimpleName = 99 private final Map<ClassSymbol, BytecodeBoundClass> env = new HashMap<>(); 133 Env<ClassSymbol, BytecodeBoundClass> env = in initPackage() 134 new Env<ClassSymbol, BytecodeBoundClass>() { in initPackage() 136 public BytecodeBoundClass get(ClassSymbol sym) { in initPackage() 152 ClassSymbol sym = new ClassSymbol(binaryName); in initPackage() 179 private static String simpleName(ClassSymbol sym) { 184 private static String packageName(ClassSymbol sym) { 234 ClassSymbol sym = packageClassesBySimpleName.get(packageName, lookupKey.first().value()); [all …]
|
/external/turbine/javatests/com/google/turbine/binder/ |
D | BinderTest.java | 29 import com.google.turbine.binder.sym.ClassSymbol; 75 ImmutableMap<ClassSymbol, SourceTypeBoundClass> bound = in hello() 85 new ClassSymbol("a/A"), in hello() 86 new ClassSymbol("a/A$Inner1"), in hello() 87 new ClassSymbol("a/A$Inner2"), in hello() 88 new ClassSymbol("b/B")); in hello() 90 SourceTypeBoundClass a = bound.get(new ClassSymbol("a/A")); in hello() 91 assertThat(a.superclass()).isEqualTo(new ClassSymbol("java/lang/Object")); in hello() 94 assertThat(bound.get(new ClassSymbol("a/A$Inner1")).superclass()) in hello() 95 .isEqualTo(new ClassSymbol("b/B")); in hello() [all …]
|
D | ClassPathBinderTest.java | 38 import com.google.turbine.binder.sym.ClassSymbol; 66 assertThat(result.sym()).isEqualTo(new ClassSymbol("java/lang/String")); in classPathLookup() 70 assertThat(result.sym()).isEqualTo(new ClassSymbol("java/lang/Object")); in classPathLookup() 75 Env<ClassSymbol, BytecodeBoundClass> env = TURBINE_BOOTCLASSPATH.env(); in classPathClasses() 77 TypeBoundClass c = env.get(new ClassSymbol("java/util/Map$Entry")); in classPathClasses() 78 assertThat(c.owner()).isEqualTo(new ClassSymbol("java/util/Map")); in classPathClasses() 81 assertThat(env.get(new ClassSymbol("javax/lang/model/SourceVersion")).kind()) in classPathClasses() 83 assertThat(env.get(new ClassSymbol("java/lang/String")).kind()).isEqualTo(TurbineTyKind.CLASS); in classPathClasses() 84 assertThat(env.get(new ClassSymbol("java/lang/Override")).kind()) in classPathClasses() 87 c = env.get(new ClassSymbol("java/util/ArrayList")); in classPathClasses() [all …]
|
/external/turbine/java/com/google/turbine/binder/lookup/ |
D | MemberImportIndex.java | 24 import com.google.turbine.binder.sym.ClassSymbol; 38 private final Map<String, Supplier<ClassSymbol>> cache = new LinkedHashMap<>(); 40 private final ImmutableList<Supplier<ClassSymbol>> classes; 47 ImmutableList.Builder<Supplier<ClassSymbol>> packageScopes = ImmutableList.builder(); in MemberImportIndex() 55 new Supplier<ClassSymbol>() { in MemberImportIndex() 57 public ClassSymbol get() { in MemberImportIndex() 62 ClassSymbol sym = (ClassSymbol) result.sym(); in MemberImportIndex() 73 new Supplier<ClassSymbol>() { in MemberImportIndex() 75 public ClassSymbol get() { in MemberImportIndex() 80 ClassSymbol sym = (ClassSymbol) result.sym(); in MemberImportIndex() [all …]
|
D | ImportIndex.java | 26 import com.google.turbine.binder.sym.ClassSymbol; 103 i.position(), ErrorKind.SYMBOL_NOT_FOUND, new ClassSymbol(Joiner.on('/').join(i.type()))); in namedImport() 106 ClassSymbol sym = (ClassSymbol) result.sym(); in namedImport() 113 ClassSymbol resolved = sym; in namedImport() 122 private static ClassSymbol resolveNext( 123 TurbineLogWithSource log, CanonicalSymbolResolver resolve, ClassSymbol sym, Ident bit) { 124 ClassSymbol next = resolve.resolveOne(sym, bit); 129 new ClassSymbol(sym.binaryName() + '$' + bit)); 151 ClassSymbol sym = (ClassSymbol) base.sym();
|
/external/turbine/java/com/google/turbine/binder/sym/ |
D | ClassSymbol.java | 30 public class ClassSymbol implements Symbol { class 32 public static final ClassSymbol OBJECT = new ClassSymbol("java/lang/Object"); 33 public static final ClassSymbol STRING = new ClassSymbol("java/lang/String"); 34 public static final ClassSymbol ENUM = new ClassSymbol("java/lang/Enum"); 35 public static final ClassSymbol ANNOTATION = new ClassSymbol("java/lang/annotation/Annotation"); 39 public ClassSymbol(String className) { in ClassSymbol() method in ClassSymbol 55 return o instanceof ClassSymbol && className.equals(((ClassSymbol) o).className); in equals()
|
/external/turbine/java/com/google/turbine/deps/ |
D | Dependencies.java | 30 import com.google.turbine.binder.sym.ClassSymbol; 51 Set<ClassSymbol> closure = superTypeClosure(bound, lowered); in collectDeps() 54 for (ClassSymbol sym : closure) { in collectDeps() 81 private static Set<ClassSymbol> superTypeClosure(BindingResult bound, Lowered lowered) { in superTypeClosure() 82 Env<ClassSymbol, TypeBoundClass> env = in superTypeClosure() 83 CompoundEnv.<ClassSymbol, TypeBoundClass>of(new SimpleEnv<>(bound.units())) in superTypeClosure() 85 Set<ClassSymbol> closure = new LinkedHashSet<>(); in superTypeClosure() 86 for (ClassSymbol sym : lowered.symbols()) { in superTypeClosure() 93 Set<ClassSymbol> closure, Env<ClassSymbol, TypeBoundClass> env, ClassSymbol sym) { in addSuperTypes() argument 104 for (ClassSymbol i : info.interfaces()) { in addSuperTypes() [all …]
|
D | Transitive.java | 29 import com.google.turbine.binder.sym.ClassSymbol; 48 for (ClassSymbol sym : superClosure(bound)) { in collectDeps() 103 private static Set<ClassSymbol> superClosure(BindingResult bound) { in superClosure() 104 Env<ClassSymbol, TypeBoundClass> env = in superClosure() 105 CompoundEnv.<ClassSymbol, TypeBoundClass>of(new SimpleEnv<>(bound.units())) in superClosure() 107 Set<ClassSymbol> closure = new LinkedHashSet<>(); in superClosure() 108 for (ClassSymbol sym : bound.units().keySet()) { in superClosure() 111 Set<ClassSymbol> directChildren = new LinkedHashSet<>(); in superClosure() 112 for (ClassSymbol sym : closure) { in superClosure() 123 Set<ClassSymbol> closure, Env<ClassSymbol, TypeBoundClass> env, ClassSymbol sym) { in addSuperTypes() argument [all …]
|
/external/turbine/java/com/google/turbine/binder/bound/ |
D | SourceBoundClass.java | 20 import com.google.turbine.binder.sym.ClassSymbol; 26 private final ClassSymbol sym; 27 private final ClassSymbol owner; 28 private final ImmutableMap<String, ClassSymbol> children; 33 ClassSymbol sym, in SourceBoundClass() 34 ClassSymbol owner, in SourceBoundClass() 35 ImmutableMap<String, ClassSymbol> children, in SourceBoundClass() 55 public ClassSymbol owner() { in owner() 65 public ImmutableMap<String, ClassSymbol> children() { in children() 69 public ClassSymbol sym() { in sym()
|
D | SourceHeaderBoundClass.java | 23 import com.google.turbine.binder.sym.ClassSymbol; 33 private final ClassSymbol superclass; 34 private final ImmutableList<ClassSymbol> interfaces; 39 ClassSymbol superclass, in SourceHeaderBoundClass() 40 ImmutableList<ClassSymbol> interfaces, in SourceHeaderBoundClass() 49 public ClassSymbol superclass() { in superclass() 54 public ImmutableList<ClassSymbol> interfaces() { in interfaces() 69 public ClassSymbol owner() { in owner() 74 public ImmutableMap<String, ClassSymbol> children() { in children()
|
D | ModuleInfo.java | 20 import com.google.turbine.binder.sym.ClassSymbol; 164 private final ClassSymbol sym; 166 public UseInfo(ClassSymbol sym) { in UseInfo() 170 public ClassSymbol sym() { in sym() 178 private final ClassSymbol sym; 179 private final ImmutableList<ClassSymbol> impls; 181 public ProvideInfo(ClassSymbol sym, ImmutableList<ClassSymbol> impls) { in ProvideInfo() 186 public ClassSymbol sym() { in sym() 190 public ImmutableList<ClassSymbol> impls() { in impls()
|
D | SourceTypeBoundClass.java | 23 import com.google.turbine.binder.sym.ClassSymbol; 38 private final ClassSymbol owner; 39 private final ImmutableMap<String, ClassSymbol> children; 64 ClassSymbol owner, in SourceTypeBoundClass() 66 ImmutableMap<String, ClassSymbol> children, in SourceTypeBoundClass() 95 public ClassSymbol superclass() { in superclass() 106 public ImmutableList<ClassSymbol> interfaces() { in interfaces() 107 ImmutableList.Builder<ClassSymbol> result = ImmutableList.builder(); in interfaces() 128 public ClassSymbol owner() { in owner() 133 public ImmutableMap<String, ClassSymbol> children() { in children()
|
/external/turbine/javatests/com/google/turbine/binder/lookup/ |
D | TopLevelIndexTest.java | 24 import com.google.turbine.binder.sym.ClassSymbol; 39 new ClassSymbol("java/util/Map"), in buildIndex() 40 new ClassSymbol("java/util/List"), in buildIndex() 41 new ClassSymbol("java.util.Optional"))); in buildIndex() 47 assertThat(result.sym()).isEqualTo(new ClassSymbol("java/util/Map")); in simple() 55 assertThat(result.sym()).isEqualTo(new ClassSymbol("java/util/Map")); in nested() 72 .isEqualTo(new ClassSymbol("java/util/Map")); in packageScope() 74 .isEqualTo(new ClassSymbol("java/util/List")); in packageScope() 84 ImmutableList.of(new ClassSymbol("java/Foo"), new ClassSymbol("java/Foo/Bar"))); in overrideClass() 87 assertThat(result.sym()).isEqualTo(new ClassSymbol("java/Foo")); in overrideClass() [all …]
|
/external/turbine/java/com/google/turbine/binder/bytecode/ |
D | BytecodeBoundClass.java | 32 import com.google.turbine.binder.sym.ClassSymbol; 73 private final ClassSymbol sym; 74 private final Env<ClassSymbol, BytecodeBoundClass> env; 79 ClassSymbol sym, in BytecodeBoundClass() 81 Env<ClassSymbol, BytecodeBoundClass> env, in BytecodeBoundClass() argument 126 private final Supplier<ClassSymbol> owner = 128 new Supplier<ClassSymbol>() { 130 public ClassSymbol get() { 133 return new ClassSymbol(inner.outerClass()); 142 public ClassSymbol owner() { in owner() [all …]
|
/external/turbine/java/com/google/turbine/types/ |
D | Canonicalize.java | 23 import com.google.turbine.binder.sym.ClassSymbol; 72 Env<ClassSymbol, TypeBoundClass> env, in canonicalize() argument 73 ClassSymbol sym, in canonicalize() 82 Env<ClassSymbol, TypeBoundClass> env, in canonicalizeClassTy() argument 83 ClassSymbol owner, in canonicalizeClassTy() 90 private final Env<ClassSymbol, TypeBoundClass> env; 92 public Canonicalize(SourceFile source, int position, Env<ClassSymbol, TypeBoundClass> env) { in Canonicalize() argument 98 private Type canonicalize(ClassSymbol base, Type type) { in canonicalize() 120 private ClassTy canon(ClassSymbol base, ClassTy ty) { in canon() 157 private Collection<ClassTy.SimpleClassTy> lexicalBase(ClassSymbol first, ClassSymbol owner) { in lexicalBase() [all …]
|
/external/turbine/java/com/google/turbine/lower/ |
D | Lower.java | 46 import com.google.turbine.binder.sym.ClassSymbol; 95 private final ImmutableSet<ClassSymbol> symbols; 97 public Lowered(ImmutableMap<String, byte[]> bytes, ImmutableSet<ClassSymbol> symbols) { in Lowered() 108 public ImmutableSet<ClassSymbol> symbols() { in symbols() 115 ImmutableMap<ClassSymbol, SourceTypeBoundClass> units, in lowerAll() argument 117 Env<ClassSymbol, BytecodeBoundClass> classpath) { in lowerAll() argument 118 CompoundEnv<ClassSymbol, TypeBoundClass> env = in lowerAll() 119 CompoundEnv.<ClassSymbol, TypeBoundClass>of(classpath).append(new SimpleEnv<>(units)); in lowerAll() 121 Set<ClassSymbol> symbols = new LinkedHashSet<>(); in lowerAll() 122 for (ClassSymbol sym : units.keySet()) { in lowerAll() [all …]
|
/external/turbine/javatests/com/google/turbine/model/ |
D | ConstTest.java | 24 import com.google.turbine.binder.sym.ClassSymbol; 66 new ClassSymbol("test/Anno"), ImmutableMap.of("value", new Const.IntValue(3))), in equalsTest() 68 new ClassSymbol("test/Anno"), ImmutableMap.of("value", new Const.IntValue(3)))) in equalsTest() 71 new ClassSymbol("test/Anno"), ImmutableMap.of("value", new Const.IntValue(4))), in equalsTest() 73 new ClassSymbol("test/Anno"), ImmutableMap.of("value", new Const.IntValue(4)))) in equalsTest() 75 new TurbineClassValue(ClassTy.asNonParametricClassTy(new ClassSymbol("test/Clazz"))), in equalsTest() 76 new TurbineClassValue(ClassTy.asNonParametricClassTy(new ClassSymbol("test/Clazz")))) in equalsTest() 78 new TurbineClassValue(ClassTy.asNonParametricClassTy(new ClassSymbol("test/Other"))), in equalsTest() 79 new TurbineClassValue(ClassTy.asNonParametricClassTy(new ClassSymbol("test/Other")))) in equalsTest()
|
/external/turbine/javatests/com/google/turbine/lower/ |
D | LowerSignatureTest.java | 22 import com.google.turbine.binder.sym.ClassSymbol; 47 new ClassSymbol("java/util/List"), ImmutableList.of(), ImmutableList.of()))); in simple() 60 new ClassSymbol("test/Outer"), in inner() 64 new ClassSymbol("test/Outer$Inner"), in inner() 76 new ClassSymbol("test/Outer"), in genericEnclosing() 80 new ClassSymbol("test/Outer$Inner"), in genericEnclosing() 98 new ClassSymbol("Outer"), in innerDefaultPackage() 102 new ClassSymbol("Outer$Inner"), in innerDefaultPackage() 117 new ClassSymbol("test/Test"), in wildcard() 135 new TyVarSymbol(ClassSymbol.OBJECT, "X"), ImmutableList.of())))) in tyVar()
|
D | LowerTest.java | 33 import com.google.turbine.binder.sym.ClassSymbol; 88 new ClassSymbol("java/util/List"), in hello() 91 new TyVarSymbol(new ClassSymbol("test/Test"), "V"), in hello() 97 new TyVarSymbol(new ClassSymbol("test/Test"), "V"), in hello() 104 new ClassSymbol("test/Test$Inner"), in hello() 112 new MethodSymbol(new ClassSymbol("test/Test"), "f"), in hello() 123 new MethodSymbol(new ClassSymbol("test/Test"), "g"), in hello() 125 new TyVarSymbol(new MethodSymbol(new ClassSymbol("test/Test"), "g"), "V"), in hello() 132 new ClassSymbol("java/lang/Runnable"), in hello() 136 new TyVarSymbol(new MethodSymbol(new ClassSymbol("test/Test"), "g"), "E"), in hello() [all …]
|