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

Method runVoid

src/hx/cppia/Cppia.cpp:5880–5896  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5878 }
5879
5880 void runVoid(CppiaCtx *ctx) HXCPP_OVERRIDE
5881 {
5882 if (init)
5883 {
5884 // TODO - store type
5885 switch(var.expressionType)
5886 {
5887 case etInt: *(int *)(ctx->frame+var.stackPos) = init->runInt(ctx); break;
5888 case etFloat: SetFloatAligned(ctx->frame+var.stackPos,init->runFloat(ctx)); break;
5889 case etString: *(String *)(ctx->frame+var.stackPos) = init->runString(ctx); break;
5890 case etObject: *(hx::Object **)(ctx->frame+var.stackPos) = init->runObject(ctx); break;
5891 case etVoid:
5892 case etNull:
5893 break;
5894 }
5895 }
5896 }
5897
5898 const char *getName() HXCPP_OVERRIDE { return "VarDecl"; }
5899 CppiaExpr *link(CppiaModule &inModule) HXCPP_OVERRIDE

Callers

nothing calls this directly

Calls 5

SetFloatAlignedFunction · 0.85
runIntMethod · 0.45
runFloatMethod · 0.45
runStringMethod · 0.45
runObjectMethod · 0.45

Tested by

no test coverage detected