]> git.kaiwu.me - njs.git/log
njs.git
6 years agoFixed memory-leak introduced in b840b7af946e.
Dmitry Volyntsev [Thu, 16 Jan 2020 16:18:41 +0000 (19:18 +0300)]
Fixed memory-leak introduced in b840b7af946e.

6 years agoHTTP: introduced promise support in r.subrequest().
Dmitry Volyntsev [Thu, 16 Jan 2020 16:18:39 +0000 (19:18 +0300)]
HTTP: introduced promise support in r.subrequest().

If callback is not provided r.subrequest() returns an ordinary
Promise object that resolves to subrequest response object.

6 years agoAdded support for typed-arrays in String.bytesFrom().
Dmitry Volyntsev [Thu, 16 Jan 2020 12:14:38 +0000 (15:14 +0300)]
Added support for typed-arrays in String.bytesFrom().

6 years agoIntroduced "global" and "globalThis" aliases to the global object.
Dmitry Volyntsev [Tue, 14 Jan 2020 13:52:42 +0000 (16:52 +0300)]
Introduced "global" and "globalThis" aliases to the global object.

6 years agoRefactored njs_benchmark.
Dmitry Volyntsev [Mon, 13 Jan 2020 18:35:15 +0000 (21:35 +0300)]
Refactored njs_benchmark.

6 years agoRemoved dead store assignments.
Dmitry Volyntsev [Thu, 9 Jan 2020 12:55:05 +0000 (15:55 +0300)]
Removed dead store assignments.

Found by Clang static analyzer.

6 years agoFixed integer overflow in njs_typed_array_constructor().
Dmitry Volyntsev [Thu, 9 Jan 2020 12:54:52 +0000 (15:54 +0300)]
Fixed integer overflow in njs_typed_array_constructor().

Found by Coverity (CID 1457371).

6 years agoRemoved dead code in njs_typed_array_get() after 1c3c593cc3fd.
Dmitry Volyntsev [Thu, 9 Jan 2020 12:54:16 +0000 (15:54 +0300)]
Removed dead code in njs_typed_array_get() after 1c3c593cc3fd.

Found by Coverity (CID 1457372).

6 years agoFixed typo introduced in 61bf7a31e685.
Alexander Borisov [Thu, 9 Jan 2020 12:21:08 +0000 (15:21 +0300)]
Fixed typo introduced in 61bf7a31e685.

Found by Coverity (CIDs 14573701457369).

6 years agoFixed "length" may be uninitialized in njs_typed_array_constructor().
Dmitry Volyntsev [Fri, 27 Dec 2019 16:17:26 +0000 (19:17 +0300)]
Fixed "length" may be uninitialized in njs_typed_array_constructor().

Found by Clang static analyzer.

6 years agoFixed njs_vm_handle_events().
Alexander Borisov [Thu, 26 Dec 2019 12:31:54 +0000 (15:31 +0300)]
Fixed njs_vm_handle_events().

Fixed typo introduced in 61bf7a31e685. Event loop is expected to process two
queues: posted events and promise events according to the spec. The "do while"
loop was introduced to handle possible promise events which may appear as
a result of posted events processing. The loop termination condition should
check for emptyness of promise events queue, because posted events can only be
created outside the loop (externally).

6 years agoShell: stopping events handling for uncaught exception in file mode.
Dmitry Volyntsev [Thu, 26 Dec 2019 11:53:52 +0000 (14:53 +0300)]
Shell: stopping events handling for uncaught exception in file mode.

This closes #269 issue on Github.

6 years agoFixed import segfault.
hongzhidao [Fri, 13 Dec 2019 04:47:37 +0000 (12:47 +0800)]
Fixed import segfault.

This closes #274 issue on Github.

6 years agoIntroduced TypedArray objects.
Dmitry Volyntsev [Wed, 25 Dec 2019 12:59:01 +0000 (15:59 +0300)]
Introduced TypedArray objects.

