Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/org/jruby/java/MiniJava.java b/src/org/jruby/java/MiniJava.java
- index 15c43ab..bc7a13b 100644
- --- a/src/org/jruby/java/MiniJava.java
- +++ b/src/org/jruby/java/MiniJava.java
- @@ -358,6 +358,9 @@ public class MiniJava implements Library {
- // construct the class, implementing all supertypes
- cw.visit(V1_5, ACC_PUBLIC | ACC_SUPER, name, null, p(Object.class), superTypeNames);
- +
- + // Give it a filename
- + cw.visitSource(name, name);
- // fields needed for dispatch and such
- cw.visitField(ACC_STATIC | ACC_PRIVATE, "ruby", ci(Ruby.class), null, null).visitEnd();
- @@ -424,10 +427,12 @@ public class MiniJava implements Library {
- } else {
- Label dispatch = new Label();
- Label end = new Label();
- + Label line;
- // Try to look up field for simple name
- // lock self
- + line = new Label(); mv.visitLineNumber(1, line); mv.label(line);
- mv.getstatic(name, "rubyClass", ci(RubyClass.class));
- mv.monitorenter();
- @@ -455,6 +460,7 @@ public class MiniJava implements Library {
- mv.pop();
- // exit monitor before making call
- // FIXME: this not being in a finally is a little worrisome
- + line = new Label(); mv.visitLineNumber(2, line); mv.label(line);
- mv.getstatic(name, "rubyClass", ci(RubyClass.class));
- mv.monitorexit();
- mv.aload(0);
- @@ -468,7 +474,8 @@ public class MiniJava implements Library {
- mv.label(dispatch);
- mv.dup();
- mv.putstatic(name, simpleName, ci(DynamicMethod.class));
- -
- +
- + line = new Label(); mv.visitLineNumber(3, line); mv.label(line);
- mv.getstatic(name, "rubyClass", ci(RubyClass.class));
- mv.monitorexit();
- @@ -493,7 +500,7 @@ public class MiniJava implements Library {
- mv.label(end);
- coerceResultAndReturn(method, mv, returnType);
- - }
- + }
- mv.end();
- }
- }
Add Comment
Please, Sign In to add comment