From c0c4e008aa051baadcc274d792f4a8f5c6b130b8 Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 2 Mar 2012 11:23:12 -0800 Subject: [PATCH 1/5] Upgrade V8 to 3.6.6.24 --- deps/v8/SConstruct | 5 +- deps/v8/src/conversions-inl.h | 2 +- deps/v8/src/conversions.h | 2 - deps/v8/src/elements.cc | 128 ++++++++++++++++------------------ deps/v8/src/globals.h | 4 ++ deps/v8/src/objects.cc | 3 + deps/v8/src/objects.h | 3 +- deps/v8/src/v8globals.h | 4 -- deps/v8/src/version.cc | 2 +- deps/v8/tools/gyp/v8.gyp | 7 -- 10 files changed, 75 insertions(+), 85 deletions(-) diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct index fc67dc5e42b..f9c33caae5d 100644 --- a/deps/v8/SConstruct +++ b/deps/v8/SConstruct @@ -127,7 +127,7 @@ LIBRARY_FLAGS = { 'CPPDEFINES': ['__C99FEATURES__'], 'CPPPATH' : ['/usr/local/include'], 'LIBPATH' : ['/usr/local/lib'], - 'CCFLAGS': ['-ansi', '-fno-omit-frame-pointer'], + 'CCFLAGS': ['-ansi'], }, 'os:win32': { 'CCFLAGS': ['-DWIN32'], @@ -288,6 +288,7 @@ V8_EXTRA_FLAGS = { 'gcc': { 'all': { 'WARNINGFLAGS': ['-Wall', + '-Werror', '-W', '-Wno-unused-parameter', '-Wnon-virtual-dtor'] @@ -381,7 +382,7 @@ MKSNAPSHOT_EXTRA_FLAGS = { DTOA_EXTRA_FLAGS = { 'gcc': { 'all': { - 'WARNINGFLAGS': ['-Wno-uninitialized'], + 'WARNINGFLAGS': ['-Werror', '-Wno-uninitialized'], 'CCFLAGS': GCC_DTOA_EXTRA_CCFLAGS } }, diff --git a/deps/v8/src/conversions-inl.h b/deps/v8/src/conversions-inl.h index 41cf0d54c21..8bc11bf83dc 100644 --- a/deps/v8/src/conversions-inl.h +++ b/deps/v8/src/conversions-inl.h @@ -47,7 +47,7 @@ namespace v8 { namespace internal { static inline double JunkStringValue() { - return std::numeric_limits::quiet_NaN(); + return BitCast(kQuietNaNMask); } diff --git a/deps/v8/src/conversions.h b/deps/v8/src/conversions.h index e51ad6501cb..31aaf6b7377 100644 --- a/deps/v8/src/conversions.h +++ b/deps/v8/src/conversions.h @@ -28,8 +28,6 @@ #ifndef V8_CONVERSIONS_H_ #define V8_CONVERSIONS_H_ -#include - #include "utils.h" namespace v8 { diff --git a/deps/v8/src/elements.cc b/deps/v8/src/elements.cc index 04546446174..f97aeda446d 100644 --- a/deps/v8/src/elements.cc +++ b/deps/v8/src/elements.cc @@ -77,18 +77,17 @@ class ElementsAccessorBase : public ElementsAccessor { uint32_t key, JSObject* obj, Object* receiver) { - return ElementsAccessorSubclass::Get( + return ElementsAccessorSubclass::GetImpl( BackingStoreClass::cast(backing_store), key, obj, receiver); } - static MaybeObject* Get(BackingStoreClass* backing_store, - uint32_t key, - JSObject* obj, - Object* receiver) { - if (key < ElementsAccessorSubclass::GetCapacity(backing_store)) { - return backing_store->get(key); - } - return backing_store->GetHeap()->the_hole_value(); + static MaybeObject* GetImpl(BackingStoreClass* backing_store, + uint32_t key, + JSObject* obj, + Object* receiver) { + return (key < ElementsAccessorSubclass::GetCapacityImpl(backing_store)) + ? backing_store->get(key) + : backing_store->GetHeap()->the_hole_value(); } virtual MaybeObject* Delete(JSObject* obj, @@ -108,7 +107,7 @@ class ElementsAccessorBase : public ElementsAccessor { } #endif BackingStoreClass* backing_store = BackingStoreClass::cast(from); - uint32_t len1 = ElementsAccessorSubclass::GetCapacity(backing_store); + uint32_t len1 = ElementsAccessorSubclass::GetCapacityImpl(backing_store); // Optimize if 'other' is empty. // We cannot optimize if 'this' is empty, as other may have holes. @@ -117,14 +116,13 @@ class ElementsAccessorBase : public ElementsAccessor { // Compute how many elements are not in other. int extra = 0; for (uint32_t y = 0; y < len1; y++) { - if (ElementsAccessorSubclass::HasElementAtIndex(backing_store, - y, - holder, - receiver)) { + if (ElementsAccessorSubclass::HasElementAtIndexImpl( + backing_store, y, holder, receiver)) { uint32_t key = - ElementsAccessorSubclass::GetKeyForIndex(backing_store, y); + ElementsAccessorSubclass::GetKeyForIndexImpl(backing_store, y); MaybeObject* maybe_value = - ElementsAccessorSubclass::Get(backing_store, key, holder, receiver); + ElementsAccessorSubclass::GetImpl(backing_store, key, + holder, receiver); Object* value; if (!maybe_value->ToObject(&value)) return maybe_value; ASSERT(!value->IsTheHole()); @@ -155,14 +153,13 @@ class ElementsAccessorBase : public ElementsAccessor { // Fill in the extra values. int index = 0; for (uint32_t y = 0; y < len1; y++) { - if (ElementsAccessorSubclass::HasElementAtIndex(backing_store, - y, - holder, - receiver)) { + if (ElementsAccessorSubclass::HasElementAtIndexImpl( + backing_store, y, holder, receiver)) { uint32_t key = - ElementsAccessorSubclass::GetKeyForIndex(backing_store, y); + ElementsAccessorSubclass::GetKeyForIndexImpl(backing_store, y); MaybeObject* maybe_value = - ElementsAccessorSubclass::Get(backing_store, key, holder, receiver); + ElementsAccessorSubclass::GetImpl(backing_store, key, + holder, receiver); Object* value; if (!maybe_value->ToObject(&value)) return maybe_value; if (!value->IsTheHole() && !HasKey(to, value)) { @@ -176,25 +173,23 @@ class ElementsAccessorBase : public ElementsAccessor { } protected: - static uint32_t GetCapacity(BackingStoreClass* backing_store) { + static uint32_t GetCapacityImpl(BackingStoreClass* backing_store) { return backing_store->length(); } virtual uint32_t GetCapacity(FixedArrayBase* backing_store) { - return ElementsAccessorSubclass::GetCapacity( + return ElementsAccessorSubclass::GetCapacityImpl( BackingStoreClass::cast(backing_store)); } - static bool HasElementAtIndex(BackingStoreClass* backing_store, - uint32_t index, - JSObject* holder, - Object* receiver) { + static bool HasElementAtIndexImpl(BackingStoreClass* backing_store, + uint32_t index, + JSObject* holder, + Object* receiver) { uint32_t key = - ElementsAccessorSubclass::GetKeyForIndex(backing_store, index); - MaybeObject* element = ElementsAccessorSubclass::Get(backing_store, - key, - holder, - receiver); + ElementsAccessorSubclass::GetKeyForIndexImpl(backing_store, index); + MaybeObject* element = + ElementsAccessorSubclass::GetImpl(backing_store, key, holder, receiver); return !element->IsTheHole(); } @@ -202,18 +197,18 @@ class ElementsAccessorBase : public ElementsAccessor { uint32_t index, JSObject* holder, Object* receiver) { - return ElementsAccessorSubclass::HasElementAtIndex( + return ElementsAccessorSubclass::HasElementAtIndexImpl( BackingStoreClass::cast(backing_store), index, holder, receiver); } - static uint32_t GetKeyForIndex(BackingStoreClass* backing_store, - uint32_t index) { + static uint32_t GetKeyForIndexImpl(BackingStoreClass* backing_store, + uint32_t index) { return index; } virtual uint32_t GetKeyForIndex(FixedArrayBase* backing_store, uint32_t index) { - return ElementsAccessorSubclass::GetKeyForIndex( + return ElementsAccessorSubclass::GetKeyForIndexImpl( BackingStoreClass::cast(backing_store), index); } @@ -297,10 +292,10 @@ class FastDoubleElementsAccessor return obj->GetHeap()->true_value(); } - static bool HasElementAtIndex(FixedDoubleArray* backing_store, - uint32_t index, - JSObject* holder, - Object* receiver) { + static bool HasElementAtIndexImpl(FixedDoubleArray* backing_store, + uint32_t index, + JSObject* holder, + Object* receiver) { return !backing_store->is_the_hole(index); } }; @@ -316,15 +311,14 @@ class ExternalElementsAccessor friend class ElementsAccessorBase; - static MaybeObject* Get(ExternalArray* backing_store, - uint32_t key, - JSObject* obj, - Object* receiver) { - if (key < ExternalElementsAccessorSubclass::GetCapacity(backing_store)) { - return backing_store->get(key); - } else { - return backing_store->GetHeap()->undefined_value(); - } + static MaybeObject* GetImpl(ExternalArray* backing_store, + uint32_t key, + JSObject* obj, + Object* receiver) { + return + key < ExternalElementsAccessorSubclass::GetCapacityImpl(backing_store) + ? backing_store->get(key) + : backing_store->GetHeap()->undefined_value(); } virtual MaybeObject* Delete(JSObject* obj, @@ -449,10 +443,10 @@ class DictionaryElementsAccessor return DeleteCommon(obj, key, mode); } - static MaybeObject* Get(SeededNumberDictionary* backing_store, - uint32_t key, - JSObject* obj, - Object* receiver) { + static MaybeObject* GetImpl(SeededNumberDictionary* backing_store, + uint32_t key, + JSObject* obj, + Object* receiver) { int entry = backing_store->FindEntry(key); if (entry != SeededNumberDictionary::kNotFound) { Object* element = backing_store->ValueAt(entry); @@ -469,8 +463,8 @@ class DictionaryElementsAccessor return obj->GetHeap()->the_hole_value(); } - static uint32_t GetKeyForIndex(SeededNumberDictionary* dict, - uint32_t index) { + static uint32_t GetKeyForIndexImpl(SeededNumberDictionary* dict, + uint32_t index) { Object* key = dict->KeyAt(index); return Smi::cast(key)->value(); } @@ -484,10 +478,10 @@ class NonStrictArgumentsElementsAccessor friend class ElementsAccessorBase; - static MaybeObject* Get(FixedArray* parameter_map, - uint32_t key, - JSObject* obj, - Object* receiver) { + static MaybeObject* GetImpl(FixedArray* parameter_map, + uint32_t key, + JSObject* obj, + Object* receiver) { Object* probe = GetParameterMapArg(parameter_map, key); if (!probe->IsTheHole()) { Context* context = Context::cast(parameter_map->get(0)); @@ -526,21 +520,21 @@ class NonStrictArgumentsElementsAccessor return obj->GetHeap()->true_value(); } - static uint32_t GetCapacity(FixedArray* parameter_map) { + static uint32_t GetCapacityImpl(FixedArray* parameter_map) { FixedArrayBase* arguments = FixedArrayBase::cast(parameter_map->get(1)); return Max(static_cast(parameter_map->length() - 2), ForArray(arguments)->GetCapacity(arguments)); } - static uint32_t GetKeyForIndex(FixedArray* dict, - uint32_t index) { + static uint32_t GetKeyForIndexImpl(FixedArray* dict, + uint32_t index) { return index; } - static bool HasElementAtIndex(FixedArray* parameter_map, - uint32_t index, - JSObject* holder, - Object* receiver) { + static bool HasElementAtIndexImpl(FixedArray* parameter_map, + uint32_t index, + JSObject* holder, + Object* receiver) { Object* probe = GetParameterMapArg(parameter_map, index); if (!probe->IsTheHole()) { return true; diff --git a/deps/v8/src/globals.h b/deps/v8/src/globals.h index 6c6966aee53..d0c78d6e22b 100644 --- a/deps/v8/src/globals.h +++ b/deps/v8/src/globals.h @@ -255,6 +255,10 @@ const int kBinary32MinExponent = 0x01; const int kBinary32MantissaBits = 23; const int kBinary32ExponentShift = 23; +// Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no +// other bits set. +const uint64_t kQuietNaNMask = static_cast(0xfff) << 51; + // ASCII/UC16 constants // Code-point values in Unicode 4.0 are 21 bits wide. typedef uint16_t uc16; diff --git a/deps/v8/src/objects.cc b/deps/v8/src/objects.cc index 88ebbf4e9dc..ecd4d0e08be 100644 --- a/deps/v8/src/objects.cc +++ b/deps/v8/src/objects.cc @@ -10006,6 +10006,9 @@ template MaybeObject* Dictionary::AtPut( template MaybeObject* Dictionary:: AtPut(uint32_t, Object*); +template Object* Dictionary:: + SlowReverseLookup(Object* value); + template Object* Dictionary:: SlowReverseLookup(Object* value); diff --git a/deps/v8/src/objects.h b/deps/v8/src/objects.h index 1245ed0c127..672cff7abba 100644 --- a/deps/v8/src/objects.h +++ b/deps/v8/src/objects.h @@ -986,7 +986,8 @@ class Smi: public Object { void SmiVerify(); #endif - static const int kMinValue = (-1 << (kSmiValueSize - 1)); + static const int kMinValue = + (static_cast(-1)) << (kSmiValueSize - 1); static const int kMaxValue = -(kMinValue + 1); private: diff --git a/deps/v8/src/v8globals.h b/deps/v8/src/v8globals.h index bf843e5f361..e3fbc2bcd26 100644 --- a/deps/v8/src/v8globals.h +++ b/deps/v8/src/v8globals.h @@ -98,10 +98,6 @@ const int kPageSizeBits = 13; const int kProcessorCacheLineSize = 64; // Constants relevant to double precision floating point numbers. - -// Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no -// other bits set. -const uint64_t kQuietNaNMask = static_cast(0xfff) << 51; // If looking only at the top 32 bits, the QNaN mask is bits 19 to 30. const uint32_t kQuietNaNHighBitsMask = 0xfff << (51 - 32); diff --git a/deps/v8/src/version.cc b/deps/v8/src/version.cc index 4d0e2453546..50a30a31400 100644 --- a/deps/v8/src/version.cc +++ b/deps/v8/src/version.cc @@ -35,7 +35,7 @@ #define MAJOR_VERSION 3 #define MINOR_VERSION 6 #define BUILD_NUMBER 6 -#define PATCH_LEVEL 20 +#define PATCH_LEVEL 24 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) #define IS_CANDIDATE_VERSION 0 diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp index 92d1e5c96a6..50144172a04 100644 --- a/deps/v8/tools/gyp/v8.gyp +++ b/deps/v8/tools/gyp/v8.gyp @@ -641,13 +641,6 @@ ], } ], - ['OS=="solaris"', { - 'sources': [ - '../../src/platform-solaris.cc', - '../../src/platform-posix.cc' - ], - } - ], ['OS=="mac"', { 'sources': [ '../../src/platform-macos.cc', From 2d6a076ab32b20447f7f173eb8b15bf15539932e Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 2 Feb 2012 15:37:59 -0800 Subject: [PATCH 2/5] Patches floating on v8 --- deps/v8/SConstruct | 3 +-- deps/v8/tools/gyp/v8.gyp | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct index f9c33caae5d..1dcdce4a8ce 100644 --- a/deps/v8/SConstruct +++ b/deps/v8/SConstruct @@ -288,7 +288,6 @@ V8_EXTRA_FLAGS = { 'gcc': { 'all': { 'WARNINGFLAGS': ['-Wall', - '-Werror', '-W', '-Wno-unused-parameter', '-Wnon-virtual-dtor'] @@ -382,7 +381,7 @@ MKSNAPSHOT_EXTRA_FLAGS = { DTOA_EXTRA_FLAGS = { 'gcc': { 'all': { - 'WARNINGFLAGS': ['-Werror', '-Wno-uninitialized'], + 'WARNINGFLAGS': ['-Wno-uninitialized'], 'CCFLAGS': GCC_DTOA_EXTRA_CCFLAGS } }, diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp index 50144172a04..92d1e5c96a6 100644 --- a/deps/v8/tools/gyp/v8.gyp +++ b/deps/v8/tools/gyp/v8.gyp @@ -641,6 +641,13 @@ ], } ], + ['OS=="solaris"', { + 'sources': [ + '../../src/platform-solaris.cc', + '../../src/platform-posix.cc' + ], + } + ], ['OS=="mac"', { 'sources': [ '../../src/platform-macos.cc', From b47ba2c431a272d05764ee92055e21969a860076 Mon Sep 17 00:00:00 2001 From: Dave Pacheco Date: Tue, 7 Feb 2012 16:50:05 -0800 Subject: [PATCH 3/5] disable omit-frame-pointer on solaris systems --- deps/v8/SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct index 1dcdce4a8ce..fc67dc5e42b 100644 --- a/deps/v8/SConstruct +++ b/deps/v8/SConstruct @@ -127,7 +127,7 @@ LIBRARY_FLAGS = { 'CPPDEFINES': ['__C99FEATURES__'], 'CPPPATH' : ['/usr/local/include'], 'LIBPATH' : ['/usr/local/lib'], - 'CCFLAGS': ['-ansi'], + 'CCFLAGS': ['-ansi', '-fno-omit-frame-pointer'], }, 'os:win32': { 'CCFLAGS': ['-DWIN32'], From ef5b0f4c8ebeba13239770a9541fc7178c7086dc Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 2 Mar 2012 12:35:58 -0800 Subject: [PATCH 4/5] css: Fix fonts on api index page navigation --- doc/api_assets/style.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index f67e9352e8a..e2fe114e162 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -75,7 +75,7 @@ p { text-rendering: optimizeLegibility; } -.apidoc p { +.apidoc #apicontent p, .apidoc #apicontent li { font-size: 15px; line-height: 22px; color: #000; @@ -280,7 +280,7 @@ hr { margin: 1em 0 2em; } - #toc ul, #api-section-index ul li, #api-section-index ul { + #toc ul, #api-section-index #apicontent ul li, #api-section-index #apicontent ul { font-family: Georgia, FreeSerif, Times, serif; color:#666!important; } @@ -422,6 +422,9 @@ a.anchor { line-height:1em; padding: 0 0 0 195px; color: #666; +} + +#footer p, #footer li { font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; } From 48a2d34cfe6b7e1c9d15202a4ef5e3c82d1fba35 Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 2 Mar 2012 10:29:03 -0800 Subject: [PATCH 5/5] 2012.03.02 Version 0.6.12 (stable) * Upgrade V8 to 3.6.6.24 * dtrace ustack helper improvements (Dave Pacheco) * API Documentation refactor (isaacs) * #2827 net: fix race write() before and after connect() (koichik) * #2554 #2567 throw if fs args for 'start' or 'end' are strings (AJ ONeal) * punycode: Update to v1.0.0 (Mathias Bynens) * Make a fat binary for the OS X pkg (isaacs) * Fix hang on accessing process.stdin (isaacs) * repl: make tab completion work on non-objects (Nathan Rajlich) * Fix fs.watch on OS X (Ben Noordhuis) * Fix #2515 nested setTimeouts cause premature process exit (Ben Noordhuis) * windows: fix time conversion in stat (Igor Zinkovsky) * windows: fs: handle EOF in read (Brandon Philips) * windows: avoid IOCP short-circuit on non-ifs lsps (Igor Zinkovsky) * Upgrade npm to 1.1.4 (isaacs) - windows fixes - Bundle nested bundleDependencies properly - install: support --save with url install targets - shrinkwrap: behave properly with url-installed modules - support installing uncompressed tars or single file modules from urls etc. - don't run make clean on rebuild - support HTTPS-over-HTTP proxy tunneling --- ChangeLog | 42 +++++++++++++++++++++++++++++++++++++++- doc/about/index.html | 2 +- doc/community/index.html | 2 +- doc/index.html | 18 ++++++++--------- doc/logos/index.html | 2 +- src/node_version.h | 2 +- 6 files changed, 54 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4b5fc56f69..7bb9808d461 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,44 @@ -2012.02.17 Version 0.6.11 (stable) +2012.03.02 Version 0.6.12 (stable) + +* Upgrade V8 to 3.6.6.24 + +* dtrace ustack helper improvements (Dave Pacheco) + +* API Documentation refactor (isaacs) + +* #2827 net: fix race write() before and after connect() (koichik) + +* #2554 #2567 throw if fs args for 'start' or 'end' are strings (AJ ONeal) + +* punycode: Update to v1.0.0 (Mathias Bynens) + +* Make a fat binary for the OS X pkg (isaacs) + +* Fix hang on accessing process.stdin (isaacs) + +* repl: make tab completion work on non-objects (Nathan Rajlich) + +* Fix fs.watch on OS X (Ben Noordhuis) + +* Fix #2515 nested setTimeouts cause premature process exit (Ben Noordhuis) + +* windows: fix time conversion in stat (Igor Zinkovsky) + +* windows: fs: handle EOF in read (Brandon Philips) + +* windows: avoid IOCP short-circuit on non-ifs lsps (Igor Zinkovsky) + +* Upgrade npm to 1.1.4 (isaacs) + - windows fixes + - Bundle nested bundleDependencies properly + - install: support --save with url install targets + - shrinkwrap: behave properly with url-installed modules + - support installing uncompressed tars or single file modules from urls etc. + - don't run make clean on rebuild + - support HTTPS-over-HTTP proxy tunneling + + +2012.02.17 Version 0.6.11 (stable), 1eb1fe32250fc88cb5b0a97cddf3e02be02e3f4a * http: allow multiple WebSocket RFC6455 headers (Einar Otto Stangvik) diff --git a/doc/about/index.html b/doc/about/index.html index 192424315b8..612369ea3ac 100644 --- a/doc/about/index.html +++ b/doc/about/index.html @@ -130,7 +130,7 @@ console.log('Server running at http://127.0.0.1:1337/');
  • -

    Copyright 2010 Joyent, Inc, Node.js is a trademark of Joyent, Inc. View license.

    +

    Copyright 2010 Joyent, Inc, Node.js is a trademark of Joyent, Inc. View license.

    diff --git a/doc/community/index.html b/doc/community/index.html index 038996d7f64..6ed965e65c2 100644 --- a/doc/community/index.html +++ b/doc/community/index.html @@ -180,7 +180,7 @@
  • -

    Copyright 2010 Joyent, Inc, Node.js is a trademark of Joyent, Inc. View license.

    +

    Copyright 2010 Joyent, Inc, Node.js is a trademark of Joyent, Inc. View license.