Mercurial > hg > graal-jvmci-8
annotate agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java @ 818:b109e761e927
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
Summary: Disable escape analysis when jvmti/debugger is used. Add support for EA ibto SA.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 09 Jun 2009 16:19:10 -0700 |
parents | a61af66fc99e |
children | bd02caa94611 |
rev | line source |
---|---|
0 | 1 /* |
2 * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
20 * CA 95054 USA or visit www.sun.com if you need additional information or | |
21 * have any questions. | |
22 * | |
23 */ | |
24 | |
25 package sun.jvm.hotspot.code; | |
26 | |
27 import java.io.*; | |
28 | |
29 import sun.jvm.hotspot.utilities.*; | |
30 | |
31 /** <P> Classes used for serializing debugging information. These | |
32 abstractions are introducted to provide symmetric read and write | |
33 operations. </P> | |
34 | |
35 <P> | |
36 <UL> | |
37 <LI> ScopeValue: describes the value of a variable/expression in a scope | |
38 <UL> | |
39 <LI> LocationValue: describes a value in a given location (in frame or register) | |
40 <LI> ConstantValue: describes a constant | |
41 </UL> | |
42 </UL> | |
43 </P> */ | |
44 | |
45 public abstract class ScopeValue { | |
46 // Package private enumeration values (FIXME: read from target VM) | |
47 static final int LOCATION_CODE = 0; | |
48 static final int CONSTANT_INT_CODE = 1; | |
49 static final int CONSTANT_OOP_CODE = 2; | |
50 static final int CONSTANT_LONG_CODE = 3; | |
51 static final int CONSTANT_DOUBLE_CODE = 4; | |
818
b109e761e927
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
0
diff
changeset
|
52 static final int CONSTANT_OBJECT_CODE = 5; |
b109e761e927
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
0
diff
changeset
|
53 static final int CONSTANT_OBJECT_ID_CODE = 6; |
0 | 54 |
55 public boolean isLocation() { return false; } | |
56 public boolean isConstantInt() { return false; } | |
57 public boolean isConstantDouble() { return false; } | |
58 public boolean isConstantLong() { return false; } | |
59 public boolean isConstantOop() { return false; } | |
818
b109e761e927
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
0
diff
changeset
|
60 public boolean isObject() { return false; } |
0 | 61 |
62 public static ScopeValue readFrom(DebugInfoReadStream stream) { | |
63 switch (stream.readInt()) { | |
64 case LOCATION_CODE: | |
65 return new LocationValue(stream); | |
66 case CONSTANT_INT_CODE: | |
67 return new ConstantIntValue(stream); | |
68 case CONSTANT_OOP_CODE: | |
69 return new ConstantOopReadValue(stream); | |
70 case CONSTANT_LONG_CODE: | |
71 return new ConstantLongValue(stream); | |
72 case CONSTANT_DOUBLE_CODE: | |
73 return new ConstantDoubleValue(stream); | |
818
b109e761e927
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
0
diff
changeset
|
74 case CONSTANT_OBJECT_CODE: |
b109e761e927
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
0
diff
changeset
|
75 return stream.readObjectValue(); |
b109e761e927
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
0
diff
changeset
|
76 case CONSTANT_OBJECT_ID_CODE: |
b109e761e927
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
0
diff
changeset
|
77 return stream.getCachedObject(); |
0 | 78 default: |
79 Assert.that(false, "should not reach here"); | |
80 return null; | |
81 } | |
82 } | |
83 | |
84 public abstract void printOn(PrintStream tty); | |
85 } |