Added the global constructors:
  Uint8Array, Int8Array, Uint8ClampedArray, Uint16Array, Int16Array,
  Uint32Array, Int32Array, Float32Array, Float64Array.

Implemented:
    - TypedArray(),
    - TypedArray(length),
    - TypedArray(buffer, [start, [end]]),
    - TypedArray(object),
    - TypedArray(typedarray),
    - TypedArray.BYTES_PER_ELEMENT.

    - %TypedArray%.prototype.constructor
    - get %TypedArray%.prototype.buffer
    - get %TypedArray%.prototype.byteLength
    - get %TypedArray%.prototype.byteOffset
    - get %TypedArray%.prototype.length
    - %TypedArray%.prototype[@@toStringTag]
    - %TypedArray%.prototype.set(array [, start])
    - %TypedArray%.prototype.slice([start, [end]])
    - %TypedArray%.prototype.toString()
    - %TypedArray%.prototype.join(separator)
    - %TypedArray%.prototype.fill().

In collaboration with Tiago Natel de Moura.

This closes #264 issue on Github.

6 years agoShell: fixed output of large values for last evaluated expression.
Dmitry Volyntsev [Tue, 17 Dec 2019 15:22:50 +0000 (18:22 +0300)]
Shell: fixed output of large values for last evaluated expression.

6 years agoIntroduced the Promise object.
Alexander Borisov [Tue, 17 Dec 2019 07:35:11 +0000 (10:35 +0300)]
Introduced the Promise object.

Implemented according to the specification without: Promise.all(),
Promise.allSettled(), Promise.race().

This closes #39 issue on GitHub.

6 years agoFixed stack-use-after-free in njs_value_property_set().
Dmitry Volyntsev [Mon, 16 Dec 2019 12:18:51 +0000 (15:18 +0300)]
Fixed stack-use-after-free in njs_value_property_set().

6 years agoFixed Array.prototype.join().
Dmitry Volyntsev [Mon, 16 Dec 2019 12:18:51 +0000 (15:18 +0300)]
Fixed Array.prototype.join().

Resulting string length of Array.prototype.join() was invalid
when joined values are not strings.

The issue was introduced in 5bf71dfc052f.

6 years agoIntroduced nullish coalescing operator.
Valentin Bartenev [Thu, 12 Dec 2019 15:50:27 +0000 (18:50 +0300)]
Introduced nullish coalescing operator.

6 years agoRefactored Array.prototype.join() using njs_chb_t API.
Dmitry Volyntsev [Wed, 11 Dec 2019 12:58:05 +0000 (15:58 +0300)]
Refactored Array.prototype.join() using njs_chb_t API.

6 years agoIntroduced generic string builder API.
Dmitry Volyntsev [Wed, 11 Dec 2019 12:30:26 +0000 (15:30 +0300)]
Introduced generic string builder API.

6 years agoIntroduced the ArrayBuffer object.
Tiago Natel de Moura [Wed, 27 Nov 2019 14:02:04 +0000 (14:02 +0000)]
Introduced the ArrayBuffer object.

6 years agoImproved object type initialization structure.
Dmitry Volyntsev [Fri, 6 Dec 2019 11:59:48 +0000 (14:59 +0300)]
Improved object type initialization structure.

Allowing predefine magic argument for a type constructor.
This allows to write generic constructor functions.

6 years agoIntroduced ToIndex() conversion primitive from the spec.
Dmitry Volyntsev [Fri, 6 Dec 2019 11:44:54 +0000 (14:44 +0300)]
Introduced ToIndex() conversion primitive from the spec.

6 years agoFixed RegExp() instance properties.
Dmitry Volyntsev [Fri, 6 Dec 2019 11:44:11 +0000 (14:44 +0300)]
Fixed RegExp() instance properties.

