]> git.kaiwu.me - njs.git/log
njs.git
5 years agoImproved UTF-8 encoding/decoding.
Alexander Borisov [Wed, 26 Aug 2020 18:05:46 +0000 (21:05 +0300)]
Improved UTF-8 encoding/decoding.

5 years agoFixed String.prototype.indexOf() for byte-strings.
Dmitry Volyntsev [Wed, 26 Aug 2020 14:56:47 +0000 (14:56 +0000)]
Fixed String.prototype.indexOf() for byte-strings.

The issue was introduced in e8a941b394a3 (0.4.3).

This closes #335 issue on Github.

5 years agoGenerator: simplified runtime errors generation.
Dmitry Volyntsev [Wed, 26 Aug 2020 14:55:47 +0000 (14:55 +0000)]
Generator: simplified runtime errors generation.

5 years agoAdapted expect tests after 775c81dcbe61.
Dmitry Volyntsev [Wed, 26 Aug 2020 14:55:28 +0000 (14:55 +0000)]
Adapted expect tests after 775c81dcbe61.

5 years agoFixed function "constructor" property handler while setting.
Dmitry Volyntsev [Mon, 24 Aug 2020 11:28:21 +0000 (11:28 +0000)]
Fixed function "constructor" property handler while setting.

5 years agoImproved njs.dump() with built-in functions.
Dmitry Volyntsev [Fri, 21 Aug 2020 13:07:54 +0000 (13:07 +0000)]
Improved njs.dump() with built-in functions.

5 years agoAdded remaining methods for %TypedArray%.prototype.
Dmitry Volyntsev [Fri, 21 Aug 2020 13:07:48 +0000 (13:07 +0000)]
Added remaining methods for %TypedArray%.prototype.

The following methods were added:
every(), filter(), find(), findIndex(), forEach(), includes(),
indexOf(), lastIndexOf(), map(), reduce(), reduceRight(), reverse(),
some().

5 years agoFixed njs_property_query() while quering symbol keys.
Dmitry Volyntsev [Wed, 19 Aug 2020 12:43:23 +0000 (12:43 +0000)]
Fixed njs_property_query() while quering symbol keys.

Since 37f1f20de909, njs_object_hash_test() requires lhq->key.start
to be NULL to avoid hash collisions.

The field is zeroed by njs_property_query_init(), but the field still
might be non-zero when njs_property_query() is called inside a loop.

The fix is to ensure lhq->key.start == NULL for symbol keys.

This closes #268 issue on Github.

5 years agoFixed function "prototype" property handler while setting.
Dmitry Volyntsev [Tue, 18 Aug 2020 16:53:46 +0000 (16:53 +0000)]
Fixed function "prototype" property handler while setting.

njs_function_prototype_create() works as a getter and setter.  As a
getter the function is expected to create "prototype" property on the
first access, it also sets F.prototype.constructor property to ensure
F.prototype.constructor === F.

Setting of "constructor" property is not needed in setter context, as
it may overwrite existing "constructor" property in setval.

This closes #333 issue on Github.

5 years agoRefactored iterator Array methods.
Dmitry Volyntsev [Tue, 18 Aug 2020 11:52:17 +0000 (11:52 +0000)]
Refactored iterator Array methods.

5 years agoAdded support for numeric separators (ES12).
Valentin Bartenev [Mon, 17 Aug 2020 16:55:46 +0000 (19:55 +0300)]
Added support for numeric separators (ES12).

5 years agoUnicode case tables updated to version 13.0.0 (March 2020).
Valentin Bartenev [Mon, 17 Aug 2020 11:44:29 +0000 (14:44 +0300)]
Unicode case tables updated to version 13.0.0 (March 2020).

5 years agoHTTP: fixed location merge.
Dmitry Volyntsev [Mon, 17 Aug 2020 11:22:35 +0000 (11:22 +0000)]
HTTP: fixed location merge.

5 years agoImproved error handling in njs_file_tree_walk().
Dmitry Volyntsev [Thu, 13 Aug 2020 13:40:36 +0000 (13:40 +0000)]
Improved error handling in njs_file_tree_walk().

