Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/compiler/il/SymbolReference.hpp
6000 views
1
/*******************************************************************************
2
* Copyright (c) 2000, 2020 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 TR_SYMBOLREFERENCE_INCL
24
#define TR_SYMBOLREFERENCE_INCL
25
26
#include "il/J9SymbolReference.hpp"
27
28
#include <stdint.h>
29
#include "env/KnownObjectTable.hpp"
30
#include "compile/SymbolReferenceTable.hpp"
31
#include "env/jittypes.h"
32
#include "infra/Annotations.hpp"
33
34
class mcount_t;
35
namespace TR { class Symbol; }
36
37
namespace TR
38
{
39
40
class OMR_EXTENSIBLE SymbolReference : public J9::SymbolReferenceConnector
41
{
42
43
public:
44
45
SymbolReference(TR::SymbolReferenceTable * symRefTab) :
46
J9::SymbolReferenceConnector(symRefTab) {}
47
48
SymbolReference(TR::SymbolReferenceTable * symRefTab,
49
TR::Symbol * symbol,
50
intptr_t offset = 0) :
51
J9::SymbolReferenceConnector(symRefTab,
52
symbol,
53
offset) {}
54
55
SymbolReference(TR::SymbolReferenceTable * symRefTab,
56
int32_t refNumber,
57
TR::Symbol *ps,
58
intptr_t offset = 0) :
59
J9::SymbolReferenceConnector(symRefTab,
60
refNumber,
61
ps,
62
offset) {}
63
64
SymbolReference(TR::SymbolReferenceTable *symRefTab,
65
TR::SymbolReferenceTable::CommonNonhelperSymbol number,
66
TR::Symbol *ps,
67
intptr_t offset = 0) :
68
J9::SymbolReferenceConnector(symRefTab,
69
number,
70
ps,
71
offset) {}
72
73
SymbolReference(TR::SymbolReferenceTable *symRefTab,
74
TR::Symbol *sym,
75
mcount_t owningMethodIndex,
76
int32_t cpIndex,
77
int32_t unresolvedIndex = 0,
78
TR::KnownObjectTable::Index knownObjectIndex = TR::KnownObjectTable::UNKNOWN) :
79
J9::SymbolReferenceConnector(symRefTab,
80
sym,
81
owningMethodIndex,
82
cpIndex,
83
unresolvedIndex,
84
knownObjectIndex) {}
85
86
SymbolReference(TR::SymbolReferenceTable *symRefTab,
87
TR::SymbolReference& sr,
88
intptr_t offset,
89
TR::KnownObjectTable::Index knownObjectIndex = TR::KnownObjectTable::UNKNOWN) :
90
J9::SymbolReferenceConnector(symRefTab,
91
sr,
92
offset,
93
knownObjectIndex) {}
94
95
protected:
96
97
SymbolReference(TR::SymbolReferenceTable * symRefTab,
98
TR::Symbol * symbol,
99
intptr_t offset,
100
const char * name) :
101
J9::SymbolReferenceConnector(symRefTab,
102
symbol,
103
offset,
104
name) {}
105
106
};
107
108
}
109
110
#endif
111
112