Mercurial > hg > truffle
annotate agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java @ 11997:cd25d3be91c5
8012144: multiple SIGSEGVs fails on staxf
Summary: Forward port of 7u change to add additional fence() on RMO platforms, with a load_acquire on all platforms
Reviewed-by: dholmes, kvn
author | vladidan |
---|---|
date | Tue, 06 Aug 2013 20:01:40 -0400 |
parents | c18cbe5936b8 |
children |
rev | line source |
---|---|
0 | 1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
844
diff
changeset
|
2 * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
844
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
844
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
844
diff
changeset
|
21 * questions. |
0 | 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 } |