changeset 49476:e65277a7109a lworld

Fix stack map creation in byte code API
author psandoz
date Wed, 25 Apr 2018 14:15:38 -0700
parents d50869a64b06
children 048139cd8f32
files src/java.base/share/classes/jdk/experimental/bytecode/BasicTypeHelper.java src/java.base/share/classes/jdk/experimental/bytecode/TypedCodeBuilder.java
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/jdk/experimental/bytecode/BasicTypeHelper.java	Wed Apr 25 14:19:39 2018 +0200
+++ b/src/java.base/share/classes/jdk/experimental/bytecode/BasicTypeHelper.java	Wed Apr 25 14:15:38 2018 -0700
@@ -73,6 +73,9 @@
             case 'V':
                 return TypeTag.V;
             default:
+                if (s == nullType()) {
+                    return TypeTag.A;
+                }
                 throw new IllegalStateException("Bad type: " + s);
         }
     }
--- a/src/java.base/share/classes/jdk/experimental/bytecode/TypedCodeBuilder.java	Wed Apr 25 14:19:39 2018 +0200
+++ b/src/java.base/share/classes/jdk/experimental/bytecode/TypedCodeBuilder.java	Wed Apr 25 14:15:38 2018 -0700
@@ -238,6 +238,7 @@
         State(ArrayList<T> stack, Vector<T> locals) {
             this.stack = stack;
             this.locals = locals;
+            this.alive = true;
         }
 
         State() {