]> git.kaiwu.me - njs.git/log
njs.git
6 years agoFixed dead store assignment in njs_fs_rename_sync().
Dmitry Volyntsev [Tue, 13 Aug 2019 12:15:42 +0000 (15:15 +0300)]
Fixed dead store assignment in njs_fs_rename_sync().

Found by clang static analyzer.

6 years agoUsing njs_set_undefined() and njs_set_invalid() where appropriate.
Dmitry Volyntsev [Mon, 12 Aug 2019 18:04:50 +0000 (21:04 +0300)]
Using njs_set_undefined() and njs_set_invalid() where appropriate.

6 years agoImproved njs_string_to_c_string() prototype.
Dmitry Volyntsev [Mon, 12 Aug 2019 18:04:49 +0000 (21:04 +0300)]
Improved njs_string_to_c_string() prototype.

To avoid excessive casts.

6 years agoAdded fs.renameSync().
Dmitry Volyntsev [Mon, 12 Aug 2019 18:04:49 +0000 (21:04 +0300)]
Added fs.renameSync().

This closes #198 issue on Github.

6 years agoFixed fs.readFile() and fs.readFileSync() for files with 0 size.
Dmitry Volyntsev [Mon, 12 Aug 2019 18:03:24 +0000 (21:03 +0300)]
Fixed fs.readFile() and fs.readFileSync() for files with 0 size.

6 years agoAdded getter/setter literal support.
hongzhidao [Thu, 8 Aug 2019 07:52:18 +0000 (03:52 -0400)]
Added getter/setter literal support.

This closes #118 issue on Github.

6 years agoFixed njs_vmcode_property_init().
Dmitry Volyntsev [Mon, 12 Aug 2019 11:54:46 +0000 (14:54 +0300)]
Fixed njs_vmcode_property_init().

Function assumed obj->__proto__ is never NULL, whereas it can become
NULL after __proto__: null assignment.

6 years agoAdded support for accessor properties in JSON.stringify().
Dmitry Volyntsev [Thu, 8 Aug 2019 11:19:56 +0000 (14:19 +0300)]
Added support for accessor properties in JSON.stringify().

This closes #203 issue on Github.

6 years agoAdded support for accessor property descriptors in njs.dump().
Dmitry Volyntsev [Thu, 8 Aug 2019 11:19:55 +0000 (14:19 +0300)]
Added support for accessor property descriptors in njs.dump().

6 years agoFixed njs_is_accessor_descriptor().
Dmitry Volyntsev [Thu, 8 Aug 2019 11:19:54 +0000 (14:19 +0300)]
Fixed njs_is_accessor_descriptor().

6 years agoFixed Error.prototype.toString().
Dmitry Volyntsev [Mon, 5 Aug 2019 14:10:59 +0000 (17:10 +0300)]
Fixed Error.prototype.toString().

1) with UTF8 string properties.
1) with non-string values for "name" and "message" properties.

This closes #199 issue on Github.

6 years agoAdded property getter support for njs_object_property().
hongzhidao [Wed, 7 Aug 2019 02:54:13 +0000 (22:54 -0400)]
Added property getter support for njs_object_property().

6 years agoFixed Object.defineProperty() for non-boolean descriptor props.
Dmitry Volyntsev [Wed, 7 Aug 2019 14:23:47 +0000 (17:23 +0300)]
Fixed Object.defineProperty() for non-boolean descriptor props.

6 years agoRemoved dead code in njs_value_property_set() after df385232d2af.
Dmitry Volyntsev [Wed, 7 Aug 2019 12:17:57 +0000 (15:17 +0300)]
Removed dead code in njs_value_property_set() after df385232d2af.

Found by Coverity Scan (CID 1452240).

6 years agoEliminating redundant NJS_METHOD type.
Dmitry Volyntsev [Tue, 6 Aug 2019 16:45:23 +0000 (19:45 +0300)]
Eliminating redundant NJS_METHOD type.

Previously, NJS_METHOD was the same as NJS_PROPERTY with function value
type.

