| 45 | void LString::DeleteSelf(VM &vm) { vm.pool.dealloc(this, sizeof(LString) + len + 1); } |
| 46 | |
| 47 | void LString::ToString(ostringstream &ss, PrintPrefs &pp) { |
| 48 | if (CycleCheck(ss, pp)) return; |
| 49 | auto sv = strv(); |
| 50 | auto dd = string_view(); |
| 51 | if (len > pp.budget) { |
| 52 | sv = sv.substr(0, pp.budget); |
| 53 | dd = ".."; |
| 54 | } |
| 55 | if (pp.quoted) { |
| 56 | EscapeAndQuote(sv, ss); |
| 57 | } else { |
| 58 | ss << sv; |
| 59 | } |
| 60 | ss << dd; |
| 61 | } |
| 62 | |
| 63 | LVector::LVector(VM &vm, intp _initial, intp _max, type_elem_t _tti) |
| 64 | : RefObj(_tti), len(_initial), maxl(_max) { |
no test coverage detected