Mercurial > hg > truffle
comparison src/share/vm/utilities/globalDefinitions.cpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | 8e47bac5643a |
children | cc32ccaaf47f |
comparison
equal
deleted
inserted
replaced
6711:ae13cc658b80 | 6948:e522a00b91aa |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 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 | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
109 case T_INT: | 109 case T_INT: |
110 case T_FLOAT: | 110 case T_FLOAT: |
111 case T_DOUBLE: | 111 case T_DOUBLE: |
112 case T_LONG: | 112 case T_LONG: |
113 case T_OBJECT: | 113 case T_OBJECT: |
114 case T_ADDRESS: // random raw pointer | 114 case T_ADDRESS: // random raw pointer |
115 case T_NARROWOOP: // compressed pointer | 115 case T_METADATA: // metadata pointer |
116 case T_CONFLICT: // might as well support a bottom type | 116 case T_NARROWOOP: // compressed pointer |
117 case T_VOID: // padding or other unaddressed word | 117 case T_NARROWKLASS: // compressed klass pointer |
118 case T_CONFLICT: // might as well support a bottom type | |
119 case T_VOID: // padding or other unaddressed word | |
118 // layout type must map to itself | 120 // layout type must map to itself |
119 assert(vt == ft, ""); | 121 assert(vt == ft, ""); |
120 break; | 122 break; |
121 default: | 123 default: |
122 // non-layout type must map to a (different) layout type | 124 // non-layout type must map to a (different) layout type |
176 _type2aelembytes[T_ARRAY] = heapOopSize; | 178 _type2aelembytes[T_ARRAY] = heapOopSize; |
177 } | 179 } |
178 | 180 |
179 | 181 |
180 // Map BasicType to signature character | 182 // Map BasicType to signature character |
181 char type2char_tab[T_CONFLICT+1]={ 0, 0, 0, 0, 'Z', 'C', 'F', 'D', 'B', 'S', 'I', 'J', 'L', '[', 'V', 0, 0, 0}; | 183 char type2char_tab[T_CONFLICT+1]={ 0, 0, 0, 0, 'Z', 'C', 'F', 'D', 'B', 'S', 'I', 'J', 'L', '[', 'V', 0, 0, 0, 0, 0}; |
182 | 184 |
183 // Map BasicType to Java type name | 185 // Map BasicType to Java type name |
184 const char* type2name_tab[T_CONFLICT+1] = { | 186 const char* type2name_tab[T_CONFLICT+1] = { |
185 NULL, NULL, NULL, NULL, | 187 NULL, NULL, NULL, NULL, |
186 "boolean", | 188 "boolean", |
194 "object", | 196 "object", |
195 "array", | 197 "array", |
196 "void", | 198 "void", |
197 "*address*", | 199 "*address*", |
198 "*narrowoop*", | 200 "*narrowoop*", |
201 "*metadata*", | |
202 "*narrowklass*", | |
199 "*conflict*" | 203 "*conflict*" |
200 }; | 204 }; |
201 | 205 |
202 | 206 |
203 BasicType name2type(const char* name) { | 207 BasicType name2type(const char* name) { |
209 return T_ILLEGAL; | 213 return T_ILLEGAL; |
210 } | 214 } |
211 | 215 |
212 | 216 |
213 // Map BasicType to size in words | 217 // Map BasicType to size in words |
214 int type2size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, 1, -1}; | 218 int type2size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, -1}; |
215 | 219 |
216 BasicType type2field[T_CONFLICT+1] = { | 220 BasicType type2field[T_CONFLICT+1] = { |
217 (BasicType)0, // 0, | 221 (BasicType)0, // 0, |
218 (BasicType)0, // 1, | 222 (BasicType)0, // 1, |
219 (BasicType)0, // 2, | 223 (BasicType)0, // 2, |
229 T_OBJECT, // T_OBJECT = 12, | 233 T_OBJECT, // T_OBJECT = 12, |
230 T_OBJECT, // T_ARRAY = 13, | 234 T_OBJECT, // T_ARRAY = 13, |
231 T_VOID, // T_VOID = 14, | 235 T_VOID, // T_VOID = 14, |
232 T_ADDRESS, // T_ADDRESS = 15, | 236 T_ADDRESS, // T_ADDRESS = 15, |
233 T_NARROWOOP, // T_NARROWOOP= 16, | 237 T_NARROWOOP, // T_NARROWOOP= 16, |
234 T_CONFLICT // T_CONFLICT = 17, | 238 T_METADATA, // T_METADATA = 17, |
239 T_NARROWKLASS, // T_NARROWKLASS = 18, | |
240 T_CONFLICT // T_CONFLICT = 19, | |
235 }; | 241 }; |
236 | 242 |
237 | 243 |
238 BasicType type2wfield[T_CONFLICT+1] = { | 244 BasicType type2wfield[T_CONFLICT+1] = { |
239 (BasicType)0, // 0, | 245 (BasicType)0, // 0, |
251 T_OBJECT, // T_OBJECT = 12, | 257 T_OBJECT, // T_OBJECT = 12, |
252 T_OBJECT, // T_ARRAY = 13, | 258 T_OBJECT, // T_ARRAY = 13, |
253 T_VOID, // T_VOID = 14, | 259 T_VOID, // T_VOID = 14, |
254 T_ADDRESS, // T_ADDRESS = 15, | 260 T_ADDRESS, // T_ADDRESS = 15, |
255 T_NARROWOOP, // T_NARROWOOP = 16, | 261 T_NARROWOOP, // T_NARROWOOP = 16, |
256 T_CONFLICT // T_CONFLICT = 17, | 262 T_METADATA, // T_METADATA = 17, |
263 T_NARROWKLASS, // T_NARROWKLASS = 18, | |
264 T_CONFLICT // T_CONFLICT = 19, | |
257 }; | 265 }; |
258 | 266 |
259 | 267 |
260 int _type2aelembytes[T_CONFLICT+1] = { | 268 int _type2aelembytes[T_CONFLICT+1] = { |
261 0, // 0 | 269 0, // 0 |
262 0, // 1 | 270 0, // 1 |
263 0, // 2 | 271 0, // 2 |
264 0, // 3 | 272 0, // 3 |
265 T_BOOLEAN_aelem_bytes, // T_BOOLEAN = 4, | 273 T_BOOLEAN_aelem_bytes, // T_BOOLEAN = 4, |
266 T_CHAR_aelem_bytes, // T_CHAR = 5, | 274 T_CHAR_aelem_bytes, // T_CHAR = 5, |
267 T_FLOAT_aelem_bytes, // T_FLOAT = 6, | 275 T_FLOAT_aelem_bytes, // T_FLOAT = 6, |
268 T_DOUBLE_aelem_bytes, // T_DOUBLE = 7, | 276 T_DOUBLE_aelem_bytes, // T_DOUBLE = 7, |
269 T_BYTE_aelem_bytes, // T_BYTE = 8, | 277 T_BYTE_aelem_bytes, // T_BYTE = 8, |
270 T_SHORT_aelem_bytes, // T_SHORT = 9, | 278 T_SHORT_aelem_bytes, // T_SHORT = 9, |
271 T_INT_aelem_bytes, // T_INT = 10, | 279 T_INT_aelem_bytes, // T_INT = 10, |
272 T_LONG_aelem_bytes, // T_LONG = 11, | 280 T_LONG_aelem_bytes, // T_LONG = 11, |
273 T_OBJECT_aelem_bytes, // T_OBJECT = 12, | 281 T_OBJECT_aelem_bytes, // T_OBJECT = 12, |
274 T_ARRAY_aelem_bytes, // T_ARRAY = 13, | 282 T_ARRAY_aelem_bytes, // T_ARRAY = 13, |
275 0, // T_VOID = 14, | 283 0, // T_VOID = 14, |
276 T_OBJECT_aelem_bytes, // T_ADDRESS = 15, | 284 T_OBJECT_aelem_bytes, // T_ADDRESS = 15, |
277 T_NARROWOOP_aelem_bytes,// T_NARROWOOP= 16, | 285 T_NARROWOOP_aelem_bytes, // T_NARROWOOP= 16, |
278 0 // T_CONFLICT = 17, | 286 T_OBJECT_aelem_bytes, // T_METADATA = 17, |
287 T_NARROWKLASS_aelem_bytes, // T_NARROWKLASS= 18, | |
288 0 // T_CONFLICT = 19, | |
279 }; | 289 }; |
280 | 290 |
281 #ifdef ASSERT | 291 #ifdef ASSERT |
282 int type2aelembytes(BasicType t, bool allow_address) { | 292 int type2aelembytes(BasicType t, bool allow_address) { |
283 assert(allow_address || t != T_ADDRESS, " "); | 293 assert(allow_address || t != T_ADDRESS, " "); |