changeset 439:c3c151c6d7d0

rebase to current hsx/hotspot-comp
author jrose
date Sat, 03 Nov 2012 19:00:02 -0700
parents 51b63e67f83e
children 7ee20b0bbd10
files meth-info-7087570.patch meth-lfi-8001106.patch meth.patch series
diffstat 4 files changed, 38 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/meth-info-7087570.patch	Wed Oct 17 21:25:59 2012 -0700
+++ b/meth-info-7087570.patch	Sat Nov 03 19:00:02 2012 -0700
@@ -170,6 +170,14 @@
 diff --git a/src/share/classes/java/lang/invoke/MethodHandleInfo.java b/src/share/classes/java/lang/invoke/MethodHandleInfo.java
 --- a/src/share/classes/java/lang/invoke/MethodHandleInfo.java
 +++ b/src/share/classes/java/lang/invoke/MethodHandleInfo.java
+@@ -29,7 +29,6 @@
+ //Not yet public: public
+ class MethodHandleInfo {
+    public static final int
+-       REF_NONE                    = Constants.REF_NONE,
+        REF_getField                = Constants.REF_getField,
+        REF_getStatic               = Constants.REF_getStatic,
+        REF_putField                = Constants.REF_putField,
 @@ -45,12 +45,17 @@
     private final MethodType methodType;
     private final int referenceKind;
@@ -199,6 +207,6 @@
                  return fakeMethodHandleInvoke(method);
 -            MethodHandle mh = DirectMethodHandle.make(refc, method);
 +            MethodHandle mh = DirectMethodHandle.make(refKind, refc, method);
+             mh = maybeBindCaller(method, mh);
              mh = mh.setVarargs(method);
              if (doRestrict)
-                 mh = restrictReceiver(method, mh, lookupClass());
--- a/meth-lfi-8001106.patch	Wed Oct 17 21:25:59 2012 -0700
+++ b/meth-lfi-8001106.patch	Sat Nov 03 19:00:02 2012 -0700
@@ -376,7 +376,7 @@
 +                            file.close();
 +                            return null;
 +                        } catch (IOException ex) {
-+                            throw new InternalError(ex);
++                            throw newInternalError(ex);
 +                        }
 +                    }
 +                });
@@ -1036,7 +1036,7 @@
 +                traceInterpreter("compileToBytecode" + (fullCustom ? "/fullCustom" : ""), this);
 +            return cp.vmentry;
          } catch (Error | Exception ex) {
-             throw new InternalError(this.toString(), ex);
+             throw newInternalError(this.toString(), ex);
          }
      }
  
@@ -1382,6 +1382,18 @@
                  Name array = names[argIndex];
                  names[nameCursor++] = new Name(NF_checkSpreadArgument, array, spreadArgCount);
                  for (int j = 0; j < spreadArgCount; i++, j++) {
+@@ -881,9 +881,9 @@
+             MethodType mt = mh.type();
+             int arity = mt.parameterCount();
+             MethodHandle vamh = mh.asType(mt.generic());
+-            vamh.internalForm().compileToBytecode();  // eliminate LFI stack frames
++            vamh.internalForm().compileToBytecode(true);  // eliminate LFI stack frames
+             vamh = vamh.asSpreader(Object[].class, arity);
+-            vamh.internalForm().compileToBytecode();  // eliminate LFI stack frames
++            vamh.internalForm().compileToBytecode(true);  // eliminate LFI stack frames
+             return vamh;
+         }
+ 
 diff --git a/src/share/classes/java/lang/invoke/MethodHandleStatics.java b/src/share/classes/java/lang/invoke/MethodHandleStatics.java
 --- a/src/share/classes/java/lang/invoke/MethodHandleStatics.java
 +++ b/src/share/classes/java/lang/invoke/MethodHandleStatics.java