1) "lastIndex" is the only own property descriptor.
2) "lastIndex" property descriptor is writable.
3) "lastIndex" is coersed to integer in RegExpBuiltinExec() and
   can be any value (not only positive integers).

6 years agoAdded njs_is_memory_error() function.
Alexander Borisov [Tue, 3 Dec 2019 15:02:40 +0000 (18:02 +0300)]
Added njs_is_memory_error() function.

6 years agoFixed typo introduced in 904333a40816.
Alexander Borisov [Tue, 3 Dec 2019 14:58:30 +0000 (17:58 +0300)]
Fixed typo introduced in 904333a40816.

6 years agoIntroduced SpeciesConstructor() from the specification.
Alexander Borisov [Tue, 3 Dec 2019 14:13:34 +0000 (17:13 +0300)]
Introduced SpeciesConstructor() from the specification.

6 years agoStyle.
Alexander Borisov [Tue, 3 Dec 2019 13:44:03 +0000 (16:44 +0300)]
Style.

6 years agoShell: fixed memory leak when empty line is entered.
Alexander Borisov [Tue, 3 Dec 2019 13:43:04 +0000 (16:43 +0300)]
Shell: fixed memory leak when empty line is entered.

6 years agoFixed Number.prototype.toString(radix).
Dmitry Volyntsev [Tue, 3 Dec 2019 11:59:26 +0000 (14:59 +0300)]
Fixed Number.prototype.toString(radix).

Fixed buffer-overflow in Number.prototype.toString(radix) when
fraction == delta == 0. The last comparison might by true for very
small numbers (denormals) around zero when fast-math mode is enabled.

The issue was introduced in 5f0812d53158.

6 years agoAdded Object.setPrototypeOf().
Artem S. Povalyukhin [Fri, 29 Nov 2019 09:53:33 +0000 (12:53 +0300)]
Added Object.setPrototypeOf().

This closes #265 issue on Github.

6 years agoMaking backtrace a property of a thrown exception.
Dmitry Volyntsev [Fri, 29 Nov 2019 14:11:11 +0000 (17:11 +0300)]
Making backtrace a property of a thrown exception.

6 years agoImproved Object.create().
Artem S. Povalyukhin [Thu, 28 Nov 2019 10:25:00 +0000 (13:25 +0300)]
Improved Object.create().

This closes #261 issue on Github.

6 years agoAdded Object.is().
Artem S. Povalyukhin [Thu, 28 Nov 2019 06:59:10 +0000 (09:59 +0300)]
Added Object.is().

This closes #260 issue on Github.

6 years agoFixed TypeError message in ValidateAndApplyPropertyDescriptor().
Dmitry Volyntsev [Wed, 27 Nov 2019 15:28:13 +0000 (18:28 +0300)]
Fixed TypeError message in ValidateAndApplyPropertyDescriptor().

For Symbol key when object is not extensible.

6 years agoImproved Array.prototype.includes().
Dmitry Volyntsev [Wed, 27 Nov 2019 13:51:29 +0000 (16:51 +0300)]
Improved Array.prototype.includes().

6 years agoFixed Object.defineProperties() according to the specification.
Dmitry Volyntsev [Wed, 27 Nov 2019 12:48:32 +0000 (15:48 +0300)]
Fixed Object.defineProperties() according to the specification.

This closes #210 issue on Github.

6 years agoChecking extensible flag in ValidateAndApplyPropertyDescriptor().
Dmitry Volyntsev [Wed, 27 Nov 2019 12:40:44 +0000 (15:40 +0300)]
Checking extensible flag in ValidateAndApplyPropertyDescriptor().

6 years agoIntroduced specification primitives SameValue(), SameValueZero().
Dmitry Volyntsev [Wed, 27 Nov 2019 11:36:04 +0000 (14:36 +0300)]
Introduced specification primitives SameValue(), SameValueZero().

