Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Wagelaar2015-12-07 14:46:08 +0000
committerDennis Wagelaar2015-12-07 14:46:08 +0000
commit51b07b329f252ec5fdbd4b36f9d06d992708d6db (patch)
treebb1749db99f4d2f381b5f1bf49da2ff1cbc6a805 /plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse
parent14c8affdaad18087a74c0c8b545b6ce7b9dffc57 (diff)
downloadorg.eclipse.atl-51b07b329f252ec5fdbd4b36f9d06d992708d6db.tar.gz
org.eclipse.atl-51b07b329f252ec5fdbd4b36f9d06d992708d6db.tar.xz
org.eclipse.atl-51b07b329f252ec5fdbd4b36f9d06d992708d6db.zip
Fix ASM deprecation warnings.
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/ByteCodeSwitch.java9
-rw-r--r--plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/CodeBlockJIT.java28
2 files changed, 24 insertions, 13 deletions
diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/ByteCodeSwitch.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/ByteCodeSwitch.java
index ce4f2b3d..a8ca44a2 100644
--- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/ByteCodeSwitch.java
+++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/ByteCodeSwitch.java
@@ -709,7 +709,8 @@ public class ByteCodeSwitch extends EmftvmSwitch<MethodVisitor> implements Opcod
mv.visitMethodInsn(opcode, // self.<method>(): [..., ?]
Type.getInternalName(dc),
method.getName(),
- Type.getMethodDescriptor(method));
+ Type.getMethodDescriptor(method),
+ dc.isInterface());
// Check if method returned anything
final Class<?> rt = method.getReturnType();
// Box primitive return values
@@ -913,7 +914,8 @@ public class ByteCodeSwitch extends EmftvmSwitch<MethodVisitor> implements Opcod
mv.visitMethodInsn(opcode, // self.<method>(arg): [..., ?]
Type.getInternalName(dc),
method.getName(),
- Type.getMethodDescriptor(method));
+ Type.getMethodDescriptor(method),
+ dc.isInterface());
// Check if method returned anything
final Class<?> rt = method.getReturnType();
// Box primitive return values
@@ -2279,7 +2281,8 @@ public class ByteCodeSwitch extends EmftvmSwitch<MethodVisitor> implements Opcod
name,
Type.getMethodDescriptor(
retType instanceof Type ? (Type)retType : Type.getType((Class<?>)retType),
- ats));
+ ats),
+ owner.isInterface());
}
protected void invokeIface(final Class<?> owner, final String name,
diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/CodeBlockJIT.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/CodeBlockJIT.java
index 2bae9060..a0afebc3 100644
--- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/CodeBlockJIT.java
+++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/CodeBlockJIT.java
@@ -184,7 +184,8 @@ public class CodeBlockJIT implements Opcodes {
init.visitMethodInsn(INVOKESPECIAL, // super(cb)
Type.getInternalName(JITCodeBlock.class),
"<init>",
- Type.getMethodDescriptor(Type.VOID_TYPE, new Type[]{Type.getType(CodeBlock.class)}));
+ Type.getMethodDescriptor(Type.VOID_TYPE, new Type[]{Type.getType(CodeBlock.class)}),
+ false);
init.visitInsn(RETURN);
init.visitLabel(end);
// Create local variable table
@@ -221,10 +222,10 @@ public class CodeBlockJIT implements Opcodes {
// Generate bytecode
execute.visitLabel(start);
execute.visitVarInsn(ALOAD, 1); // frame
- execute.visitMethodInsn(INVOKEVIRTUAL, Type.getInternalName(StackFrame.class), "getEnv", Type.getMethodDescriptor(Type.getType(ExecEnv.class), new Type[0]));
+ execute.visitMethodInsn(INVOKEVIRTUAL, Type.getInternalName(StackFrame.class), "getEnv", Type.getMethodDescriptor(Type.getType(ExecEnv.class), new Type[0]), false);
execute.visitVarInsn(ASTORE, 2);
execute.visitVarInsn(ALOAD, 2); // env
- execute.visitMethodInsn(INVOKEINTERFACE, Type.getInternalName(ExecEnv.class), "getMonitor", Type.getMethodDescriptor(Type.getType(VMMonitor.class), new Type[0]));
+ execute.visitMethodInsn(INVOKEINTERFACE, Type.getInternalName(ExecEnv.class), "getMonitor", Type.getMethodDescriptor(Type.getType(VMMonitor.class), new Type[0]), true);
execute.visitVarInsn(ASTORE, 3); // monitor
final boolean hasMonitor = getEnv().getMonitor() != null;
if (hasMonitor) {
@@ -235,7 +236,8 @@ public class CodeBlockJIT implements Opcodes {
"enter",
Type.getMethodDescriptor(Type.VOID_TYPE, new Type[]{
Type.getType(StackFrame.class)
- }));
+ }),
+ true);
}
execute.visitLabel(tryStart);
final ByteCodeSwitch bs = new ByteCodeSwitch(this, execute, ls);
@@ -267,7 +269,8 @@ public class CodeBlockJIT implements Opcodes {
Type.getMethodDescriptor(Type.VOID_TYPE, new Type[]{
Type.getType(StackFrame.class),
Type.getType(Throwable.class)
- }));
+ }),
+ false);
execute.visitInsn(ATHROW); // throw vme
// Regular method return
execute.visitLabel(catchEnd);
@@ -279,7 +282,8 @@ public class CodeBlockJIT implements Opcodes {
"leave",
Type.getMethodDescriptor(Type.VOID_TYPE, new Type[]{
Type.getType(StackFrame.class)
- }));
+ }),
+ true);
}
if (cb.getStackLevel() == 0) {
execute.visitInsn(ACONST_NULL); // push null
@@ -311,7 +315,8 @@ public class CodeBlockJIT implements Opcodes {
mv.visitMethodInsn(INVOKEINTERFACE, // monitor.isTerminated(): [..., boolean]
Type.getInternalName(VMMonitor.class),
"isTerminated",
- Type.getMethodDescriptor(Type.BOOLEAN_TYPE, new Type[0]));
+ Type.getMethodDescriptor(Type.BOOLEAN_TYPE, new Type[0]),
+ true);
mv.visitJumpInsn(IFEQ, notTerminated); // jump if isTerminated == false: [...]
mv.visitTypeInsn(NEW, Type.getInternalName(VMException.class)); // new VMException: [..., vme]
mv.visitInsn(DUP); // [..., vme, vme]
@@ -323,7 +328,8 @@ public class CodeBlockJIT implements Opcodes {
Type.getMethodDescriptor(Type.VOID_TYPE, new Type[]{
Type.getType(StackFrame.class),
Type.getType(String.class)
- }));
+ }),
+ false);
mv.visitInsn(ATHROW); // throw vme: [...]
mv.visitLabel(notTerminated);
mv.visitVarInsn(ALOAD, 1); // frame: [..., frame]
@@ -333,7 +339,8 @@ public class CodeBlockJIT implements Opcodes {
"setPc",
Type.getMethodDescriptor(Type.VOID_TYPE, new Type[]{
Type.INT_TYPE
- }));
+ }),
+ false);
mv.visitVarInsn(ALOAD, 3); // monitor: [..., monitor]
mv.visitVarInsn(ALOAD, 1); // frame: [..., monitor, frame]
mv.visitMethodInsn(INVOKEINTERFACE, // monitor.step(frame): [...]
@@ -341,7 +348,8 @@ public class CodeBlockJIT implements Opcodes {
"step",
Type.getMethodDescriptor(Type.VOID_TYPE, new Type[]{
Type.getType(StackFrame.class)
- }));
+ }),
+ true);
}
/**

Back to the top