MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / JitVal

Class JitVal

src/hx/cppia/CppiaCompiler.h:84–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82};
83
84struct JitVal
85{
86 JitPosition position;
87 JitType type;
88 union
89 {
90 struct
91 {
92 int offset;
93 unsigned short reg0;
94 unsigned short reg1;
95 };
96 void *pVal;
97 double dVal;
98 int iVal;
99 };
100
101 JitVal(JitType inType=jtVoid, size_t inOffset=0, JitPosition inPosition=jposDontCare,int inReg0=0, int inReg1=0)
102 {
103 position = inPosition;
104 type = inType;
105 offset = (int)inOffset;
106 reg0 = inReg0;
107 reg1 = inReg1;
108 }
109 JitVal(int inValue)
110 {
111 offset = 0;
112 reg0 = 0;
113 reg1 = 0;
114 position = jposIntVal;
115 type = jtInt;
116 iVal = inValue;
117 }
118 /*
119 JitVal(double inValue)
120 {
121 offset = 0;
122 reg0 = 0;
123 reg1 = 0;
124 position = jposFloatVal;
125 type = jtFloat;
126 dVal = inValue;
127 }
128 */
129 JitVal(void *inValue)
130 {
131 offset = 0;
132 reg0 = 0;
133 reg1 = 0;
134 position = jposPointerVal;
135 type = jtPointer;
136 pVal = inValue;
137 }
138
139 bool uses(int reg) const
140 {
141 return ( (position==jposRegister || position==jposStar || position==jposStar || position==jposStarReg) && reg==reg0 ) ||

Callers 15

CppiaExprClass · 0.85
ScriptCallableClass · 0.85
operator +Method · 0.85
asMethod · 0.85
getRegMethod · 0.85
starMethod · 0.85
atRegMethod · 0.85
starMethod · 0.85
genFunctionCallFunction · 0.85
genCodeMethod · 0.85
genCodeMethod · 0.85
genCodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected