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

Class CppiaJitCompiler

src/hx/cppia/CppiaCompiler.cpp:204–1527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202
203
204class CppiaJitCompiler : public CppiaCompiler
205{
206public:
207 struct sljit_compiler *compiler;
208
209 QuickVec<JumpId> allBreaks;
210 QuickVec<JumpId> uncaught;
211 LabelId continuePos;
212 ThrowList *catching;
213 OnReturnFunc onReturn;
214 int onReturnStackSize;
215 int lineOffset;
216
217 bool usesCtx;
218 bool usesThis;
219 bool usesFrame;
220 bool makesNativeCalls;
221
222 int localSize;
223 int frameSize;
224 int maxFrameSize;
225 int baseFrameSize;
226
227 int maxTempCount;
228 int maxFTempCount;
229 int maxLocalSize;
230
231
232
233 CppiaJitCompiler(int inFrameSize)
234 {
235 maxTempCount = 0;
236 maxFTempCount = 0;
237 maxLocalSize = 0;
238 localSize = 0;
239 compiler = 0;
240 usesFrame = false;
241 usesThis = false;
242 usesCtx = false;
243 makesNativeCalls = false;
244 continuePos = 0;
245 catching = 0;
246 onReturn = 0;
247 onReturnStackSize = 0;
248 lineOffset = 0;
249 maxFrameSize = frameSize = baseFrameSize = sizeof(void *) + inFrameSize;
250 }
251
252
253 ~CppiaJitCompiler()
254 {
255 if (compiler)
256 {
257 sljit_free_compiler(compiler);
258 compiler = 0;
259 }
260 }
261

Callers

nothing calls this directly

Calls 5

onReturnFunction · 0.85
sljit_emit_returnFunction · 0.50
sljit_emit_labelFunction · 0.50
sljit_emit_op0Function · 0.50
pushMethod · 0.45

Tested by

no test coverage detected