This also fixes Coverity CID 1465877.

5 years agoFixing Coverity warnings introduced in 24de499877ca.
Dmitry Volyntsev [Wed, 12 Aug 2020 14:57:31 +0000 (14:57 +0000)]
Fixing Coverity warnings introduced in 24de499877ca.

CIDs: 146587014658711465872.

5 years agoVersion bump.
Dmitry Volyntsev [Wed, 12 Aug 2020 12:56:35 +0000 (12:56 +0000)]
Version bump.

5 years agoAdded tag 0.4.3 for changeset 1ada1061a040
Dmitry Volyntsev [Tue, 11 Aug 2020 14:31:50 +0000 (14:31 +0000)]
Added tag 0.4.3 for changeset 1ada1061a040

5 years agoVersion 0.4.3. 0.4.3
Dmitry Volyntsev [Tue, 11 Aug 2020 14:31:07 +0000 (14:31 +0000)]
Version 0.4.3.

5 years agoImproved fs.rmdir() to support recursive directory removal.
Artem S. Povalyukhin [Sat, 25 Jul 2020 12:49:03 +0000 (15:49 +0300)]
Improved fs.rmdir() to support recursive directory removal.

5 years agoGetting rid of non-portable _GNU_SOURCE define.
Dmitry Volyntsev [Tue, 11 Aug 2020 14:31:04 +0000 (14:31 +0000)]
Getting rid of non-portable _GNU_SOURCE define.

5 years agoIntroduced TextEncoder/TextDecoder implementation.
Alexander Borisov [Tue, 28 Jul 2020 13:58:59 +0000 (16:58 +0300)]
Introduced TextEncoder/TextDecoder implementation.

According to WHATWG encoding spec.

5 years agoIntroduced tags for NJS_DATA type.
Dmitry Volyntsev [Thu, 30 Jul 2020 17:47:05 +0000 (17:47 +0000)]
Introduced tags for NJS_DATA type.

NJS_DATA is designed to contain arbitrary opaque pointers.
Tags are used to distinguish different opaque pointers.

5 years agoFixed njs_prop_handler_t inline documentation.
Dmitry Volyntsev [Wed, 29 Jul 2020 17:00:23 +0000 (17:00 +0000)]
Fixed njs_prop_handler_t inline documentation.

5 years agoImproved readability of surrogate pairs handling.
Dmitry Volyntsev [Mon, 27 Jul 2020 14:34:35 +0000 (14:34 +0000)]
Improved readability of surrogate pairs handling.

5 years agoFixed TOCTOU in fs.mkdir() introduced in cb2ff67e595d.
Dmitry Volyntsev [Mon, 27 Jul 2020 14:18:15 +0000 (14:18 +0000)]
Fixed TOCTOU in fs.mkdir() introduced in cb2ff67e595d.

Found by Coverity (CID 1465508).

5 years agoImproved fs.mkdir() to support recursive directory creation.
Artem S. Povalyukhin [Wed, 15 Jul 2020 12:51:06 +0000 (15:51 +0300)]
Improved fs.mkdir() to support recursive directory creation.

5 years agoImproved String.prototype.toString() for ordinary strings.
Dmitry Volyntsev [Fri, 24 Jul 2020 14:02:04 +0000 (14:02 +0000)]
Improved String.prototype.toString() for ordinary strings.

Allowing converting all strings to encodings 'hex', 'base64', 'base64url'.

5 years agoFixed pre/post increment/decrement in assignment operations.
Alexander Borisov [Thu, 23 Jul 2020 10:24:10 +0000 (13:24 +0300)]
Fixed pre/post increment/decrement in assignment operations.

Previously, the compound assignment operations did not create temporary
index for increments/decrements in the generator. The result was that
the increment/decrement changed the value immediately in place, which
led to incorrect calculations.

The fix is to use a separate temporary index for increments/decrements in
assignment operations.

This closes #271 issue on GitHub.

