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

Method doRun

src/hx/cppia/Cppia.cpp:4498–4511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4496 const char *getName() HXCPP_OVERRIDE { return "MemStackFloatCrement"; }
4497
4498 inline Float doRun(CppiaCtx *ctx)
4499 {
4500 void *ptr = (char*)ctx->frame + offset;
4501 Float v = GetFloatAligned(ptr);
4502 switch(op)
4503 {
4504 case coPreInc: SetFloatAligned(ptr,++v); break;
4505 case coPostInc: SetFloatAligned(ptr,v+1); break;
4506 case coPreDec: SetFloatAligned(ptr,--v); break;
4507 case coPostDec: SetFloatAligned(ptr,v-1); break;
4508 default: ;
4509 }
4510 return v;
4511 }
4512
4513 void runVoid(CppiaCtx *ctx) HXCPP_OVERRIDE { doRun(ctx); }
4514 int runInt(CppiaCtx *ctx) HXCPP_OVERRIDE { return doRun(ctx); }

Callers

nothing calls this directly

Calls 2

GetFloatAlignedFunction · 0.85
SetFloatAlignedFunction · 0.85

Tested by

no test coverage detected