6 years agoFixed JSON.stringify() and njs.dump() allocation error handling.
Dmitry Volyntsev [Tue, 26 Nov 2019 15:44:11 +0000 (18:44 +0300)]
Fixed JSON.stringify() and njs.dump() allocation error handling.

Previously, the return value of njs_json_buf_append() was not
verified in some places.

Found by Coverity (CID 1456031).

6 years agoFixed operator "in" according to the specification.
Artem S. Povalyukhin [Tue, 26 Nov 2019 10:22:09 +0000 (13:22 +0300)]
Fixed operator "in" according to the specification.

6 years agoInteractive shell: introduced global print() alias to console.log().
Dmitry Volyntsev [Tue, 26 Nov 2019 12:11:40 +0000 (15:11 +0300)]
Interactive shell: introduced global print() alias to console.log().

6 years agoIntroduced njs_vm_bind().
Dmitry Volyntsev [Tue, 26 Nov 2019 12:09:45 +0000 (15:09 +0300)]
Introduced njs_vm_bind().

This is a generic replacement for njs_vm_external_bind().

6 years agoFixed "accumulative" mode of VM.
Dmitry Volyntsev [Tue, 26 Nov 2019 12:01:02 +0000 (15:01 +0300)]
Fixed "accumulative" mode of VM.

The issue was introduced in 452ce96df2e3.

This closes #258 issue on Github.

6 years agoHTTP: improved r.parent property handler.
Dmitry Volyntsev [Mon, 25 Nov 2019 14:54:58 +0000 (17:54 +0300)]
HTTP: improved r.parent property handler.

Previously, r.parent handler threw an exception if it was called not for
a subrequest.  This is too restrictive, as it prevents any iterations
over all r properties (for example: JSON.stringify()).

Instead, "undefined" value is returned as it is already done for
r.requestBody when request body is unavailable.

6 years agoFixed njs.dump() for objects with NJS_PROPERTY_HANDLER props.
Dmitry Volyntsev [Mon, 25 Nov 2019 14:53:32 +0000 (17:53 +0300)]
Fixed njs.dump() for objects with NJS_PROPERTY_HANDLER props.

6 years agoAdded externals support in JSON.stringify().
Dmitry Volyntsev [Mon, 25 Nov 2019 14:53:19 +0000 (17:53 +0300)]
Added externals support in JSON.stringify().

6 years agoPass unprintable values to JSON.stringify() replacer function.
Artem S. Povalyukhin [Sat, 23 Nov 2019 09:52:06 +0000 (12:52 +0300)]
Pass unprintable values to JSON.stringify() replacer function.

This closes #257 issue on Github.

6 years agoFixed handling of Symbol values in JSON.stringify().
Artem S. Povalyukhin [Fri, 22 Nov 2019 22:02:04 +0000 (01:02 +0300)]
Fixed handling of Symbol values in JSON.stringify().

6 years agoFixed Object.prototype.valueOf() according to the specification.
Artem S. Povalyukhin [Fri, 22 Nov 2019 21:09:26 +0000 (00:09 +0300)]
Fixed Object.prototype.valueOf() according to the specification.

This closes #256 issue on Github.

6 years agoIntroduced Symbol.toStringTag support for builtin objects.
Dmitry Volyntsev [Fri, 22 Nov 2019 16:03:23 +0000 (19:03 +0300)]
Introduced Symbol.toStringTag support for builtin objects.

This closes #255 issue on Github.

6 years agoFixed typo in njs_string_prototype_pad().
Artem S. Povalyukhin [Fri, 22 Nov 2019 08:02:55 +0000 (11:02 +0300)]
Fixed typo in njs_string_prototype_pad().

The typo was introduced in 47cdd4680fc2.

This closes #253 issue on Github.

6 years agoFixed hash collision for empty string key.
Artem S. Povalyukhin [Thu, 21 Nov 2019 19:31:14 +0000 (22:31 +0300)]
Fixed hash collision for empty string key.