5 years agoIntroduced Query String module implementation.
Alexander Borisov [Wed, 22 Jul 2020 12:21:15 +0000 (15:21 +0300)]
Introduced Query String module implementation.

In collaboration with Dmitry Volyntsev.

This closes #288 issue on GitHub.

5 years agoFixed njs_value_property() for NJS_DECLINED from prop handler.
Alexander Borisov [Wed, 22 Jul 2020 12:21:14 +0000 (15:21 +0300)]
Fixed njs_value_property() for NJS_DECLINED from prop handler.

This ensures retval has valid value for any case except NJS_ERROR.

5 years agoFixed clearing UTF-8 context for two-byte codepoints.
Alexander Borisov [Wed, 22 Jul 2020 12:21:13 +0000 (15:21 +0300)]
Fixed clearing UTF-8 context for two-byte codepoints.

5 years agoFixed njs_string_truncate() function for non-byte strings.
Alexander Borisov [Wed, 22 Jul 2020 12:21:13 +0000 (15:21 +0300)]
Fixed njs_string_truncate() function for non-byte strings.

5 years agoIntroduced njs_chb_append_str() as inline function.
Dmitry Volyntsev [Wed, 22 Jul 2020 11:27:18 +0000 (11:27 +0000)]
Introduced njs_chb_append_str() as inline function.

To catch erroneous passing of njs_string_prop_t (instead of njs_str_t)
in compile time.

5 years agoIntroduced UTF-8 decoder according to WHATWG encoding spec.
Alexander Borisov [Wed, 15 Jul 2020 16:19:19 +0000 (19:19 +0300)]
Introduced UTF-8 decoder according to WHATWG encoding spec.

5 years agoIntroduced UTF-16 according to WHATWG encoding spec.
Alexander Borisov [Wed, 15 Jul 2020 16:19:18 +0000 (19:19 +0300)]
Introduced UTF-16 according to WHATWG encoding spec.

5 years agoFixed detection of endianness introduced in fcb5e172abaf.
Dmitry Volyntsev [Wed, 15 Jul 2020 15:34:16 +0000 (15:34 +0000)]
Fixed detection of endianness introduced in fcb5e172abaf.

Previously, NJS_HAVE_LITTLE_ENDIAN was declared unconditionally.

This correctly fixes #326 issue on Github.

5 years agoTests: improved declaring of sparse arrays in unit tests.
Dmitry Volyntsev [Tue, 14 Jul 2020 18:22:03 +0000 (18:22 +0000)]
Tests: improved declaring of sparse arrays in unit tests.

5 years agoStyle.
Dmitry Volyntsev [Tue, 14 Jul 2020 17:21:53 +0000 (17:21 +0000)]
Style.

5 years agoParser: fixed regexp-literals parsing with '=' characters.
Dmitry Volyntsev [Tue, 14 Jul 2020 17:20:29 +0000 (17:20 +0000)]
Parser: fixed regexp-literals parsing with '=' characters.

Previously, njs lexer decoded '/=' as an assignment token.

This closes #329 issue on Github.

5 years agoFixed unit test on big-endian platforms.
Dmitry Volyntsev [Tue, 14 Jul 2020 13:16:06 +0000 (13:16 +0000)]
Fixed unit test on big-endian platforms.

This closes #326 issue on Github.

5 years agoFixed njs_number_to_int32() for big-endian platforms.
Dmitry Volyntsev [Tue, 14 Jul 2020 13:16:05 +0000 (13:16 +0000)]
Fixed njs_number_to_int32() for big-endian platforms.

This is related to #326 issue in Github.

5 years agoParser: fixed parsing return statement without semicolon.
Alexander Borisov [Tue, 14 Jul 2020 11:49:46 +0000 (14:49 +0300)]
Parser: fixed parsing return statement without semicolon.

The issue was introduced in 86f55a7dc4a4.

This closes #330 issue on GitHub.

5 years agoFixed SetFunctionName() with Symbol keys.
Dmitry Volyntsev [Thu, 9 Jul 2020 13:57:10 +0000 (13:57 +0000)]
Fixed SetFunctionName() with Symbol keys.