6 years agoSimplified njs_property_query() API by eliminating pq->shared.
Dmitry Volyntsev [Tue, 6 Aug 2019 15:46:50 +0000 (18:46 +0300)]
Simplified njs_property_query() API by eliminating pq->shared.

Making copy of shared property in object's hash at the first access. It
simplifies njs_property_query() API and speeds up next access to the
property.

6 years agoCleanup of njs_property_query() usage.
Dmitry Volyntsev [Tue, 6 Aug 2019 14:58:37 +0000 (17:58 +0300)]
Cleanup of njs_property_query() usage.

6 years agoFixed "in" operator for values with accessor descriptors.
Dmitry Volyntsev [Mon, 5 Aug 2019 18:17:27 +0000 (21:17 +0300)]
Fixed "in" operator for values with accessor descriptors.

6 years agoRemoved obsolete commentaries for njs_value_property() and friends.
Dmitry Volyntsev [Mon, 5 Aug 2019 16:02:17 +0000 (19:02 +0300)]
Removed obsolete commentaries for njs_value_property() and friends.

After NJS_TRAP and NJS_APPLIED was eliminanted they are mostly useless.

6 years agoStyle.
hongzhidao [Sun, 4 Aug 2019 15:17:48 +0000 (11:17 -0400)]
Style.

Renaming arguments of the functions as follows:
1) "property" -> "key".
2) if function handles values of any type, its main argument
   is named "value".

6 years agoFixed njs_error_new() for UTF8 messages.
Dmitry Volyntsev [Mon, 5 Aug 2019 14:10:59 +0000 (17:10 +0300)]
Fixed njs_error_new() for UTF8 messages.

6 years agoUsing njs_is_defined() where appropriate.
Dmitry Volyntsev [Mon, 5 Aug 2019 15:17:15 +0000 (18:17 +0300)]
Using njs_is_defined() where appropriate.

6 years agoFixed Error() constructor with no arguments.
hongzhidao [Sun, 4 Aug 2019 07:59:42 +0000 (03:59 -0400)]
Fixed Error() constructor with no arguments.

6 years agoSeparating private from public headers.
Dmitry Volyntsev [Mon, 5 Aug 2019 14:36:09 +0000 (17:36 +0300)]
Separating private from public headers.

6 years agoAdded getter support for method frame calls.
hongzhidao [Sun, 4 Aug 2019 08:13:02 +0000 (04:13 -0400)]
Added getter support for method frame calls.

6 years agoFixed njs_builtin_match().
hongzhidao [Sun, 4 Aug 2019 08:06:30 +0000 (04:06 -0400)]
Fixed njs_builtin_match().

Previously native functions were identified by comparing pointers to
njs_function_t. This is not correct because njs_function_t maybe copied
from shared prototypes. Instead pointers to native functions should be
compared.

6 years agoRefactored njs_object_property.c.
hongzhidao [Fri, 2 Aug 2019 15:36:42 +0000 (23:36 +0800)]
Refactored njs_object_property.c.

1) Moving generic function to njs_value.c:
        njs_property_query(),
        njs_value_property(),
        njs_value_property_set().

2) Moving rest of the functions to njs_object_prop.c.

6 years agoRemoved vm->count.
Dmitry Volyntsev [Fri, 2 Aug 2019 17:12:01 +0000 (20:12 +0300)]
Removed vm->count.

Previously it was used to catch infinite recursion.
This is redundant, because NJS_MAX_STACK_SIZE is used for
the same purpose.

6 years agoHeaders cleanup in src/test missed in 835b3e817b93.
Dmitry Volyntsev [Fri, 2 Aug 2019 13:05:44 +0000 (16:05 +0300)]
Headers cleanup in src/test missed in 835b3e817b93.

6 years agoAdding default target as dependency for make all.
Dmitry Volyntsev [Fri, 2 Aug 2019 12:41:21 +0000 (15:41 +0300)]
Adding default target as dependency for make all.

6 years agoMoving all common headers into njs_main.h.
Dmitry Volyntsev [Fri, 2 Aug 2019 09:12:36 +0000 (12:12 +0300)]
Moving all common headers into njs_main.h.

