line |
true |
false |
branch |
141
|
1236 |
11 |
for(int i = 0; i < tab_atom_count; i++) { |
150
|
1235 |
1 |
if (val_sv) { |
159
|
1 |
1235 |
if (!val_sv) break; |
164
|
1 |
11 |
if (*err_svp) { |
180
|
18 |
5 |
if (len) { |
182
|
31 |
17 |
for (uint32_t i=0; i
|
187
|
30 |
1 |
if (val_sv) av_store( av, i, val_sv ); |
191
|
1 |
30 |
if (!val_sv) break; |
195
|
1 |
22 |
if (*err_svp) { |
232
|
5 |
6 |
RETVAL = boolSV(JS_VALUE_GET_BOOL(jsval)); |
241
|
9 |
38 |
if (JS_IsFunction(ctx, jsval)) { |
262
|
23 |
15 |
else if (JS_IsArray(ctx, jsval)) { |
269
|
2 |
13 |
if (JS_IsInstanceOf(ctx, jsval, ctxdata->regexp_jsvalue)) { |
272
|
1 |
12 |
else if (JS_IsInstanceOf(ctx, jsval, ctxdata->date_jsvalue)) { |
286
|
4 |
0 |
if (typename) { |
305
|
12 |
4 |
if (ctxdata->svs_count == 1) { |
306
|
0 |
12 |
Newx(ctxdata->svs, ctxdata->svs_count, SV*); |
309
|
0 |
4 |
Renew(ctxdata->svs, ctxdata->svs_count, SV*); |
334
|
8 |
1 |
if (!error2) break; |
339
|
0 |
1 |
if (tries > _MAX_ERRSV_TO_JS_TRIES) { |
366
|
12 |
13 |
for (int a=0; a
|
369
|
2 |
10 |
if (error_sv) { |
370
|
1 |
2 |
while (--a >= 0) { |
378
|
13 |
2 |
if (!error_sv) { |
381
|
12 |
1 |
if (from_perl) { |
386
|
9 |
3 |
if (!error_sv) return to_js; |
397
|
42 |
7 |
return JS_NewInt64(ctx, (int64_t) SvIV(value)); |
404
|
1226 |
94 |
SvGETMAGIC(value); |
|
0 |
1226 |
SvGETMAGIC(value); |
406
|
226 |
1094 |
switch ( exs_sv_type(value) ) { |
|
226 |
0 |
switch ( exs_sv_type(value) ) { |
|
0 |
226 |
switch ( exs_sv_type(value) ) { |
|
1052 |
42 |
switch ( exs_sv_type(value) ) { |
|
25 |
1027 |
switch ( exs_sv_type(value) ) { |
|
25 |
0 |
switch ( exs_sv_type(value) ) { |
|
4 |
21 |
switch ( exs_sv_type(value) ) { |
|
4 |
0 |
switch ( exs_sv_type(value) ) { |
411
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(value)); |
415
|
6 |
1021 |
const char* str = SvPVutf8(value, len); |
421
|
0 |
0 |
UV val_uv = SvUV(value); |
424
|
0 |
0 |
if (val_uv > IV_MAX) { |
441
|
4 |
0 |
return JS_NewFloat64(ctx, (double) SvNV(value)); |
445
|
10 |
32 |
if (sv_isobject(value)) { |
446
|
2 |
8 |
if (sv_derived_from(value, PERL_BOOLEAN_CLASS)) { |
447
|
2 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
2 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
2 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
2 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
2 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
2 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
1 |
1 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
1 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
1 |
1 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
|
0 |
0 |
return JS_NewBool(ctx, SvTRUE(SvRV(value))); |
449
|
3 |
5 |
else if (sv_derived_from(value, PQJS_JSOBJECT_CLASS)) { |
452
|
2 |
1 |
if (LIKELY(pqjs->ctx == ctx)) { |
482
|
5 |
6 |
for (int32_t i=0; i <= av_len(av); i++) { |
489
|
1 |
4 |
if (*error_svp) { |
507
|
1231 |
7 |
while ( (hvent = hv_iternext(hv)) ) { |
512
|
2 |
1229 |
const char* key = SvPVutf8(key_sv, keylen); |
515
|
1 |
1230 |
if (*error_svp) { |
571
|
10 |
214 |
if (JS_IsException(jsret)) { |
600
|
12 |
212 |
if (err) croak_sv(err); |
608
|
32 |
12 |
if (--ctxdata->refcount == 0) { |
614
|
16 |
32 |
for (U32 i=0; isvs_count; i++) { |
633
|
1 |
5 |
if (module_base_path) { |
677
|
9 |
8 |
for (int32_t i=0; i
|
682
|
1 |
8 |
if (error) { |
683
|
0 |
1 |
while (--i >= 0) { |
709
|
33 |
0 |
RETVAL = exs_new_structref(perl_qjs_s, SvPVbyte_nolen(classname_sv)); |
734
|
0 |
33 |
if (PL_dirty && pqjs->pid == getpid()) { |
|
0 |
0 |
if (PL_dirty && pqjs->pid == getpid()) { |
738
|
1 |
32 |
if (pqjs->module_base_path) Safefree(pqjs->module_base_path); |
749
|
4 |
4 |
if (SvOK(max_stack_size_sv)) { |
|
4 |
0 |
if (SvOK(max_stack_size_sv)) { |
|
0 |
4 |
if (SvOK(max_stack_size_sv)) { |
753
|
2 |
4 |
if (SvOK(memory_limit_sv)) { |
|
2 |
0 |
if (SvOK(memory_limit_sv)) { |
|
0 |
2 |
if (SvOK(memory_limit_sv)) { |
757
|
0 |
4 |
if (SvOK(gc_threshold_sv)) { |
|
0 |
0 |
if (SvOK(gc_threshold_sv)) { |
|
0 |
0 |
if (SvOK(gc_threshold_sv)) { |
799
|
0 |
1 |
if (pqjs->module_base_path) { |
811
|
0 |
1 |
if (!SvOK(path_sv)) croak("Give a path! (Did you want unset_module_base?)"); |
|
0 |
0 |
if (!SvOK(path_sv)) croak("Give a path! (Did you want unset_module_base?)"); |
|
0 |
0 |
if (!SvOK(path_sv)) croak("Give a path! (Did you want unset_module_base?)"); |
819
|
0 |
1 |
if (pqjs->module_base_path) { |
842
|
0 |
40 |
if (items < 2) croak("Need at least 1 key/value pair."); |
844
|
0 |
40 |
if (!(items % 2)) croak("Need an even list of key/value pairs."); |
857
|
45 |
38 |
for (int i=0; i < valscount; i++) { |
862
|
4 |
41 |
const char* jsname_str = SvPVutf8(jsname_sv, jsnamelen); |
866
|
2 |
43 |
if (error) { |
867
|
0 |
2 |
while (i-- > 0) { |
881
|
43 |
38 |
for (int i=0; i < valscount; i++) { |
903
|
26 |
88 |
const char* js_code = SvPVutf8(js_code_sv, js_code_len); |
914
|
3 |
99 |
if (ix) { |
918
|
0 |
3 |
if ( UNLIKELY(RETVAL != &PL_sv_undef) ) { |
1027
|
0 |
70 |
if (items > 1) { |
1042
|
0 |
0 |
for (uint32_t i=0; i
|
1076
|
0 |
4 |
const char* specimen = SvPVutf8(specimen_sv, specimen_len); |
1079
|
2 |
2 |
JSAtom prop = JS_NewAtom(ctx, ix ? "test" : "exec"); |
1122
|
0 |
8 |
if (err) croak_sv(err); |
1136
|
0 |
11 |
if (PL_dirty && pqjs->pid == getpid()) { |
|
0 |
0 |
if (PL_dirty && pqjs->pid == getpid()) { |
1170
|
0 |
4 |
if (err) croak_sv(err); |
1185
|
0 |
9 |
if (error) croak_sv(error); |
1197
|
8 |
8 |
for (uint32_t i=0; i
|