changeset 58:15afb13fc4a6

indy: continue to emit N&T in transitional mode
author jrose
date Sun, 04 Jul 2010 00:51:01 -0700
parents e1dc6d53bb96
children f79609513cfc
files indy-bsm-6964498.patch
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/indy-bsm-6964498.patch	Sun Jul 04 00:33:53 2010 -0700
+++ b/indy-bsm-6964498.patch	Sun Jul 04 00:51:01 2010 -0700
@@ -473,7 +473,7 @@
 +        }
 +        ClassType classValue = (values[0] instanceof ClassType) ? (ClassType) values[0] : null;
 +        String    nameValue  = (values[1] instanceof String)    ? (String)    values[1] : null;
-+        List<?>   argsValue  = (values[2] instanceof List)      ? (List<?>)   values[2] : null;
++        List<?>   argsValue  = (values[2] instanceof List<?>)   ? (List<?>)   values[2] : null;
 +        Name methName = null;
 +        if (nameValue != null)
 +            methName = nameValue.equals("") ? names.init : names.fromString(nameValue);
@@ -746,7 +746,7 @@
              assert member.owner == syms.invokeDynamicType.tsym;
          }
  
-@@ -483,10 +482,10 @@
+@@ -483,10 +482,13 @@
  
          Item invoke() {
              // assert target.hasNativeInvokeDynamic();
@@ -756,7 +756,10 @@
              int rescode = Code.typecode(mtype.restype);
 -            ClassFile.NameAndType descr = new ClassFile.NameAndType(member.name, mtype);
 -            code.emitInvokedynamic(pool.put(descr), mtype);
-+            code.emitInvokedynamic(pool.put(new Pool.InvokeDynamic(indy)), mtype);
++            if (indy.getBootstrapMethod() == null) //allowTransitionalJSR292 only
++                code.emitInvokedynamic(pool.put(new ClassFile.NameAndType(indy.name, mtype)), mtype);
++            else
++                code.emitInvokedynamic(pool.put(new Pool.InvokeDynamic(indy)), mtype);
              return stackItem[rescode];
          }