6 years agoRemoving njs_stub.h.
Dmitry Volyntsev [Fri, 2 Aug 2019 09:12:35 +0000 (12:12 +0300)]
Removing njs_stub.h.

6 years agoRefactored njs_arr_t API.
Dmitry Volyntsev [Fri, 2 Aug 2019 09:12:30 +0000 (12:12 +0300)]
Refactored njs_arr_t API.

1) const njs_mem_proto_t *proto is removed from arguments.
2) njs_mp_t *mp is passed during array creation.

6 years agoRemoving njs_mem_proto_t from njs_mp_t.
Dmitry Volyntsev [Thu, 1 Aug 2019 18:01:16 +0000 (21:01 +0300)]
Removing njs_mem_proto_t from njs_mp_t.

6 years agoMerging njs_alignment.h into njs_clang.h.
Dmitry Volyntsev [Thu, 1 Aug 2019 15:49:29 +0000 (18:49 +0300)]
Merging njs_alignment.h into njs_clang.h.

6 years agoAvoiding excessive (njs_value_t *) casts.
Dmitry Volyntsev [Thu, 1 Aug 2019 15:49:28 +0000 (18:49 +0300)]
Avoiding excessive (njs_value_t *) casts.

Previously njs_arg() returned expression of type (const njs_value_t *).
This caused a lot of casts when calling functions and forced to declared
const njs_value_t * variables.

NO functional changes.

6 years agoUnifying return code variable name.
Dmitry Volyntsev [Thu, 1 Aug 2019 15:48:39 +0000 (18:48 +0300)]
Unifying return code variable name.

Using "ret" everywhere.

6 years agoRemoved unused njs_global_variable_value().
Dmitry Volyntsev [Thu, 1 Aug 2019 13:41:36 +0000 (16:41 +0300)]
Removed unused njs_global_variable_value().

6 years agoRefactored usage of njs_ret_t.
Dmitry Volyntsev [Tue, 30 Jul 2019 18:12:08 +0000 (21:12 +0300)]
Refactored usage of njs_ret_t.

Currently njs_ret_t is used in 2 different cases: as a jump offset for
bytecode and as a return value for ordinary functions. The second case
is quite similar with njs_int_t (and is often confused with).

1) Splitting this two cases into different types to avoid
confusion with njs_int_t.

2) Renaming njs_ret_t to njs_jump_off_t to better reflect its
purpose.

NO functional changes.

6 years agoRefactored file hierarchy.
Dmitry Volyntsev [Tue, 30 Jul 2019 17:11:46 +0000 (20:11 +0300)]
Refactored file hierarchy.

1) all source files are moved to src directory.
2) nxt files are renamed with "njs" prefix.
3) some files are renamed to avoid collisions:
    nxt_array.c -> njs_arr.c
    nxt_array.h -> njs_arr.h
    nxt_string.h -> njs_str.h
    nxt_time.c -> njs_time.c
    nxt_time.h -> njs_time.h
    njs_time.c -> njs_timer.c
    njs_time.h -> njs_timer.c
    njs_core.h -> njs_main.h
4) C tests are moved to src/test dir.
5) Other tests are moved to test dir.
6) Some structs are renamed to avoid collisions:
    nxt_array_t -> njs_arr_t
    nxt_string_t -> njs_str_t

    appropriate functions and macros are also renamed.

7) all macros, functions and other identifiers with "NXT_" and "nxt_"
    prefixes are renamed to corresponding "NJS_" or "njs_" prefix.

NO functional changes.

6 years agoRemoved retval from njs_vmcode_t.
hongzhidao [Sun, 28 Jul 2019 07:28:03 +0000 (03:28 -0400)]
Removed retval from njs_vmcode_t.

6 years agoMoving ctor from njs_vmcode_t to corresponding structure.
hongzhidao [Sun, 28 Jul 2019 06:26:23 +0000 (02:26 -0400)]
Moving ctor from njs_vmcode_t to corresponding structure.