This improves 85c1b6ba326b.

5 years agoHTTP: removed dead store assignment after 3df09cf5345c.
Dmitry Volyntsev [Wed, 8 Jul 2020 13:07:06 +0000 (13:07 +0000)]
HTTP: removed dead store assignment after 3df09cf5345c.

5 years agoFixed Array.prototype.join() with TypeArray instance.
Dmitry Volyntsev [Wed, 8 Jul 2020 13:07:05 +0000 (13:07 +0000)]
Fixed Array.prototype.join() with TypeArray instance.

Found by Clang static analyzer.
The issue was introduced in ccfa84cea2b3.

5 years agoVersion bump.
Dmitry Volyntsev [Wed, 8 Jul 2020 13:07:03 +0000 (13:07 +0000)]
Version bump.

5 years agoAdded tag 0.4.2 for changeset b409e86fd02a
Dmitry Volyntsev [Tue, 7 Jul 2020 12:25:03 +0000 (12:25 +0000)]
Added tag 0.4.2 for changeset b409e86fd02a

5 years agoVersion 0.4.2. 0.4.2
Dmitry Volyntsev [Tue, 7 Jul 2020 12:23:48 +0000 (12:23 +0000)]
Version 0.4.2.

5 years agoRemoved dead store assignment after 1c729f765cfb.
Dmitry Volyntsev [Tue, 7 Jul 2020 12:23:47 +0000 (12:23 +0000)]
Removed dead store assignment after 1c729f765cfb.

Found by Clang static analyzer.

5 years agoFixed String.prototype.replace() when replacer throws exception.
Dmitry Volyntsev [Tue, 7 Jul 2020 12:23:46 +0000 (12:23 +0000)]
Fixed String.prototype.replace() when replacer throws exception.

This issue was introduced in 1c729f765cfb.
Found by Clang static analyzer.

5 years agoFixed GetSubstitution() with absent namedCaptures.
Dmitry Volyntsev [Tue, 7 Jul 2020 12:23:45 +0000 (12:23 +0000)]
Fixed GetSubstitution() with absent namedCaptures.

This issue was introduced in 1c729f765cfb.
Found by Clang static analyzer.

5 years agoSilenced Coverity false-positive NULL-pointer dereference warning.
Dmitry Volyntsev [Tue, 7 Jul 2020 12:23:44 +0000 (12:23 +0000)]
Silenced Coverity false-positive NULL-pointer dereference warning.

Found by Coverity (CID 1463869).

5 years agoFixed potential NULL-pointer dereference (CID 1464584).
Dmitry Volyntsev [Tue, 7 Jul 2020 12:23:42 +0000 (12:23 +0000)]
Fixed potential NULL-pointer dereference (CID 1464584).

5 years agoAdded TypeScript test.
Dmitry Volyntsev [Mon, 6 Jul 2020 18:37:13 +0000 (18:37 +0000)]
Added TypeScript test.

5 years agoHTTP: fixed TypeScript description for headers.
Dmitry Volyntsev [Mon, 6 Jul 2020 16:44:03 +0000 (16:44 +0000)]
HTTP: fixed TypeScript description for headers.

The common headers were declared using only lowercase characters.
Unknown outgoing headers are declared as having the following type:
NjsStringLike | NjsStringLike[]. This causes an issue when unknown
header is used in the context requiring only NjsStringLike.

The fix is to declare common headers using canonical casing.

The issue was introduced in 8f3ef384f69e.

5 years agoHTTP: improved TypeScript API description for detached subrequests.
Artem S. Povalyukhin [Sat, 27 Jun 2020 16:26:41 +0000 (19:26 +0300)]
HTTP: improved TypeScript API description for detached subrequests.

5 years agoFixed TypeScript description for NjsByteString type.
Artem S. Povalyukhin [Sat, 27 Jun 2020 16:26:41 +0000 (19:26 +0300)]
Fixed TypeScript description for NjsByteString type.