--- a/meth.patch	Wed Oct 17 21:25:59 2012 -0700
+++ b/meth.patch	Sat Nov 03 19:00:02 2012 -0700
@@ -153,13 +153,6 @@
 diff --git a/src/share/classes/java/lang/invoke/MethodHandleImpl.java b/src/share/classes/java/lang/invoke/MethodHandleImpl.java
 --- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java
 +++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
 @@ -107,7 +107,7 @@
          }
          static String name(Class<?> arrayClass, boolean isSetter) {
@@ -199,7 +192,7 @@
 +// FIXME in MR1: Make this a public API
  class MethodHandleInfo {
     public static final int
-        REF_NONE                    = Constants.REF_NONE,
+        REF_getField                = Constants.REF_getField,
 diff --git a/src/share/classes/java/lang/invoke/MethodHandleProxies.java b/src/share/classes/java/lang/invoke/MethodHandleProxies.java
 --- a/src/share/classes/java/lang/invoke/MethodHandleProxies.java
 +++ b/src/share/classes/java/lang/invoke/MethodHandleProxies.java
@@ -240,30 +233,13 @@
      }
  
      /**
-diff --git a/src/share/classes/java/lang/invoke/MethodHandleStatics.java b/src/share/classes/java/lang/invoke/MethodHandleStatics.java
---- a/src/share/classes/java/lang/invoke/MethodHandleStatics.java
-+++ b/src/share/classes/java/lang/invoke/MethodHandleStatics.java
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
 diff --git a/src/share/classes/java/lang/invoke/MethodHandles.java b/src/share/classes/java/lang/invoke/MethodHandles.java
 --- a/src/share/classes/java/lang/invoke/MethodHandles.java
 +++ b/src/share/classes/java/lang/invoke/MethodHandles.java
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -329,6 +329,7 @@
-      *     where {@code defcPkg} is the package of {@code defc}.
+@@ -330,6 +330,7 @@
       * </ul>
       */
+     // FIXME in MR1: clarify that the bytecode behavior of a caller-ID method (like Class.forName) is relative to the lookupClass used to create the method handle, not the dynamic caller of the method handle
 +    // FIXME in MR1: clarify that the name "<init>" never works as a method name, even if the corresponding constructor happens to exist
      public static final
      class Lookup {
--- a/series	Wed Oct 17 21:25:59 2012 -0700
+++ b/series	Sat Nov 03 19:00:02 2012 -0700
@@ -1,4 +1,4 @@
-# base = 1dde94130b0c in http://hg.openjdk.java.net/hsx/hotspot-comp/jdk [2012-09-20]
+# base = 7ac292e57b5a in http://hg.openjdk.java.net/hsx/hotspot-comp/jdk [2012-11-04]
 
 # review complete for hotspot-comp:
 # (none)
@@ -6,24 +6,24 @@
 # review pending before push to hotspot-comp:
 
 # non-pushed files are under review or development, or merely experimental:
-anno-stable-8001107.patch       #-/meth #+1dde94130b0c
-meth-lfi-8001106.patch          #-/meth #+1dde94130b0c
-meth-info-7087570.patch         #-/meth #+1dde94130b0c
-meth-aclone-8001105.patch       #-/meth #+1dde94130b0c
-meth.patch                      #-/meth #+1dde94130b0c
-meth-7177472.patch              #-/meth #+1dde94130b0c #-buildable
-indy.pack.patch                 #-/meth #+1dde94130b0c #-buildable
+anno-stable-8001107.patch       #-/meth #+7ac292e57b5a
+meth-lfi-8001106.patch          #-/meth #+7ac292e57b5a
+meth-info-7087570.patch         #-/meth #+7ac292e57b5a
+meth-aclone-8001105.patch       #-/meth #+7ac292e57b5a
+meth.patch                      #-/meth #+7ac292e57b5a
+meth-7177472.patch              #-/meth #+7ac292e57b5a #-buildable
+indy.pack.patch                 #-/meth #+7ac292e57b5a #-buildable
 
 # Keep these separate, for debugging and review:
 dyncast.patch   #+dyncast       #-/dyncast
 inti.patch      #+inti          #-/inti #-buildable
 callcc_old.patch #+callcc_old   #-/callcc_old
-continuation.patch #+continuation #-/continuation #(1dde94130b0c)
+continuation.patch #+continuation #-/continuation #(7ac292e57b5a)
 tailc.patch     #+tailc         #-/tailc
-anonk.patch                     #-/anonk #+1dde94130b0c
+anonk.patch                     #-/anonk #+7ac292e57b5a
 
 # Coroutine patches: full version and simple version (no thread migration, no serialization, no stack sharing) 
-coro.patch                      #+coro          #(1dde94130b0c)
-coro-simple.patch               #+coro-simple   #(1dde94130b0c)
+coro.patch                      #+coro          #(7ac292e57b5a)
+coro-simple.patch               #+coro-simple   #(7ac292e57b5a)
 
 tuple-tsig.patch                #-/tuple #-testable