The issue was introduced in 10a19a2e1d4f.

6 years agoAdded Symbol support for builtin operations.
Dmitry Volyntsev [Thu, 21 Nov 2019 17:56:06 +0000 (20:56 +0300)]
Added Symbol support for builtin operations.

1) object property get/set, object literals.
2) Added Object.getOwnPropertySymbols().
3) Extended to support Symbol: Object.getOwnPropertyNames(),
   Object.keys(), Object.defineProperty(), Object.defineProperties(),
   Object.getOwnPropertyDescriptor(),
   Object.getOwnPropertyDescriptors().

6 years agoAdded initial version of Symbol primitive type.
Artem S. Povalyukhin [Tue, 19 Nov 2019 17:45:22 +0000 (20:45 +0300)]
Added initial version of Symbol primitive type.

This closes #249 issue on Github.

6 years agoIntroduced njs_fuzzer target.
Dmitry Volyntsev [Tue, 19 Nov 2019 16:32:26 +0000 (19:32 +0300)]
Introduced njs_fuzzer target.

6 years agoFixed handling of "init" flag in njs_vm_create().
Dmitry Volyntsev [Tue, 19 Nov 2019 16:19:53 +0000 (19:19 +0300)]
Fixed handling of "init" flag in njs_vm_create().

6 years agoFixed Object.getPrototypeOf() according to the specification.
Artem S. Povalyukhin [Tue, 19 Nov 2019 14:22:53 +0000 (17:22 +0300)]
Fixed Object.getPrototypeOf() according to the specification.

This closes #252 issue on Github.

6 years agoDetecting standard data types in configure script.
Dmitry Volyntsev [Tue, 19 Nov 2019 16:17:09 +0000 (19:17 +0300)]
Detecting standard data types in configure script.

6 years agoVersion bump.
Dmitry Volyntsev [Tue, 19 Nov 2019 16:17:06 +0000 (19:17 +0300)]
Version bump.

6 years agoAdded tag 0.3.7 for changeset 9e5ef927c7ea
Dmitry Volyntsev [Tue, 19 Nov 2019 12:35:55 +0000 (15:35 +0300)]
Added tag 0.3.7 for changeset 9e5ef927c7ea

6 years agoVersion 0.3.7. 0.3.7
Dmitry Volyntsev [Tue, 19 Nov 2019 12:35:24 +0000 (15:35 +0300)]
Version 0.3.7.

6 years agoReimplemented "bound" functions according to specification.
Dmitry Volyntsev [Thu, 14 Nov 2019 18:06:48 +0000 (21:06 +0300)]
Reimplemented "bound" functions according to specification.

This closes #202 and closes #204 issues on Github.

6 years agoSetting optimization level to "-O0" when debug option is enabled.
Dmitry Volyntsev [Thu, 14 Nov 2019 18:01:28 +0000 (21:01 +0300)]
Setting optimization level to "-O0" when debug option is enabled.

6 years agoAdded support for labels in console.time().
Artem S. Povalyukhin [Tue, 12 Nov 2019 13:07:42 +0000 (16:07 +0300)]
Added support for labels in console.time().

This closes #248 issue on Github.

6 years agoAdded extra configure options for debug builds.
Dmitry Volyntsev [Wed, 13 Nov 2019 15:27:06 +0000 (18:27 +0300)]
Added extra configure options for debug builds.

6 years agoFixed potential NULL-pointer dereference (CID 1455631).
Dmitry Volyntsev [Wed, 13 Nov 2019 12:31:41 +0000 (15:31 +0300)]
Fixed potential NULL-pointer dereference (CID 1455631).

6 years agoRefactored JSON methods.
Dmitry Volyntsev [Wed, 13 Nov 2019 12:19:49 +0000 (15:19 +0300)]
Refactored JSON methods.

Before 540f03725df2 the parse/stringify methods had to store
their local context in dynamic memory because each JS
function invocation interrupted them.  Since JS function calls
are synchronous now the code can be greatly simplified.

