diff --git a/.gitignore b/.gitignore index d60603514c801f..f652a2c74c37d6 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ !.mailmap !.nycrc !.travis.yml +!.eslintrc.yaml core vgcore.* @@ -38,14 +39,15 @@ icu_config.gypi .eslintcache node_trace.*.log coverage/ +!**/node_modules/**/coverage /out # various stuff that VC++ produces/uses Debug/ !**/node_modules/debug/ -!deps/v8/src/debug/ Release/ +!**/node_modules/**/release !doc/blog/** *.sln !nodemsi.sln @@ -64,7 +66,6 @@ ipch/ *.VC.opendb .vs/ .vscode/ -/deps/v8/src/debug/obj /*.exe /config.mk @@ -98,6 +99,7 @@ deps/openssl/openssl.xml deps/openssl/openssl.target.mk deps/zlib/zlib.target.mk +!deps/npm/node_modules # not needed and causes issues for distro packagers deps/npm/node_modules/.bin/ @@ -130,8 +132,4 @@ deps/uv/docs/src/guide/ # ignore VS compiler output unhandled by V8's .gitignore deps/v8/gypfiles/Debug/ deps/v8/gypfiles/Release/ -deps/v8/src/Debug/ -deps/v8/src/Release/ -deps/v8/src/inspector/Debug/ -deps/v8/src/inspector/Release/ deps/v8/third_party/eu-strip/ diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index 513faa46c8ab34..75b3c5e6c2e068 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -171,10 +171,10 @@ agenda. ### Waiting for Approvals Before landing pull requests, sufficient time should be left for input -from other Collaborators. In general, leave at least 48 hours during the -week and 72 hours over weekends to account for international time -differences and work schedules. However, certain types of pull requests -can be fast-tracked and may be landed after a shorter delay. For example: +from other Collaborators. In general, leave at least 72 hours to account for +international time differences and work schedules. However, certain types of +pull requests can be fast-tracked and may be landed after a shorter delay. For +example: * Focused changes that affect only documentation and/or the test suite: * `code-and-learn` tasks typically fall into this category. diff --git a/Makefile b/Makefile index c5a6b19da06732..05d3056f27973e 100644 --- a/Makefile +++ b/Makefile @@ -1181,19 +1181,25 @@ else @echo "To install (requires internet access) run: $ make format-cpp-build" endif +ifeq ($(V),1) + CPPLINT_QUIET = +else + CPPLINT_QUIET = --quiet +endif .PHONY: lint-cpp # Lints the C++ code with cpplint.py and check-imports.py. lint-cpp: tools/.cpplintstamp tools/.cpplintstamp: $(LINT_CPP_FILES) @echo "Running C++ linter..." - @$(PYTHON) tools/cpplint.py --quiet $? + @$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) $? @$(PYTHON) tools/check-imports.py @touch $@ lint-addon-docs: test/addons/.docbuildstamp @echo "Running C++ linter on addon docs..." - @$(PYTHON) tools/cpplint.py --filter=$(ADDON_DOC_LINT_FLAGS) $(LINT_CPP_ADDON_DOC_FILES_GLOB) + @$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) --filter=$(ADDON_DOC_LINT_FLAGS) \ + $(LINT_CPP_ADDON_DOC_FILES_GLOB) cpplint: lint-cpp @echo "Please use lint-cpp instead of cpplint" diff --git a/common.gypi b/common.gypi index 084bca14e0abaa..2621b5e327d5d8 100644 --- a/common.gypi +++ b/common.gypi @@ -9,6 +9,8 @@ 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds 'component%': 'static_library', # NB. these names match with what V8 expects 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way + 'enable_pgo_generate%': '0', + 'enable_pgo_use%': '0', 'python%': 'python', 'node_shared%': 'false', diff --git a/configure.py b/configure.py index da696a92b48c1a..4c2bd4d0bbcc7e 100755 --- a/configure.py +++ b/configure.py @@ -1226,7 +1226,6 @@ def configure_static(o): def write(filename, data): - filename = filename print_verbose('creating %s' % filename) with open(filename, 'w+') as f: f.write(data) diff --git a/deps/v8/include/libplatform/libplatform.h b/deps/v8/include/libplatform/libplatform.h index 2c830bf834b786..d001514f9883be 100644 --- a/deps/v8/include/libplatform/libplatform.h +++ b/deps/v8/include/libplatform/libplatform.h @@ -41,7 +41,7 @@ V8_PLATFORM_EXPORT std::unique_ptr NewDefaultPlatform( InProcessStackDumping::kDisabled, std::unique_ptr tracing_controller = {}); -V8_PLATFORM_EXPORT V8_DEPRECATE_SOON( +V8_PLATFORM_EXPORT V8_DEPRECATED( "Use NewDefaultPlatform instead", v8::Platform* CreateDefaultPlatform( int thread_pool_size = 0, diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 05ab9b05210ab4..55ad7c8cf220cc 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -1019,8 +1019,12 @@ class V8_EXPORT PrimitiveArray { public: static Local New(Isolate* isolate, int length); int Length() const; - void Set(int index, Local item); - Local Get(int index); + V8_DEPRECATED("Use Isolate* version", + void Set(int index, Local item)); + V8_DEPRECATED("Use Isolate* version", + Local Get(int index)); + void Set(Isolate* isolate, int index, Local item); + Local Get(Isolate* isolate, int index); }; /** @@ -1735,8 +1739,8 @@ class V8_EXPORT StackTrace { /** * Returns a StackFrame at a particular index. */ - V8_DEPRECATE_SOON("Use Isolate version", - Local GetFrame(uint32_t index) const); + V8_DEPRECATED("Use Isolate version", + Local GetFrame(uint32_t index) const); Local GetFrame(Isolate* isolate, uint32_t index) const; /** @@ -2432,25 +2436,25 @@ class V8_EXPORT Value : public Data { Local context) const; V8_WARN_UNUSED_RESULT MaybeLocal ToInt32(Local context) const; - V8_DEPRECATE_SOON("Use maybe version", - Local ToBoolean(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToNumber(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToString(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToObject(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToInteger(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToInt32(Isolate* isolate) const); - - inline V8_DEPRECATE_SOON("Use maybe version", - Local ToBoolean() const); - inline V8_DEPRECATE_SOON("Use maybe version", Local ToString() const); - inline V8_DEPRECATE_SOON("Use maybe version", Local ToObject() const); - inline V8_DEPRECATE_SOON("Use maybe version", - Local ToInteger() const); + V8_DEPRECATED("Use maybe version", + Local ToBoolean(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToNumber(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToString(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToObject(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToInteger(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToInt32(Isolate* isolate) const); + + inline V8_DEPRECATED("Use maybe version", + Local ToBoolean() const); + inline V8_DEPRECATED("Use maybe version", Local ToString() const); + inline V8_DEPRECATED("Use maybe version", Local ToObject() const); + inline V8_DEPRECATED("Use maybe version", + Local ToInteger() const); /** * Attempts to convert a string to an array index. @@ -2467,14 +2471,14 @@ class V8_EXPORT Value : public Data { Local context) const; V8_WARN_UNUSED_RESULT Maybe Int32Value(Local context) const; - V8_DEPRECATE_SOON("Use maybe version", bool BooleanValue() const); - V8_DEPRECATE_SOON("Use maybe version", double NumberValue() const); - V8_DEPRECATE_SOON("Use maybe version", int64_t IntegerValue() const); - V8_DEPRECATE_SOON("Use maybe version", uint32_t Uint32Value() const); - V8_DEPRECATE_SOON("Use maybe version", int32_t Int32Value() const); + V8_DEPRECATED("Use maybe version", bool BooleanValue() const); + V8_DEPRECATED("Use maybe version", double NumberValue() const); + V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const); + V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const); + V8_DEPRECATED("Use maybe version", int32_t Int32Value() const); /** JS == */ - V8_DEPRECATE_SOON("Use maybe version", bool Equals(Local that) const); + V8_DEPRECATED("Use maybe version", bool Equals(Local that) const); V8_WARN_UNUSED_RESULT Maybe Equals(Local context, Local that) const; bool StrictEquals(Local that) const; @@ -2580,7 +2584,7 @@ class V8_EXPORT String : public Name { * Returns the number of bytes in the UTF-8 encoded * representation of this string. */ - V8_DEPRECATE_SOON("Use Isolate version instead", int Utf8Length() const); + V8_DEPRECATED("Use Isolate version instead", int Utf8Length() const); int Utf8Length(Isolate* isolate) const; @@ -2638,23 +2642,23 @@ class V8_EXPORT String : public Name { // 16-bit character codes. int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1, int options = NO_OPTIONS) const; - V8_DEPRECATE_SOON("Use Isolate* version", - int Write(uint16_t* buffer, int start = 0, int length = -1, - int options = NO_OPTIONS) const); + V8_DEPRECATED("Use Isolate* version", + int Write(uint16_t* buffer, int start = 0, int length = -1, + int options = NO_OPTIONS) const); // One byte characters. int WriteOneByte(Isolate* isolate, uint8_t* buffer, int start = 0, int length = -1, int options = NO_OPTIONS) const; - V8_DEPRECATE_SOON("Use Isolate* version", - int WriteOneByte(uint8_t* buffer, int start = 0, - int length = -1, int options = NO_OPTIONS) - const); + V8_DEPRECATED("Use Isolate* version", + int WriteOneByte(uint8_t* buffer, int start = 0, + int length = -1, int options = NO_OPTIONS) + const); // UTF-8 encoded characters. int WriteUtf8(Isolate* isolate, char* buffer, int length = -1, int* nchars_ref = NULL, int options = NO_OPTIONS) const; - V8_DEPRECATE_SOON("Use Isolate* version", - int WriteUtf8(char* buffer, int length = -1, - int* nchars_ref = NULL, - int options = NO_OPTIONS) const); + V8_DEPRECATED("Use Isolate* version", + int WriteUtf8(char* buffer, int length = -1, + int* nchars_ref = NULL, + int options = NO_OPTIONS) const); /** * A zero length string. @@ -2818,9 +2822,9 @@ class V8_EXPORT String : public Name { */ static Local Concat(Isolate* isolate, Local left, Local right); - static V8_DEPRECATE_SOON("Use Isolate* version", - Local Concat(Local left, - Local right)); + static V8_DEPRECATED("Use Isolate* version", + Local Concat(Local left, + Local right)); /** * Creates a new external string using the data defined in the given @@ -5044,7 +5048,9 @@ class V8_EXPORT BooleanObject : public Object { */ class V8_EXPORT StringObject : public Object { public: - static Local New(Local value); + static Local New(Isolate* isolate, Local value); + V8_DEPRECATED("Use Isolate* version", + static Local New(Local value)); Local ValueOf() const; diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 09b2ae92dc8b1b..f68759f33bb16e 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -2227,6 +2227,10 @@ int PrimitiveArray::Length() const { return array->length(); } +void PrimitiveArray::Set(Isolate* isolate, int index, Local item) { + return Set(index, item); +} + void PrimitiveArray::Set(int index, Local item) { i::Handle array = Utils::OpenHandle(this); i::Isolate* isolate = array->GetIsolate(); @@ -2239,6 +2243,10 @@ void PrimitiveArray::Set(int index, Local item) { array->set(index, *i_item); } +Local PrimitiveArray::Get(Isolate* isolate, int index) { + return Get(index); +} + Local PrimitiveArray::Get(int index) { i::Handle array = Utils::OpenHandle(this); i::Isolate* isolate = array->GetIsolate(); @@ -6880,6 +6888,11 @@ bool v8::BooleanObject::ValueOf() const { } +Local v8::StringObject::New(Isolate* isolate, Local value) { + return New(value); +} + + Local v8::StringObject::New(Local value) { i::Handle string = Utils::OpenHandle(*value); i::Isolate* isolate = string->GetIsolate(); diff --git a/doc/api/errors.md b/doc/api/errors.md index dcb2c77a7bf353..8aa4f0c2dc7c2f 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1555,18 +1555,6 @@ An attempt was made to operate on an already closed socket. A call was made and the UDP subsystem was not running. - -### ERR_STDERR_CLOSE - -An attempt was made to close the `process.stderr` stream. By design, Node.js -does not allow `stdout` or `stderr` streams to be closed by user code. - - -### ERR_STDOUT_CLOSE - -An attempt was made to close the `process.stdout` stream. By design, Node.js -does not allow `stdout` or `stderr` streams to be closed by user code. - ### ERR_STREAM_CANNOT_PIPE @@ -1952,6 +1940,37 @@ removed: v10.0.0 The `repl` module was unable to parse data from the REPL history file. + + +### ERR_STDERR_CLOSE + + +An attempt was made to close the `process.stderr` stream. By design, Node.js +does not allow `stdout` or `stderr` streams to be closed by user code. + + +### ERR_STDOUT_CLOSE + + +An attempt was made to close the `process.stdout` stream. By design, Node.js +does not allow `stdout` or `stderr` streams to be closed by user code. + ### ERR_STREAM_READ_NOT_IMPLEMENTED