NjsByteString was declared as it has no relation to string primitive type.
This causes a problem when a variable of type NjsByteString is passed into
built-in functions expecting string type.

The issue was introduced in 8f3ef384f69e.

5 years agoFixed String.prototype.replace() according to the specification.
Dmitry Volyntsev [Thu, 2 Jul 2020 14:00:16 +0000 (14:00 +0000)]
Fixed String.prototype.replace() according to the specification.

This closes #308 issue on Github.

5 years agoIntroduced RegExpBuiltinExec().
Dmitry Volyntsev [Thu, 2 Jul 2020 13:59:33 +0000 (13:59 +0000)]
Introduced RegExpBuiltinExec().

5 years agoImproved README page.
Dmitry Volyntsev [Thu, 2 Jul 2020 12:59:54 +0000 (12:59 +0000)]
Improved README page.

5 years agoFixed String.prototype.repeat() according to the specification.
Dmitry Volyntsev [Thu, 2 Jul 2020 12:59:48 +0000 (12:59 +0000)]
Fixed String.prototype.repeat() according to the specification.

5 years agoParser: fixed parsing of regexp flags.
Dmitry Volyntsev [Thu, 2 Jul 2020 12:58:50 +0000 (12:58 +0000)]
Parser: fixed parsing of regexp flags.

5 years agoIntroduced StringIndexOf().
Dmitry Volyntsev [Tue, 30 Jun 2020 15:36:31 +0000 (15:36 +0000)]
Introduced StringIndexOf().

5 years agoAdding Symbol support for backtraces.
Dmitry Volyntsev [Tue, 30 Jun 2020 15:33:58 +0000 (15:33 +0000)]
Adding Symbol support for backtraces.

5 years agoFixed index generation for global objects.
Alexander Borisov [Tue, 30 Jun 2020 15:22:18 +0000 (18:22 +0300)]
Fixed index generation for global objects.

In c75a8fc6d534 "GLOBAL GET" instruction was introduced to handle unresolved
references.  The issue was that the "GLOBAL GET" instruction erroneously
used the assignment variable index as a destination index.
The result was that a variable was assigned the retval of a "GLOBAL GET"
instruction.

The fix is to use a separate temporary index for "GLOBAL GET".

This closes #289 issue on GitHub.

5 years agoParser: fixed broken for expressions parsing.
Alexander Borisov [Thu, 25 Jun 2020 10:10:04 +0000 (13:10 +0300)]
Parser: fixed broken for expressions parsing.

5 years agoParser: fixed broken object literals parsing.
Alexander Borisov [Thu, 25 Jun 2020 10:10:03 +0000 (13:10 +0300)]
Parser: fixed broken object literals parsing.

5 years agoParser: fixed line counting in template literals.
Alexander Borisov [Fri, 19 Jun 2020 16:48:13 +0000 (19:48 +0300)]
Parser: fixed line counting in template literals.

This closes #321 issue on GitHub.

5 years agoParser: fixed heap-use-after-free in optional chain.
Alexander Borisov [Fri, 19 Jun 2020 16:48:12 +0000 (19:48 +0300)]
Parser: fixed heap-use-after-free in optional chain.

5 years agoOptimizing njs_builtin_match_native_function() for speed.
Dmitry Volyntsev [Thu, 18 Jun 2020 18:56:24 +0000 (18:56 +0000)]
Optimizing njs_builtin_match_native_function() for speed.

5 years agoIntroduced line level backtrace.
Dmitry Volyntsev [Thu, 18 Jun 2020 18:56:24 +0000 (18:56 +0000)]
Introduced line level backtrace.

This closes #140 issue on Github.

5 years agoImproved unit test.
Dmitry Volyntsev [Wed, 17 Jun 2020 14:38:23 +0000 (14:38 +0000)]
Improved unit test.

1) Accepting multiple options.
2) Added filter option, to run only selected suites.
For example, the following command would run only
selected tests:

$ njs_unit_test  -f "module|externals"
module tests: PASSED [5/5]
externals tests: PASSED [76/76]
TOTAL: PASSED [81/81]