6 years agoStyle.
hongzhidao [Sat, 27 Jul 2019 03:01:38 +0000 (23:01 -0400)]
Style.

6 years agoRemoved dead store assignment in njs_vmcode_interpreter().
Dmitry Volyntsev [Mon, 29 Jul 2019 13:22:39 +0000 (16:22 +0300)]
Removed dead store assignment in njs_vmcode_interpreter().

6 years agoFixed undefined behaviour in left shift of negative numbers.
Valentin Bartenev [Sun, 28 Jul 2019 14:19:51 +0000 (17:19 +0300)]
Fixed undefined behaviour in left shift of negative numbers.

Now it's implementation defined.

6 years agoSlight improvements to njs_vmcode_interpreter().
Valentin Bartenev [Sun, 28 Jul 2019 12:00:40 +0000 (15:00 +0300)]
Slight improvements to njs_vmcode_interpreter().

No functional changes.

6 years agoAdded String.prototype.trimStrart() and String.prototype.trimEnd().
Valentin Bartenev [Sun, 28 Jul 2019 10:19:03 +0000 (13:19 +0300)]
Added String.prototype.trimStrart() and String.prototype.trimEnd().

6 years agoUpdated the list of space separators in String.prototype.trim().
Valentin Bartenev [Sun, 28 Jul 2019 10:17:13 +0000 (13:17 +0300)]
Updated the list of space separators in String.prototype.trim().

According to the specification it must include all Unicode code points listed
in the "Space_Separator" (Zs) category.

6 years agoFixed String.fromCodePoint(), broken after 0b82f1c9268c.
Valentin Bartenev [Sat, 27 Jul 2019 18:12:32 +0000 (21:12 +0300)]
Fixed String.fromCodePoint(), broken after 0b82f1c9268c.

As it turned out, fromCodePoint() has shared the same handler with
fromCharCode(), but according to the specification these functions
have different semantics.  As a result, before 0b82f1c9268c both
functions had behaviour of fromCodePoint(), while after the change
they had behaviour of fromCharCode().

So, the fix is to revert back the code used before the change,
but only for fromCodePoint().

6 years agoFixed String.toLowerCase() and String.toUpperCase().
Valentin Bartenev [Sat, 27 Jul 2019 14:03:02 +0000 (17:03 +0300)]
Fixed String.toLowerCase() and String.toUpperCase().

Previously these functions didn't took into account that the size of
a string may change during case transformation resulting in buffer
underflow or overflow.

6 years agoFixed String.fromCharCode() for code points > 65535 and NaN.
Valentin Bartenev [Sat, 27 Jul 2019 13:12:26 +0000 (16:12 +0300)]
Fixed String.fromCharCode() for code points > 65535 and NaN.

According to the specification the code units must be truncated to uint16.

6 years agoFixed Array.length setter.
Artem S. Povalyukhin [Fri, 26 Jul 2019 04:24:36 +0000 (07:24 +0300)]
Fixed Array.length setter.

This closes #26 and closes #27 issues on Github.

6 years agoRemoved function call flag.
hongzhidao [Sat, 27 Jul 2019 02:37:38 +0000 (22:37 -0400)]
Removed function call flag.

6 years agoUnicode case tables updated to version 12.1 (May 2019).
Valentin Bartenev [Sat, 27 Jul 2019 00:51:48 +0000 (03:51 +0300)]
Unicode case tables updated to version 12.1 (May 2019).

6 years agoStyle in nxt_unicode_upper_case.pl and nxt_unicode_upper_case.h.
Valentin Bartenev [Sat, 27 Jul 2019 00:51:48 +0000 (03:51 +0300)]
Style in nxt_unicode_upper_case.pl and nxt_unicode_upper_case.h.

6 years agoRefactored njs_vmcode_interpreter() for performance.
Dmitry Volyntsev [Fri, 26 Jul 2019 17:37:13 +0000 (20:37 +0300)]
Refactored njs_vmcode_interpreter() for performance.

    1) opcodes are rewritten using switch table.
    2) often-used opcodes are prioritized and
       inlined.
    3) similar opcodes are combined into unified
       handlers.
    4) njs_vmcode_interpreter() return NJS_OK on
       success. NJS_STOP return code is removed.

