| 127 | } |
| 128 | |
| 129 | static uint32_t serializeStringFast(Local<Value> receiver, |
| 130 | const v8::FastApiTypedArray<uint8_t> &dst, |
| 131 | const v8::FastOneByteString &src, |
| 132 | uint32_t offset, uint32_t max_length) { |
| 133 | uint8_t *dst_data; |
| 134 | dst.getStorageIfAligned(&dst_data); |
| 135 | offset += writeVarUint32(dst_data, offset, |
| 136 | (src.length << 2 | Encoding::LATIN1)); // length |
| 137 | memcpy(dst_data + offset, src.data, src.length); |
| 138 | return offset + src.length; |
| 139 | } |
| 140 | |
| 141 | v8::CFunction fast_serialize_string(v8::CFunction::Make(serializeStringFast)); |
| 142 |
nothing calls this directly
no test coverage detected