| 452 | } |
| 453 | |
| 454 | DAS_API char * jit_str_cat ( const char * sA, const char * sB, Context * context, LineInfoArg * at ) { |
| 455 | sA = sA ? sA : ""; |
| 456 | sB = sB ? sB : ""; |
| 457 | auto la = stringLength(*context, sA); |
| 458 | auto lb = stringLength(*context, sB); |
| 459 | uint32_t commonLength = la + lb; |
| 460 | if ( !commonLength ) { |
| 461 | return nullptr; |
| 462 | } else { |
| 463 | char * sAB = (char * ) context->allocateString(nullptr, commonLength, at); |
| 464 | memcpy ( sAB, sA, la ); |
| 465 | memcpy ( sAB+la, sB, lb+1 ); |
| 466 | context->stringHeap->recognize(sAB); |
| 467 | return sAB; |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | struct JitStackState { |
| 472 | char * EP; |
nothing calls this directly
no test coverage detected