| 293 | |
| 294 | |
| 295 | void beginGeneration(int inArgs) HXCPP_OVERRIDE |
| 296 | { |
| 297 | compiler = sljit_create_compiler(NULL); |
| 298 | |
| 299 | int options = 0; |
| 300 | // S0 is stack |
| 301 | int saveds = inArgs; |
| 302 | if (usesCtx && saveds<1) |
| 303 | saveds = 1; |
| 304 | if (usesFrame && saveds<2) |
| 305 | saveds = 2; |
| 306 | if (usesThis && saveds<3) |
| 307 | { |
| 308 | usesFrame = true; |
| 309 | saveds = 3; |
| 310 | } |
| 311 | saveds = 3; |
| 312 | int fsaveds = 0; |
| 313 | #ifdef HXCPP_M64 |
| 314 | // Add shadow space for native calls |
| 315 | int scratches = std::max(maxTempCount + (makesNativeCalls?4:0) ,inArgs); |
| 316 | #else |
| 317 | int scratches = std::max(maxTempCount,inArgs); |
| 318 | #endif |
| 319 | |
| 320 | sljit_emit_enter(compiler, options, inArgs, scratches, saveds, maxFTempCount, fsaveds, maxLocalSize); |
| 321 | usesCtx = true; |
| 322 | |
| 323 | if (usesFrame) |
| 324 | { |
| 325 | move( sJitFrame, sJitCtxFrame ); |
| 326 | if (makesNativeCalls) |
| 327 | add( sJitCtxPointer, sJitFrame, maxFrameSize ); |
| 328 | } |
| 329 | |
| 330 | if (usesThis) |
| 331 | move( sJitThis, JitFramePos(0) ); |
| 332 | |
| 333 | frameSize = baseFrameSize; |
| 334 | uncaught.setSize(0); |
| 335 | catching = 0; |
| 336 | } |
| 337 | |
| 338 | CppiaFunc finishGeneration() HXCPP_OVERRIDE |
| 339 | { |
no test coverage detected