| 3014 | |
| 3015 | #ifdef CPPIA_JIT |
| 3016 | void genCode(CppiaCompiler *compiler, const JitVal &inDest,ExprType destType) HXCPP_OVERRIDE |
| 3017 | { |
| 3018 | // TODO - interfaces |
| 3019 | if (object) |
| 3020 | { |
| 3021 | object->genCode(compiler, sJitTemp0.as(jtPointer), etObject); |
| 3022 | genNullReferenceExceptionCheck(compiler, sJitTemp0); |
| 3023 | } |
| 3024 | else if (isStatic) |
| 3025 | { |
| 3026 | compiler->move(sJitTemp0, (void *)&staticClass.mPtr); |
| 3027 | compiler->move(sJitTemp0, sJitTemp0.star() ); |
| 3028 | } |
| 3029 | else |
| 3030 | { |
| 3031 | // this... |
| 3032 | compiler->move(sJitTemp0, sJitThis ); |
| 3033 | } |
| 3034 | |
| 3035 | switch(destType) |
| 3036 | { |
| 3037 | case etInt: |
| 3038 | compiler->callNative( (void *)getFieldInt, sJitTemp0.as(jtPointer), (void *)&name); |
| 3039 | compiler->checkException(); |
| 3040 | compiler->move(inDest.as(jtInt), sJitReturnReg.as(jtInt)); |
| 3041 | break; |
| 3042 | case etFloat: |
| 3043 | if (isMemoryVal(inDest)) |
| 3044 | { |
| 3045 | compiler->callNative( (void *)getFieldFloat, sJitTemp0.as(jtPointer), (void *)&name, inDest.as(jtFloat) ); |
| 3046 | compiler->checkException(); |
| 3047 | } |
| 3048 | else |
| 3049 | { |
| 3050 | JitTemp floatResult(compiler, jtFloat); |
| 3051 | compiler->callNative( (void *)getFieldFloat, sJitTemp0.as(jtPointer), &name, floatResult ); |
| 3052 | compiler->checkException(); |
| 3053 | compiler->move(inDest.as(jtFloat), floatResult); |
| 3054 | } |
| 3055 | break; |
| 3056 | case etString: |
| 3057 | compiler->callNative( (void *)getFieldString, sJitTemp0.as(jtPointer), (void *)&name, inDest.as(jtString) ); |
| 3058 | compiler->checkException(); |
| 3059 | break; |
| 3060 | case etObject: |
| 3061 | compiler->callNative( (void *)getFieldObject, sJitTemp0.as(jtPointer), (void *)&name); |
| 3062 | compiler->checkException(); |
| 3063 | compiler->move(inDest.as(jtPointer), sJitReturnReg.as(jtPointer)); |
| 3064 | break; |
| 3065 | default: ; |
| 3066 | } |
| 3067 | } |
| 3068 | #endif |
| 3069 | |
| 3070 | CppiaExpr *makeSetter(AssignOp inOp,CppiaExpr *inValue) HXCPP_OVERRIDE |
nothing calls this directly
no test coverage detected