6 years agoAvoiding dynamic allocation in JSON methods.
Dmitry Volyntsev [Tue, 12 Nov 2019 12:09:48 +0000 (15:09 +0300)]
Avoiding dynamic allocation in JSON methods.

Before 540f03725df2 the parse/stringify state had to be allocated
from dynamic memory because function calls to JS functions were
asynchronous.

6 years agoFixed Math.round() according to the specification.
Artem S. Povalyukhin [Sat, 9 Nov 2019 22:35:02 +0000 (01:35 +0300)]
Fixed Math.round() according to the specification.

This closes #246 issue on Github.

6 years agoFixed handling of NaN and -0 arguments in Math.min(), Math.max().
Artem S. Povalyukhin [Thu, 31 Oct 2019 19:18:41 +0000 (22:18 +0300)]
Fixed handling of NaN and -0 arguments in Math.min(), Math.max().

This closes #241 issue on Github.

6 years agoFixed a dead store.
Dmitry Volyntsev [Mon, 11 Nov 2019 12:37:39 +0000 (15:37 +0300)]
Fixed a dead store.

Found by Clang static analyzer.

6 years agoFixed sharing of externals between main and cloned VMs.
Dmitry Volyntsev [Mon, 11 Nov 2019 12:37:08 +0000 (15:37 +0300)]
Fixed sharing of externals between main and cloned VMs.

The issue was introduced in 7e7d0dac4572.

This closes #245 issue on Github.

6 years agoStyle.
Dmitry Volyntsev [Fri, 8 Nov 2019 17:33:46 +0000 (20:33 +0300)]
Style.

6 years agoUnifying Date.prototype.*ToString() function into single handler.
Dmitry Volyntsev [Fri, 8 Nov 2019 13:29:34 +0000 (16:29 +0300)]
Unifying Date.prototype.*ToString() function into single handler.

6 years agoRefactored working with Date object.
Dmitry Volyntsev [Fri, 8 Nov 2019 13:29:29 +0000 (16:29 +0300)]
Refactored working with Date object.

1) Replacing gmtime_r() and localtime_r() with builtin function.
2) Custom getters and setters for each field (like hours, minutes,
   seconds) are replaced with generic functions.

6 years agoPassing to native function additional magic argument.
Dmitry Volyntsev [Fri, 8 Nov 2019 13:29:24 +0000 (16:29 +0300)]
Passing to native function additional magic argument.

This allows to make more generic function handlers.

6 years agoAdded arguments validation for configure script.
Dmitry Volyntsev [Tue, 5 Nov 2019 17:49:57 +0000 (20:49 +0300)]
Added arguments validation for configure script.

6 years agoAdded explanation for why njs CLI cannot be built.
Dmitry Volyntsev [Tue, 5 Nov 2019 17:49:56 +0000 (20:49 +0300)]
Added explanation for why njs CLI cannot be built.

6 years agoauto/cc cleanup.
Dmitry Volyntsev [Tue, 5 Nov 2019 17:49:56 +0000 (20:49 +0300)]
auto/cc cleanup.

6 years agoAdded implementation of Array.prototype.copyWithin().
Alexander Borisov [Tue, 5 Nov 2019 17:24:48 +0000 (20:24 +0300)]
Added implementation of Array.prototype.copyWithin().

6 years agoAdded Object.assign().
Alexander Mazyrin [Sat, 12 Oct 2019 13:23:25 +0000 (16:23 +0300)]
Added Object.assign().

6 years agoFixed "Date" object string formatting.
Dmitry Volyntsev [Fri, 1 Nov 2019 16:26:42 +0000 (19:26 +0300)]
Fixed "Date" object string formatting.

1) Getting rid of strftime() as it is locale dependent
    whereas output should always be in english.

2) Unifying all formatters in a single function.

