templatizing CopyStringChars/CopyLinearStringChars and adding start param
Myk Melez <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
SpiderShim uses custom implementations of CopyStringChars and CopyLinearStringChars [1] with two enhancements: 1. Per the V8 API, they accept an additional "start" parameter that identifies the index in the src string from which to start copying characters. 2. They're templatized, with char16_t* and char* specializations of CopyLinearStringChars, so SpiderShim's String::Write implementation can call CopyStringChars for both types of destination buffers [2]. Would it be feasible to upstream those enhancements? -myk [1] https://github.com/mozilla/spidernode/blob/e9b2841/deps/spidershim/src/v8string.h#L52-L108 [2] https://github.com/mozilla/spidernode/blob/e9b2841/deps/spidershim/src/v8string.cc#L363-L392