diff --git a/docs/01.CONFIGURATION.md b/docs/01.CONFIGURATION.md index 006350e9f..209dc3f8c 100644 --- a/docs/01.CONFIGURATION.md +++ b/docs/01.CONFIGURATION.md @@ -1,7 +1,7 @@ # Configuration JerryScript provides a large number of configuration options which can be used to enable or disable specific features, allowing users to fine tune the engine to best suit their needs. -A configuration option's value can be changed either by providing specific C preprocessor definitions, by adding CMake defininitions, or by using the arguments of the `tools/build.py` script. +A configuration option's value can be changed either by providing specific C preprocessor definitions, by adding CMake definitions, or by using the arguments of the `tools/build.py` script. This document lists the available configuration options, shows the configuration name for C, CMake, and python, and provides a brief description that explains the effect of the options. diff --git a/docs/02.API-REFERENCE.md b/docs/02.API-REFERENCE.md index 94868d326..3591953a8 100644 --- a/docs/02.API-REFERENCE.md +++ b/docs/02.API-REFERENCE.md @@ -79,7 +79,7 @@ Enum that contains JerryScript **function** value types: - JERRY_FUNCTION_TYPE_GENERIC - Generic JavaScript function - JERRY_FUNCTION_TYPE_ACCESSOR - Accessor function - JERRY_FUNCTION_TYPE_BOUND - Bound function - - JERRY_FUNCTION_TYPE_ARROW - Arrow fuction + - JERRY_FUNCTION_TYPE_ARROW - Arrow function - JERRY_FUNCTION_TYPE_GENERATOR - Generator function object *New in version 2.4*. @@ -112,18 +112,23 @@ produce correct results. Enum that contains JerryScript **property filter** options bits: - - JERRY_PROPERTY_FILTER_ALL - List all property keys independently from key type or property value attributes (equivalent to Reflect.ownKeys call) - - JERRY_PROPERTY_FILTER_TRAVERSE_PROTOTYPE_CHAIN - Include keys from the objects's prototype chain as well - - JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE - Exclude property key if the property is non-configurable - - JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE - Exclude property key if the property is non-enumerable - - JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE - Exclude property key if the property is non-writable - - JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS - Exclude property key if it is a string - - JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS - Exclude property key if it is a symbol - - JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES - Exclude property key if it is an integer index + - JERRY_PROPERTY_FILTER_ALL - List all property keys independently from key type or property value attributes (equivalent to Reflect.ownKeys call) + - JERRY_PROPERTY_FILTER_TRAVERSE_PROTOTYPE_CHAIN - Include keys from the objects' prototype chain as well + - JERRY_PROPERTY_FILTER_EXCLUDE_NON_CONFIGURABLE - Exclude property key if the property is non-configurable + - JERRY_PROPERTY_FILTER_EXCLUDE_NON_ENUMERABLE - Exclude property key if the property is non-enumerable + - JERRY_PROPERTY_FILTER_EXCLUDE_NON_WRITABLE - Exclude property key if the property is non-writable + - JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS - Exclude property key if it is a string + - JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS - Exclude property key if it is a symbol + - JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES - Exclude property key if it is an integer index - JERRY_PROPERTY_FILTER_INTEGER_INDICES_AS_NUMBER - By default integer index property keys are converted to string. Enabling this flags keeps integer index property keys as numbers *New in version 2.4*. +*Changed in version [[NEXT_RELEASE]]*: The following values are modified due to a typo in their names (exlcude/exclude): + `JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE`, `JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE`, + `JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE`, `JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS`, + `JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS`, `JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES`. + ## jerry_error_t Possible types of an error: @@ -306,7 +311,7 @@ so their constant pools do not need to be loaded into the memory. Hence these snapshots can be executed from ROM. ***Important note:*** The [jerry_exec_snapshot](#jerry_exec_snapshot) -function rejects static snaphots unless the `JERRY_SNAPSHOT_EXEC_ALLOW_STATIC` +function rejects static snapshots unless the `JERRY_SNAPSHOT_EXEC_ALLOW_STATIC` option bit is set. The caller must also ensure that the same magic strings are set by [jerry_register_magic_strings](#jerry_register_magic_strings) when the snapshot is generated and executed. Furthermore the @@ -618,7 +623,7 @@ typedef struct **Summary** -Source code location data retreived by +Source code location data retrieved by [jerry_backtrace_get_location](#jerry_backtrace_get_location). **Prototype** @@ -800,7 +805,7 @@ typedef void (*jerry_external_string_free_callback_t) (jerry_char_t *string_p, void *user_p); ``` -- `string_p` - extrenal string pointer +- `string_p` - external string pointer - `string_size` - size of external string - `user_p` - pointer passed when the external string is created @@ -846,7 +851,7 @@ An enum representing the current status of a module - JERRY_MODULE_STATE_INVALID - Return value for jerry_module_get_state when its argument is not a module - JERRY_MODULE_STATE_UNLINKED - Module is currently unlinked - JERRY_MODULE_STATE_LINKING - Module is currently being linked - - JERRY_MODULE_STATE_LINKED - Module has been linked (its depencencies has been resolved) + - JERRY_MODULE_STATE_LINKED - Module has been linked (its dependencies has been resolved) - JERRY_MODULE_STATE_EVALUATING - Module is currently being evaluated - JERRY_MODULE_STATE_EVALUATED - Module has been evaluated (its source code has been executed) - JERRY_MODULE_STATE_ERROR - An error has been encountered before the evaluated state is reached @@ -1961,7 +1966,7 @@ main (void) { jerry_init (JERRY_INIT_EMPTY); - /* Specifly the argument list to parse a function. */ + /* Specify the argument list to parse a function. */ jerry_parse_options_t parse_options; parse_options.options = JERRY_PARSE_HAS_ARGUMENT_LIST; parse_options.argument_list = jerry_create_string ((const jerry_char_t *) "a, b"); @@ -5577,7 +5582,7 @@ main (void) **Summary** Returns the module request specified by the `request_index` argument. The requests -are ordered in source code occurence. When parsing is completed, all returned values +are ordered in source code occurrence. When parsing is completed, all returned values are strings. If [jerry_module_link](#jerry_module_link) is completed successfully all returned values are module objects instead. If linking is in progress or fails, the successfully resolved dependencies are module objects, the rest are strings. @@ -5928,7 +5933,7 @@ jerry_native_module_get_export (const jerry_value_t native_module_val, const jerry_value_t export_name_val); ``` -- `module_val` - a native module object. +- `native_module_val` - a native module object. - `export_name_val` - string identifier of the export. - return - value of the export, if success @@ -5983,12 +5988,12 @@ Sets the value of an export binding which belongs to a native module. ```c jerry_value_t -jerry_value_t jerry_native_module_set_export (const jerry_value_t native_mmodule_val, +jerry_value_t jerry_native_module_set_export (const jerry_value_t native_module_val, const jerry_value_t export_name_val, const jerry_value_t value_to_set) ``` -- `module_val` - a native module object. +- `native_module_val` - a native module object. - `export_name_val` - string identifier of the export. - `value_to_set` - new value of the export. - return @@ -6081,7 +6086,7 @@ example (void) // acquire/create a promise object. jerry_value_t promise = jerry_create_promise (); { - // prepare the argumnent for the resolve or reject. + // prepare the argument for the resolve or reject. jerry_value_t argument = jerry_create_number (33); jerry_value_t is_ok = jerry_resolve_or_reject_promise (promise, @@ -6153,7 +6158,7 @@ example (void) // a Promise have a default state of JERRY_PROMISE_STATE_PENDING { - // prepare the argumnent for the resolve or reject. + // prepare the argument for the resolve or reject. jerry_value_t argument = jerry_create_number (33); jerry_value_t is_ok = jerry_resolve_or_reject_promise (promise, @@ -6384,7 +6389,7 @@ jerry_resolve_or_reject_promise (jerry_value_t promise, - `argument` - the argument for resolve or reject - `is_resolve` - whether the promise should be resolved or rejected - return value - - undefined jerry value - resolve or reject successed + - undefined jerry value - success of resolve or reject - jerry value with error flag - otherwise *New in version 2.0*. @@ -6400,7 +6405,7 @@ jerry_resolve_or_reject_promise (jerry_value_t promise, ... bool is_resolve = ... // whether the promise should be resolved or rejected - jerry_value_t argument = ... // prepare the argumnent for the resolve or reject. + jerry_value_t argument = ... // prepare the argument for the resolve or reject. jerry_value_t is_ok = jerry_resolve_or_reject_promise (promise, argument, @@ -6621,7 +6626,7 @@ These APIs all depend on build option (`JERRY_BUILTIN_BIGINT`). Returns the size of uint64 digits of a BigInt value. This value is the minimum size of the buffer which can hold all digits of a BigInt value when -the digits are retreived by `[jerry_get_bigint_digits](#jerry_get_bigint_digits)`. +the digits are retrieved by `[jerry_get_bigint_digits](#jerry_get_bigint_digits)`. *Notes*: - This API depends on a build option (`JERRY_BUILTIN_BIGINT`) and can be checked @@ -7043,7 +7048,7 @@ jerry_create_arraybuffer_external (const jerry_length_t size - `buffer_p` - the backing store used by the array buffer object. - `arraybuffer_user_p` - user pointer assigned to the array buffer object. - return value - - value of the newly construced array buffer object. + - value of the newly constructed array buffer object. *New in version 2.0*. @@ -7146,7 +7151,7 @@ jerry_create_shared_arraybuffer_external (const jerry_length_t size - `buffer_p` - the backing store used by the shared array buffer object. - `arraybuffer_user_p` - user pointer assigned to the shared array buffer object. - return value - - value of the newly construced shared array buffer object. + - value of the newly constructed shared array buffer object. *New in version [[NEXT_RELEASE]]*. @@ -9479,7 +9484,7 @@ method_setter (const jerry_call_info_t *call_info_p, const jerry_length_t argc) { // Note: the arguments count and type should be checked - // in this example it is ommitted! + // in this example it is omitted! double new_value = jerry_get_number_value (args[0]); counter = (int) new_value; @@ -10062,12 +10067,12 @@ main (void) shape_p->perimeter = 12; jerry_set_object_native_pointer (object, shape_p, &shape_obj_type_info); - // The native pointer can be NULL. This gives possibily to get notified via the native type info's + // The native pointer can be NULL. This gives possibly to get notified via the native type info's // free callback when the object has been freed by the GC. jerry_set_object_native_pointer (object, NULL, &destructor_obj_type_info); // The native type info can be NULL as well. In this case the registered property is simply freed - // when the object is freed by te GC. + // when the object is freed by the GC. jerry_set_object_native_pointer (object, SECRET_INFO, NULL); do_stuff (object); @@ -11083,7 +11088,7 @@ jerry_generate_snapshot (jerry_value_t compiled_code, - `buffer_p` - output buffer (aligned to 4 bytes) to save snapshot to. - `buffer_size` - the output buffer's size in bytes. - return value - - the size of the generated snapshot in bytes as number value, if it was generated succesfully (i.e. there + - the size of the generated snapshot in bytes as number value, if it was generated successfully (i.e. there are no syntax errors in source code, buffer size is sufficient, and snapshot support is enabled in current configuration through JERRY_SNAPSHOT_SAVE) - thrown error, otherwise. @@ -11170,7 +11175,7 @@ jerry_exec_snapshot (const uint32_t *snapshot_p, - `snapshot_size` - size of snapshot in bytes. - `func_index` - index of executed function. - `exec_snapshot_opts` - any combination of [jerry_exec_snapshot_opts_t](#jerry_exec_snapshot_opts_t) flags. -- `options_values_p` - additional loadig options, can be NULL if not used. The fields are described in +- `options_values_p` - additional loading options, can be NULL if not used. The fields are described in [jerry_exec_snapshot_option_values_t](#jerry_exec_snapshot_option_values_t). - return value - result of bytecode, if run was successful. @@ -11333,7 +11338,7 @@ jerry_get_literals_from_snapshot (const uint32_t *snapshot_p, - `lit_buf_size` - the buffer's size. - `is_c_format` - the output format would be C-style (true) or a simple list (false). - return value - - the size of the literal-list, if it was generated succesfully (i.e. the list of literals isn't empty, + - the size of the literal-list, if it was generated successfully (i.e. the list of literals isn't empty, and literal-save support is enabled in current configuration through JERRY_SNAPSHOT_SAVE) - 0 otherwise. @@ -11903,7 +11908,7 @@ backtrace_callback (jerry_backtrace_frame_t *frame_p, if (jerry_backtrace_is_strict (frame_p)) { printf ("Strict mode code is running"); - return truel + return true; } printf ("Non-strict mode code is running"); @@ -12554,7 +12559,7 @@ jerry_arraybuffer_read (const jerry_value_t value, { uint8_t data[20]; jerry_value_t buffer; - // ... create the ArrayBuffer or acuiqre it from somewhere. + // ... create the ArrayBuffer or acquire it from somewhere. jerry_value_t bytes_read; @@ -13106,7 +13111,7 @@ jerry_get_typedarray_type (jerry_value_t value); ```c { jerry_typedarray_type_t expected_type = JERRY_TYPEDARRAY_UINT32; - jerry_value_t typedarray = jerry_create_typedarray (expected_klass, 25); + jerry_value_t typedarray = jerry_create_typedarray (expected_class, 25); jerry_typedarray_type_t type = jerry_get_typedarray_type (typedarray); @@ -13262,7 +13267,7 @@ main (void) const jerry_char_t data[] = "{\"name\": \"John\", \"age\": 5}"; jerry_value_t obj = jerry_json_parse (data, sizeof (data) - 1); - /* "obj" now conatins and object created from the "data" JSON string. */ + /* "obj" now contains and object created from the "data" JSON string. */ jerry_release_value (obj); diff --git a/docs/04.INTERNALS.md b/docs/04.INTERNALS.md index 8576048d0..4fa1753a1 100644 --- a/docs/04.INTERNALS.md +++ b/docs/04.INTERNALS.md @@ -78,7 +78,7 @@ Argument combinations are limited to the following seven forms: ## Literals Literals are organized into groups whose represent various literal types. Having these groups consuming less space than assigning flag bits to each literal. -(In the followings, the mentioned ranges represent those indicies which are greater than or equal to the left side and less than the right side of the range. For example a range between `ident_end` and `literal_end` fields of the byte-code header contains those indicies, which are greater than or equal to `ident_end` +(In the followings, the mentioned ranges represent those indices which are greater than or equal to the left side and less than the right side of the range. For example a range between `ident_end` and `literal_end` fields of the byte-code header contains those indices, which are greater than or equal to `ident_end` and less than `literal_end`. If `ident_end` equals to `literal_end` the range is empty.) The two major group of literals are _identifiers_ and _values_. @@ -271,7 +271,7 @@ An object can be a conventional data object or a lexical environment object. Unl [Lexical environments](http://www.ecma-international.org/ecma-262/5.1/#sec-10.2) are implemented as objects in JerryScript, since lexical environments contains key-value pairs (called bindings) like objects. This simplifies the implementation and reduces code size. -![Object/Lexicat environment structures](img/ecma_object.png) +![Object/Lexical environment structures](img/ecma_object.png) The objects are represented as following structure: diff --git a/docs/05.PORT-API.md b/docs/05.PORT-API.md index 976832cbb..10eca0a95 100644 --- a/docs/05.PORT-API.md +++ b/docs/05.PORT-API.md @@ -72,8 +72,8 @@ typedef enum void jerry_port_log (jerry_log_level_t level, const char *fmt, ...); ``` -The `jerry_port_print_char` is currenlty not used by the jerry-core directly. -However, it provides a port specifc way for `jerry-ext` components to print +The `jerry_port_print_char` is currently not used by the jerry-core directly. +However, it provides a port specific way for `jerry-ext` components to print information. ```c @@ -284,7 +284,7 @@ void jerry_port_print_char (char c) { putchar (c); -} /* jerr_port_print_char */ +} /* jerry_port_print_char */ ``` ## Date diff --git a/docs/08.CODING-STANDARDS.md b/docs/08.CODING-STANDARDS.md index c0bdb917f..df92e6928 100644 --- a/docs/08.CODING-STANDARDS.md +++ b/docs/08.CODING-STANDARDS.md @@ -46,7 +46,7 @@ is doing. /* not a complete sentence */ - /* A bad mulitiline + /* A bad multiline comment. */ ``` @@ -369,7 +369,7 @@ a = 6; b = 7; -/* No newlines are allowed between control staments +/* No newlines are allowed between control statements * and their code blocks. */ if (a > 6) @@ -419,7 +419,7 @@ a=b+c; a = b+c; a += c + ( d ); /* Introduce temporary variables or macros - * if the expression is too long. Occures rarely.. */ + * if the expression is too long. Occurs rarely.. */ a = b + c; if ( a + b > 0 ) diff --git a/docs/10.EXT-REFERENCE-HANDLER.md b/docs/10.EXT-REFERENCE-HANDLER.md index 9ff0aeea2..9484c5b56 100644 --- a/docs/10.EXT-REFERENCE-HANDLER.md +++ b/docs/10.EXT-REFERENCE-HANDLER.md @@ -141,7 +141,7 @@ jerryx_has_property_str (const jerry_value_t target_object, - `target_object` - object on which the property name is accessed - `name` - property name as an UTF-8 `char*` - return value - - true, if the given property name exsits on the object + - true, if the given property name exists on the object - false, if there is no such property name or there was an error accessing the property **Example** @@ -180,7 +180,7 @@ for this the following utility structures and methods are provided. Structure to define an array of properties with `name` and `value` fields which can be registered to a target object. -The engine must be initialied before specifying the `jerry_value_t` in the struct. +The engine must be initialized before specifying the `jerry_value_t` in the struct. **Prototype** @@ -209,7 +209,7 @@ successfully registered methods. This must be passed for the [jerryx_release_property_entry](#jerryx_release_property_entry) method after the property registration. -If any error occured during the property registration the `result` field of the structure +If any error occurred during the property registration the `result` field of the structure must be manually released after processing the error value. **Prototype** @@ -393,7 +393,7 @@ Release all `jerry_value_t` in a `jerryx_property_entry` array based on a previo and also the error value (if any) in the `jerryx_register_result` structure. In case of a successful registration it is safe to call this method. -After the method call the `ęntries` array should not be used as all values are released. +After the method call the `entries` array should not be used as all values are released. **Prototype** @@ -403,7 +403,7 @@ jerryx_release_property_entry (const jerryx_property_entry entries[], const jerryx_register_result register_result); ``` -- `entires` - array of [jerryx_property_entry](#jerryx_property_entry). +- `entries` - array of [jerryx_property_entry](#jerryx_property_entry). - `register_result` - result of a previous [jerryx_set_properties](#jerryx_set_properties) call. **Example** @@ -513,7 +513,7 @@ jerryx_handler_gc (const jerry_value_t func_obj_val, const jerry_value_t this_p, Provide a `print` implementation for scripts. The routine converts all of its arguments to strings and outputs them char-by-char using -`jerry_port_print_char`. The NUL character is output as "\u0000", +`jerry_port_print_char`. The NULL character is output as "\u0000", other characters are output bytewise. *Note*: This implementation does not use standard C `printf` to print its diff --git a/docs/12.EXT-REFERENCE-MODULE.md b/docs/12.EXT-REFERENCE-MODULE.md index d25af7c40..0a1056ddf 100644 --- a/docs/12.EXT-REFERENCE-MODULE.md +++ b/docs/12.EXT-REFERENCE-MODULE.md @@ -257,7 +257,7 @@ symbols so that they may be called explicitly from within the application. #define JERRYX_NATIVE_MODULE(module_name, on_resolve_cb) ``` -- `module_name` - the name of the module without quotes. This value is used as the prefix for the registration and unregistration funtions. For example, when `module_name` is `example_module`, this results in the declaration of two functions `example_module_register()` and `example_module_unregister()`. These functions are declared global if support for library constructors/destructors is absent, allowing you to call them from other parts of the code by +- `module_name` - the name of the module without quotes. This value is used as the prefix for the registration and unregistration functions. For example, when `module_name` is `example_module`, this results in the declaration of two functions `example_module_register()` and `example_module_unregister()`. These functions are declared global if support for library constructors/destructors is absent, allowing you to call them from other parts of the code by first forward-declaring them. - `on_resolve_cb` - the function of type `jerryx_native_module_on_resolve_t` that will be called when the module needs to be loaded. diff --git a/docs/13.DEBUGGER-TRANSPORT.md b/docs/13.DEBUGGER-TRANSPORT.md index de483067c..d4bf6e02d 100644 --- a/docs/13.DEBUGGER-TRANSPORT.md +++ b/docs/13.DEBUGGER-TRANSPORT.md @@ -100,7 +100,7 @@ typedef bool (*jerry_debugger_transport_receive_t) (struct jerry_debugger_transp **Summary** -Add a new interface to the transporation interface chain. The interface +Add a new interface to the transportation interface chain. The interface will be the first item of the interface chain. **Prototype** @@ -111,7 +111,7 @@ void jerry_debugger_transport_add (jerry_debugger_transport_header_t *header_p, size_t receive_message_header_size, size_t max_receive_message_size); ``` -- `header_p`: header of a transporation interface. +- `header_p`: header of a transportation interface. - `send_message_header_size`: size of the outgoing message header, can be 0. - `max_send_message_size`: maximum outgoing message size supported by the interface. - `receive_message_header_size`: size of the incoming message header, can be 0. diff --git a/docs/15.MODULE-SYSTEM.md b/docs/15.MODULE-SYSTEM.md index 1df02f0c1..978ee0514 100644 --- a/docs/15.MODULE-SYSTEM.md +++ b/docs/15.MODULE-SYSTEM.md @@ -7,7 +7,7 @@ Embedders wishing to use native builtin modules with ES6 imports can use the [Po ## General If a script contains import statements, then JerryScript will open and evaluate the the referenced modules before the main script runs, resolving and creating bindings for the referenced identifiers in the process. -It is not necessary to use any specific filename extensions for modules, JerryScript will try to open the given file paths as they are, but will try to normalize them before doing so. The exact normalization process is dependant on the port implementation provided. It is the user's responsibility to verify that the given files are valid EcmaScript modules. +It is not necessary to use any specific filename extensions for modules, JerryScript will try to open the given file paths as they are, but will try to normalize them before doing so. The exact normalization process is dependant on the port implementation provided. It is the user's responsibility to verify that the given files are valid ECMAScript modules. main.js @@ -76,7 +76,7 @@ export var version = "1.0 (e92ae0fb)"; ```js // module_2.js -var featureName = "EcmaScript modules"; +var featureName = "ECMAScript modules"; var year = 2018; export function getFeatureDetails() { @@ -86,7 +86,7 @@ export function getFeatureDetails() { ### Module namespace import statements -A module namespace object can be imported. In this case the local binding will contain an object holding the exported values of the module, including local exports and all indirect exports. Ambiguous exported names are exluded from the namespace object. +A module namespace object can be imported. In this case the local binding will contain an object holding the exported values of the module, including local exports and all indirect exports. Ambiguous exported names are excluded from the namespace object. ```js import * as module from './module.js'; diff --git a/docs/16.MIGRATION-GUIDE.md b/docs/16.MIGRATION-GUIDE.md index 03416e4b2..9c71d63a1 100644 --- a/docs/16.MIGRATION-GUIDE.md +++ b/docs/16.MIGRATION-GUIDE.md @@ -1,11 +1,11 @@ # Migration guide This guide intends to describe the major changes between the JerryScript 1.0 and 2.0 versions. -In addtion it is designed to provide a guide on how to modify the 1.0 version code to a +In addition it is designed to provide a guide on how to modify the 1.0 version code to a 2.0 compliant code. During the development it was important to minimize the changes in the API functions and types. -Each API method removal or chang is described below providing a ***before*** and ***after*** +Each API method removal or change is described below providing a ***before*** and ***after*** code example. For more information on the current API methods please check the [API reference](02.API-REFERENCE.md) document. @@ -53,7 +53,7 @@ For more information on the current API methods please check the [API reference] ## Error manipulating functions -The most important changes in the API are releated to error handling and manipulation. +The most important changes in the API are related to error handling and manipulation. ### jerry_value_set_abort_flag diff --git a/jerry-core/api/jerry.c b/jerry-core/api/jerry.c index 9eb0b6edc..6566e184a 100644 --- a/jerry-core/api/jerry.c +++ b/jerry-core/api/jerry.c @@ -4697,36 +4697,36 @@ jerry_object_get_property_names (const jerry_value_t obj_val, /**< object */ uint32_t index = ecma_string_get_array_index (key_p); /* Step 2. Filter by key type */ - if (filter & (JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS - | JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS - | JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES)) + if (filter & (JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS + | JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS + | JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES)) { if (ecma_is_value_symbol (key)) { - if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS) + if (filter & JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS) { continue; } } else if (index != ECMA_STRING_NOT_ARRAY_INDEX) { - if ((filter & JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES) - || ((filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS) + if ((filter & JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES) + || ((filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS) && !(filter & JERRY_PROPERTY_FILTER_INTEGER_INDICES_AS_NUMBER))) { continue; } } - else if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS) + else if (filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS) { continue; } } /* Step 3. Filter property attributes */ - if (filter & (JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE - | JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE - | JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE)) + if (filter & (JERRY_PROPERTY_FILTER_EXCLUDE_NON_CONFIGURABLE + | JERRY_PROPERTY_FILTER_EXCLUDE_NON_ENUMERABLE + | JERRY_PROPERTY_FILTER_EXCLUDE_NON_WRITABLE)) { ecma_property_descriptor_t prop_desc; ecma_value_t status = ecma_op_object_get_own_property_descriptor (obj_iter_p, key_p, &prop_desc); @@ -4746,11 +4746,11 @@ jerry_object_get_property_names (const jerry_value_t obj_val, /**< object */ ecma_free_property_descriptor (&prop_desc); if ((!(flags & JERRY_PROP_IS_CONFIGURABLE) - && (filter & JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE)) + && (filter & JERRY_PROPERTY_FILTER_EXCLUDE_NON_CONFIGURABLE)) || (!(flags & JERRY_PROP_IS_ENUMERABLE) - && (filter & JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE)) + && (filter & JERRY_PROPERTY_FILTER_EXCLUDE_NON_ENUMERABLE)) || (!(flags & JERRY_PROP_IS_WRITABLE) - && (filter & JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE))) + && (filter & JERRY_PROPERTY_FILTER_EXCLUDE_NON_WRITABLE))) { continue; } @@ -5949,7 +5949,7 @@ jerry_create_arraybuffer (const jerry_length_t size) /**< size of the backing st * * if the typed arrays are disabled this will return a TypeError. * * if the size is zero or buffer_p is a null pointer this will return an empty ArrayBuffer. * - * @return value of the newly construced array buffer object + * @return value of the newly constructed array buffer object */ jerry_value_t jerry_create_arraybuffer_external (const jerry_length_t size, /**< size of the buffer in bytes */ @@ -6035,7 +6035,7 @@ jerry_create_shared_arraybuffer (const jerry_length_t size) /**< size of the bac * * if the typed arrays are disabled this will return a TypeError. * * if the size is zero or buffer_p is a null pointer this will return an empty SharedArrayBuffer. * - * @return value of the newly construced shared array buffer object + * @return value of the newly constructed shared array buffer object */ jerry_value_t jerry_create_shared_arraybuffer_external (const jerry_length_t size, /**< size of the buffer in bytes */ diff --git a/jerry-core/ecma/base/ecma-module.c b/jerry-core/ecma/base/ecma-module.c index 59c86f69e..878e9a730 100644 --- a/jerry-core/ecma/base/ecma-module.c +++ b/jerry-core/ecma/base/ecma-module.c @@ -537,7 +537,7 @@ exit: /** * Evaluates an EcmaScript module. * - * @return ECMA_VALUE_ERROR - if an error occured + * @return ECMA_VALUE_ERROR - if an error occurred * ECMA_VALUE_EMPTY - otherwise */ ecma_value_t @@ -610,7 +610,7 @@ ecma_module_evaluate (ecma_module_t *module_p) /**< module */ * Resolves an export and adds it to the modules namespace object, if the export name is not yet handled. * Note: See 15.2.1.16.2 and 15.2.1.18 * - * @return ECMA_VALUE_ERROR - if an error occured + * @return ECMA_VALUE_ERROR - if an error occurred * ECMA_VALUE_EMPTY - otherwise */ static ecma_value_t @@ -713,7 +713,7 @@ ecma_module_heap_sort_shift_down (ecma_value_t *buffer_p, /**< array of items */ * Creates a namespace object for a module. * Note: See 15.2.1.18 * - * @return ECMA_VALUE_ERROR - if an error occured + * @return ECMA_VALUE_ERROR - if an error occurred * ECMA_VALUE_EMPTY - otherwise */ static ecma_value_t @@ -925,7 +925,7 @@ exit: /** * Connects imported values to the current module scope. * - * @return ECMA_VALUE_ERROR - if an error occured + * @return ECMA_VALUE_ERROR - if an error occurred * ECMA_VALUE_EMPTY - otherwise */ static ecma_value_t @@ -1043,7 +1043,7 @@ ecma_module_connect_imports (ecma_module_t *module_p) * Initialize the current module by creating the local binding for the imported variables * and verifying indirect exports. * - * @return ECMA_VALUE_ERROR - if an error occured + * @return ECMA_VALUE_ERROR - if an error occurred * ECMA_VALUE_EMPTY - otherwise */ ecma_value_t @@ -1108,7 +1108,7 @@ typedef struct ecma_module_stack_item_t /** * Link module dependencies * - * @return ECMA_VALUE_ERROR - if an error occured + * @return ECMA_VALUE_ERROR - if an error occurred * ECMA_VALUE_UNDEFINED - otherwise */ ecma_value_t diff --git a/jerry-core/ecma/base/ecma-property-hashmap.h b/jerry-core/ecma/base/ecma-property-hashmap.h index dd595716c..8aafd24c7 100644 --- a/jerry-core/ecma/base/ecma-property-hashmap.h +++ b/jerry-core/ecma/base/ecma-property-hashmap.h @@ -36,7 +36,7 @@ typedef struct ecma_property_header_t header; /**< header of the property */ uint32_t max_property_count; /**< maximum property count (power of 2) */ uint32_t null_count; /**< number of NULLs in the map */ - uint32_t unused_count; /**< number of unused entires in the map */ + uint32_t unused_count; /**< number of unused entries in the map */ /* * The hash is followed by max_property_count ecma_cpointer_t diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-json.c b/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-json.c index e1e2256d2..2f1fa927b 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-json.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-json.c @@ -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) diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.h b/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.h index 90aae7d95..08440fb4d 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-helpers.h @@ -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, diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-json.c b/jerry-core/ecma/builtin-objects/ecma-builtin-json.c index 8b4e3b072..ba71461ac 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-json.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-json.c @@ -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. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-object.c b/jerry-core/ecma/builtin-objects/ecma-builtin-object.c index 3df890db3..7d8a08a94 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-object.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-object.c @@ -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); diff --git a/jerry-core/ecma/builtin-objects/ecma-builtins.c b/jerry-core/ecma/builtin-objects/ecma-builtins.c index c4587c817..d95c111f9 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtins.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtins.c @@ -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]; diff --git a/jerry-core/ecma/operations/ecma-arguments-object.c b/jerry-core/ecma/operations/ecma-arguments-object.c index d9effe316..35339be78 100644 --- a/jerry-core/ecma/operations/ecma-arguments-object.c +++ b/jerry-core/ecma/operations/ecma-arguments-object.c @@ -411,7 +411,7 @@ ecma_op_arguments_object_list_lazy_property_names (ecma_object_t *obj_p, /**< ar uint32_t arguments_number = arguments_p->header.u.cls.u3.arguments_number; uint8_t flags = arguments_p->header.u.cls.u1.arguments_flags; - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES)) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES)) { ecma_value_t *argv_p = (ecma_value_t *) (arguments_p + 1); @@ -431,7 +431,7 @@ ecma_op_arguments_object_list_lazy_property_names (ecma_object_t *obj_p, /**< ar } } - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS)) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS)) { if (!(flags & ECMA_ARGUMENTS_OBJECT_LENGTH_INITIALIZED)) { @@ -455,7 +455,7 @@ ecma_op_arguments_object_list_lazy_property_names (ecma_object_t *obj_p, /**< ar } #if JERRY_ESNEXT - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS) && !(flags & ECMA_ARGUMENTS_OBJECT_ITERATOR_INITIALIZED)) { ecma_string_t *symbol_p = ecma_op_get_global_symbol (LIT_GLOBAL_SYMBOL_ITERATOR); diff --git a/jerry-core/ecma/operations/ecma-array-object.c b/jerry-core/ecma/operations/ecma-array-object.c index 5494a3e55..e52125c88 100644 --- a/jerry-core/ecma/operations/ecma-array-object.c +++ b/jerry-core/ecma/operations/ecma-array-object.c @@ -656,7 +656,7 @@ ecma_fast_array_object_own_property_keys (ecma_object_t *object_p, /**< fast acc ecma_collection_t *ret_p = ecma_new_collection (); - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES)) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES)) { ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p; uint32_t length = ext_obj_p->u.array.length; @@ -679,7 +679,7 @@ ecma_fast_array_object_own_property_keys (ecma_object_t *object_p, /**< fast acc } } - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS)) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS)) { ecma_collection_push_back (ret_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH)); } diff --git a/jerry-core/ecma/operations/ecma-function-object.c b/jerry-core/ecma/operations/ecma-function-object.c index 40cfd373a..7c34dc367 100644 --- a/jerry-core/ecma/operations/ecma-function-object.c +++ b/jerry-core/ecma/operations/ecma-function-object.c @@ -2165,7 +2165,7 @@ ecma_op_function_list_lazy_property_names (ecma_object_t *object_p, /**< functio ecma_property_counter_t *prop_counter_p, /**< property counters */ jerry_property_filter_t filter) /**< property name filter options */ { - if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS) + if (filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS) { return; } @@ -2239,7 +2239,7 @@ ecma_op_external_function_list_lazy_property_names (ecma_object_t *object_p, /** { JERRY_UNUSED (object_p); - if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS) + if (filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS) { return; } @@ -2262,7 +2262,7 @@ ecma_op_bound_function_list_lazy_property_names (ecma_object_t *object_p, /**< b ecma_property_counter_t *prop_counter_p, /**< property counters */ jerry_property_filter_t filter) /**< property name filter options */ { - if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS) + if (filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS) { return; } diff --git a/jerry-core/ecma/operations/ecma-objects.c b/jerry-core/ecma/operations/ecma-objects.c index cee9064a1..b9b6f3583 100644 --- a/jerry-core/ecma/operations/ecma-objects.c +++ b/jerry-core/ecma/operations/ecma-objects.c @@ -2146,7 +2146,7 @@ ecma_op_object_get_enumerable_property_names (ecma_object_t *obj_p, /**< routine ecma_enumerable_property_names_options_t option) /**< listing option */ { /* 2. */ - ecma_collection_t *prop_names_p = ecma_op_object_own_property_keys (obj_p, JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS); + ecma_collection_t *prop_names_p = ecma_op_object_own_property_keys (obj_p, JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS); #if JERRY_BUILTIN_PROXY if (JERRY_UNLIKELY (prop_names_p == NULL)) @@ -2309,7 +2309,7 @@ ecma_object_list_lazy_property_names (ecma_object_t *obj_p, /**< object */ } case ECMA_OBJECT_TYPE_ARRAY: { - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS)) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS)) { ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH)); prop_counter_p->string_named_props++; @@ -2479,20 +2479,20 @@ ecma_op_object_own_property_keys (ecma_object_t *obj_p, /**< object */ counter_prop_iter_cp = prop_iter_p->next_property_cp; } - if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES) + if (filter & JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES) { JERRY_ASSERT (prop_counter.array_index_named_props == 0); array_index_named_props = 0; } - if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS) + if (filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS) { JERRY_ASSERT (prop_counter.string_named_props == 0); string_named_props = 0; } #if JERRY_ESNEXT - if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS) + if (filter & JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS) { JERRY_ASSERT (prop_counter.symbol_named_props == 0); symbol_named_props = 0; @@ -2564,7 +2564,7 @@ ecma_op_object_own_property_keys (ecma_object_t *obj_p, /**< object */ if (ecma_string_get_array_index (name_p) != ECMA_STRING_NOT_ARRAY_INDEX) { - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES)) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES)) { *(--array_index_current_p) = ecma_make_string_value (name_p); continue; @@ -2573,7 +2573,7 @@ ecma_op_object_own_property_keys (ecma_object_t *obj_p, /**< object */ #if JERRY_ESNEXT else if (ecma_prop_name_is_symbol (name_p)) { - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS)) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS)) { *(--symbol_current_p) = ecma_make_symbol_value (name_p); continue; @@ -2582,7 +2582,7 @@ ecma_op_object_own_property_keys (ecma_object_t *obj_p, /**< object */ #endif /* JERRY_ESNEXT */ else { - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS)) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS)) { *(--string_current_p) = ecma_make_string_value (name_p); continue; @@ -2664,7 +2664,7 @@ ecma_op_object_enumerate (ecma_object_t *obj_p) /**< object */ while (true) { - ecma_collection_t *keys = ecma_op_object_own_property_keys (obj_p, JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS); + ecma_collection_t *keys = ecma_op_object_own_property_keys (obj_p, JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS); #if JERRY_ESNEXT if (JERRY_UNLIKELY (keys == NULL)) diff --git a/jerry-core/ecma/operations/ecma-promise-object.c b/jerry-core/ecma/operations/ecma-promise-object.c index b5d135d84..a1966dd63 100644 --- a/jerry-core/ecma/operations/ecma-promise-object.c +++ b/jerry-core/ecma/operations/ecma-promise-object.c @@ -1208,7 +1208,7 @@ ecma_promise_async_then (ecma_value_t promise, /**< promise object */ /** * Resolves the value and resume the execution of an async function after the resolve is completed * - * @return ECMA_VALUE_UNDEFINED if not error is occured, an error otherwise + * @return ECMA_VALUE_UNDEFINED if not error is occurred, an error otherwise */ ecma_value_t ecma_promise_async_await (ecma_extended_object_t *async_generator_object_p, /**< async generator function */ diff --git a/jerry-core/ecma/operations/ecma-reference.c b/jerry-core/ecma/operations/ecma-reference.c index ab8f8afb8..44cf03e36 100644 --- a/jerry-core/ecma/operations/ecma-reference.c +++ b/jerry-core/ecma/operations/ecma-reference.c @@ -36,7 +36,7 @@ * Resolve syntactic reference. * * @return ECMA_OBJECT_POINTER_ERROR - if the operation fails - * pointer to lexical environment - if the reference's base is resolved sucessfully, + * pointer to lexical environment - if the reference's base is resolved successfully, * NULL - otherwise. */ ecma_object_t * diff --git a/jerry-core/ecma/operations/ecma-string-object.c b/jerry-core/ecma/operations/ecma-string-object.c index 653e9ec0e..23f53a7bd 100644 --- a/jerry-core/ecma/operations/ecma-string-object.c +++ b/jerry-core/ecma/operations/ecma-string-object.c @@ -110,7 +110,7 @@ ecma_op_string_list_lazy_property_names (ecma_object_t *obj_p, /**< a String obj { JERRY_ASSERT (ecma_get_object_base_type (obj_p) == ECMA_OBJECT_BASE_TYPE_CLASS); - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES)) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES)) { ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p; JERRY_ASSERT (ext_object_p->u.cls.type == ECMA_OBJECT_CLASS_STRING); @@ -130,7 +130,7 @@ ecma_op_string_list_lazy_property_names (ecma_object_t *obj_p, /**< a String obj prop_counter_p->array_index_named_props += length; } - if (!(filter & JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS)) + if (!(filter & JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS)) { ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH)); prop_counter_p->string_named_props++; diff --git a/jerry-core/ecma/operations/ecma-typedarray-object.c b/jerry-core/ecma/operations/ecma-typedarray-object.c index 8e635a2e4..79245cb85 100644 --- a/jerry-core/ecma/operations/ecma-typedarray-object.c +++ b/jerry-core/ecma/operations/ecma-typedarray-object.c @@ -1862,7 +1862,7 @@ ecma_op_typedarray_list_lazy_property_names (ecma_object_t *obj_p, /**< a TypedA { JERRY_ASSERT (ecma_object_is_typedarray (obj_p)); - if (filter & JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES) + if (filter & JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES) { return; } diff --git a/jerry-core/include/jerryscript-core.h b/jerry-core/include/jerryscript-core.h index 6ee4532bc..2490cd807 100644 --- a/jerry-core/include/jerryscript-core.h +++ b/jerry-core/include/jerryscript-core.h @@ -285,9 +285,9 @@ void jerry_module_set_import_callback (jerry_module_import_callback_t callback_p jerry_value_t jerry_native_module_create (jerry_native_module_evaluate_callback_t callback, const jerry_value_t * const exports_p, size_t number_of_exports); -jerry_value_t jerry_native_module_get_export (const jerry_value_t native_mmodule_val, +jerry_value_t jerry_native_module_get_export (const jerry_value_t native_module_val, const jerry_value_t export_name_val); -jerry_value_t jerry_native_module_set_export (const jerry_value_t native_mmodule_val, +jerry_value_t jerry_native_module_set_export (const jerry_value_t native_module_val, const jerry_value_t export_name_val, const jerry_value_t value_to_set); diff --git a/jerry-core/include/jerryscript-types.h b/jerry-core/include/jerryscript-types.h index c17876b41..6b7e1e8e8 100644 --- a/jerry-core/include/jerryscript-types.h +++ b/jerry-core/include/jerryscript-types.h @@ -234,15 +234,15 @@ typedef enum * (equivalent to Reflect.ownKeys call) */ JERRY_PROPERTY_FILTER_TRAVERSE_PROTOTYPE_CHAIN = (1 << 0), /**< Include keys from the objects's * prototype chain as well */ - JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE = (1 << 1), /**< Exclude property key if + JERRY_PROPERTY_FILTER_EXCLUDE_NON_CONFIGURABLE = (1 << 1), /**< Exclude property key if * the property is non-configurable */ - JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE = (1 << 2), /**< Exclude property key if + JERRY_PROPERTY_FILTER_EXCLUDE_NON_ENUMERABLE = (1 << 2), /**< Exclude property key if * the property is non-enumerable */ - JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE = (1 << 3), /**< Exclude property key if + JERRY_PROPERTY_FILTER_EXCLUDE_NON_WRITABLE = (1 << 3), /**< Exclude property key if * the property is non-writable */ - JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS = (1 << 4), /**< Exclude property key if it is a string */ - JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS = (1 << 5), /**< Exclude property key if it is a symbol */ - JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES = (1 << 6), /**< Exclude property key if it is an integer index */ + JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS = (1 << 4), /**< Exclude property key if it is a string */ + JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS = (1 << 5), /**< Exclude property key if it is a symbol */ + JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES = (1 << 6), /**< Exclude property key if it is an integer index */ JERRY_PROPERTY_FILTER_INTEGER_INDICES_AS_NUMBER = (1 << 7), /**< By default integer index property keys are * converted to string. Enabling this flags keeps * integer index property keys as numbers. */ @@ -445,7 +445,7 @@ typedef enum } jerry_backtrace_frame_types_t; /** - * Location info retreived by jerry_backtrace_get_location. + * Location info retrieved by jerry_backtrace_get_location. */ typedef struct { @@ -534,7 +534,7 @@ typedef enum JERRY_FUNCTION_TYPE_GENERIC, /**< Generic JavaScript function */ JERRY_FUNCTION_TYPE_ACCESSOR, /**< Accessor function */ JERRY_FUNCTION_TYPE_BOUND, /**< Bound function */ - JERRY_FUNCTION_TYPE_ARROW, /**< Arrow fuction */ + JERRY_FUNCTION_TYPE_ARROW, /**< Arrow function */ JERRY_FUNCTION_TYPE_GENERATOR, /**< Generator function */ } jerry_function_type_t; @@ -562,7 +562,7 @@ typedef enum JERRY_MODULE_STATE_INVALID = 0, /**< return value for jerry_module_get_state when its argument is not a module */ JERRY_MODULE_STATE_UNLINKED = 1, /**< module is currently unlinked */ JERRY_MODULE_STATE_LINKING = 2, /**< module is currently being linked */ - JERRY_MODULE_STATE_LINKED = 3, /**< module has been linked (its depencencies has been resolved) */ + JERRY_MODULE_STATE_LINKED = 3, /**< module has been linked (its dependencies has been resolved) */ JERRY_MODULE_STATE_EVALUATING = 4, /**< module is currently being evaluated */ JERRY_MODULE_STATE_EVALUATED = 5, /**< module has been evaluated (its source code has been executed) */ JERRY_MODULE_STATE_ERROR = 6, /**< an error has been encountered before the evaluated state is reached */ diff --git a/jerry-core/parser/js/js-parser-statm.c b/jerry-core/parser/js/js-parser-statm.c index 46b403572..acedf39b9 100644 --- a/jerry-core/parser/js/js-parser-statm.c +++ b/jerry-core/parser/js/js-parser-statm.c @@ -3541,7 +3541,7 @@ consume_last_statement: } /* parser_parse_statements */ /** - * Free jumps stored on the stack if a parse error is occured. + * Free jumps stored on the stack if a parse error is occurred. */ void JERRY_ATTR_NOINLINE parser_free_jumps (parser_stack_iterator_t iterator) /**< iterator position */ diff --git a/jerry-core/parser/js/js-scanner-util.c b/jerry-core/parser/js/js-scanner-util.c index 63aecce22..ac2ecce59 100644 --- a/jerry-core/parser/js/js-scanner-util.c +++ b/jerry-core/parser/js/js-scanner-util.c @@ -1898,7 +1898,7 @@ scanner_reverse_info_list (parser_context_t *context_p) /**< context */ /** * Release unused scanner info blocks. - * This should happen only if an error is occured. + * This should happen only if an error is occurred. */ void scanner_cleanup (parser_context_t *context_p) /**< context */ diff --git a/jerry-core/profiles/README.md b/jerry-core/profiles/README.md index 0323dc482..d60c4c472 100644 --- a/jerry-core/profiles/README.md +++ b/jerry-core/profiles/README.md @@ -81,7 +81,7 @@ defined to `1`. Enables or disables the [String](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15.5) built-in. * `JERRY_BUILTINS`: Enables or disable all of the [Standard Built-in ECMAScript 5.1 Objects](http://www.ecma-international.org/ecma-262/5.1/index.html#sec-15) - This option is evaulated first, any other `JERRY_BUILTIN_` defines will override that specific builtin config. + This option is evaluated first, any other `JERRY_BUILTIN_` defines will override that specific builtin config. Equivalent with setting the following defines to the `JERRY_BUILTINS` value: * `JERRY_BUILTIN_ANNEXB` * `JERRY_BUILTIN_ARRAY` @@ -113,7 +113,7 @@ defined to `1`. * `JERRY_BUILTIN_REALMS`: Enables or disables the [Realms](https://262.ecma-international.org/11.0/#sec-code-realms) support in the engine. * `JERRY_BUILTIN_REFLECT`: - Enables or disables the [Reflext](https://262.ecma-international.org/11.0/#sec-reflect-object) built-in. + Enables or disables the [Reflect](https://262.ecma-international.org/11.0/#sec-reflect-object) built-in. * `JERRY_BUILTIN_TYPEDARRAY`: Enables or disables the [ArrayBuffer](http://www.ecma-international.org/ecma-262/6.0/#sec-arraybuffer-objects) and [TypedArray](http://www.ecma-international.org/ecma-262/6.0/#sec-typedarray-objects) built-ins. * `JERRY_BUILTIN_WEAKREF`: @@ -142,7 +142,7 @@ defined to `1`. * [template strings](http://www.ecma-international.org/ecma-262/6.0/#sec-static-semantics-templatestrings) language element. Furthermore all builtins follow the latest ECMAScript specification including those which behave differently in ES5.1. - This option is evaulated first, any other `JERRY_` defines will override that specific entry. + This option is evaluated first, any other `JERRY_` defines will override that specific entry. Equivalent with setting the following defines to the `JERRY_ESNEXT` value: * `JERRY_BUILTIN_BIGINT` * `JERRY_BUILTIN_CONTAINER` diff --git a/jerry-ext/include/jerryscript-ext/handler.h b/jerry-ext/include/jerryscript-ext/handler.h index e1c217379..c9bd72b57 100644 --- a/jerry-ext/include/jerryscript-ext/handler.h +++ b/jerry-ext/include/jerryscript-ext/handler.h @@ -72,7 +72,7 @@ typedef struct */ typedef struct { - jerry_value_t result; /**< result of property registraion (undefined or error object) */ + jerry_value_t result; /**< result of property registration (undefined or error object) */ uint32_t registered; /**< number of successfully registered methods */ } jerryx_register_result; diff --git a/jerry-main/cli.h b/jerry-main/cli.h index 256aa2b2d..2e2e18a01 100644 --- a/jerry-main/cli.h +++ b/jerry-main/cli.h @@ -38,7 +38,7 @@ typedef struct /** * Returned by cli_consume_option () when no more options are available - * or an error occured. + * or an error occurred. */ #define CLI_OPT_END -2 diff --git a/targets/curie_bsp/README.md b/targets/curie_bsp/README.md index 8e1e70ab8..967782a75 100644 --- a/targets/curie_bsp/README.md +++ b/targets/curie_bsp/README.md @@ -6,7 +6,7 @@ This folder contains necessary files to integrate JerryScript with Intel® Curie ### How to build #### 1. Preface -Curie BSP only support Ubuntu GNU/Linux as host OS envirenment. +Curie BSP only support Ubuntu GNU/Linux as host OS environment. Necessary hardwares * [FlySwatter2 JTAG debugger](https://www.tincantools.com/wiki/Flyswatter2) @@ -117,4 +117,4 @@ undefined js e 1 OK ``` -`js e 1 ACK` and `js e 1 OK` are debug info of Curie BSP uart commands, which mean it receive and execute the command sucessfully. `Hello World!` is the printed content. `undefined` is the return value of the statement `print ('Hello World!')`. +`js e 1 ACK` and `js e 1 OK` are debug info of Curie BSP uart commands, which mean it receive and execute the command successfully. `Hello World!` is the printed content. `undefined` is the return value of the statement `print ('Hello World!')`. diff --git a/targets/esp-idf/README.md b/targets/esp-idf/README.md index a61b85f7d..2b4d385cf 100644 --- a/targets/esp-idf/README.md +++ b/targets/esp-idf/README.md @@ -4,9 +4,9 @@ This is a port for espressif's esp-idf (esp32). The MATH, LTO and STRIP options python tools\build.py --toolchain=cmake/toolchain-esp32.cmake --cmake-param "-GUnix Makefiles" --jerry-cmdline=OFF --jerry-port-default=OFF --lto=OFF --strip=OFF ``` -NB: the MATH, STRIP and LTO might be disabled by platform as well. I strongly suggest limiting heap memorry with '--mem-heap=128' but that really depends on the SRAM avaiulable on your esp32. +NB: the MATH, STRIP and LTO might be disabled by platform as well. I strongly suggest limiting heap memory with '--mem-heap=128' but that really depends on the SRAM available on your esp32. -Then copy the artefacts 'build/lib/\*.a' in an esp-idf component named 'jerryscript' (eg) and use a 'CMakeLists.txt' like this one +Then copy the artifacts 'build/lib/\*.a' in an esp-idf component named 'jerryscript' (eg) and use a 'CMakeLists.txt' like this one ``` # assumes there is a component with this the following diff --git a/targets/openwrt/readme.md b/targets/openwrt/readme.md index f51bbc080..60a342fba 100644 --- a/targets/openwrt/readme.md +++ b/targets/openwrt/readme.md @@ -8,7 +8,7 @@ modifications to this document could be required. IMPORTANT! As the TP-Link WR1043ND is a mips based device and mips is a big-endian -architecture a JerryScipt snapshot which was built on an little-endian +architecture a JerryScript snapshot which was built on an little-endian system will not work correctly. Thus it is advised that the snapshot functionally should be used with caution, that is DO NOT run snapshots generated on little-endian system(s) on diff --git a/targets/zephyr/README.md b/targets/zephyr/README.md index 049ed1f08..8e52f016f 100644 --- a/targets/zephyr/README.md +++ b/targets/zephyr/README.md @@ -39,7 +39,7 @@ If you just start with Zephyr, you may want to follow "Building a Sample Application" section in the doc above and check that you can flash your target board. -Remember to source the Zephyr environment as explained in the zephyr documenation: +Remember to source the Zephyr environment as explained in the zephyr documentation: ``` cd zephyr-project @@ -71,7 +71,7 @@ Below, we build for NXP FRDM-K64F board (`frdm_k64f` Zephyr board identifier). Building for other boards is similar. You are expected to read [Supported Boards](https://docs.zephyrproject.org/latest/boards/index.html) section in the Zephyr documentation for more information about -Zephyr's support for a particilar board, means to flash binaries, +Zephyr's support for a particular board, means to flash binaries, etc. ``` diff --git a/tests/test262-es6-excludelist.xml b/tests/test262-es6-excludelist.xml index 52c784426..0b02934d0 100644 --- a/tests/test262-es6-excludelist.xml +++ b/tests/test262-es6-excludelist.xml @@ -331,8 +331,8 @@ ES11: arguments object no longer has caller property ES11+: ProxyCreate does not check Proxy handler and target. ES11+: ProxyCreate does not check Proxy handler and target. - Outdated test, anonymous funtions should now have a name property - Outdated test, anonymous funtions should now have a name property - Outdated test, anonymous funtions should now have a name property - Outdated test, anonymous funtions should now have a name property + Outdated test, anonymous functions should now have a name property + Outdated test, anonymous functions should now have a name property + Outdated test, anonymous functions should now have a name property + Outdated test, anonymous functions should now have a name property diff --git a/tests/unit-core/test-api-object-property-names.c b/tests/unit-core/test-api-object-property-names.c index ea124cb5c..0f9a98f3b 100644 --- a/tests/unit-core/test-api-object-property-names.c +++ b/tests/unit-core/test-api-object-property-names.c @@ -114,7 +114,7 @@ main (void) // Test enumerable - non-enumerable filter define_property (test_object, prop_names[2], &prop_desc, false); names = jerry_object_get_property_names (test_object, - JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE); + JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXCLUDE_NON_ENUMERABLE); TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 2); jerry_release_value (names); names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL); @@ -127,7 +127,7 @@ main (void) prop_desc.flags &= (uint16_t) ~JERRY_PROP_IS_CONFIGURABLE; define_property (test_object, prop_names[3], &prop_desc, false); names = jerry_object_get_property_names (test_object, - JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE); + JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXCLUDE_NON_CONFIGURABLE); TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 3); jerry_release_value (names); names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL); @@ -140,7 +140,7 @@ main (void) prop_desc.flags &= (uint16_t) ~JERRY_PROP_IS_WRITABLE; define_property (test_object, prop_names[4], &prop_desc, false); names = jerry_object_get_property_names (test_object, - JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE); + JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXCLUDE_NON_WRITABLE); TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 4); jerry_release_value (names); names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL); @@ -164,13 +164,13 @@ main (void) // Test number and string index exclusion define_property (test_object, prop_names[5], &prop_desc, false); names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL - | JERRY_PROPERTY_FILTER_EXLCUDE_STRINGS + | JERRY_PROPERTY_FILTER_EXCLUDE_STRINGS | JERRY_PROPERTY_FILTER_INTEGER_INDICES_AS_NUMBER); TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 1); compare_prop_name (names, prop_names[5], 0); jerry_release_value (names); names = jerry_object_get_property_names (test_object, - JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXLCUDE_INTEGER_INDICES); + JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXCLUDE_INTEGER_INDICES); TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 5); jerry_release_value (names); @@ -186,7 +186,7 @@ main (void) // Test symbol exclusion define_property (test_object, prop_names[6], &prop_desc, true); names = jerry_object_get_property_names (test_object, - JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXLCUDE_SYMBOLS); + JERRY_PROPERTY_FILTER_ALL | JERRY_PROPERTY_FILTER_EXCLUDE_SYMBOLS); TEST_ASSERT (jerry_get_array_length (names) == (uint32_t) 6); jerry_release_value (names); names = jerry_object_get_property_names (test_object, JERRY_PROPERTY_FILTER_ALL);