6 years agoMaking custom top-level objects enumerable.
Dmitry Volyntsev [Fri, 1 Nov 2019 13:02:21 +0000 (16:02 +0300)]
Making custom top-level objects enumerable.

6 years agoFixed typo introduced in c75a8fc6d534.
Dmitry Volyntsev [Fri, 1 Nov 2019 12:48:21 +0000 (15:48 +0300)]
Fixed typo introduced in c75a8fc6d534.

This closes #242 issue on Github.

6 years agoFixed getter/setter proto.
Dmitry Volyntsev [Thu, 31 Oct 2019 16:53:21 +0000 (19:53 +0300)]
Fixed getter/setter proto.

This closes #238 issue on Github.

6 years agoFixed "constructor" property of "Hash" and "Hmac" objects.
Dmitry Volyntsev [Thu, 31 Oct 2019 15:17:34 +0000 (18:17 +0300)]
Fixed "constructor" property of "Hash" and "Hmac" objects.

6 years agoRefactored object type initialization.
Dmitry Volyntsev [Thu, 31 Oct 2019 15:17:33 +0000 (18:17 +0300)]
Refactored object type initialization.

6 years agoRemoving console.help() from CLI as it not needed anymore.
Dmitry Volyntsev [Thu, 31 Oct 2019 15:17:32 +0000 (18:17 +0300)]
Removing console.help() from CLI as it not needed anymore.

Now all available objects are accessible through the global object.

6 years agoRefactored completions and backtrace matches.
Dmitry Volyntsev [Thu, 31 Oct 2019 15:17:31 +0000 (18:17 +0300)]
Refactored completions and backtrace matches.

6 years agoMoving constructors to global object.
Dmitry Volyntsev [Thu, 31 Oct 2019 15:17:31 +0000 (18:17 +0300)]
Moving constructors to global object.

6 years agoMoving top-level objects to global object.
Dmitry Volyntsev [Thu, 31 Oct 2019 15:17:31 +0000 (18:17 +0300)]
Moving top-level objects to global object.

6 years agoExtending njs_prop_handler_t prototype.
Dmitry Volyntsev [Thu, 31 Oct 2019 15:17:30 +0000 (18:17 +0300)]
Extending njs_prop_handler_t prototype.

6 years agoFixed Array.prototype.join() with "undefined" argument.
Alexander Borisov [Wed, 30 Oct 2019 13:43:12 +0000 (16:43 +0300)]
Fixed Array.prototype.join() with "undefined" argument.

This closes #232 issue on GitHub.

6 years agoFixed Array.prototype.includes() with "undefined" argument.
Alexander Borisov [Wed, 30 Oct 2019 13:43:10 +0000 (16:43 +0300)]
Fixed Array.prototype.includes() with "undefined" argument.

This closes #230 issue on GitHub.

6 years agoFixed iterator for Array.prototype.find/findIndex() functions.
Alexander Borisov [Wed, 30 Oct 2019 13:43:09 +0000 (16:43 +0300)]
Fixed iterator for Array.prototype.find/findIndex() functions.

Array might be changed in callback function.  If an array became smaller than
the initial one, it is necessary to iterate the missing values as invalid.

This closes #229 issue on GitHub.

6 years agoFixed strict aliasing warnings with old GCC versions.
Alexander Borisov [Tue, 29 Oct 2019 12:24:58 +0000 (15:24 +0300)]
Fixed strict aliasing warnings with old GCC versions.

6 years agoAdded conversion of this value to object in Array.prototype functions.
Alexander Borisov [Mon, 28 Oct 2019 13:50:20 +0000 (16:50 +0300)]
Added conversion of this value to object in Array.prototype functions.

This closes #231 issue on GitHub.

6 years agoAdded njs_lvalue_arg() macro.
Alexander Borisov [Mon, 28 Oct 2019 13:10:17 +0000 (16:10 +0300)]
Added njs_lvalue_arg() macro.