|
|
@ -214,9 +214,7 @@ public class ConstantRuntimeEnvironment extends SimpleRuntimeEnvironment { |
|
|
|
("Ljava/lang/Math;", "PI", "D")); |
|
|
|
("Ljava/lang/Math;", "PI", "D")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MethodIdentifier m; |
|
|
|
public ConstantRuntimeEnvironment() { |
|
|
|
public ConstantRuntimeEnvironment(MethodIdentifier method) { |
|
|
|
|
|
|
|
m = method; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Object getField(Reference ref, Object obj) |
|
|
|
public Object getField(Reference ref, Object obj) |
|
|
@ -224,8 +222,8 @@ public class ConstantRuntimeEnvironment extends SimpleRuntimeEnvironment { |
|
|
|
if (isWhite(ref)) |
|
|
|
if (isWhite(ref)) |
|
|
|
return super.getField(ref, obj); |
|
|
|
return super.getField(ref, obj); |
|
|
|
Type type = Type.tType(ref.getType()); |
|
|
|
Type type = Type.tType(ref.getType()); |
|
|
|
FieldIdentifier fi = (FieldIdentifier) |
|
|
|
FieldIdentifier fi |
|
|
|
m.clazz.bundle.getIdentifier(ref); |
|
|
|
= (FieldIdentifier) Main.getClassBundle().getIdentifier(ref); |
|
|
|
if (fi != null && !fi.isNotConstant()) { |
|
|
|
if (fi != null && !fi.isNotConstant()) { |
|
|
|
Object result = fi.getConstant(); |
|
|
|
Object result = fi.getConstant(); |
|
|
|
if (result == null) |
|
|
|
if (result == null) |
|
|
@ -253,8 +251,8 @@ public class ConstantRuntimeEnvironment extends SimpleRuntimeEnvironment { |
|
|
|
if (isWhite(ref)) |
|
|
|
if (isWhite(ref)) |
|
|
|
return super.invokeMethod(ref, isVirtual, cls, params); |
|
|
|
return super.invokeMethod(ref, isVirtual, cls, params); |
|
|
|
Type type = Type.tType(ref.getType()); |
|
|
|
Type type = Type.tType(ref.getType()); |
|
|
|
MethodIdentifier mi = (MethodIdentifier) |
|
|
|
MethodIdentifier mi |
|
|
|
m.clazz.bundle.getIdentifier(ref); |
|
|
|
= (MethodIdentifier) Main.getClassBundle().getIdentifier(ref); |
|
|
|
if (mi != null) { |
|
|
|
if (mi != null) { |
|
|
|
BytecodeInfo code = mi.info.getBytecode(); |
|
|
|
BytecodeInfo code = mi.info.getBytecode(); |
|
|
|
if (code != null) { |
|
|
|
if (code != null) { |
|
|
|