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

Method runVoid

src/hx/cppia/ArrayVirtual.cpp:407–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405 return 0;
406 }
407 void runVoid(CppiaCtx *ctx) HXCPP_OVERRIDE
408 {
409 if (FUNC==afSort)
410 {
411 ArrayAnyImpl *thisVal = (ArrayAnyImpl *)thisExpr->runObject(ctx);
412 BCR_VCHECK;
413 Dynamic a0 = args[0]->runObject(ctx);
414 BCR_VCHECK;
415
416 thisVal->CALL(sort)(a0);
417 return;
418 }
419 if (FUNC==afInsert)
420 {
421 ArrayAnyImpl *thisVal = (ArrayAnyImpl *)thisExpr->runObject(ctx);
422 BCR_VCHECK;
423 Dynamic pos = args[0]->runObject(ctx);
424 BCR_VCHECK;
425 Dynamic val = args[1]->runObject(ctx);
426 BCR_VCHECK;
427 thisVal->CALL(insert)(pos, val);
428 return;
429 }
430 if (FUNC==afUnshift)
431 {
432 ArrayAnyImpl *thisVal = (ArrayAnyImpl *)thisExpr->runObject(ctx);
433 BCR_VCHECK;
434 Dynamic val = args[0]->runObject(ctx);
435 BCR_VCHECK;
436 thisVal->CALL(unshift)(val);
437 return;
438 }
439 if (FUNC==af__SetSizeExact)
440 {
441 ArrayAnyImpl *thisVal = (ArrayAnyImpl *)thisExpr->runObject(ctx);
442 BCR_VCHECK;
443 int size = args[0]->runInt(ctx);
444 BCR_VCHECK;
445 thisVal->__SetSizeExact(size);
446 return;
447 }
448 if (FUNC==afBlit)
449 {
450 ArrayAnyImpl *thisVal = (ArrayAnyImpl *)thisExpr->runObject(ctx);
451 BCR_VCHECK;
452 int destElem = args[0]->runInt(ctx);
453 BCR_VCHECK;
454 Dynamic srcArray = args[1]->runObject(ctx);
455 BCR_VCHECK;
456 int srcElem = args[2]->runInt(ctx);
457 BCR_VCHECK;
458 int elemCount = args[3]->runInt(ctx);
459 BCR_VCHECK;
460 thisVal->blit(destElem, srcArray, srcElem, elemCount);
461 return;
462 }
463
464

Callers

nothing calls this directly

Calls 3

runObjectMethod · 0.45
runIntMethod · 0.45
__SetSizeExactMethod · 0.45

Tested by

no test coverage detected