]>
git.kaiwu.me - njs.git/log
Dmitry Volyntsev [Fri, 12 Apr 2019 17:48:44 +0000 (20:48 +0300)]
Added quiet option for vm to support bit-exact output in test262.
hongzhidao [Sun, 7 Apr 2019 06:26:13 +0000 (14:26 +0800)]
Added arrow function support.
This closes #106 issue on Github.
In collaboration with Artem S. Povalyukhin.
Dmitry Volyntsev [Wed, 10 Apr 2019 14:46:29 +0000 (17:46 +0300)]
This object as a variable.
Non-local this is introduced to support arrow functions.
this is non-local when reference scope != first non-arrow
function scope.
Dmitry Volyntsev [Wed, 10 Apr 2019 14:46:29 +0000 (17:46 +0300)]
Added support for module mode of execution.
According to ES6:15.2 global this is undefined in module
mode.
Dmitry Volyntsev [Fri, 12 Apr 2019 15:36:02 +0000 (18:36 +0300)]
Fixed objects instance properties.
Some properties like 'length' of Array, String or Function
objects should be instance properties not prototype properties.
Dmitry Volyntsev [Thu, 11 Apr 2019 18:24:16 +0000 (21:24 +0300)]
Shell: improved njs_vm_value_dump().
njs_vm_value_dump() is used in two modes:
1) printing value of the previous expression in the shell.
2) console.log().
The behavior is different. Strings are printed with quotes
in the first case, but without in the second. Also special
ASCII symbols should not be escaped in console.log().
Dmitry Volyntsev [Thu, 11 Apr 2019 17:09:42 +0000 (20:09 +0300)]
Shell: added shebang support.
Dmitry Volyntsev [Thu, 11 Apr 2019 17:09:41 +0000 (20:09 +0300)]
Added string functions wrappers.
nxt_strlen(), nxt_strchr(), nxt_strlchr().
Dmitry Volyntsev [Thu, 11 Apr 2019 17:09:41 +0000 (20:09 +0300)]
UNIT style indentation in njs_string.h.
Dmitry Volyntsev [Thu, 11 Apr 2019 15:53:19 +0000 (18:53 +0300)]
Improved console.log() for string values.
Outputting string values without quotes.
hongzhidao [Thu, 11 Apr 2019 13:13:03 +0000 (21:13 +0800)]
Checking for duplicate function parameter names.
This closes #80 issue on Github.
Dmitry Volyntsev [Thu, 11 Apr 2019 13:32:06 +0000 (16:32 +0300)]
Allowing to output large values in console.log().
Previously, the size was limited to 2048 bytes.
This closes #127 issue on Github.
Dmitry Volyntsev [Thu, 11 Apr 2019 12:00:17 +0000 (15:00 +0300)]
HTTP: documenting props removal in changelog.
res.contentLength and res.contentType were deprecated in
0.2.2 and removed in 0.2.8.
Dmitry Volyntsev [Wed, 10 Apr 2019 14:46:14 +0000 (17:46 +0300)]
Making njs_function_closures() inline function.
Dmitry Volyntsev [Sun, 7 Apr 2019 05:38:04 +0000 (13:38 +0800)]
Fixed njs_function_copy().
Sergey Kandaurov [Tue, 9 Apr 2019 12:00:27 +0000 (15:00 +0300)]
Fixed using %*s format in nxt_printf().
hongzhidao [Sat, 6 Apr 2019 16:09:09 +0000 (00:09 +0800)]
Fixed Function.prototype.bind().
Making a correct copy of a function.
Alexander Borisov [Fri, 5 Apr 2019 14:49:22 +0000 (17:49 +0300)]
Added support array-like objects for Function.prototype.apply().
This closes #51 issue on Github.
hongzhidao [Fri, 5 Apr 2019 13:16:41 +0000 (21:16 +0800)]
Making njs_parser_var_statement() more generic.
hongzhidao [Fri, 5 Apr 2019 12:59:15 +0000 (20:59 +0800)]
Removed unnecessary njs_parser_var_expression().
Dmitry Volyntsev [Fri, 5 Apr 2019 13:49:21 +0000 (16:49 +0300)]
Adding const qualifier to njs_value_property().
hongzhidao [Mon, 25 Mar 2019 16:42:39 +0000 (00:42 +0800)]
Arguments object as a variable.
hongzhidao [Wed, 3 Apr 2019 03:27:05 +0000 (11:27 +0800)]
Refactored njs_parser_call_expression().
hongzhidao [Wed, 3 Apr 2019 03:19:14 +0000 (11:19 +0800)]
Refactored njs_parser_object() and njs_parser_array().
Dmitry Volyntsev [Tue, 2 Apr 2019 16:32:43 +0000 (19:32 +0300)]
Introduced njs_parser_variable_node().
Dmitry Volyntsev [Tue, 2 Apr 2019 14:45:38 +0000 (17:45 +0300)]
Making __proto__ accessor descriptor of Object mutable.
Igor Sysoev [Tue, 2 Apr 2019 14:17:49 +0000 (17:17 +0300)]
Fixed editline detection.
This simplifies building on modern macOS.
Dmitry Volyntsev [Mon, 1 Apr 2019 16:11:39 +0000 (19:11 +0300)]
Refactored function object creation.
hongzhidao [Sun, 31 Mar 2019 14:59:04 +0000 (22:59 +0800)]
Refactored out terminal tokens into njs_parser_terminal.c.
Artem S. Povalyukhin [Wed, 27 Mar 2019 17:49:03 +0000 (20:49 +0300)]
Added Object.getOwnPropertyDescriptors().
This closes #119 issue on Github.
Artem S. Povalyukhin [Wed, 27 Mar 2019 17:45:39 +0000 (20:45 +0300)]
Introduced njs_object_property_descriptor().
Dmitry Volyntsev [Thu, 28 Mar 2019 17:42:11 +0000 (20:42 +0300)]
Improved njs_object_enumerate().
Dmitry Volyntsev [Thu, 28 Mar 2019 17:31:20 +0000 (20:31 +0300)]
Avoiding strict check in export default value expressions.
Previously, only object literals were allowed.
Dmitry Volyntsev [Thu, 28 Mar 2019 16:45:58 +0000 (19:45 +0300)]
Using nxt_printf() everywhere.
Dmitry Volyntsev [Wed, 27 Mar 2019 18:00:20 +0000 (21:00 +0300)]
Added njs_vm_json_parse() and njs_vm_json_stringify().
Dmitry Volyntsev [Wed, 27 Mar 2019 18:00:19 +0000 (21:00 +0300)]
Improved njs API tests.
Dmitry Volyntsev [Wed, 27 Mar 2019 18:00:19 +0000 (21:00 +0300)]
Added nxt_dprintf() and nxt_printf().
Dmitry Volyntsev [Wed, 27 Mar 2019 18:00:19 +0000 (21:00 +0300)]
Improved working with arguments in JSON methods.
Dmitry Volyntsev [Wed, 27 Mar 2019 18:00:18 +0000 (21:00 +0300)]
Adding const qualifier njs_string_prop().
Dmitry Volyntsev [Mon, 16 Apr 2018 16:28:07 +0000 (19:28 +0300)]
Added njs_vm_value().
Artem S. Povalyukhin [Tue, 26 Mar 2019 05:04:02 +0000 (08:04 +0300)]
Added Object.getOwnPropertyNames().
This closes #4 issue on Github.
Dmitry Volyntsev [Tue, 26 Mar 2019 20:06:46 +0000 (23:06 +0300)]
Version bump.
Dmitry Volyntsev [Tue, 26 Mar 2019 13:58:43 +0000 (16:58 +0300)]
Added tag 0.3.0 for changeset
1935ab4643fd
Dmitry Volyntsev [Tue, 26 Mar 2019 13:56:32 +0000 (16:56 +0300)]
Version 0.3.0.
Dmitry Volyntsev [Tue, 26 Mar 2019 12:52:53 +0000 (15:52 +0300)]
Modules: added js_path directive.
Dmitry Volyntsev [Tue, 26 Mar 2019 12:35:45 +0000 (15:35 +0300)]
Modules: improved working with arguments.
According to ES 5.1:10.5 direct checking of the number
of arguments should be avoided.
Dmitry Volyntsev [Tue, 26 Mar 2019 12:28:18 +0000 (15:28 +0300)]
Treating null and undefined as empty string for external prop set.
Dmitry Volyntsev [Tue, 26 Mar 2019 11:51:03 +0000 (14:51 +0300)]
Modules: returning undefined value for absent values.
Instead of empty string.
Dmitry Volyntsev [Mon, 25 Mar 2019 14:51:19 +0000 (17:51 +0300)]
Resetting loaded modules in accumulative mode.
This closes #113 issue on Github.
Dmitry Volyntsev [Mon, 25 Mar 2019 12:41:21 +0000 (15:41 +0300)]
Shell: fixed potential memory leak in main().
Dmitry Volyntsev [Sat, 23 Mar 2019 13:39:40 +0000 (16:39 +0300)]
Fixed accesing global function and objects in modules.
hongzhidao [Sat, 23 Mar 2019 11:57:52 +0000 (14:57 +0300)]
Fixed nxt_file_dirname() for paths with no dir component.
Making it more similar to dirname shell cmd.
This closes #114 issue on Github.
hongzhidao [Sat, 2 Mar 2019 12:31:10 +0000 (20:31 +0800)]
Added initial modules support.
The following syntax is supported:
1) default import statements:
import lib1 from '../relative/path/lib.js';
import lib2 from '/abs/path/lib.js';
import fs from 'fs'; // built-in modules
2) default export statements:
export default {fun1, fun2, ...}; // export module object
Modules look up procedure:
1) absolute paths (start with '/') are used as is.
2) otherwise the following paths are tried:
dir + '/' + path where dir is
a) the directory of the current file.
b) additions paths provided with njs_vm_add_path().
This closes #91 on Github.
Dmitry Volyntsev [Wed, 20 Mar 2019 12:56:22 +0000 (15:56 +0300)]
HTTP: handling absence of value while iterating over r.args.
Alexander Borisov [Tue, 19 Mar 2019 15:26:44 +0000 (18:26 +0300)]
Fixed Math.max() for undefined arguments.
Dmitry Volyntsev [Tue, 19 Mar 2019 13:02:07 +0000 (16:02 +0300)]
Renaming void to undefined.
Dmitry Volyntsev [Mon, 18 Mar 2019 16:20:02 +0000 (19:20 +0300)]
Setting [[Construct]] internal property for Function Objects.
According to ES5.1: 13.2 [[Construct]] is set by default.
hongzhidao [Mon, 18 Mar 2019 13:05:27 +0000 (16:05 +0300)]
Fixed native frame arguments number.
hongzhidao [Sun, 17 Mar 2019 13:22:30 +0000 (21:22 +0800)]
Style.
Dmitry Volyntsev [Sun, 17 Mar 2019 14:36:17 +0000 (17:36 +0300)]
Removed unused closures field in njs_variable_t.
hongzhidao [Sun, 17 Mar 2019 14:11:09 +0000 (17:11 +0300)]
Fixed njs_parser_peek_token().
Dmitry Volyntsev [Wed, 13 Mar 2019 07:04:58 +0000 (15:04 +0800)]
Introducing UNIT makefile dependency scripts.
1) Autogenerating Makefile.
2) Correct makefile dependency tracking.
3) Makefile.conf is removed.
4) nxt/auto scripts moved to auto.
In collaboration with 洪志道 (Hong Zhi Dao).
This closes #110 issue on Github.
Dmitry Volyntsev [Tue, 12 Mar 2019 16:28:11 +0000 (19:28 +0300)]
Reporting file name and function name in disassembler output.
Dmitry Volyntsev [Mon, 11 Mar 2019 15:31:40 +0000 (18:31 +0300)]
Added Object.prototype.propertyIsEnumerable().
Dmitry Volyntsev [Mon, 11 Mar 2019 08:15:20 +0000 (11:15 +0300)]
Improved handling of arguments object.
Dmitry Volyntsev [Sun, 10 Mar 2019 19:26:25 +0000 (22:26 +0300)]
Introduced njs_parser_peek_token().
Dmitry Volyntsev [Sun, 10 Mar 2019 18:13:26 +0000 (21:13 +0300)]
Fixed heap-buffer-overflow in lexer.
The issue was introduced in
8e2cb4da5e46 .
hongzhidao [Sun, 10 Mar 2019 14:25:59 +0000 (22:25 +0800)]
Added support for arbitrary number of peek tokens in lexer.
hongzhidao [Sun, 10 Mar 2019 09:44:16 +0000 (17:44 +0800)]
Refactored njs_parser_function_lambda().
The function is split into reusable components.
Dmitry Volyntsev [Sun, 10 Mar 2019 13:14:37 +0000 (16:14 +0300)]
Improved njs_parser_reference().
hongzhidao [Thu, 7 Mar 2019 16:11:23 +0000 (00:11 +0800)]
Introduced njs_lexer_token_t.
Dmitry Volyntsev [Wed, 6 Mar 2019 16:39:21 +0000 (19:39 +0300)]
Correctly setting length of UTF8 string in fs.readFileSync().
This closes #109 issue on Github.
Dmitry Volyntsev [Tue, 5 Mar 2019 16:54:23 +0000 (19:54 +0300)]
Fixed RegExp literal parsing.
hongzhidao [Tue, 5 Mar 2019 00:32:54 +0000 (08:32 +0800)]
Style.
Dmitry Volyntsev [Thu, 28 Feb 2019 17:34:47 +0000 (20:34 +0300)]
Added additional RegExp tests.
Dmitry Volyntsev [Thu, 28 Feb 2019 16:30:32 +0000 (19:30 +0300)]
Fixed lexer referencing in runtime.
Dmitry Volyntsev [Thu, 28 Feb 2019 12:32:15 +0000 (15:32 +0300)]
Shell: passing original filename to parser.
hongzhidao [Tue, 26 Feb 2019 02:19:14 +0000 (10:19 +0800)]
Improved njs_value_index().
hongzhidao [Tue, 26 Feb 2019 02:11:53 +0000 (10:11 +0800)]
Improved parser syntax error.
hongzhidao [Wed, 27 Feb 2019 09:52:50 +0000 (17:52 +0800)]
Shell: fixed function redeclarations.
This closes #108 issue on Github.
hongzhidao [Wed, 27 Feb 2019 09:49:03 +0000 (17:49 +0800)]
Style.
hongzhidao [Tue, 26 Feb 2019 09:30:02 +0000 (17:30 +0800)]
Improved parser scope filename.
hongzhidao [Tue, 26 Feb 2019 09:32:59 +0000 (17:32 +0800)]
Style.
Dmitry Volyntsev [Tue, 26 Feb 2019 14:11:50 +0000 (17:11 +0300)]
Improved checking that filename is not empty.
file->start can be non NULL for empty string.
Dmitry Volyntsev [Tue, 26 Feb 2019 14:11:47 +0000 (17:11 +0300)]
Renaming njs_value_void_set() to njs_value_undefined_set().
Dmitry Volyntsev [Tue, 26 Feb 2019 14:11:42 +0000 (17:11 +0300)]
Version bump.
Dmitry Volyntsev [Tue, 26 Feb 2019 14:03:24 +0000 (17:03 +0300)]
Added tag 0.2.8 for changeset
ee190d3ace00
Dmitry Volyntsev [Tue, 26 Feb 2019 13:36:29 +0000 (16:36 +0300)]
Version 0.2.8.
Dmitry Volyntsev [Tue, 26 Feb 2019 13:16:08 +0000 (16:16 +0300)]
HTTP: avoid creating empty request_body buffer in r.subrequest().
This fixes #101 issue on Github.
Dmitry Volyntsev [Mon, 25 Feb 2019 16:00:56 +0000 (19:00 +0300)]
Moving boilerplate code into njs_generate_code().
Dmitry Volyntsev [Mon, 25 Feb 2019 16:00:55 +0000 (19:00 +0300)]
Added labels support.
Dmitry Volyntsev [Mon, 25 Feb 2019 16:00:54 +0000 (19:00 +0300)]
HTTP: setting exception if memory allocation fails.
Artem S. Povalyukhin [Sat, 23 Feb 2019 01:21:44 +0000 (04:21 +0300)]
Fixed Array.prototype.fill().
This closes #71 issue on Github.
Artem S. Povalyukhin [Sat, 23 Feb 2019 01:20:23 +0000 (04:20 +0300)]
Style.
Dmitry Volyntsev [Fri, 22 Feb 2019 17:33:31 +0000 (20:33 +0300)]
Fixed heap-buffer-overflow in String.prototype.split().
Dmitry Volyntsev [Thu, 21 Feb 2019 17:47:52 +0000 (20:47 +0300)]
Added support for setting nginx variables.
This closes #37 issue on Github.
Dmitry Volyntsev [Thu, 21 Feb 2019 13:35:52 +0000 (16:35 +0300)]
Improved API for value creation from the outside of VM.
hongzhidao [Wed, 20 Feb 2019 16:30:40 +0000 (00:30 +0800)]
Fixed njs_benchmark.
Dmitry Volyntsev [Wed, 20 Feb 2019 18:04:22 +0000 (21:04 +0300)]
Style.
Dmitry Volyntsev [Wed, 20 Feb 2019 18:04:19 +0000 (21:04 +0300)]
Fixed %*s length argument type in nxt_sprintf() fmt string.