Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/compiler/il/J9StaticSymbol_inlines.hpp
6000 views
1
/*******************************************************************************
2
* Copyright (c) 2017, 2019 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
24
25
#ifndef J9_STATICSYMBOL_INLINES_INCL
26
#define J9_STATICSYMBOL_INLINES_INCL
27
28
/**
29
* If OMRStaticInlines gets created, be sure to include here
30
*/
31
32
#include <stddef.h>
33
#include "env/TRMemory.hpp"
34
#include "il/J9StaticSymbol.hpp"
35
#include "il/LabelSymbol.hpp"
36
#include "il/Symbol.hpp"
37
38
39
inline void
40
J9::StaticSymbol::makeMethodTypeTableEntry(int32_t methodTypeIndex)
41
{
42
TR_ASSERT(self()->getDataType() == TR::Address, "MethodTypeTableEntries have historically had TR::Address as data type");
43
_methodTypeIndex = methodTypeIndex;
44
self()->setMethodTypeTableEntry();
45
}
46
47
inline void
48
J9::StaticSymbol::makeCallSiteTableEntry(int32_t callSiteIndex)
49
{
50
TR_ASSERT(self()->getDataType() == TR::Address, "CallSiteTableEntries have historically had TR::Address as data type");
51
_callSiteIndex = callSiteIndex;
52
self()->setCallSiteTableEntry();
53
}
54
55
56
inline int32_t
57
J9::StaticSymbol::getCallSiteIndex()
58
{
59
TR_ASSERT(self()->isCallSiteTableEntry(), "Must have called makeCallSiteTableEntry to have a valid callSiteIndex!");
60
return _callSiteIndex;
61
}
62
63
inline void
64
J9::StaticSymbol::makeConstantDynamic(char * classSignature, int32_t classSignatureLength, bool isPrimitive)
65
{
66
TR_ASSERT(self()->getDataType() == TR::Address, "ConstantDynamic should have TR::Address as data type");
67
_classSignature = classSignature;
68
_classSignatureLength = classSignatureLength;
69
_isPrimitive = isPrimitive;
70
}
71
72
inline char *
73
J9::StaticSymbol::getConstantDynamicClassSignature(int32_t & classSignatureLength)
74
{
75
classSignatureLength = _classSignatureLength;
76
return _classSignature;
77
}
78
79
inline bool
80
J9::StaticSymbol::isConstantDynamicPrimitive()
81
{
82
return _isPrimitive;
83
}
84
85
inline TR::Symbol::RecognizedField
86
J9::StaticSymbol::getRecognizedField()
87
{
88
if (self()->isRecognizedStatic())
89
return _recognizedField;
90
else
91
return TR::Symbol::UnknownField;
92
}
93
94
95
inline int32_t
96
J9::StaticSymbol::getMethodTypeIndex()
97
{
98
TR_ASSERT(self()->isMethodTypeTableEntry(), "Must have called makeMethodTypeTableEntry() to have a valid MethodTypeIndex()");
99
return _methodTypeIndex;
100
}
101
102
#endif
103
104