annotate graal/com.oracle.jvmci.code/src/com/oracle/jvmci/code/BytecodeFrame.java @ 21556:48c1ebd24120

renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Wed, 27 May 2015 00:36:16 +0200
parents graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/BytecodeFrame.java@082417ac43e4
children f5b549811bac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
1 /*
18189
e75eb4720d4e Introduce new JavaValue interface for use in debug info.
Roland Schatz <roland.schatz@oracle.com>
parents: 16888
diff changeset
2 * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
4 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
8 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
13 * accompanied this code).
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
14 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
18 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
21 * questions.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
22 */
21556
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21411
diff changeset
23 package com.oracle.jvmci.code;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
24
21556
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21411
diff changeset
25 import com.oracle.jvmci.meta.Kind;
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21411
diff changeset
26 import com.oracle.jvmci.meta.ResolvedJavaMethod;
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21411
diff changeset
27 import com.oracle.jvmci.meta.Value;
18342
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
28 import java.util.*;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
29
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
30
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
31 /**
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
32 * Represents the Java bytecode frame state(s) at a given position including {@link Value locations}
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
33 * where to find the local variables, operand stack values and locked objects of the bytecode
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
34 * frame(s).
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
35 */
21411
082417ac43e4 removed com.oracle.graal.hotspot.server and uses of Serializable it depended upon (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21063
diff changeset
36 public class BytecodeFrame extends BytecodePosition {
4142
bc8527f3071c Adjust code base to new level of warnings.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3733
diff changeset
37
bc8527f3071c Adjust code base to new level of warnings.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3733
diff changeset
38 /**
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
39 * An array of values representing how to reconstruct the state of the Java frame. This is array
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
40 * is partitioned as follows:
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
41 * <p>
14906
f3a5036cc13c javadoc fixes
Bernhard Urban <bernhard.urban@jku.at>
parents: 13970
diff changeset
42 * <table summary="" border="1" cellpadding="5" frame="void" rules="all">
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
43 * <tr>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
44 * <th>Start index (inclusive)</th>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
45 * <th>End index (exclusive)</th>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
46 * <th>Description</th>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
47 * </tr>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
48 * <tr>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
49 * <td>0</td>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
50 * <td>numLocals</td>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
51 * <td>Local variables</td>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
52 * </tr>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
53 * <tr>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
54 * <td>numLocals</td>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
55 * <td>numLocals + numStack</td>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
56 * <td>Operand stack</td>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
57 * </tr>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
58 * <tr>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
59 * <td>numLocals + numStack</td>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
60 * <td>values.length</td>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
61 * <td>Locked objects</td>
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
62 * </tr>
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
63 * </table>
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
64 * <p>
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
65 * Note that the number of locals and the number of stack slots may be smaller than the maximum
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
66 * number of locals and stack slots as specified in the compiled method.
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
67 */
19662
f595e97626fd Use Value instead of JavaValue in BytecodeFrame and VirtualObject
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 19608
diff changeset
68 public final Value[] values;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
69
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
70 /**
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
71 * The number of locals in the values array.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
72 */
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
73 public final int numLocals;
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
74
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
75 /**
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
76 * The number of stack slots in the values array.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
77 */
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
78 public final int numStack;
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
79
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
80 /**
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
81 * The number of locks in the values array.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
82 */
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
83 public final int numLocks;
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
84
9900
f6a792c8e3ec added documentation for BytecodeFrame.rethrowException
Doug Simon <doug.simon@oracle.com>
parents: 7660
diff changeset
85 /**
f6a792c8e3ec added documentation for BytecodeFrame.rethrowException
Doug Simon <doug.simon@oracle.com>
parents: 7660
diff changeset
86 * True if this is a position inside an exception handler before the exception object has been
19779
143d65ef196f minor javadoc fix
Doug Simon <doug.simon@oracle.com>
parents: 18913
diff changeset
87 * consumed. In this case, {@link #numStack} {@code == 1} and {@link #getStackValue(int)
9900
f6a792c8e3ec added documentation for BytecodeFrame.rethrowException
Doug Simon <doug.simon@oracle.com>
parents: 7660
diff changeset
88 * getStackValue(0)} is the location of the exception object. If deoptimization happens at this
f6a792c8e3ec added documentation for BytecodeFrame.rethrowException
Doug Simon <doug.simon@oracle.com>
parents: 7660
diff changeset
89 * position, the interpreter will rethrow the exception instead of executing the bytecode
f6a792c8e3ec added documentation for BytecodeFrame.rethrowException
Doug Simon <doug.simon@oracle.com>
parents: 7660
diff changeset
90 * instruction at this position.
f6a792c8e3ec added documentation for BytecodeFrame.rethrowException
Doug Simon <doug.simon@oracle.com>
parents: 7660
diff changeset
91 */
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
92 public final boolean rethrowException;
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
93
4678
a03f3fd16b22 Fix reexecute boolean in HotSpot debug information. Introduce "duringCall" flag in FrameState that indicates that the bci of the frame state denotes an invoke that should *not* be reexecuted.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4199
diff changeset
94 public final boolean duringCall;
a03f3fd16b22 Fix reexecute boolean in HotSpot debug information. Introduce "duringCall" flag in FrameState that indicates that the bci of the frame state denotes an invoke that should *not* be reexecuted.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4199
diff changeset
95
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
96 /**
15263
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
97 * This BCI should be used for frame states that are built for code with no meaningful BCI.
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
98 */
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
99 public static final int UNKNOWN_BCI = -5;
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
100
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
101 /**
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
102 * The BCI for exception unwind. This is synthetic code and has no representation in bytecode.
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
103 * In contrast with {@link #AFTER_EXCEPTION_BCI}, at this point, if the method is synchronized,
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
104 * the monitor is still held.
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
105 */
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
106 public static final int UNWIND_BCI = -1;
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
107
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
108 /**
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
109 * The BCI for the state before starting to execute a method. Note that if the method is
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
110 * synchronized, the monitor is not yet held.
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
111 */
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
112 public static final int BEFORE_BCI = -2;
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
113
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
114 /**
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
115 * The BCI for the state after finishing the execution of a method and returning normally. Note
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
116 * that if the method was synchronized the monitor is already released.
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
117 */
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
118 public static final int AFTER_BCI = -3;
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
119
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
120 /**
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
121 * The BCI for exception unwind. This is synthetic code and has no representation in bytecode.
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
122 * In contrast with {@link #UNWIND_BCI}, at this point, if the method is synchronized, the
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
123 * monitor is already released.
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
124 */
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
125 public static final int AFTER_EXCEPTION_BCI = -4;
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
126
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
127 /**
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
128 * This BCI should be used for states that cannot be the target of a deoptimization, like
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
129 * snippet frame states.
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
130 */
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
131 public static final int INVALID_FRAMESTATE_BCI = -6;
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
132
0b25b81414c9 Move various bci constants from FrameState (gral.nodes) to BytecodeFrame (graal.api.code)
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14906
diff changeset
133 /**
21063
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
134 * Determines if a given BCI matches one of the placeholder BCI constants defined in this class.
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
135 */
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
136 public static boolean isPlaceholderBci(int bci) {
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
137 return bci < 0;
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
138 }
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
139
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
140 /**
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
141 * Gets the name of a given placeholder BCI.
21046
d35d2ac04970 weakened check used by an assertion in the FrameStateAssignmentPhase
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
142 */
21063
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
143 public static String getPlaceholderBciName(int bci) {
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
144 assert isPlaceholderBci(bci);
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
145 if (bci == BytecodeFrame.AFTER_BCI) {
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
146 return "AFTER_BCI";
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
147 } else if (bci == BytecodeFrame.AFTER_EXCEPTION_BCI) {
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
148 return "AFTER_EXCEPTION_BCI";
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
149 } else if (bci == BytecodeFrame.INVALID_FRAMESTATE_BCI) {
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
150 return "INVALID_FRAMESTATE_BCI";
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
151 } else if (bci == BytecodeFrame.BEFORE_BCI) {
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
152 return "BEFORE_BCI";
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
153 } else if (bci == BytecodeFrame.UNKNOWN_BCI) {
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
154 return "UNKNOWN_BCI";
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
155 } else {
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
156 assert bci == BytecodeFrame.UNWIND_BCI;
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
157 return "UNWIND_BCI";
ae5710f20011 renamed BytecodeFrame.isSyntheticBci to isPlaceholderBci and added getPlaceholderBciName
Doug Simon <doug.simon@oracle.com>
parents: 21046
diff changeset
158 }
21046
d35d2ac04970 weakened check used by an assertion in the FrameStateAssignmentPhase
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
159 }
d35d2ac04970 weakened check used by an assertion in the FrameStateAssignmentPhase
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
160
d35d2ac04970 weakened check used by an assertion in the FrameStateAssignmentPhase
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
161 /**
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
162 * Creates a new frame object.
14906
f3a5036cc13c javadoc fixes
Bernhard Urban <bernhard.urban@jku.at>
parents: 13970
diff changeset
163 *
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
164 * @param caller the caller frame (which may be {@code null})
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
165 * @param method the method
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
166 * @param bci a BCI within the method
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
167 * @param rethrowException specifies if the VM should re-throw the pending exception when
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 5552
diff changeset
168 * deopt'ing using this frame
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
169 * @param values the frame state {@link #values}
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
170 * @param numLocals the number of local variables
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
171 * @param numStack the depth of the stack
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
172 * @param numLocks the number of locked objects
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
173 */
19662
f595e97626fd Use Value instead of JavaValue in BytecodeFrame and VirtualObject
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 19608
diff changeset
174 public BytecodeFrame(BytecodeFrame caller, ResolvedJavaMethod method, int bci, boolean rethrowException, boolean duringCall, Value[] values, int numLocals, int numStack, int numLocks) {
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
175 super(caller, method, bci);
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
176 assert values != null;
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
177 this.rethrowException = rethrowException;
5129
51111665eda6 Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents: 4678
diff changeset
178 this.duringCall = duringCall;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
179 this.values = values;
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
180 this.numLocals = numLocals;
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
181 this.numStack = numStack;
5129
51111665eda6 Support for recording a leaf graph id for each deoptimization point in the debug info.
Lukas Stadler <lukas.stadler@jku.at>
parents: 4678
diff changeset
182 this.numLocks = numLocks;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
183 assert !rethrowException || numStack == 1 : "must have exception on top of the stack";
13929
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
184 }
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
185
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
186 /**
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
187 * Ensure that the frame state is formatted as expected by the JVM, with null or Illegal in the
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
188 * slot following a double word item. This should really be checked in FrameState itself but
13970
bbf84e85b775 Move BytecodeFrame validation into the HotSpot backend
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 13929
diff changeset
189 * because of Word type rewriting and alternative backends that can't be done.
13929
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
190 */
19732
6a3832494e24 Check for derived pointers before passing BytecodeFrame into HotSpot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 19662
diff changeset
191 public boolean validateFormat(boolean derivedOk) {
16888
8f4150982bc3 validateFormat should validate caller too
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 15263
diff changeset
192 if (caller() != null) {
19732
6a3832494e24 Check for derived pointers before passing BytecodeFrame into HotSpot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 19662
diff changeset
193 caller().validateFormat(derivedOk);
16888
8f4150982bc3 validateFormat should validate caller too
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 15263
diff changeset
194 }
13929
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
195 for (int i = 0; i < numLocals + numStack; i++) {
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
196 if (values[i] != null) {
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
197 Kind kind = values[i].getKind();
18913
51680f58e681 Clean up in Kind class. Introduce Kind#getSlotCount and Kind#needsTwoSlots methods.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18342
diff changeset
198 if (kind.needsTwoSlots()) {
13929
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
199 assert values.length > i + 1 : String.format("missing second word %s", this);
19608
3349fe56e6e9 Small change to BytecodeFrame validation.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18913
diff changeset
200 assert values[i + 1] == null || values[i + 1].getKind() == Kind.Illegal : this;
13929
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
201 }
19732
6a3832494e24 Check for derived pointers before passing BytecodeFrame into HotSpot
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 19662
diff changeset
202 assert derivedOk || ValueUtil.isIllegal(values[i]) || !values[i].getLIRKind().isDerivedReference() : "Unexpected derived value: " + values[i];
13929
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
203 }
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
204 }
f191cac04605 add assert to check format of debug info
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 9900
diff changeset
205 return true;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
206 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
207
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
208 /**
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
209 * Gets the value representing the specified local variable.
14906
f3a5036cc13c javadoc fixes
Bernhard Urban <bernhard.urban@jku.at>
parents: 13970
diff changeset
210 *
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
211 * @param i the local variable index
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
212 * @return the value that can be used to reconstruct the local's current value
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
213 */
19662
f595e97626fd Use Value instead of JavaValue in BytecodeFrame and VirtualObject
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 19608
diff changeset
214 public Value getLocalValue(int i) {
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
215 return values[i];
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
216 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
217
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
218 /**
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
219 * Gets the value representing the specified stack slot.
14906
f3a5036cc13c javadoc fixes
Bernhard Urban <bernhard.urban@jku.at>
parents: 13970
diff changeset
220 *
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
221 * @param i the stack index
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
222 * @return the value that can be used to reconstruct the stack slot's current value
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
223 */
19662
f595e97626fd Use Value instead of JavaValue in BytecodeFrame and VirtualObject
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 19608
diff changeset
224 public Value getStackValue(int i) {
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
225 return values[i + numLocals];
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
226 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
227
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
228 /**
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
229 * Gets the value representing the specified lock.
14906
f3a5036cc13c javadoc fixes
Bernhard Urban <bernhard.urban@jku.at>
parents: 13970
diff changeset
230 *
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
231 * @param i the lock index
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
232 * @return the value that can be used to reconstruct the lock's current value
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
233 */
19662
f595e97626fd Use Value instead of JavaValue in BytecodeFrame and VirtualObject
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 19608
diff changeset
234 public Value getLockValue(int i) {
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
235 return values[i + numLocals + numStack];
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
236 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
237
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
238 /**
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
239 * Gets the caller of this frame.
14906
f3a5036cc13c javadoc fixes
Bernhard Urban <bernhard.urban@jku.at>
parents: 13970
diff changeset
240 *
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
241 * @return {@code null} if this frame has no caller
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
242 */
5547
b6617d13ea44 Dropping Ci* prefixes. Some additional renamings in the api.code interface.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5541
diff changeset
243 public BytecodeFrame caller() {
5552
69a8969dbf40 Reduce public fields in api.code project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5547
diff changeset
244 return (BytecodeFrame) getCaller();
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
245 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
246
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
247 @Override
18342
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
248 public boolean equals(Object obj) {
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
249 if (this == obj) {
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
250 return true;
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
251 }
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
252 if (obj instanceof BytecodeFrame && super.equals(obj)) {
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
253 BytecodeFrame that = (BytecodeFrame) obj;
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
254 // @formatter:off
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
255 if (this.duringCall == that.duringCall &&
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
256 this.rethrowException == that.rethrowException &&
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
257 this.numLocals == that.numLocals &&
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
258 this.numLocks == that.numLocks &&
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
259 this.numStack == that.numStack &&
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
260 Arrays.equals(this.values, that.values)) {
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
261 return true;
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
262 }
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
263 // @formatter:off
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
264 return true;
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
265 }
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
266 return false;
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
267 }
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
268
d60dd21329f2 implemented .equals() for CompilationResult and the objects it encapsulates
Doug Simon <doug.simon@oracle.com>
parents: 18189
diff changeset
269 @Override
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
270 public String toString() {
5547
b6617d13ea44 Dropping Ci* prefixes. Some additional renamings in the api.code interface.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5541
diff changeset
271 return CodeUtil.append(new StringBuilder(100), this).toString();
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
272 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
273 }