Skip to content

Fix incorrect interchange of interfaces taking to ecma values and ecma completion values #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ ecma_builtin_array_prototype_object_to_locale_string (const ecma_value_t this_ar
ecma_op_to_object (this_arg),
ret_value);

ecma_object_t *obj_p = ecma_get_object_from_completion_value (obj_value);
ecma_object_t *obj_p = ecma_get_object_from_value (obj_value);

ecma_string_t *length_magic_string_p = ecma_get_magic_string (ECMA_MAGIC_STRING_LENGTH);

Expand Down Expand Up @@ -532,7 +532,7 @@ ecma_builtin_array_prototype_object_to_locale_string (const ecma_value_t this_ar
ecma_builtin_helper_get_to_locale_string_at_index (obj_p, k),
ret_value);

ecma_string_t *next_string_p = ecma_get_string_from_completion_value (next_string_value);
ecma_string_t *next_string_p = ecma_get_string_from_value (next_string_value);

ecma_deref_ecma_string (return_string_p);

Expand Down Expand Up @@ -1736,7 +1736,7 @@ ecma_builtin_array_prototype_object_every (ecma_value_t this_arg, /**< this argu
ECMA_TRY_CATCH (call_value, ecma_op_function_call (func_object_p, arg2, call_args, 3), ret_value);

/* 7.c.iii, ecma_op_to_boolean always returns a simple value, so no need to free. */
if (!ecma_is_value_true (ecma_op_to_boolean (call_value)))
if (ecma_is_completion_value_normal_false (ecma_op_to_boolean (call_value)))
{
ret_value = ecma_make_simple_completion_value (ECMA_SIMPLE_VALUE_FALSE);
}
Expand Down Expand Up @@ -1837,7 +1837,7 @@ ecma_builtin_array_prototype_object_some (ecma_value_t this_arg, /**< this argum
ECMA_TRY_CATCH (call_value, ecma_op_function_call (func_object_p, arg2, call_args, 3), ret_value);

/* 7.c.iii, ecma_op_to_boolean always returns a simple value, so no need to free. */
if (ecma_is_value_true (ecma_op_to_boolean (call_value)))
if (ecma_is_completion_value_normal_true (ecma_op_to_boolean (call_value)))
{
ret_value = ecma_make_simple_completion_value (ECMA_SIMPLE_VALUE_TRUE);
}
Expand Down Expand Up @@ -1944,7 +1944,7 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t this_arg, /**< this arg
ECMA_TRY_CATCH (call_value, ecma_op_function_call (func_object_p, arg2, call_args, 3), ret_value);

/* 9.c.iii, ecma_op_to_boolean always returns a simple value, so no need to free. */
if (ecma_is_value_true (ecma_op_to_boolean (call_value)))
if (ecma_is_completion_value_normal_true (ecma_op_to_boolean (call_value)))
{
ecma_string_t* to_index_string_p = ecma_new_ecma_string_from_uint32 (new_array_index);
/*
Expand Down
4 changes: 2 additions & 2 deletions jerry-core/ecma/builtin-objects/ecma-builtin-object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ ecma_builtin_object_object_define_properties (ecma_value_t this_arg __attr_unuse
ecma_op_to_object (arg2),
ret_value);

ecma_object_t *props_p = ecma_get_object_from_completion_value (props);
ecma_object_t *props_p = ecma_get_object_from_value (props);
ecma_property_t *property_p;

// First we need to know how many properties should be stored
Expand Down Expand Up @@ -732,7 +732,7 @@ ecma_builtin_object_object_define_properties (ecma_value_t this_arg __attr_unuse

// 5.b
ECMA_TRY_CATCH (conv_result,
ecma_op_to_property_descriptor (ecma_get_completion_value_value (desc_obj),
ecma_op_to_property_descriptor (desc_obj,
&property_descriptors[index]),
ret_value);

Expand Down
2 changes: 1 addition & 1 deletion jerry-core/vm/opcodes-native-call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ opfunc_native_call (opcode_t opdata, /**< operation data */

JERRY_STATIC_ASSERT (OPCODE_NATIVE_CALL__COUNT < (1u << (sizeof (native_call_id_idx) * JERRY_BITSINBYTE)));

ecma_completion_value_t ret_value = 0;
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();

MEM_DEFINE_LOCAL_ARRAY (arg_values, args_number, ecma_value_t);

Expand Down