6 years agoOptimized nxt_dec_count() using bisection.
Valentin Bartenev [Thu, 25 Jul 2019 19:07:57 +0000 (22:07 +0300)]
Optimized nxt_dec_count() using bisection.

Previously, the number of comparisons required to count decimal numbers
was equal to decimal numbers count.

Now only 3 comparsions are needed for numbers with 1, 2, 3, 4, 5, or 6
decimal digits, and 4 comparsions are needed for numbers with 7, 8, 9,
and 10 decimal digits.

6 years agoFixed one byte overread in njs_string_to_c_string().
Valentin Bartenev [Thu, 25 Jul 2019 17:17:42 +0000 (20:17 +0300)]
Fixed one byte overread in njs_string_to_c_string().

Short strings are packed quite tight in njs_value_t, so there's
no one more byte to test.

    struct {
        njs_value_type_t              type:8;

        uint8_t                       size:4;
        uint8_t                       length:4;

        u_char                        start[14];
    } short_string;

With 14 bytes string this occupies 16 bytes, which is equal
to sizeof(njs_value_t).

6 years agoMoving njs.c functions into njs_vm.c and njs_value.c
Dmitry Volyntsev [Tue, 23 Jul 2019 16:42:25 +0000 (19:42 +0300)]
Moving njs.c functions into njs_vm.c and njs_value.c

NO functional changes.

6 years agoSplitting vmcode functionality from njs_vm.c into njs_vmcode.c
Dmitry Volyntsev [Tue, 23 Jul 2019 14:53:00 +0000 (17:53 +0300)]
Splitting vmcode functionality from njs_vm.c into njs_vmcode.c

No functional changes.

6 years agoFixed property setter lookup.
Artem S. Povalyukhin [Sat, 20 Jul 2019 10:31:59 +0000 (13:31 +0300)]
Fixed property setter lookup.

6 years agoAdded Object shorthand methods and computed property names.
hongzhidao [Wed, 3 Jul 2019 02:24:11 +0000 (22:24 -0400)]
Added Object shorthand methods and computed property names.

This closes #182 issue on Github.

6 years agoInlining call to hash function in njs_property_query().
Dmitry Volyntsev [Fri, 19 Jul 2019 20:27:53 +0000 (23:27 +0300)]
Inlining call to hash function in njs_property_query().

6 years agoAdded njs_set_int32() and njs_set_uint32() intrinsics.
Dmitry Volyntsev [Fri, 19 Jul 2019 19:05:34 +0000 (22:05 +0300)]
Added njs_set_int32() and njs_set_uint32() intrinsics.

6 years agoRefactored working with function calls.
hongzhidao [Wed, 17 Jul 2019 02:44:16 +0000 (22:44 -0400)]
Refactored working with function calls.

    1) njs_continuation_t is removed (appropriate functions
       are rewritten).
    2) all function calls are made syncronous.

    This closes #190 issue on Github.

6 years agoRefactored working with non-primitive types.
Dmitry Volyntsev [Fri, 5 Jul 2019 18:45:28 +0000 (21:45 +0300)]
Refactored working with non-primitive types.

Traps mechanism is remove.

6 years agoFixed njs_string_slice().
Dmitry Volyntsev [Thu, 18 Jul 2019 18:12:25 +0000 (21:12 +0300)]
Fixed njs_string_slice().

Previously, njs_string_slice() when slice->start == slice->string_length
may call njs_string_offset() with invalid index.

This might result in invalid memory access in njs_string_offset()
for native functions which use njs_string_slice():

    String.prototype.substring()

6 years agoFixed typo in njs_parser_string_create() introduced in f1a70d67646d.
Alexander Borisov [Thu, 18 Jul 2019 13:18:19 +0000 (16:18 +0300)]
Fixed typo in njs_parser_string_create() introduced in f1a70d67646d.

