42650
|
1 |
/*
|
52910
|
2 |
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
42650
|
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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
20 |
* or visit www.oracle.com if you need additional information or have any
|
|
21 |
* questions.
|
|
22 |
*/
|
|
23 |
|
51436
|
24 |
|
|
25 |
|
42650
|
26 |
package jdk.tools.jaotc;
|
|
27 |
|
|
28 |
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
|
|
29 |
|
|
30 |
/**
|
|
31 |
* Constants used to mark special positions in code being installed into the code cache by Graal C++
|
|
32 |
* code.
|
|
33 |
*/
|
|
34 |
enum MarkId {
|
|
35 |
VERIFIED_ENTRY("CodeInstaller::VERIFIED_ENTRY"),
|
|
36 |
UNVERIFIED_ENTRY("CodeInstaller::UNVERIFIED_ENTRY"),
|
|
37 |
OSR_ENTRY("CodeInstaller::OSR_ENTRY"),
|
|
38 |
EXCEPTION_HANDLER_ENTRY("CodeInstaller::EXCEPTION_HANDLER_ENTRY"),
|
|
39 |
DEOPT_HANDLER_ENTRY("CodeInstaller::DEOPT_HANDLER_ENTRY"),
|
|
40 |
INVOKEINTERFACE("CodeInstaller::INVOKEINTERFACE"),
|
|
41 |
INVOKEVIRTUAL("CodeInstaller::INVOKEVIRTUAL"),
|
|
42 |
INVOKESTATIC("CodeInstaller::INVOKESTATIC"),
|
|
43 |
INVOKESPECIAL("CodeInstaller::INVOKESPECIAL"),
|
|
44 |
INLINE_INVOKE("CodeInstaller::INLINE_INVOKE"),
|
|
45 |
POLL_NEAR("CodeInstaller::POLL_NEAR"),
|
|
46 |
POLL_RETURN_NEAR("CodeInstaller::POLL_RETURN_NEAR"),
|
|
47 |
POLL_FAR("CodeInstaller::POLL_FAR"),
|
|
48 |
POLL_RETURN_FAR("CodeInstaller::POLL_RETURN_FAR"),
|
|
49 |
CARD_TABLE_ADDRESS("CodeInstaller::CARD_TABLE_ADDRESS"),
|
|
50 |
HEAP_TOP_ADDRESS("CodeInstaller::HEAP_TOP_ADDRESS"),
|
|
51 |
HEAP_END_ADDRESS("CodeInstaller::HEAP_END_ADDRESS"),
|
|
52 |
NARROW_KLASS_BASE_ADDRESS("CodeInstaller::NARROW_KLASS_BASE_ADDRESS"),
|
43435
|
53 |
NARROW_OOP_BASE_ADDRESS("CodeInstaller::NARROW_OOP_BASE_ADDRESS"),
|
42650
|
54 |
CRC_TABLE_ADDRESS("CodeInstaller::CRC_TABLE_ADDRESS"),
|
|
55 |
LOG_OF_HEAP_REGION_GRAIN_BYTES("CodeInstaller::LOG_OF_HEAP_REGION_GRAIN_BYTES"),
|
|
56 |
INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED("CodeInstaller::INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED");
|
|
57 |
|
|
58 |
private final int value;
|
|
59 |
|
51436
|
60 |
MarkId(String name) {
|
42650
|
61 |
this.value = (int) (long) HotSpotJVMCIRuntime.runtime().getConfigStore().getConstants().get(name);
|
|
62 |
}
|
|
63 |
|
46949
|
64 |
static MarkId getEnum(int value) {
|
42650
|
65 |
for (MarkId e : values()) {
|
|
66 |
if (e.value == value) {
|
|
67 |
return e;
|
|
68 |
}
|
|
69 |
}
|
|
70 |
throw new InternalError("Unknown enum value: " + value);
|
|
71 |
}
|
|
72 |
}
|