Implement direct strings. (#2196)
Direct strings are a new type of direct ecma-values (no memory allocation is needed for encoding them) in JerryScript. Currently magic strings, external magic strings and uint values are encoded as direct strings. The constant pool of JerryScript byte-code is changed to hold ecma-values rather than cpointers to support direct strings. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
This commit is contained in:
1 parent
fbf5c32747
commit
51e3c4455a
37 files changed
+1492
-1147
No files matched your search
@@ -761,9 +761,7 @@ ecma_builtin_list_lazy_property_names (ecma_object_t *object_p, /**< a built-in
|
||||
|
||||
if (!(*bitset_p & bit_for_index) || ecma_op_object_has_own_property (object_p, name_p))
|
||||
{
|
||||
ecma_append_to_values_collection (for_non_enumerable_p,
|
||||
ecma_make_string_value (name_p),
|
||||
0);
|
||||
ecma_append_to_values_collection (for_non_enumerable_p, ecma_make_string_value (name_p), 0);
|
||||
}
|
||||
|
||||
ecma_deref_ecma_string (name_p);
|
||||
|
||||
@@ -736,11 +736,10 @@ ecma_builtin_typedarray_prototype_set (ecma_value_t this_arg, /**< this argument
|
||||
|
||||
while (k < source_length_uint32 && ecma_is_value_empty (ret_val))
|
||||
{
|
||||
ecma_string_t k_str;
|
||||
ecma_init_ecma_string_from_uint32 (&k_str, k);
|
||||
ecma_string_t *k_str_p = ecma_new_ecma_string_from_uint32 (k);
|
||||
|
||||
ECMA_TRY_CATCH (elem,
|
||||
ecma_op_object_get (source_obj_p, &k_str),
|
||||
ecma_op_object_get (source_obj_p, k_str_p),
|
||||
ret_val);
|
||||
|
||||
ECMA_OP_TO_NUMBER_TRY_CATCH (elem_num, elem, ret_val);
|
||||
@@ -750,6 +749,8 @@ ecma_builtin_typedarray_prototype_set (ecma_value_t this_arg, /**< this argument
|
||||
ECMA_OP_TO_NUMBER_FINALIZE (elem_num);
|
||||
ECMA_FINALIZE (elem);
|
||||
|
||||
ecma_deref_ecma_string (k_str_p);
|
||||
|
||||
k++;
|
||||
target_byte_index += element_size;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user