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

Method run

src/hx/cppia/Cppia.cpp:5627–5733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5625
5626 template<typename T>
5627 void run(CppiaCtx *ctx,T &outValue)
5628 {
5629 unsigned char *pointer = ctx->pointer;
5630 unsigned char *frame = ctx->frame;
5631
5632 hx::Object *obj = object ? object->runObject(ctx) : ctx->getThis(false);
5633
5634 BCR_VCHECK;
5635 CPPIA_CHECK(obj);
5636 int i = index->runInt(ctx);
5637 BCR_VCHECK;
5638
5639 if (crement==coNone && (assign==aoNone || assign==aoSet) )
5640 {
5641 unsigned char *pointer = ctx->pointer;
5642
5643 if (assign==aoSet)
5644 {
5645 if (accessType == etInt)
5646 {
5647 int val = value->runInt(ctx);
5648 BCR_VCHECK;
5649 ctx->pushObject(obj);
5650 ctx->pushInt(i);
5651 ctx->pushInt(val);
5652 }
5653 else if (accessType == etFloat)
5654 {
5655 Float val = value->runFloat(ctx);
5656 BCR_VCHECK;
5657 ctx->pushObject(obj);
5658 ctx->pushInt(i);
5659 ctx->pushFloat(val);
5660 }
5661 else if (accessType == etString)
5662 {
5663 String val = value->runString(ctx);
5664 BCR_VCHECK;
5665 ctx->pushObject(obj);
5666 ctx->pushInt(i);
5667 ctx->pushString(val);
5668 }
5669 else if (accessType == etObject)
5670 {
5671 hx::Object *val = value->runObject(ctx);
5672 BCR_VCHECK;
5673 ctx->pushObject(obj);
5674 ctx->pushInt(i);
5675 ctx->pushObject(val);
5676 }
5677
5678 AutoStack a(ctx,pointer);
5679 __set.execute(ctx);
5680 BCR_VCHECK;
5681 setResult(ctx,outValue);
5682 }
5683 else
5684 {

Callers

nothing calls this directly

Calls 15

UShrFunction · 0.85
ModFunction · 0.85
pushObjectMethod · 0.80
pushIntMethod · 0.80
pushFloatMethod · 0.80
pushStringMethod · 0.80
DynamicClass · 0.50
runObjectMethod · 0.45
getThisMethod · 0.45
runIntMethod · 0.45
runFloatMethod · 0.45
runStringMethod · 0.45

Tested by

no test coverage detected