1879N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 113N/A// Info for oops within a java object. Defaults are zero so 113N/A// things will break badly if incorrectly initialized. 1491N/A// Object alignment, in units of HeapWords. 1491N/A// Defaults are -1 so things will break badly if incorrectly initialized. 0N/A// Something to help porters sleep at night 0N/A assert(
1 ==
sizeof(
u1),
"wrong size for basic type");
0N/A assert(
2 ==
sizeof(
u2),
"wrong size for basic type");
0N/A assert(
4 ==
sizeof(
u4),
"wrong size for basic type");
0N/A for (
int i = 0; i <
99; i++) {
0N/A // the following types might plausibly show up in memory layouts: 0N/A case T_VOID:
// padding or other unaddressed word 0N/A // layout type must map to itself 0N/A // non-layout type must map to a (different) layout type 0N/A // every type must map to same-sized layout type: 0N/A // These are assumed, e.g., when filling HeapWords with juints. 0N/A "HeapWord should be at least as large as juint");
0N/A assert(
sizeof(
NULL) ==
sizeof(
char*),
"NULL must be same size as pointer");
113N/A // Set the size of basic types here (after argument parsing but before 113N/A // Size info for oops within java objects is fixed 0N/A// Map BasicType to signature character 113N/Achar type2char_tab[
T_CONFLICT+
1]={ 0, 0, 0, 0,
'Z',
'C',
'F',
'D',
'B',
'S',
'I',
'J',
'L',
'[',
'V', 0, 0, 0};
0N/A// Map BasicType to Java type name 0N/A// Map BasicType to size in words 113N/Aint type2size[
T_CONFLICT+
1]={ -
1, 0, 0, 0,
1,
1,
1,
2,
1,
1,
1,
2,
1,
1, 0,
1,
1, -
1};
0N/A// Support for 64-bit integer arithmetic 0N/A// least common multiple