6 years agoAdded support '$&' substitution in String.prototype.replace().
Alexander Borisov [Wed, 17 Jul 2019 11:24:00 +0000 (14:24 +0300)]
Added support '$&' substitution in String.prototype.replace().

6 years agoUsing hand-written nxt_explicit_memzero() with memory-sanitizer.
Dmitry Volyntsev [Wed, 17 Jul 2019 13:28:30 +0000 (16:28 +0300)]
Using hand-written nxt_explicit_memzero() with memory-sanitizer.

To avoid false-positive results.

6 years agoFixed String.prototype.substring() with empty substring.
Alexander Borisov [Tue, 16 Jul 2019 14:32:12 +0000 (17:32 +0300)]
Fixed String.prototype.substring() with empty substring.

6 years agoFixed parsing of "$&" substitutions in String.prototype.replace().
Alexander Borisov [Tue, 16 Jul 2019 14:32:11 +0000 (17:32 +0300)]
Fixed parsing of "$&" substitutions in String.prototype.replace().

6 years agoFixed String.prototype.match() for byte strings with regex arg.
Alexander Borisov [Tue, 16 Jul 2019 14:32:11 +0000 (17:32 +0300)]
Fixed String.prototype.match() for byte strings with regex arg.

6 years agoFixed String.prototype.replace() for byte strings with regex arg.
Alexander Borisov [Tue, 16 Jul 2019 14:32:10 +0000 (17:32 +0300)]
Fixed String.prototype.replace() for byte strings with regex arg.

6 years agoAvoiding aligned attribute detection skip on ppc64le platforms.
Dmitry Volyntsev [Tue, 16 Jul 2019 09:57:29 +0000 (12:57 +0300)]
Avoiding aligned attribute detection skip on ppc64le platforms.

6 years agoUnifying makefile target names.
Dmitry Volyntsev [Mon, 15 Jul 2019 16:20:55 +0000 (19:20 +0300)]
Unifying makefile target names.

6 years agoAdded unit_test target.
Dmitry Volyntsev [Mon, 15 Jul 2019 15:46:31 +0000 (18:46 +0300)]
Added unit_test target.

6 years agoAdded memory-sanitizer support.
Dmitry Volyntsev [Mon, 15 Jul 2019 14:46:37 +0000 (17:46 +0300)]
Added memory-sanitizer support.

6 years agoFixed incorrect optimization in njs_string_to_c_string().
Alexander Borisov [Mon, 15 Jul 2019 14:45:23 +0000 (17:45 +0300)]
Fixed incorrect optimization in njs_string_to_c_string().

6 years agoTests: reporting unit tests statistics.
Dmitry Volyntsev [Mon, 15 Jul 2019 13:20:41 +0000 (16:20 +0300)]
Tests: reporting unit tests statistics.

6 years agoTests: passing unit tests options in a struct.
Dmitry Volyntsev [Mon, 15 Jul 2019 12:54:41 +0000 (15:54 +0300)]
Tests: passing unit tests options in a struct.

6 years agoImproved typeof for internal types.
Dmitry Volyntsev [Fri, 12 Jul 2019 20:30:22 +0000 (23:30 +0300)]
Improved typeof for internal types.

6 years agoAllowing to configure ar binary.
Dmitry Volyntsev [Fri, 12 Jul 2019 18:18:30 +0000 (21:18 +0300)]
Allowing to configure ar binary.

6 years agoFixed Array.prototype.lastIndexOf() with undefined arguments.
Dmitry Volyntsev [Thu, 11 Jul 2019 18:29:59 +0000 (21:29 +0300)]
Fixed Array.prototype.lastIndexOf() with undefined arguments.

6 years agoOptimized inlining of njs_values_strict_equal().
Valentin Bartenev [Thu, 11 Jul 2019 13:10:33 +0000 (16:10 +0300)]
Optimized inlining of njs_values_strict_equal().

This function is often called inside loops and basically it does only a few cmp
instructions that can be inlined.

The more complex part related to comparing of two strings is functionally
identical to njs_string_eq(), but contains an optimization that avoids memcmp()
when strings have different lengths.  This optimization has been merged into
njs_string_eq().

