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

Method runObject

src/hx/cppia/Cppia.cpp:2991–3013  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2989 }
2990
2991 hx::Object *runObject(CppiaCtx *ctx) HXCPP_OVERRIDE
2992 {
2993 hx::Object *instance = object ? object->runObject(ctx) : isStatic ? staticClass.mPtr : ctx->getThis(false);
2994 BCR_CHECK;
2995 CPPIA_CHECK(instance);
2996 if (vtableSlot!=-1)
2997 {
2998 //if (isInterface)
2999 // instance = instance->__GetRealObject();
3000
3001 ScriptCallable **vtable = (ScriptCallable **)instance->__GetScriptVTable();
3002 ScriptCallable *func = vtable[vtableSlot];
3003 if (func==0)
3004 {
3005 CPPIALOG("Could not find vtable entry %s intf=%d (%d)\n", name.out_str(), isInterface, vtableSlot);
3006 return 0;
3007 }
3008
3009 return createMemberClosure(instance, func);
3010 }
3011
3012 return Dynamic(instance->__Field(name,HX_PROP_DYNAMIC)).mPtr;
3013 }
3014
3015 #ifdef CPPIA_JIT
3016 void genCode(CppiaCompiler *compiler, const JitVal &inDest,ExprType destType) HXCPP_OVERRIDE

Callers

nothing calls this directly

Calls 5

createMemberClosureFunction · 0.85
DynamicClass · 0.50
runObjectMethod · 0.45
getThisMethod · 0.45
__FieldMethod · 0.45

Tested by

no test coverage detected