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

Method runObject

src/hx/cppia/StringBuiltin.cpp:200–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198 return val.charCodeAt(idx);
199 }
200 hx::Object *runObject(CppiaCtx *ctx) HXCPP_OVERRIDE
201 {
202 String val = strVal->runString(ctx);
203 BCR_CHECK;
204 int idx = a0->runInt(ctx);
205 BCR_CHECK;
206
207 if (CODE)
208 {
209 if (AS_INT)
210 return Dynamic( val.cca(idx) ).mPtr;
211 else
212 return val.charCodeAt(idx).mPtr;
213 }
214 else
215 return Dynamic(val.charAt(idx)).mPtr;
216 }
217
218 #ifdef CPPIA_JIT
219 static hx::Object *SLJIT_CALL runCharCodeAt(String *inValue, int inIndex)

Callers

nothing calls this directly

Calls 5

charCodeAtMethod · 0.80
charAtMethod · 0.80
DynamicClass · 0.50
runStringMethod · 0.45
runIntMethod · 0.45

Tested by

no test coverage detected