No functional changes.

6 years agoFixed used of uninitialized memory in String.prototype.match().
Alexander Borisov [Thu, 11 Jul 2019 12:42:33 +0000 (15:42 +0300)]
Fixed used of uninitialized memory in String.prototype.match().

6 years agoFixed Object.values() and Object.entries() for shared objects.
Dmitry Volyntsev [Thu, 11 Jul 2019 12:33:40 +0000 (15:33 +0300)]
Fixed Object.values() and Object.entries() for shared objects.

Previously, there was a mismatch between
njs_object_enumerate_object_length() and
njs_object_own_enumerate_object() in the way they enumerated
values.

This closes #194, #195, #196 issues on Github.

6 years agoFixed UTF-8 character escaping.
Alexander Borisov [Wed, 10 Jul 2019 18:54:33 +0000 (21:54 +0300)]
Fixed UTF-8 character escaping.

6 years agoAdded UTF8 validation for string literals.
Alexander Borisov [Wed, 10 Jul 2019 11:20:53 +0000 (14:20 +0300)]
Added UTF8 validation for string literals.

All bad UTF-8 characters are replaced by '\uFFFD'
(REPLACEMENT CHARACTER).

6 years agoUsing njs_set_regexp() and njs_regexp() where approprite.
Dmitry Volyntsev [Mon, 8 Jul 2019 14:51:58 +0000 (17:51 +0300)]
Using njs_set_regexp() and njs_regexp() where approprite.

6 years agoUsing njs_function() and njs_set_function() where applicable.
Dmitry Volyntsev [Mon, 8 Jul 2019 14:51:35 +0000 (17:51 +0300)]
Using njs_function() and njs_set_function() where applicable.

6 years agoUsing njs_object() macro where applicable.
Dmitry Volyntsev [Mon, 8 Jul 2019 14:49:43 +0000 (17:49 +0300)]
Using njs_object() macro where applicable.

6 years agoUsing njs_number() and njs_set_number() everywhere.
Dmitry Volyntsev [Mon, 8 Jul 2019 14:49:14 +0000 (17:49 +0300)]
Using njs_number() and njs_set_number() everywhere.

6 years agoAdded njs_date() and njs_set_date() macros.
Dmitry Volyntsev [Mon, 8 Jul 2019 12:31:39 +0000 (15:31 +0300)]
Added njs_date() and njs_set_date() macros.

6 years agoMoving value methods to njs_value.c.
hongzhidao [Sat, 6 Jul 2019 14:27:14 +0000 (10:27 -0400)]
Moving value methods to njs_value.c.

6 years agoSplitting njs_vm_value_to_ext_string().
hongzhidao [Wed, 3 Jul 2019 02:18:56 +0000 (22:18 -0400)]
Splitting njs_vm_value_to_ext_string().

Into njs_vm_value_to_string() and njs_vm_backtrace_dump().

6 years agoIntroduced njs_function_lambda_alloc().
hongzhidao [Wed, 3 Jul 2019 02:10:19 +0000 (22:10 -0400)]
Introduced njs_function_lambda_alloc().

6 years agoFixed heap-buffer-overflow while importing module.
Dmitry Volyntsev [Wed, 3 Jul 2019 15:30:59 +0000 (18:30 +0300)]
Fixed heap-buffer-overflow while importing module.

This closes #187 issue on Github.

6 years agoFixed Array.prototype.slice() for primitive types.
Dmitry Volyntsev [Wed, 3 Jul 2019 14:16:40 +0000 (17:16 +0300)]
Fixed Array.prototype.slice() for primitive types.

This closes #188 issue on Github.

6 years agoRefactored functions inlining.
Dmitry Volyntsev [Tue, 2 Jul 2019 18:37:10 +0000 (21:37 +0300)]
Refactored functions inlining.

Allowing compiler to decide whether inline a function or not by
removing most of nxt_noinline prefixes.

Inlining simple functions.

Splitting public function getters from njs internal value getters.