Add new coding style rules and fix appeared issues.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
This commit is contained in:
@@ -181,7 +181,7 @@ ecma_builtin_array_prototype_object_push (ecma_value_t this_arg, /**< this argum
|
||||
{
|
||||
JERRY_ASSERT (argument_list_p == NULL || arguments_number > 0);
|
||||
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value();
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
// 1.
|
||||
ECMA_TRY_CATCH (obj_this_value, ecma_op_to_object (this_arg), ret_value);
|
||||
@@ -240,7 +240,7 @@ ecma_builtin_array_prototype_object_push (ecma_value_t this_arg, /**< this argum
|
||||
true);
|
||||
|
||||
if (unlikely (ecma_is_completion_value_throw (completion)
|
||||
|| ecma_is_completion_value_exit(completion)))
|
||||
|| ecma_is_completion_value_exit (completion)))
|
||||
{
|
||||
ret_value = completion;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ ecma_builtin_boolean_dispatch_call (const ecma_value_t *arguments_list_p, /**< a
|
||||
}
|
||||
else
|
||||
{
|
||||
arg_value = arguments_list_p [0];
|
||||
arg_value = arguments_list_p[0];
|
||||
}
|
||||
|
||||
return ecma_op_to_boolean (arg_value);
|
||||
|
||||
@@ -55,7 +55,7 @@ ecma_builtin_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arg
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
if (arguments_list_len != 0
|
||||
&& !ecma_is_value_undefined (arguments_list_p [0]))
|
||||
&& !ecma_is_value_undefined (arguments_list_p[0]))
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ ecma_builtin_eval_error_dispatch_call (const ecma_value_t *arguments_list_p, /**
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
if (arguments_list_len != 0
|
||||
&& !ecma_is_value_undefined (arguments_list_p [0]))
|
||||
&& !ecma_is_value_undefined (arguments_list_p[0]))
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ ecma_builtin_function_prototype_object_call (ecma_value_t this_arg, /**< this ar
|
||||
else
|
||||
{
|
||||
return ecma_op_function_call (func_obj_p,
|
||||
arguments_list_p [0],
|
||||
arguments_list_p[0],
|
||||
(arguments_number == 1u) ? NULL : (arguments_list_p + 1),
|
||||
(ecma_length_t) (arguments_number - 1u));
|
||||
}
|
||||
|
||||
@@ -73,14 +73,14 @@ SORT_PROPERTY_NAMES_ROUTINE_NAME (BUILTIN_UNDERSCORED_ID) (void)
|
||||
swapped = false;
|
||||
|
||||
for (ecma_length_t i = 1;
|
||||
i < (sizeof (ecma_builtin_property_names) / sizeof (ecma_builtin_property_names [0]));
|
||||
i < (sizeof (ecma_builtin_property_names) / sizeof (ecma_builtin_property_names[0]));
|
||||
i++)
|
||||
{
|
||||
if (ecma_builtin_property_names [i] < ecma_builtin_property_names [i - 1])
|
||||
if (ecma_builtin_property_names[i] < ecma_builtin_property_names[i - 1])
|
||||
{
|
||||
ecma_magic_string_id_t id_temp = ecma_builtin_property_names [i - 1];
|
||||
ecma_builtin_property_names [i - 1] = ecma_builtin_property_names [i];
|
||||
ecma_builtin_property_names [i] = id_temp;
|
||||
ecma_magic_string_id_t id_temp = ecma_builtin_property_names[i - 1];
|
||||
ecma_builtin_property_names[i - 1] = ecma_builtin_property_names[i];
|
||||
ecma_builtin_property_names[i] = id_temp;
|
||||
|
||||
swapped = true;
|
||||
}
|
||||
@@ -115,7 +115,7 @@ TRY_TO_INSTANTIATE_PROPERTY_ROUTINE_NAME (BUILTIN_UNDERSCORED_ID) (ecma_object_t
|
||||
}
|
||||
|
||||
const ecma_length_t property_numbers = (ecma_length_t) (sizeof (ecma_builtin_property_names) /
|
||||
sizeof (ecma_builtin_property_names [0]));
|
||||
sizeof (ecma_builtin_property_names[0]));
|
||||
int32_t index;
|
||||
index = ecma_builtin_bin_search_for_magic_string_id_in_array (ecma_builtin_property_names,
|
||||
property_numbers,
|
||||
@@ -279,7 +279,7 @@ DISPATCH_ROUTINE_ROUTINE_NAME (BUILTIN_UNDERSCORED_ID) (uint16_t builtin_routine
|
||||
identifier */
|
||||
ecma_value_t this_arg_value, /**< 'this' argument
|
||||
value */
|
||||
const ecma_value_t arguments_list [], /**< list of arguments
|
||||
const ecma_value_t arguments_list[], /**< list of arguments
|
||||
passed to routine */
|
||||
ecma_length_t arguments_number) /**< length of
|
||||
arguments' list */
|
||||
|
||||
@@ -118,8 +118,8 @@ ecma_builtin_jerry_try_to_instantiate_property (ecma_object_t *obj_p, /**< objec
|
||||
ecma_completion_value_t
|
||||
ecma_builtin_jerry_dispatch_routine (uint16_t builtin_routine_id, /**< built-in wide identifier of routine */
|
||||
ecma_value_t this_arg_value __attr_unused___, /**< 'this' argument value */
|
||||
const ecma_value_t arguments_list [], /**< list of arguments
|
||||
* passed to routine */
|
||||
const ecma_value_t arguments_list[], /**< list of arguments
|
||||
* passed to routine */
|
||||
ecma_length_t arguments_number) /**< length of arguments' list */
|
||||
{
|
||||
uint32_t extension_object_index = builtin_routine_id / ECMA_EXTENSION_MAX_FUNCTIONS_IN_EXTENSION;
|
||||
@@ -138,7 +138,7 @@ ecma_builtin_jerry_dispatch_routine (uint16_t builtin_routine_id, /**< built-in
|
||||
JERRY_ASSERT (desc_p != NULL);
|
||||
|
||||
JERRY_ASSERT (function_index < desc_p->functions_count);
|
||||
jerry_extension_function_t *function_p = &desc_p->functions_p [function_index];
|
||||
jerry_extension_function_t *function_p = &desc_p->functions_p[function_index];
|
||||
|
||||
bool throw_type_error = false;
|
||||
if (function_p->args_number != arguments_number)
|
||||
@@ -150,8 +150,8 @@ ecma_builtin_jerry_dispatch_routine (uint16_t builtin_routine_id, /**< built-in
|
||||
uint32_t arg_index;
|
||||
for (arg_index = 0; arg_index < function_p->args_number; arg_index++)
|
||||
{
|
||||
jerry_api_value_t *arg_p = &function_p->args_p [arg_index];
|
||||
const ecma_value_t arg_value = arguments_list [arg_index];
|
||||
jerry_api_value_t *arg_p = &function_p->args_p[arg_index];
|
||||
const ecma_value_t arg_value = arguments_list[arg_index];
|
||||
|
||||
if (arg_p->type == JERRY_API_DATA_TYPE_BOOLEAN)
|
||||
{
|
||||
@@ -234,7 +234,7 @@ ecma_builtin_jerry_dispatch_routine (uint16_t builtin_routine_id, /**< built-in
|
||||
arg_index < initialized_args_count;
|
||||
arg_index++)
|
||||
{
|
||||
jerry_api_value_t *arg_p = &function_p->args_p [arg_index];
|
||||
jerry_api_value_t *arg_p = &function_p->args_p[arg_index];
|
||||
|
||||
if (arg_p->type == JERRY_API_DATA_TYPE_STRING)
|
||||
{
|
||||
@@ -342,8 +342,8 @@ ecma_extension_register (jerry_extension_descriptor_t *extension_desc_p) /**< ex
|
||||
for (uint32_t j = 0; j < extension_desc_p->fields_count; j++)
|
||||
{
|
||||
if (i != j
|
||||
&& !strcmp (extension_desc_p->fields_p [i].field_name_p,
|
||||
extension_desc_p->fields_p [j].field_name_p))
|
||||
&& !strcmp (extension_desc_p->fields_p[i].field_name_p,
|
||||
extension_desc_p->fields_p[j].field_name_p))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -352,14 +352,14 @@ ecma_extension_register (jerry_extension_descriptor_t *extension_desc_p) /**< ex
|
||||
|
||||
for (uint32_t i = 0; i < extension_desc_p->functions_count; i++)
|
||||
{
|
||||
if (extension_desc_p->functions_p [i].args_number >= ECMA_EXTENSION_MAX_ARGUMENTS_IN_FUNCTION)
|
||||
if (extension_desc_p->functions_p[i].args_number >= ECMA_EXTENSION_MAX_ARGUMENTS_IN_FUNCTION)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
/* Check if we can represent the arguments' values */
|
||||
for (uint32_t j = 0; j < extension_desc_p->functions_p [i].args_number; j++)
|
||||
for (uint32_t j = 0; j < extension_desc_p->functions_p[i].args_number; j++)
|
||||
{
|
||||
if (extension_desc_p->functions_p[i].args_p[j].type == JERRY_API_DATA_TYPE_FLOAT64)
|
||||
{
|
||||
@@ -371,8 +371,8 @@ ecma_extension_register (jerry_extension_descriptor_t *extension_desc_p) /**< ex
|
||||
for (uint32_t j = 0; j < extension_desc_p->functions_count; j++)
|
||||
{
|
||||
if (i != j
|
||||
&& !strcmp (extension_desc_p->functions_p [i].function_name_p,
|
||||
extension_desc_p->functions_p [j].function_name_p))
|
||||
&& !strcmp (extension_desc_p->functions_p[i].function_name_p,
|
||||
extension_desc_p->functions_p[j].function_name_p))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -399,8 +399,8 @@ ecma_extension_register (jerry_extension_descriptor_t *extension_desc_p) /**< ex
|
||||
|
||||
for (uint32_t j = 0; j < extension_desc_p->functions_count; j++)
|
||||
{
|
||||
if (!strcmp (extension_desc_p->fields_p [i].field_name_p,
|
||||
extension_desc_p->functions_p [j].function_name_p))
|
||||
if (!strcmp (extension_desc_p->fields_p[i].field_name_p,
|
||||
extension_desc_p->functions_p[j].function_name_p))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -480,7 +480,7 @@ ecma_op_extension_object_get_own_property (ecma_object_t *obj_p, /**< the extens
|
||||
field_index < desc_p->fields_count;
|
||||
field_index++)
|
||||
{
|
||||
if (!strcmp (name_p, desc_p->fields_p [field_index].field_name_p))
|
||||
if (!strcmp (name_p, desc_p->fields_p[field_index].field_name_p))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -488,7 +488,7 @@ ecma_op_extension_object_get_own_property (ecma_object_t *obj_p, /**< the extens
|
||||
|
||||
if (field_index < desc_p->fields_count)
|
||||
{
|
||||
const jerry_extension_field_t *field_p = &desc_p->fields_p [field_index];
|
||||
const jerry_extension_field_t *field_p = &desc_p->fields_p[field_index];
|
||||
|
||||
ecma_value_t value;
|
||||
prop_p = ecma_create_named_data_property (obj_p,
|
||||
@@ -549,7 +549,7 @@ ecma_op_extension_object_get_own_property (ecma_object_t *obj_p, /**< the extens
|
||||
function_index < desc_p->functions_count;
|
||||
function_index++)
|
||||
{
|
||||
if (!strcmp (name_p, desc_p->functions_p [function_index].function_name_p))
|
||||
if (!strcmp (name_p, desc_p->functions_p[function_index].function_name_p))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -557,7 +557,7 @@ ecma_op_extension_object_get_own_property (ecma_object_t *obj_p, /**< the extens
|
||||
|
||||
if (function_index < desc_p->functions_count)
|
||||
{
|
||||
const jerry_extension_function_t *function_p = &desc_p->functions_p [function_index];
|
||||
const jerry_extension_function_t *function_p = &desc_p->functions_p[function_index];
|
||||
|
||||
/* Currently, combined identifier of extension object and extension function should fit in uint16_t. */
|
||||
JERRY_STATIC_ASSERT (ECMA_EXTENSION_MAX_NUMBER_OF_EXTENSIONS * ECMA_EXTENSION_MAX_FUNCTIONS_IN_EXTENSION
|
||||
|
||||
@@ -66,7 +66,7 @@ ecma_builtin_number_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_value = ecma_op_to_number (arguments_list_p [0]);
|
||||
ret_value = ecma_op_to_number (arguments_list_p[0]);
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
|
||||
@@ -57,13 +57,13 @@ ecma_builtin_object_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
|
||||
|
||||
if (arguments_list_len == 0
|
||||
|| ecma_is_value_undefined (arguments_list_p[0])
|
||||
|| ecma_is_value_null (arguments_list_p [0]))
|
||||
|| ecma_is_value_null (arguments_list_p[0]))
|
||||
{
|
||||
ret_value = ecma_builtin_object_dispatch_construct (arguments_list_p, arguments_list_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_value = ecma_op_to_object (arguments_list_p [0]);
|
||||
ret_value = ecma_op_to_object (arguments_list_p[0]);
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
@@ -88,7 +88,7 @@ ecma_builtin_object_dispatch_construct (const ecma_value_t *arguments_list_p, /*
|
||||
}
|
||||
else
|
||||
{
|
||||
ecma_completion_value_t new_obj_value = ecma_op_create_object_object_arg (arguments_list_p [0]);
|
||||
ecma_completion_value_t new_obj_value = ecma_op_create_object_object_arg (arguments_list_p[0]);
|
||||
|
||||
if (!ecma_is_completion_value_normal (new_obj_value))
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ ecma_builtin_range_error_dispatch_call (const ecma_value_t *arguments_list_p, /*
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
if (arguments_list_len != 0
|
||||
&& !ecma_is_value_undefined (arguments_list_p [0]))
|
||||
&& !ecma_is_value_undefined (arguments_list_p[0]))
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ ecma_builtin_reference_error_dispatch_call (const ecma_value_t *arguments_list_p
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
if (arguments_list_len != 0
|
||||
&& !ecma_is_value_undefined (arguments_list_p [0]))
|
||||
&& !ecma_is_value_undefined (arguments_list_p[0]))
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ ecma_builtin_string_object_from_char_code (ecma_value_t this_arg __attr_unused__
|
||||
|
||||
ecma_char_t *ret_zt_str_p = (ecma_char_t*) mem_heap_alloc_block (zt_str_buffer_size,
|
||||
MEM_HEAP_ALLOC_SHORT_TERM);
|
||||
ret_zt_str_p [args_number] = ECMA_CHAR_NULL;
|
||||
ret_zt_str_p[args_number] = ECMA_CHAR_NULL;
|
||||
|
||||
for (ecma_length_t arg_index = 0;
|
||||
arg_index < args_number;
|
||||
@@ -82,10 +82,10 @@ ecma_builtin_string_object_from_char_code (ecma_value_t this_arg __attr_unused__
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_zt_str_p [arg_index] = (ecma_char_t) uint16_char_code;
|
||||
ret_zt_str_p[arg_index] = (ecma_char_t) uint16_char_code;
|
||||
}
|
||||
#elif CONFIG_ECMA_CHAR_ENCODING == CONFIG_ECMA_CHAR_UTF16
|
||||
ret_zt_str_p [arg_index] = (ecma_char_t) uint16_char_code;
|
||||
ret_zt_str_p[arg_index] = (ecma_char_t) uint16_char_code;
|
||||
#endif /* CONFIG_ECMA_CHAR_ENCODING == CONFIG_ECMA_CHAR_UTF16 */
|
||||
|
||||
ECMA_OP_TO_NUMBER_FINALIZE (arg_num);
|
||||
@@ -129,7 +129,7 @@ ecma_builtin_string_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_value = ecma_op_to_string (arguments_list_p [0]);
|
||||
ret_value = ecma_op_to_string (arguments_list_p[0]);
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
|
||||
@@ -55,7 +55,7 @@ ecma_builtin_syntax_error_dispatch_call (const ecma_value_t *arguments_list_p, /
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
if (arguments_list_len != 0
|
||||
&& !ecma_is_value_undefined (arguments_list_p [0]))
|
||||
&& !ecma_is_value_undefined (arguments_list_p[0]))
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ ecma_builtin_type_error_dispatch_call (const ecma_value_t *arguments_list_p, /**
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
if (arguments_list_len != 0
|
||||
&& !ecma_is_value_undefined (arguments_list_p [0]))
|
||||
&& !ecma_is_value_undefined (arguments_list_p[0]))
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ ecma_builtin_uri_error_dispatch_call (const ecma_value_t *arguments_list_p, /**<
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
if (arguments_list_len != 0
|
||||
&& !ecma_is_value_undefined (arguments_list_p [0]))
|
||||
&& !ecma_is_value_undefined (arguments_list_p[0]))
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ ecma_builtin_ ## lowercase_name ## _dispatch_construct (const ecma_value_t *argu
|
||||
extern ecma_completion_value_t \
|
||||
ecma_builtin_ ## lowercase_name ## _dispatch_routine (uint16_t builtin_routine_id, \
|
||||
ecma_value_t this_arg_value, \
|
||||
const ecma_value_t arguments_list [], \
|
||||
const ecma_value_t arguments_list[], \
|
||||
ecma_length_t arguments_number); \
|
||||
extern ecma_property_t* \
|
||||
ecma_builtin_ ## lowercase_name ## _try_to_instantiate_property (ecma_object_t *obj_p, \
|
||||
|
||||
@@ -35,14 +35,14 @@ static ecma_completion_value_t
|
||||
ecma_builtin_dispatch_routine (ecma_builtin_id_t builtin_object_id,
|
||||
uint16_t builtin_routine_id,
|
||||
ecma_value_t this_arg_value,
|
||||
const ecma_value_t arguments_list [],
|
||||
const ecma_value_t arguments_list[],
|
||||
ecma_length_t arguments_number);
|
||||
static void ecma_instantiate_builtin (ecma_builtin_id_t id);
|
||||
|
||||
/**
|
||||
* Pointer to instances of built-in objects
|
||||
*/
|
||||
static ecma_object_t* ecma_builtin_objects [ECMA_BUILTIN_ID__COUNT];
|
||||
static ecma_object_t* ecma_builtin_objects[ECMA_BUILTIN_ID__COUNT];
|
||||
|
||||
/**
|
||||
* Check if passed object is the instance of specified built-in.
|
||||
@@ -54,12 +54,12 @@ ecma_builtin_is (ecma_object_t *obj_p, /**< pointer to an object */
|
||||
JERRY_ASSERT (obj_p != NULL && !ecma_is_lexical_environment (obj_p));
|
||||
JERRY_ASSERT (builtin_id < ECMA_BUILTIN_ID__COUNT);
|
||||
|
||||
if (unlikely (ecma_builtin_objects [builtin_id] == NULL))
|
||||
if (unlikely (ecma_builtin_objects[builtin_id] == NULL))
|
||||
{
|
||||
ecma_instantiate_builtin (builtin_id);
|
||||
}
|
||||
|
||||
return (obj_p == ecma_builtin_objects [builtin_id]);
|
||||
return (obj_p == ecma_builtin_objects[builtin_id]);
|
||||
} /* ecma_builtin_is */
|
||||
|
||||
/**
|
||||
@@ -72,14 +72,14 @@ ecma_builtin_get (ecma_builtin_id_t builtin_id) /**< id of built-in to check on
|
||||
{
|
||||
JERRY_ASSERT (builtin_id < ECMA_BUILTIN_ID__COUNT);
|
||||
|
||||
if (unlikely (ecma_builtin_objects [builtin_id] == NULL))
|
||||
if (unlikely (ecma_builtin_objects[builtin_id] == NULL))
|
||||
{
|
||||
ecma_instantiate_builtin (builtin_id);
|
||||
}
|
||||
|
||||
ecma_ref_object (ecma_builtin_objects [builtin_id]);
|
||||
ecma_ref_object (ecma_builtin_objects[builtin_id]);
|
||||
|
||||
return ecma_builtin_objects [builtin_id];
|
||||
return ecma_builtin_objects[builtin_id];
|
||||
} /* ecma_builtin_get */
|
||||
|
||||
/**
|
||||
@@ -169,7 +169,7 @@ ecma_init_builtins (void)
|
||||
id < ECMA_BUILTIN_ID__COUNT;
|
||||
id = (ecma_builtin_id_t) (id + 1))
|
||||
{
|
||||
ecma_builtin_objects [id] = NULL;
|
||||
ecma_builtin_objects[id] = NULL;
|
||||
}
|
||||
} /* ecma_init_builtins */
|
||||
|
||||
@@ -190,7 +190,7 @@ ecma_instantiate_builtin (ecma_builtin_id_t id) /**< built-in id */
|
||||
lowercase_name) \
|
||||
case builtin_id: \
|
||||
{ \
|
||||
JERRY_ASSERT (ecma_builtin_objects [builtin_id] == NULL); \
|
||||
JERRY_ASSERT (ecma_builtin_objects[builtin_id] == NULL); \
|
||||
if (is_static) \
|
||||
{ \
|
||||
ecma_builtin_ ## lowercase_name ## _sort_property_names (); \
|
||||
@@ -203,11 +203,11 @@ ecma_instantiate_builtin (ecma_builtin_id_t id) /**< built-in id */
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
if (ecma_builtin_objects [object_prototype_builtin_id] == NULL) \
|
||||
if (ecma_builtin_objects[object_prototype_builtin_id] == NULL) \
|
||||
{ \
|
||||
ecma_instantiate_builtin (object_prototype_builtin_id); \
|
||||
} \
|
||||
prototype_obj_p = ecma_builtin_objects [object_prototype_builtin_id]; \
|
||||
prototype_obj_p = ecma_builtin_objects[object_prototype_builtin_id]; \
|
||||
JERRY_ASSERT (prototype_obj_p != NULL); \
|
||||
} \
|
||||
\
|
||||
@@ -216,7 +216,7 @@ ecma_instantiate_builtin (ecma_builtin_id_t id) /**< built-in id */
|
||||
object_type, \
|
||||
object_class, \
|
||||
is_extensible); \
|
||||
ecma_builtin_objects [builtin_id] = builtin_obj_p; \
|
||||
ecma_builtin_objects[builtin_id] = builtin_obj_p; \
|
||||
\
|
||||
break; \
|
||||
}
|
||||
@@ -241,11 +241,11 @@ ecma_finalize_builtins (void)
|
||||
id < ECMA_BUILTIN_ID__COUNT;
|
||||
id = (ecma_builtin_id_t) (id + 1))
|
||||
{
|
||||
if (ecma_builtin_objects [id] != NULL)
|
||||
if (ecma_builtin_objects[id] != NULL)
|
||||
{
|
||||
ecma_deref_object (ecma_builtin_objects [id]);
|
||||
ecma_deref_object (ecma_builtin_objects[id]);
|
||||
|
||||
ecma_builtin_objects [id] = NULL;
|
||||
ecma_builtin_objects[id] = NULL;
|
||||
}
|
||||
}
|
||||
} /* ecma_finalize_builtins */
|
||||
@@ -523,7 +523,7 @@ ecma_builtin_dispatch_routine (ecma_builtin_id_t builtin_object_id, /**< built-i
|
||||
* of the built-in object's
|
||||
* routine property */
|
||||
ecma_value_t this_arg_value, /**< 'this' argument value */
|
||||
const ecma_value_t arguments_list [], /**< list of arguments passed to routine */
|
||||
const ecma_value_t arguments_list[], /**< list of arguments passed to routine */
|
||||
ecma_length_t arguments_number) /**< length of arguments' list */
|
||||
{
|
||||
switch (builtin_object_id)
|
||||
@@ -583,7 +583,7 @@ ecma_builtin_bin_search_for_magic_string_id_in_array (const ecma_magic_string_id
|
||||
id_index < array_length;
|
||||
id_index++)
|
||||
{
|
||||
JERRY_ASSERT (ids [id_index - 1] < ids [id_index]);
|
||||
JERRY_ASSERT (ids[id_index - 1] < ids[id_index]);
|
||||
}
|
||||
#endif /* !JERRY_NDEBUG */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user