A couple toString() methods in backend

This commit is contained in:
Alexander Udalov
2012-11-02 20:09:37 +04:00
parent cd35a6626e
commit e89ccf5f1b
3 changed files with 22 additions and 0 deletions
@@ -20,6 +20,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.asm4.Type;
import org.jetbrains.asm4.commons.InstructionAdapter;
import org.jetbrains.asm4.util.Printer;
import org.jetbrains.jet.codegen.signature.JvmMethodSignature;
import org.jetbrains.jet.codegen.state.GenerationState;
import org.jetbrains.jet.lang.resolve.calls.model.ResolvedCall;
@@ -153,4 +154,15 @@ public class CallableMethod implements Callable {
public Type getReturnType() {
return signature.getAsmMethod().getReturnType();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(Printer.OPCODES[invokeOpcode]);
sb.append(" ");
sb.append(owner);
sb.append(".");
sb.append(signature);
return sb.toString();
}
}
@@ -45,4 +45,9 @@ public class ClassContext extends CodegenContext {
public boolean isStatic() {
return false;
}
@Override
public String toString() {
return "Class: " + getContextDescriptor();
}
}
@@ -148,4 +148,9 @@ public class JvmMethodSignature {
public String getName() {
return asmMethod.getName();
}
@Override
public String toString() {
return asmMethod.toString();
}
}