Fix typos in the documentation and related files (#4809)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
@@ -28,17 +28,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Check whether the object is pushed onto the occurence stack
|
||||
* Check whether the object is pushed onto the occurrence stack
|
||||
*
|
||||
* Used by:
|
||||
* - ecma_builtin_json_object step 1
|
||||
* - ecma_builtin_json_array step 1
|
||||
*
|
||||
* @return true - if the object is pushed onto the occurence stack
|
||||
* @return true - if the object is pushed onto the occurrence stack
|
||||
* false - otherwise
|
||||
*/
|
||||
bool
|
||||
ecma_json_has_object_in_stack (ecma_json_occurence_stack_item_t *stack_p, /**< stack */
|
||||
ecma_json_has_object_in_stack (ecma_json_occurrence_stack_item_t *stack_p, /**< stack */
|
||||
ecma_object_t *object_p) /**< object */
|
||||
{
|
||||
while (stack_p != NULL)
|
||||
|
||||
@@ -187,13 +187,13 @@ ecma_value_t ecma_date_value_to_time_string (ecma_number_t datetime_number);
|
||||
/* ecma-builtin-helper-json.c */
|
||||
|
||||
/**
|
||||
* Occurence stack item of JSON.stringify()
|
||||
* Occurrence stack item of JSON.stringify()
|
||||
*/
|
||||
typedef struct struct_ecma_json_occurence_stack_item_t
|
||||
typedef struct struct_ecma_json_occurrence_stack_item_t
|
||||
{
|
||||
struct struct_ecma_json_occurence_stack_item_t *next_p; /**< next stack item */
|
||||
struct struct_ecma_json_occurrence_stack_item_t *next_p; /**< next stack item */
|
||||
ecma_object_t *object_p; /**< current object */
|
||||
} ecma_json_occurence_stack_item_t;
|
||||
} ecma_json_occurrence_stack_item_t;
|
||||
|
||||
/**
|
||||
* Context for JSON.stringify()
|
||||
@@ -204,7 +204,7 @@ typedef struct
|
||||
ecma_collection_t *property_list_p;
|
||||
|
||||
/** Collection for traversing objects. */
|
||||
ecma_json_occurence_stack_item_t *occurence_stack_last_p;
|
||||
ecma_json_occurrence_stack_item_t *occurrence_stack_last_p;
|
||||
|
||||
/** The actual indentation text. */
|
||||
ecma_stringbuilder_t indent_builder;
|
||||
@@ -222,7 +222,7 @@ typedef struct
|
||||
ecma_value_t ecma_builtin_json_parse_buffer (const lit_utf8_byte_t * str_start_p,
|
||||
lit_utf8_size_t string_size);
|
||||
ecma_value_t ecma_builtin_json_stringify_no_opts (const ecma_value_t value);
|
||||
bool ecma_json_has_object_in_stack (ecma_json_occurence_stack_item_t *stack_p, ecma_object_t *object_p);
|
||||
bool ecma_json_has_object_in_stack (ecma_json_occurrence_stack_item_t *stack_p, ecma_object_t *object_p);
|
||||
|
||||
ecma_value_t
|
||||
ecma_builtin_helper_json_create_non_formatted_json (lit_utf8_byte_t left_bracket, lit_utf8_byte_t right_bracket,
|
||||
|
||||
@@ -550,7 +550,7 @@ ecma_builtin_json_parse_value (ecma_json_token_t *token_p) /**< token argument *
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse error occured.
|
||||
* Parse error occurred.
|
||||
*/
|
||||
ecma_deref_object (object_p);
|
||||
return ECMA_VALUE_EMPTY;
|
||||
@@ -752,7 +752,7 @@ ecma_builtin_json_internalize_property (ecma_object_t *reviver_p, /**< reviver f
|
||||
* ECMA-262 v5, 15.12.2
|
||||
* ECMA-262 v11, 24.5.1.1 in step 2
|
||||
*
|
||||
* @return ECMA_VALUE_TRUE - if no error occured.
|
||||
* @return ECMA_VALUE_TRUE - if no error occurred.
|
||||
* error if one of the operation failed.
|
||||
*/
|
||||
static
|
||||
@@ -1010,16 +1010,16 @@ ecma_builtin_json_serialize_object (ecma_json_stringify_context_t *context_p, /*
|
||||
ecma_object_t *obj_p) /**< the object*/
|
||||
{
|
||||
/* 1. */
|
||||
if (ecma_json_has_object_in_stack (context_p->occurence_stack_last_p, obj_p))
|
||||
if (ecma_json_has_object_in_stack (context_p->occurrence_stack_last_p, obj_p))
|
||||
{
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("The structure is cyclical"));
|
||||
}
|
||||
|
||||
/* 2. */
|
||||
ecma_json_occurence_stack_item_t stack_item;
|
||||
stack_item.next_p = context_p->occurence_stack_last_p;
|
||||
ecma_json_occurrence_stack_item_t stack_item;
|
||||
stack_item.next_p = context_p->occurrence_stack_last_p;
|
||||
stack_item.object_p = obj_p;
|
||||
context_p->occurence_stack_last_p = &stack_item;
|
||||
context_p->occurrence_stack_last_p = &stack_item;
|
||||
|
||||
/* 3. - 4.*/
|
||||
const lit_utf8_size_t stepback_size = ecma_stringbuilder_get_size (&context_p->indent_builder);
|
||||
@@ -1115,7 +1115,7 @@ ecma_builtin_json_serialize_object (ecma_json_stringify_context_t *context_p, /*
|
||||
result = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 11. */
|
||||
context_p->occurence_stack_last_p = stack_item.next_p;
|
||||
context_p->occurrence_stack_last_p = stack_item.next_p;
|
||||
|
||||
/* 12. */
|
||||
ecma_stringbuilder_revert (&context_p->indent_builder, stepback_size);
|
||||
@@ -1147,16 +1147,16 @@ ecma_builtin_json_serialize_array (ecma_json_stringify_context_t *context_p, /**
|
||||
#endif /* !JERRY_NDEBUG */
|
||||
|
||||
/* 1. */
|
||||
if (ecma_json_has_object_in_stack (context_p->occurence_stack_last_p, obj_p))
|
||||
if (ecma_json_has_object_in_stack (context_p->occurrence_stack_last_p, obj_p))
|
||||
{
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("The structure is cyclical"));
|
||||
}
|
||||
|
||||
/* 2. */
|
||||
ecma_json_occurence_stack_item_t stack_item;
|
||||
stack_item.next_p = context_p->occurence_stack_last_p;
|
||||
ecma_json_occurrence_stack_item_t stack_item;
|
||||
stack_item.next_p = context_p->occurrence_stack_last_p;
|
||||
stack_item.object_p = obj_p;
|
||||
context_p->occurence_stack_last_p = &stack_item;
|
||||
context_p->occurrence_stack_last_p = &stack_item;
|
||||
|
||||
/* 3. - 4.*/
|
||||
const lit_utf8_size_t stepback_size = ecma_stringbuilder_get_size (&context_p->indent_builder);
|
||||
@@ -1232,7 +1232,7 @@ ecma_builtin_json_serialize_array (ecma_json_stringify_context_t *context_p, /**
|
||||
ecma_stringbuilder_append_byte (&context_p->result_builder, LIT_CHAR_RIGHT_SQUARE);
|
||||
|
||||
/* 12. */
|
||||
context_p->occurence_stack_last_p = stack_item.next_p;
|
||||
context_p->occurrence_stack_last_p = stack_item.next_p;
|
||||
|
||||
/* 13. */
|
||||
ecma_stringbuilder_revert (&context_p->indent_builder, stepback_size);
|
||||
@@ -1532,7 +1532,7 @@ ecma_value_t
|
||||
ecma_builtin_json_stringify_no_opts (const ecma_value_t value) /**< value to stringify */
|
||||
{
|
||||
ecma_json_stringify_context_t context;
|
||||
context.occurence_stack_last_p = NULL;
|
||||
context.occurrence_stack_last_p = NULL;
|
||||
context.indent_builder = ecma_stringbuilder_create ();
|
||||
context.property_list_p = NULL;
|
||||
context.replacer_function_p = NULL;
|
||||
@@ -1781,7 +1781,7 @@ ecma_builtin_json_stringify (ecma_value_t arg1, /**< value */
|
||||
ecma_free_value (space);
|
||||
|
||||
/* 1., 2., 3. */
|
||||
context.occurence_stack_last_p = NULL;
|
||||
context.occurrence_stack_last_p = NULL;
|
||||
context.indent_builder = ecma_stringbuilder_create ();
|
||||
|
||||
/* 9. */
|
||||
|
||||
@@ -311,7 +311,7 @@ ecma_builtin_object_object_set_proto (ecma_value_t arg1, /**< routine's first ar
|
||||
* ECMA-262 v6, 7.3.14
|
||||
*
|
||||
* @return ECMA_VALUE_ERROR - if the operation raised an error
|
||||
* ECMA_VALUE_{TRUE/FALSE} - depends on whether the integrity level has been set sucessfully
|
||||
* ECMA_VALUE_{TRUE/FALSE} - depends on whether the integrity level has been set successfully
|
||||
*/
|
||||
static ecma_value_t
|
||||
ecma_builtin_object_set_integrity_level (ecma_object_t *obj_p, /**< object */
|
||||
@@ -1327,12 +1327,12 @@ ecma_op_object_get_own_property_keys (ecma_value_t this_arg, /**< this argument
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (object);
|
||||
|
||||
/* 2. */
|
||||
jerry_property_filter_t filter = JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS;
|
||||
jerry_property_filter_t filter = JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS;
|
||||
|
||||
if (type == ECMA_OBJECT_ROUTINE_GET_OWN_PROPERTY_SYMBOLS)
|
||||
{
|
||||
filter = (JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS
|
||||
| JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES);
|
||||
filter = (JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS
|
||||
| JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES);
|
||||
}
|
||||
|
||||
ecma_collection_t *props_p = ecma_op_object_own_property_keys (obj_p, filter);
|
||||
|
||||
@@ -1420,7 +1420,7 @@ ecma_builtin_routine_list_lazy_property_names (ecma_object_t *object_p, /**< a b
|
||||
JERRY_ASSERT (ecma_get_object_type (object_p) == ECMA_OBJECT_TYPE_BUILT_IN_FUNCTION);
|
||||
JERRY_ASSERT (ecma_builtin_function_is_routine (object_p));
|
||||
|
||||
if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS)
|
||||
if (filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1495,7 +1495,7 @@ ecma_builtin_list_lazy_property_names (ecma_object_t *object_p, /**< a built-in
|
||||
bool has_symbol = true;
|
||||
#endif /* JERRY_BUILTIN_REALMS */
|
||||
|
||||
if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS))
|
||||
if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS))
|
||||
{
|
||||
const ecma_builtin_property_descriptor_t *curr_property_p = ecma_builtin_property_list_references[builtin_id];
|
||||
uint8_t bitset = built_in_props_p->u2.instantiated_bitset[0];
|
||||
@@ -1540,7 +1540,7 @@ ecma_builtin_list_lazy_property_names (ecma_object_t *object_p, /**< a built-in
|
||||
}
|
||||
|
||||
#if JERRY_ESNEXT
|
||||
if (has_symbol && !(filter & JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS))
|
||||
if (has_symbol && !(filter & JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS))
|
||||
{
|
||||
const ecma_builtin_property_descriptor_t *curr_property_p = ecma_builtin_property_list_references[builtin_id];
|
||||
uint8_t bitset = built_in_props_p->u2.instantiated_bitset[0];
|
||||
|
||||
Reference in New Issue
Block a user