| 694 | return runObject(ctx)->toString(); |
| 695 | } |
| 696 | hx::Object *runObject(CppiaCtx *ctx) HXCPP_OVERRIDE |
| 697 | { |
| 698 | if (FUNC==af__get) |
| 699 | { |
| 700 | Array_obj<ELEM> *thisVal = (Array_obj<ELEM>*)thisExpr->runObject(ctx); |
| 701 | BCR_CHECK; |
| 702 | int idx = args[0]->runInt(ctx); |
| 703 | BCR_CHECK; |
| 704 | return thisVal->__GetItem(idx).mPtr; |
| 705 | } |
| 706 | if (FUNC==af__set) |
| 707 | { |
| 708 | Array_obj<ELEM> *thisVal = (Array_obj<ELEM>*)thisExpr->runObject(ctx); |
| 709 | BCR_CHECK; |
| 710 | int i = args[0]->runInt(ctx); |
| 711 | BCR_CHECK; |
| 712 | ELEM elem; |
| 713 | thisVal->Item(i) = runValue(elem,ctx,args[1]); |
| 714 | #ifdef HXCPP_GC_GENERATIONAL |
| 715 | if (hx::ContainsPointers<ELEM>()) |
| 716 | HX_OBJ_WB_GET(thisVal, hx::PointerOf(elem)); |
| 717 | #endif |
| 718 | return Dynamic(elem).mPtr; |
| 719 | } |
| 720 | if (FUNC==af__crement) |
| 721 | { |
| 722 | Array_obj<ELEM> *thisVal = (Array_obj<ELEM>*)thisExpr->runObject(ctx); |
| 723 | BCR_CHECK; |
| 724 | int idx = args[0]->runInt(ctx); |
| 725 | BCR_CHECK; |
| 726 | ELEM &elem = thisVal->Item(idx); |
| 727 | Dynamic result(CREMENT::run(elem)); |
| 728 | #ifdef HXCPP_GC_GENERATIONAL |
| 729 | if (hx::ContainsPointers<ELEM>()) |
| 730 | HX_OBJ_WB_CTX(thisVal,hx::PointerOf(elem),ctx); |
| 731 | #endif |
| 732 | return result.mPtr; |
| 733 | |
| 734 | } |
| 735 | |
| 736 | if (FUNC==afPop) |
| 737 | { |
| 738 | Array_obj<ELEM> *thisVal = (Array_obj<ELEM>*)thisExpr->runObject(ctx); |
| 739 | BCR_CHECK; |
| 740 | return Dynamic(thisVal->pop()).mPtr; |
| 741 | } |
| 742 | if (FUNC==afShift) |
| 743 | { |
| 744 | Array_obj<ELEM> *thisVal = (Array_obj<ELEM>*)thisExpr->runObject(ctx); |
| 745 | BCR_CHECK; |
| 746 | return Dynamic(thisVal->shift()).mPtr; |
| 747 | } |
| 748 | |
| 749 | |
| 750 | if (FUNC==afConcat) |
| 751 | { |
| 752 | Array_obj<ELEM> *thisVal = (Array_obj<ELEM>*)thisExpr->runObject(ctx); |
| 753 | BCR_CHECK; |
nothing calls this directly
no test coverage detected