5 years agoOptimizing njs_native_frame_t structure.
Dmitry Volyntsev [Tue, 16 Jun 2020 13:55:25 +0000 (13:55 +0000)]
Optimizing njs_native_frame_t structure.

Moving njs_exception_t from njs_native_frame_t to njs_frame_t,
as the exception structure is only needed for lambda frames.

5 years agoParser: fixed semicolon check after continue/break statement.
Alexander Borisov [Mon, 15 Jun 2020 15:33:57 +0000 (18:33 +0300)]
Parser: fixed semicolon check after continue/break statement.

This closes #318 issue on GitHub.

5 years agoMerging interactive tests into unit_test binary.
Dmitry Volyntsev [Mon, 15 Jun 2020 15:26:44 +0000 (15:26 +0000)]
Merging interactive tests into unit_test binary.

5 years agoFixed potential memory corruption in njs_function_frame_invoke().
Dmitry Volyntsev [Mon, 15 Jun 2020 15:26:40 +0000 (15:26 +0000)]
Fixed potential memory corruption in njs_function_frame_invoke().

It is a bug to cast vm->top_frame which is (njs_native_frame_t *) type,
to (njs_frame_t *) in general context.  The cast is allowed only for the
lambda frames.

The bug did not manifest itself previously because native frames were
allocated with NJS_NATIVE_FRAME_SIZE, which is sizeof(njs_value_t) aligned
size of njs_native_frame_t (on 64bit platform are 80 and 72 bytes
respectively). njs_frame_t contains njs_native_frame_t as a first field.
The frame->retval assignment for native frames resulted in 8 padding bytes
were used as a storage space for the retval field.

The bug becomes visible when the size of njs_native_frame_t changes.

The issue was introduced in 540f03725df2.

5 years agoAdded fs.Dirent, fs.readdir() and friends.
Artem S. Povalyukhin [Sun, 31 May 2020 05:45:41 +0000 (08:45 +0300)]
Added fs.Dirent, fs.readdir() and friends.

This closes #254 issue on Github.

5 years agoIntroduced njs_array_push().
Dmitry Volyntsev [Tue, 9 Jun 2020 12:56:56 +0000 (12:56 +0000)]
Introduced njs_array_push().

5 years agoParser: correctly fixing closing brace unwinding for invalid syntax.
Alexander Borisov [Sat, 6 Jun 2020 15:15:07 +0000 (18:15 +0300)]
Parser: correctly fixing closing brace unwinding for invalid syntax.

The issue was introduced in 86f55a7dc4a4.

Previous attempts to catch unprocessed token in ea1754b79e7a and 61dce54ce3d5
were misplaced.

5 years agoParser: added line positions for AST nodes.
Alexander Borisov [Thu, 4 Jun 2020 14:26:01 +0000 (17:26 +0300)]
Parser: added line positions for AST nodes.

5 years agoFixed %TypedArray%.prototype.copyWithin() with nonzero byte offset.
Dmitry Volyntsev [Fri, 5 Jun 2020 11:42:41 +0000 (11:42 +0000)]
Fixed %TypedArray%.prototype.copyWithin() with nonzero byte offset.

5 years agoAdded %TypedArray%.prototype.sort().
Dmitry Volyntsev [Fri, 5 Jun 2020 11:42:40 +0000 (11:42 +0000)]
Added %TypedArray%.prototype.sort().

5 years agoFixed AST printing with long strings values.
Dmitry Volyntsev [Fri, 5 Jun 2020 11:40:42 +0000 (11:40 +0000)]
Fixed AST printing with long strings values.

The issue was introduced in d255e73aed3b.

5 years agoFixed Array.prototype.splice() according to the specification.
Dmitry Volyntsev [Wed, 3 Jun 2020 18:40:10 +0000 (18:40 +0000)]
Fixed Array.prototype.splice() according to the specification.

