@@ -352,7 +352,7 @@ create_wasm_array_with_string(wasm_exec_env_t exec_env, void **ptr,
352
352
}
353
353
354
354
/* Push object to local ref to avoid being freed at next allocation */
355
- wasm_runtime_push_local_object_ref (exec_env , & local_ref );
355
+ wasm_runtime_push_local_obj_ref (exec_env , & local_ref );
356
356
local_ref .val = (wasm_obj_t )new_arr ;
357
357
358
358
/* create_wasm_string for every element */
@@ -367,7 +367,7 @@ create_wasm_array_with_string(wasm_exec_env_t exec_env, void **ptr,
367
367
wasm_struct_obj_new_with_type (exec_env , res_arr_struct_type );
368
368
369
369
if (!new_stringref_array_struct ) {
370
- wasm_runtime_pop_local_object_ref (exec_env );
370
+ wasm_runtime_pop_local_obj_ref (exec_env );
371
371
wasm_runtime_set_exception (wasm_runtime_get_module_inst (exec_env ),
372
372
"alloc memory failed" );
373
373
return NULL ;
@@ -379,7 +379,7 @@ create_wasm_array_with_string(wasm_exec_env_t exec_env, void **ptr,
379
379
val .u32 = arrlen ;
380
380
wasm_struct_obj_set_field (new_stringref_array_struct , 1 , & val );
381
381
382
- wasm_runtime_pop_local_object_ref (exec_env );
382
+ wasm_runtime_pop_local_obj_ref (exec_env );
383
383
return new_stringref_array_struct ;
384
384
}
385
385
#else
@@ -420,11 +420,11 @@ create_wasm_array_with_string(wasm_exec_env_t exec_env, void **ptr,
420
420
/* create new array */
421
421
new_arr =
422
422
wasm_array_obj_new_with_type (exec_env , res_arr_type , arrlen , & init );
423
- wasm_runtime_push_local_object_ref (exec_env , & local_ref );
423
+ wasm_runtime_push_local_obj_ref (exec_env , & local_ref );
424
424
local_ref .val = (wasm_obj_t )new_arr ;
425
425
426
426
if (!new_arr ) {
427
- wasm_runtime_pop_local_object_ref (exec_env );
427
+ wasm_runtime_pop_local_obj_ref (exec_env );
428
428
wasm_runtime_set_exception ((wasm_module_inst_t )module_inst ,
429
429
"alloc memory failed" );
430
430
return NULL ;
@@ -452,7 +452,7 @@ create_wasm_array_with_string(wasm_exec_env_t exec_env, void **ptr,
452
452
tmp_val .u32 = arrlen ;
453
453
wasm_struct_obj_set_field (string_array_struct , 1 , & tmp_val );
454
454
455
- wasm_runtime_pop_local_object_ref (exec_env );
455
+ wasm_runtime_pop_local_obj_ref (exec_env );
456
456
return string_array_struct ;
457
457
}
458
458
#endif /* end of WASM_ENABLE_STRINGREF != 0 */
@@ -672,15 +672,15 @@ create_wasm_string(wasm_exec_env_t exec_env, const char *value)
672
672
}
673
673
674
674
/* Push object to local ref to avoid being freed at next allocation */
675
- wasm_runtime_push_local_object_ref (exec_env , & local_ref );
675
+ wasm_runtime_push_local_obj_ref (exec_env , & local_ref );
676
676
local_ref .val = (wasm_obj_t )new_string_struct ;
677
677
678
678
val .i32 = 0 ;
679
679
get_string_array_type (module , & string_array_type );
680
680
new_arr =
681
681
wasm_array_obj_new_with_type (exec_env , string_array_type , len , & val );
682
682
if (!new_arr ) {
683
- wasm_runtime_pop_local_object_ref (exec_env );
683
+ wasm_runtime_pop_local_obj_ref (exec_env );
684
684
wasm_runtime_set_exception (module_inst , "alloc memory failed" );
685
685
return NULL ;
686
686
}
@@ -697,7 +697,7 @@ create_wasm_string(wasm_exec_env_t exec_env, const char *value)
697
697
val .gc_obj = (wasm_obj_t )new_arr ;
698
698
wasm_struct_obj_set_field (new_string_struct , 1 , & val );
699
699
700
- wasm_runtime_pop_local_object_ref (exec_env );
700
+ wasm_runtime_pop_local_obj_ref (exec_env );
701
701
702
702
(void )p_end ;
703
703
return new_string_struct ;
@@ -748,16 +748,16 @@ create_new_array_with_primitive_type(wasm_exec_env_t exec_env,
748
748
/* create new array */
749
749
new_arr =
750
750
wasm_array_obj_new_with_type (exec_env , res_arr_type , arrlen , & init );
751
- wasm_runtime_push_local_object_ref (exec_env , & local_ref );
751
+ wasm_runtime_push_local_obj_ref (exec_env , & local_ref );
752
752
local_ref .val = (wasm_obj_t )new_arr ;
753
753
754
754
if (!new_arr ) {
755
- wasm_runtime_pop_local_object_ref (exec_env );
755
+ wasm_runtime_pop_local_obj_ref (exec_env );
756
756
wasm_runtime_set_exception ((wasm_module_inst_t )module_inst ,
757
757
"alloc memory failed" );
758
758
return NULL ;
759
759
}
760
- wasm_runtime_pop_local_object_ref (exec_env );
760
+ wasm_runtime_pop_local_obj_ref (exec_env );
761
761
return new_arr ;
762
762
}
763
763
@@ -1025,7 +1025,7 @@ array_to_string(wasm_exec_env_t exec_env, void *ctx, void *obj, void *separator)
1025
1025
}
1026
1026
1027
1027
/* Push object to local ref to avoid being freed at next allocation */
1028
- wasm_runtime_push_local_object_ref (exec_env , & local_ref );
1028
+ wasm_runtime_push_local_obj_ref (exec_env , & local_ref );
1029
1029
local_ref .val = (wasm_obj_t )new_arr ;
1030
1030
1031
1031
p = (char * )wasm_array_obj_first_elem_addr (new_arr );
@@ -1072,7 +1072,7 @@ array_to_string(wasm_exec_env_t exec_env, void *ctx, void *obj, void *separator)
1072
1072
}
1073
1073
1074
1074
if (local_ref .val ) {
1075
- wasm_runtime_pop_local_object_ref (exec_env );
1075
+ wasm_runtime_pop_local_obj_ref (exec_env );
1076
1076
}
1077
1077
1078
1078
if (sep ) {
0 commit comments