test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineCondy.jasm
author hseigel
Mon, 29 Jul 2019 09:57:37 -0400
changeset 57566 ad84ae073248
permissions -rw-r--r--
8228596: Class redefinition fails when condy instructions are removed Summary: Make sure has_dynamic_constant flag value gets copied to merged constant pool, when it is set to TRUE Reviewed-by: coleenp, dcubed, sspitsyn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57566
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
     1
/*
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
     2
 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
     4
 *
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
     8
 *
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    13
 * accompanied this code).
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    14
 *
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    18
 *
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    21
 * questions.
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    22
 */
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    23
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    24
super public class RedefineCondy version 55:0 {
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    25
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    26
    public Method "<init>":"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)V"
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    27
    stack 3 locals 4 {
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    28
        aload_0;
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    29
        invokespecial   Method java/lang/Object."<init>":"()V";
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    30
        getstatic       Field java/lang/System.out:"Ljava/io/PrintStream;";
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    31
        ldc             String "In RedefineCondy <init> method";
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    32
        invokevirtual   Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    33
        return;
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    34
    }
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    35
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    36
    public static Method main:"([Ljava/lang/String;)V" stack 3 locals 1 {
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    37
        new    class RedefineCondy;
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    38
        dup;
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    39
        ldc    Dynamic REF_newInvokeSpecial:RedefineCondy."<init>":"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)V":RedefineCondy:"Ljava/lang/Object;";
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    40
        return;
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    41
    }
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    42
ad84ae073248 8228596: Class redefinition fails when condy instructions are removed
hseigel
parents:
diff changeset
    43
} // end Class RedefineCondy