Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/bcutil/bcutil_internal.h
5985 views
1
/*******************************************************************************
2
* Copyright (c) 1991, 2014 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
* or the Apache License, Version 2.0 which accompanies this distribution and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
20
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
*******************************************************************************/
22
23
#ifndef bcutil_internal_h
24
#define bcutil_internal_h
25
26
/**
27
* @file bcutil_internal.h
28
* @brief Internal prototypes used within the BCUTIL module.
29
*
30
* This file contains implementation-private function prototypes and
31
* type definitions for the BCUTIL module.
32
*
33
*/
34
35
#include "j9.h"
36
#include "j9comp.h"
37
#include "bcutil_api.h"
38
39
#ifdef __cplusplus
40
extern "C" {
41
#endif
42
43
/* ---------------- bcutil.c ---------------- */
44
45
#if defined(J9VM_OPT_INVARIANT_INTERNING)
46
47
#define BCU_TREE_VERIFY_ASSERT(tree, condition) \
48
do { \
49
if (!condition) { \
50
if (tree != NULL) { \
51
tree->flags = (tree->flags & (~J9AVLTREE_DO_VERIFY_TREE_STRUCT_AND_ACCESS)); \
52
} \
53
Trc_BCU_Assert_TrueTreeVerify(condition); \
54
} \
55
} while(0)
56
57
#define BCU_TREE_VERIFY_ASSERT_AND_RETURN_ONFAIL_VOID(tree, condition) \
58
do { \
59
if (!condition) { \
60
if (tree != NULL) { \
61
tree->flags = (tree->flags & (~J9AVLTREE_DO_VERIFY_TREE_STRUCT_AND_ACCESS)); \
62
} \
63
Trc_BCU_Assert_TrueTreeVerify(condition); \
64
return; \
65
} \
66
} while(0)
67
68
#define BCU_TREE_VERIFY_ASSERT_AND_RETURN_ONFAIL_RC(tree, condition, rc) \
69
do { \
70
if (!condition) { \
71
if (tree != NULL) { \
72
tree->flags = (tree->flags & (~J9AVLTREE_DO_VERIFY_TREE_STRUCT_AND_ACCESS)); \
73
} \
74
Trc_BCU_Assert_TrueTreeVerify(condition); \
75
return rc; \
76
} \
77
} while(0)
78
79
#else
80
#define BCU_TREE_VERIFY_ASSERT(tree, condition)
81
#define BCU_TREE_VERIFY_ASSERT_AND_RETURN_ONFAIL_VOID(tree, condition)
82
#define BCU_TREE_VERIFY_ASSERT_AND_RETURN_ONFAIL_RC(tree, condition, rc)
83
#endif
84
85
J9HashTable*
86
romClassHashTableNew(J9JavaVM *vm, U_32 initialSize);
87
88
void
89
romClassHashTableFree(J9HashTable *hashTable);
90
91
UDATA
92
romClassHashTableAdd(J9HashTable *hashTable, J9ROMClass *value);
93
94
J9ROMClass*
95
romClassHashTableFind(J9HashTable *hashTable, U_8 *className, UDATA classNameLength);
96
97
void
98
romClassHashTableReplace(J9HashTable *hashTable, J9ROMClass *originalClass, J9ROMClass *replacementClass);
99
100
UDATA
101
romClassHashTableDelete(J9HashTable *hashTable, J9ROMClass *romClass);
102
103
void
104
romVerboseRecordPhaseStart(void *verboseContext, UDATA phase);
105
106
void
107
romVerboseRecordPhaseEnd(void *verboseContext, UDATA phase);
108
109
#ifdef __cplusplus
110
}
111
#endif
112
113
#endif /* bcutil_internal_h */
114
115
116