[njs] Style: removing excessive commentaries.

Dmitry Volyntsev xeioex at nginx.com
Mon Feb 17 14:01:45 UTC 2020


details:   https://hg.nginx.org/njs/rev/cbc09d7edfc8
branches:  
changeset: 1327:cbc09d7edfc8
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Mon Feb 17 16:18:18 2020 +0300
description:
Style: removing excessive commentaries.

diffstat:

 src/njs_array.c        |  10 -------
 src/njs_array_buffer.c |   5 ---
 src/njs_boolean.c      |   3 --
 src/njs_date.c         |   3 --
 src/njs_dtoa_fixed.c   |  10 -------
 src/njs_error.c        |  27 -------------------
 src/njs_function.c     |  10 -------
 src/njs_math.c         |  17 ------------
 src/njs_number.c       |  12 --------
 src/njs_object.c       |  26 ------------------
 src/njs_regexp.c       |   3 --
 src/njs_string.c       |  69 --------------------------------------------------
 src/njs_symbol.c       |  18 -------------
 13 files changed, 0 insertions(+), 213 deletions(-)

diffs (truncated from 1324 to 1000 lines):

diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_array.c
--- a/src/njs_array.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_array.c	Mon Feb 17 16:18:18 2020 +0300
@@ -444,7 +444,6 @@ njs_array_of(njs_vm_t *vm, njs_value_t *
 
 static const njs_object_prop_t  njs_array_constructor_properties[] =
 {
-    /* Array.name == "Array". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -452,7 +451,6 @@ static const njs_object_prop_t  njs_arra
         .configurable = 1,
     },
 
-    /* Array.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -460,14 +458,12 @@ static const njs_object_prop_t  njs_arra
         .configurable = 1,
     },
 
-    /* Array.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
         .value = njs_prop_handler(njs_object_prototype_create),
     },
 
-    /* Array.isArray(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("isArray"),
@@ -476,8 +472,6 @@ static const njs_object_prop_t  njs_arra
         .configurable = 1,
     },
 
-    /* ES6. */
-    /* Array.of(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("of"),
@@ -3403,7 +3397,6 @@ static const njs_object_prop_t  njs_arra
         .configurable = 1,
     },
 
-    /* ES7. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("includes"),
@@ -3436,7 +3429,6 @@ static const njs_object_prop_t  njs_arra
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("fill"),
@@ -3453,7 +3445,6 @@ static const njs_object_prop_t  njs_arra
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("find"),
@@ -3462,7 +3453,6 @@ static const njs_object_prop_t  njs_arra
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("findIndex"),
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_array_buffer.c
--- a/src/njs_array_buffer.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_array_buffer.c	Mon Feb 17 16:18:18 2020 +0300
@@ -112,7 +112,6 @@ njs_array_buffer_is_view(njs_vm_t *vm, n
 
 static const njs_object_prop_t  njs_array_buffer_constructor_properties[] =
 {
-    /* ArrayBuffer.name == "ArrayBuffer". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -120,7 +119,6 @@ static const njs_object_prop_t  njs_arra
         .configurable = 1,
     },
 
-    /* ArrayBuffer.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -128,14 +126,12 @@ static const njs_object_prop_t  njs_arra
         .configurable = 1,
     },
 
-    /* ArrayBuffer.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
         .value = njs_prop_handler(njs_object_prototype_create),
     },
 
-    /* ArrayBuffer[Symbol.species] */
     {
         .type = NJS_PROPERTY,
         .name = njs_wellknown_symbol(NJS_SYMBOL_SPECIES),
@@ -147,7 +143,6 @@ static const njs_object_prop_t  njs_arra
         .enumerable = 0,
     },
 
-    /* ArrayBuffer.isView(new Uint8Array()) === true */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("isView"),
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_boolean.c
--- a/src/njs_boolean.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_boolean.c	Mon Feb 17 16:18:18 2020 +0300
@@ -40,7 +40,6 @@ njs_boolean_constructor(njs_vm_t *vm, nj
 
 static const njs_object_prop_t  njs_boolean_constructor_properties[] =
 {
-    /* Boolean.name == "Boolean". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -48,7 +47,6 @@ static const njs_object_prop_t  njs_bool
         .configurable = 1,
     },
 
-    /* Boolean.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -56,7 +54,6 @@ static const njs_object_prop_t  njs_bool
         .configurable = 1,
     },
 
-    /* Boolean.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_date.c
--- a/src/njs_date.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_date.c	Mon Feb 17 16:18:18 2020 +0300
@@ -1057,7 +1057,6 @@ njs_date_number_parse(int64_t *value, co
 
 static const njs_object_prop_t  njs_date_constructor_properties[] =
 {
-    /* Date.name == "Date". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -1065,7 +1064,6 @@ static const njs_object_prop_t  njs_date
         .configurable = 1,
     },
 
-    /* Date.length == 7. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -1073,7 +1071,6 @@ static const njs_object_prop_t  njs_date
         .configurable = 1,
     },
 
-    /* Date.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_dtoa_fixed.c
--- a/src/njs_dtoa_fixed.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_dtoa_fixed.c	Mon Feb 17 16:18:18 2020 +0300
@@ -378,16 +378,6 @@ njs_fixed_dtoa(double value, njs_uint_t 
 
         dividend = significand;
 
-        /*
-         * Let v = f * 2^e with f == significand and e == exponent.
-         * Then need q (quotient) and r (remainder) as follows:
-         *   f * 2^e      = q * 5^17 * 2^17 + r
-         * If e > 17 then
-         *   f * 2^(e-17) = q * 5^17        + r/2^17
-         * else
-         *   f  = q * 5^17 * 2^(17-e) + r/2^e
-         */
-
         if (exponent > 17) {
             /* (e - 17) <= 3. */
             dividend <<= exponent - 17;
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_error.c
--- a/src/njs_error.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_error.c	Mon Feb 17 16:18:18 2020 +0300
@@ -297,7 +297,6 @@ njs_error_constructor(njs_vm_t *vm, njs_
 
 static const njs_object_prop_t  njs_error_constructor_properties[] =
 {
-    /* Error.name == "Error". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -305,7 +304,6 @@ static const njs_object_prop_t  njs_erro
         .configurable = 1,
     },
 
-    /* Error.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -313,7 +311,6 @@ static const njs_object_prop_t  njs_erro
         .configurable = 1,
     },
 
-    /* Error.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
@@ -338,7 +335,6 @@ njs_eval_error_constructor(njs_vm_t *vm,
 
 static const njs_object_prop_t  njs_eval_error_constructor_properties[] =
 {
-    /* EvalError.name == "EvalError". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -346,7 +342,6 @@ static const njs_object_prop_t  njs_eval
         .configurable = 1,
     },
 
-    /* EvalError.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -354,7 +349,6 @@ static const njs_object_prop_t  njs_eval
         .configurable = 1,
     },
 
-    /* EvalError.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
@@ -379,7 +373,6 @@ njs_internal_error_constructor(njs_vm_t 
 
 static const njs_object_prop_t  njs_internal_error_constructor_properties[] =
 {
-    /* InternalError.name == "InternalError". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -387,7 +380,6 @@ static const njs_object_prop_t  njs_inte
         .configurable = 1,
     },
 
-    /* InternalError.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -395,7 +387,6 @@ static const njs_object_prop_t  njs_inte
         .configurable = 1,
     },
 
-    /* InternalError.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
@@ -420,7 +411,6 @@ njs_range_error_constructor(njs_vm_t *vm
 
 static const njs_object_prop_t  njs_range_error_constructor_properties[] =
 {
-    /* RangeError.name == "RangeError". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -428,7 +418,6 @@ static const njs_object_prop_t  njs_rang
         .configurable = 1,
     },
 
-    /* RangeError.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -436,7 +425,6 @@ static const njs_object_prop_t  njs_rang
         .configurable = 1,
     },
 
-    /* RangeError.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
@@ -461,7 +449,6 @@ njs_reference_error_constructor(njs_vm_t
 
 static const njs_object_prop_t  njs_reference_error_constructor_properties[] =
 {
-    /* ReferenceError.name == "ReferenceError". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -469,7 +456,6 @@ static const njs_object_prop_t  njs_refe
         .configurable = 1,
     },
 
-    /* ReferenceError.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -477,7 +463,6 @@ static const njs_object_prop_t  njs_refe
         .configurable = 1,
     },
 
-    /* ReferenceError.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
@@ -502,7 +487,6 @@ njs_syntax_error_constructor(njs_vm_t *v
 
 static const njs_object_prop_t  njs_syntax_error_constructor_properties[] =
 {
-    /* SyntaxError.name == "SyntaxError". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -510,7 +494,6 @@ static const njs_object_prop_t  njs_synt
         .configurable = 1,
     },
 
-    /* SyntaxError.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -518,7 +501,6 @@ static const njs_object_prop_t  njs_synt
         .configurable = 1,
     },
 
-    /* SyntaxError.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
@@ -543,7 +525,6 @@ njs_type_error_constructor(njs_vm_t *vm,
 
 static const njs_object_prop_t  njs_type_error_constructor_properties[] =
 {
-    /* TypeError.name == "TypeError". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -551,7 +532,6 @@ static const njs_object_prop_t  njs_type
         .configurable = 1,
     },
 
-    /* TypeError.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -559,7 +539,6 @@ static const njs_object_prop_t  njs_type
         .configurable = 1,
     },
 
-    /* TypeError.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
@@ -584,7 +563,6 @@ njs_uri_error_constructor(njs_vm_t *vm, 
 
 static const njs_object_prop_t  njs_uri_error_constructor_properties[] =
 {
-    /* URIError.name == "URIError". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -592,7 +570,6 @@ static const njs_object_prop_t  njs_uri_
         .configurable = 1,
     },
 
-    /* URIError.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -600,7 +577,6 @@ static const njs_object_prop_t  njs_uri_
         .configurable = 1,
     },
 
-    /* URIError.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
@@ -686,7 +662,6 @@ njs_memory_error_prototype_create(njs_vm
 
 static const njs_object_prop_t  njs_memory_error_constructor_properties[] =
 {
-    /* MemoryError.name == "MemoryError". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -694,7 +669,6 @@ static const njs_object_prop_t  njs_memo
         .configurable = 1,
     },
 
-    /* MemoryError.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -702,7 +676,6 @@ static const njs_object_prop_t  njs_memo
         .configurable = 1,
     },
 
-    /* MemoryError.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_function.c
--- a/src/njs_function.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_function.c	Mon Feb 17 16:18:18 2020 +0300
@@ -217,9 +217,6 @@ njs_function_copy(njs_vm_t *vm, njs_func
 }
 
 
-/*
- * ES5.1, 10.6: CreateArgumentsObject.
- */
 njs_int_t
 njs_function_arguments_object_init(njs_vm_t *vm, njs_native_frame_t *frame)
 {
@@ -973,7 +970,6 @@ njs_function_constructor(njs_vm_t *vm, n
 
 static const njs_object_prop_t  njs_function_constructor_properties[] =
 {
-    /* Function.name == "Function". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -981,7 +977,6 @@ static const njs_object_prop_t  njs_func
         .configurable = 1,
     },
 
-    /* Function.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -989,7 +984,6 @@ static const njs_object_prop_t  njs_func
         .configurable = 1,
     },
 
-    /* Function.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
@@ -1004,10 +998,6 @@ const njs_object_init_t  njs_function_co
 };
 
 
-/*
- * ES5.1, 15.3.5.1 length
- *      the typical number of arguments expected by the function.
- */
 static njs_int_t
 njs_function_instance_length(njs_vm_t *vm, njs_object_prop_t *prop,
     njs_value_t *value, njs_value_t *setval, njs_value_t *retval)
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_math.c
--- a/src/njs_math.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_math.c	Mon Feb 17 16:18:18 2020 +0300
@@ -1063,7 +1063,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("acosh"),
@@ -1080,7 +1079,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("asinh"),
@@ -1105,7 +1103,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("atanh"),
@@ -1114,7 +1111,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("cbrt"),
@@ -1131,7 +1127,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("clz32"),
@@ -1148,7 +1143,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("cosh"),
@@ -1165,7 +1159,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("expm1"),
@@ -1182,7 +1175,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("fround"),
@@ -1191,7 +1183,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("hypot"),
@@ -1200,7 +1191,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("imul"),
@@ -1217,7 +1207,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("log10"),
@@ -1226,7 +1215,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("log1p"),
@@ -1235,7 +1223,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("log2"),
@@ -1284,7 +1271,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("sign"),
@@ -1301,7 +1287,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("sinh"),
@@ -1326,7 +1311,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("tanh"),
@@ -1335,7 +1319,6 @@ static const njs_object_prop_t  njs_math
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("trunc"),
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_number.c
--- a/src/njs_number.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_number.c	Mon Feb 17 16:18:18 2020 +0300
@@ -420,7 +420,6 @@ njs_number_is_finite(njs_vm_t *vm, njs_v
 
 static const njs_object_prop_t  njs_number_constructor_properties[] =
 {
-    /* Number.name == "Number". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -428,7 +427,6 @@ static const njs_object_prop_t  njs_numb
         .configurable = 1,
     },
 
-    /* Number.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -436,28 +434,24 @@ static const njs_object_prop_t  njs_numb
         .configurable = 1,
     },
 
-    /* Number.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
         .value = njs_prop_handler(njs_object_prototype_create),
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("EPSILON"),
         .value = njs_value(NJS_NUMBER, 1, DBL_EPSILON),
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_long_string("MAX_SAFE_INTEGER"),
         .value = njs_value(NJS_NUMBER, 1, NJS_MAX_SAFE_INTEGER),
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_long_string("MIN_SAFE_INTEGER"),
@@ -494,7 +488,6 @@ static const njs_object_prop_t  njs_numb
         .value = njs_value(NJS_NUMBER, 1, -INFINITY),
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("isFinite"),
@@ -503,7 +496,6 @@ static const njs_object_prop_t  njs_numb
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("isInteger"),
@@ -512,7 +504,6 @@ static const njs_object_prop_t  njs_numb
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("isSafeInteger"),
@@ -521,7 +512,6 @@ static const njs_object_prop_t  njs_numb
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("isNaN"),
@@ -530,7 +520,6 @@ static const njs_object_prop_t  njs_numb
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("parseFloat"),
@@ -539,7 +528,6 @@ static const njs_object_prop_t  njs_numb
         .configurable = 1,
     },
 
-    /* ES6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("parseInt"),
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_object.c
--- a/src/njs_object.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_object.c	Mon Feb 17 16:18:18 2020 +0300
@@ -2084,7 +2084,6 @@ njs_property_prototype_create(njs_vm_t *
 
 static const njs_object_prop_t  njs_object_constructor_properties[] =
 {
-    /* Object.name == "Object". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -2092,7 +2091,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -2100,14 +2098,12 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
         .value = njs_prop_handler(njs_object_prototype_create),
     },
 
-    /* Object.create(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("create"),
@@ -2116,7 +2112,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.keys(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("keys"),
@@ -2125,7 +2120,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* ES8: Object.values(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("values"),
@@ -2134,7 +2128,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* ES8: Object.entries(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("entries"),
@@ -2143,7 +2136,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.defineProperty(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("defineProperty"),
@@ -2152,7 +2144,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.defineProperties(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_long_string("defineProperties"),
@@ -2161,7 +2152,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.getOwnPropertyDescriptor(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_long_string("getOwnPropertyDescriptor"),
@@ -2170,7 +2160,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.getOwnPropertyDescriptors(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_long_string("getOwnPropertyDescriptors"),
@@ -2180,7 +2169,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.getOwnPropertyNames(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_long_string("getOwnPropertyNames"),
@@ -2190,7 +2178,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.getOwnPropertySymbols(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_long_string("getOwnPropertySymbols"),
@@ -2200,7 +2187,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.getPrototypeOf(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("getPrototypeOf"),
@@ -2209,7 +2195,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.setPrototypeOf(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("setPrototypeOf"),
@@ -2218,7 +2203,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.freeze(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("freeze"),
@@ -2227,7 +2211,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.isFrozen(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("isFrozen"),
@@ -2236,7 +2219,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.seal(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("seal"),
@@ -2245,7 +2227,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.isSealed(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("isSealed"),
@@ -2254,7 +2235,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.preventExtensions(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_long_string("preventExtensions"),
@@ -2263,7 +2243,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.isExtensible(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("isExtensible"),
@@ -2272,7 +2251,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.assign(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("assign"),
@@ -2281,7 +2259,6 @@ static const njs_object_prop_t  njs_obje
         .configurable = 1,
     },
 
-    /* Object.is(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("is"),
@@ -2298,9 +2275,6 @@ const njs_object_init_t  njs_object_cons
 };
 
 
-/*
- * ES6, 9.1.2: [[SetPrototypeOf]].
- */
 static njs_int_t
 njs_object_set_prototype(njs_vm_t *vm, njs_object_t *object,
     const njs_value_t *value)
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_regexp.c
--- a/src/njs_regexp.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_regexp.c	Mon Feb 17 16:18:18 2020 +0300
@@ -1224,7 +1224,6 @@ njs_regexp_string_create(njs_vm_t *vm, n
 
 static const njs_object_prop_t  njs_regexp_constructor_properties[] =
 {
-    /* RegExp.name == "RegExp". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -1232,7 +1231,6 @@ static const njs_object_prop_t  njs_rege
         .configurable = 1,
     },
 
-    /* RegExp.length == 2. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -1240,7 +1238,6 @@ static const njs_object_prop_t  njs_rege
         .configurable = 1,
     },
 
-    /* RegExp.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
diff -r 13dbdff9b76f -r cbc09d7edfc8 src/njs_string.c
--- a/src/njs_string.c	Mon Feb 17 16:13:43 2020 +0300
+++ b/src/njs_string.c	Mon Feb 17 16:18:18 2020 +0300
@@ -581,7 +581,6 @@ njs_string_constructor(njs_vm_t *vm, njs
 
 static const njs_object_prop_t  njs_string_constructor_properties[] =
 {
-    /* String.name == "String". */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("name"),
@@ -589,7 +588,6 @@ static const njs_object_prop_t  njs_stri
         .configurable = 1,
     },
 
-    /* String.length == 1. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("length"),
@@ -597,14 +595,12 @@ static const njs_object_prop_t  njs_stri
         .configurable = 1,
     },
 
-    /* String.prototype. */
     {
         .type = NJS_PROPERTY_HANDLER,
         .name = njs_string("prototype"),
         .value = njs_prop_handler(njs_object_prototype_create),
     },
 
-    /* String.bytesFrom(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("bytesFrom"),
@@ -613,7 +609,6 @@ static const njs_object_prop_t  njs_stri
         .configurable = 1,
     },
 
-    /* String.fromCharCode(). */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("fromCharCode"),
@@ -622,7 +617,6 @@ static const njs_object_prop_t  njs_stri
         .configurable = 1,
     },
 
-    /* String.fromCodePoint(), ECMAScript 6. */
     {
         .type = NJS_PROPERTY,
         .name = njs_string("fromCodePoint"),
@@ -869,11 +863,6 @@ njs_string_prototype_to_string(njs_vm_t 
 }
 
 
-/*
- * String.concat(string2[, ..., stringN]).
- * JavaScript 1.2, ECMAScript 3.
- */
-
 njs_int_t
 njs_string_prototype_concat(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
     njs_index_t unused)
@@ -1168,11 +1157,6 @@ njs_string_prototype_to_bytes(njs_vm_t *
 }
 
 
-/*
- * String.slice(start[, end]).
- * JavaScript 1.2, ECMAScript 3.
- */
-
 static njs_int_t
 njs_string_prototype_slice(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
     njs_index_t unused)
@@ -1195,11 +1179,6 @@ njs_string_prototype_slice(njs_vm_t *vm,
 }
 
 
-/*
- * String.substring(start[, end]).
- * JavaScript 1.0, ECMAScript 1.
- */
-
 static njs_int_t


More information about the nginx-devel mailing list