| 4764 | |
| 4765 | #ifdef CPPIA_JIT |
| 4766 | void genCode(CppiaCompiler *compiler, const JitVal &inDest,ExprType destType) HXCPP_OVERRIDE |
| 4767 | { |
| 4768 | switch(destType) |
| 4769 | { |
| 4770 | case etObject: |
| 4771 | //TODO - GC! |
| 4772 | if (!value.mPtr) |
| 4773 | value = strVal; |
| 4774 | compiler->move(inDest, (void *) value.mPtr ); |
| 4775 | break; |
| 4776 | |
| 4777 | |
| 4778 | case etString: |
| 4779 | if (!isMemoryVal(inDest)) |
| 4780 | compiler->setError("Bad String target"); |
| 4781 | else |
| 4782 | { |
| 4783 | compiler->move(inDest.as(jtInt),JitVal(strVal.length)); |
| 4784 | compiler->move(inDest.as(jtPointer)+StringOffset::Ptr,JitVal((void *)strVal.raw_ptr())); |
| 4785 | } |
| 4786 | break; |
| 4787 | |
| 4788 | default: |
| 4789 | compiler->setError("Bad String conversion type"); |
| 4790 | } |
| 4791 | } |
| 4792 | #endif |
| 4793 | |
| 4794 | }; |
nothing calls this directly
no test coverage detected