comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java @ 19801:deab43a789ad

Split LeafType off from ConcreteSubtype
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 11 Mar 2015 17:45:21 -0700
parents 3362ba500371
children 754f2b20d8bc
comparison
equal deleted inserted replaced
19800:3362ba500371 19801:deab43a789ad
124 if (resolvedMethod != null && (resolvedMethod.canBeStaticallyBound() || StampTool.isExactType(receiver) || type.isArray())) { 124 if (resolvedMethod != null && (resolvedMethod.canBeStaticallyBound() || StampTool.isExactType(receiver) || type.isArray())) {
125 return resolvedMethod; 125 return resolvedMethod;
126 } 126 }
127 Assumptions assumptions = receiver.graph().getAssumptions(); 127 Assumptions assumptions = receiver.graph().getAssumptions();
128 if (assumptions != null) { 128 if (assumptions != null) {
129 AssumptionResult<ResolvedJavaType> uniqueConcreteType = type.findUniqueConcreteSubtype(); 129 AssumptionResult<ResolvedJavaType> leafConcreteSubtype = type.findLeafConcreteSubtype();
130 if (uniqueConcreteType != null) { 130 if (leafConcreteSubtype != null) {
131 ResolvedJavaMethod methodFromUniqueType = uniqueConcreteType.getResult().resolveConcreteMethod(targetMethod, contextType); 131 ResolvedJavaMethod methodFromUniqueType = leafConcreteSubtype.getResult().resolveConcreteMethod(targetMethod, contextType);
132 if (methodFromUniqueType != null) { 132 if (methodFromUniqueType != null) {
133 assumptions.record(uniqueConcreteType); 133 assumptions.record(leafConcreteSubtype);
134 return methodFromUniqueType; 134 return methodFromUniqueType;
135 } 135 }
136 } 136 }
137 137
138 AssumptionResult<ResolvedJavaMethod> uniqueConcreteMethod = type.findUniqueConcreteMethod(targetMethod); 138 AssumptionResult<ResolvedJavaMethod> uniqueConcreteMethod = type.findUniqueConcreteMethod(targetMethod);