templatizing CopyStringChars/CopyLinearStringChars and adding start param

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

templatizing CopyStringChars/CopyLinearStringChars and adding start param

Myk Melez-4

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 


_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: templatizing CopyStringChars/CopyLinearStringChars and adding start param

Tom Schuster
You don't have to ask every time when you need some API for SpiderNode.
Node is important so we will try to add everything that is needed for it
within reason, especially if it's just some external API.

Just open a bug, mention it's for SpiderNode and ask for review.

Keep up the good work,
Tom
On May 7, 2016 2:49 AM, "Myk Melez" <[hidden email]> wrote:

>
> 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
>
> _______________________________________________
> dev-tech-js-engine mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: templatizing CopyStringChars/CopyLinearStringChars and adding start param

Myk Melez-4
> Tom Schuster <mailto:[hidden email]>
> 2016 May 7 at 01:45
>
> You don't have to ask every time when you need some API for
> SpiderNode. Node is important so we will try to add everything that is
> needed for it within reason, especially if it's just some external API.
>
> Just open a bug, mention it's for SpiderNode and ask for review.
>
Sounds good, will do! I filed this one as
https://bugzilla.mozilla.org/show_bug.cgi?id=1271078.

-myk

_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine