rename js_new_string8 as js_new_string8_len. takes const char *.
new inline function js_new_string8 takes const char *, computes string length with strlen and calls js_new_string8_len. No overhead for string literals
use internal string allocation functions where appropriate, remove overhead
String values are allocated as temporary or final results. This commit attempts to improve the consistency and performance of this step.
JS_NewString
as an inline function to allow simple expansion ofstrlen()
for string literalsjs_new_string8
asjs_new_string8_len
. takesconst char *
.js_new_string8
takesconst char *
, computes string length withstrlen
and callsjs_new_string8_len
. No overhead for string literals