5 years agoIntroduced njs_array_copy_within().
Dmitry Volyntsev [Wed, 3 Jun 2020 18:40:09 +0000 (18:40 +0000)]
Introduced njs_array_copy_within().

5 years agoFixed parsing of invalid unary expression.
Alexander Borisov [Wed, 3 Jun 2020 17:49:52 +0000 (20:49 +0300)]
Fixed parsing of invalid unary expression.

The issue was introduced in 86f55a7dc4a4.

5 years agoRemoved support for functions in labelled statements.
Alexander Borisov [Wed, 3 Jun 2020 12:17:51 +0000 (15:17 +0300)]
Removed support for functions in labelled statements.

In strict mode, support for functions is prohibited.

The issue was introduced in 86f55a7dc4a4.

5 years agoEnsuring Array.prototype.sort() stability.
Dmitry Volyntsev [Tue, 2 Jun 2020 12:08:04 +0000 (12:08 +0000)]
Ensuring Array.prototype.sort() stability.

For fast arrays with empty or undefined elements.

This closes #312 issue on Github.

5 years agoFixed endless loop in Array.prototype.sort().
Dmitry Volyntsev [Tue, 2 Jun 2020 14:59:30 +0000 (14:59 +0000)]
Fixed endless loop in Array.prototype.sort().

With non-consistent comparison function.

The issue was introduced in 1d0825906438.

5 years agoFixed typo introduced in db77713e0536.
Dmitry Volyntsev [Tue, 2 Jun 2020 14:59:27 +0000 (14:59 +0000)]
Fixed typo introduced in db77713e0536.

5 years agoAdded necessary checks for obligatory grammar symbols.
Alexander Borisov [Tue, 2 Jun 2020 14:53:29 +0000 (17:53 +0300)]
Added necessary checks for obligatory grammar symbols.

The issue was introduced in 86f55a7dc4a4.

5 years agoFixed parsing of invalid binary expressions.
Alexander Borisov [Tue, 2 Jun 2020 14:53:28 +0000 (17:53 +0300)]
Fixed parsing of invalid binary expressions.

The issue was introduced in 86f55a7dc4a4.

5 years agoFixed checking return value in primary expression.
Alexander Borisov [Tue, 2 Jun 2020 14:53:27 +0000 (17:53 +0300)]
Fixed checking return value in primary expression.

The issue was introduced in 86f55a7dc4a4.

5 years agoSilenced cast to smaller integer type warning.
Alexander Borisov [Mon, 1 Jun 2020 15:09:29 +0000 (18:09 +0300)]
Silenced cast to smaller integer type warning.

This fixes compilation with clang 11.

5 years agoFixed grammar introduced in 86f55a7dc4a4.
Alexander Borisov [Mon, 1 Jun 2020 15:09:29 +0000 (18:09 +0300)]
Fixed grammar introduced in 86f55a7dc4a4.

5 years agoRemoved unnecessary NULL checks introduced in 86f55a7dc4a4.
Alexander Borisov [Mon, 1 Jun 2020 15:09:28 +0000 (18:09 +0300)]
Removed unnecessary NULL checks introduced in 86f55a7dc4a4.

Found by Clang static analyzer.

5 years agoFixed potential NULL-pointer dereference added in 86f55a7dc4a4.
Alexander Borisov [Mon, 1 Jun 2020 15:09:27 +0000 (18:09 +0300)]
Fixed potential NULL-pointer dereference added in 86f55a7dc4a4.

Found by Coverity (CID 1463867).

5 years agoAdded AST serialization.
Dmitry Volyntsev [Fri, 29 May 2020 19:29:59 +0000 (19:29 +0000)]
Added AST serialization.

5 years agoParser refactoring.
Alexander Borisov [Fri, 29 May 2020 17:00:32 +0000 (20:00 +0300)]
Parser refactoring.

5 years agoAdded return value check forgotten in 9beb9ea093b5.
Alexander Borisov [Fri, 29 May 2020 11:49:36 +0000 (14:49 +0300)]
Added return value check forgotten in 9beb9ea093b5.

Found by Coverity (CID 14638591463860).