From: Ben Noordhuis Date: Tue, 30 Jul 2013 15:14:55 +0000 (+0200) Subject: v8: upgrade v8 to 3.20.11 X-Git-Tag: v0.11.5~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2fc47ab10bdbcfb39521d04cf5417520e0035163;p=platform%2Fupstream%2Fnodejs.git v8: upgrade v8 to 3.20.11 --- diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index a4c486f..2f524be 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -59,3 +59,4 @@ GTAGS GRTAGS GSYMS GPATH +/_* diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index 7d00fb7..567afd2 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,13 @@ +2013-07-30: Version 3.20.11 + + Performance and stability improvements on all platforms. + + +2013-07-29: Version 3.20.10 + + Performance and stability improvements on all platforms. + + 2013-07-26: Version 3.20.9 Check that ExternalString objects get aligned resources. diff --git a/deps/v8/build/toolchain.gypi b/deps/v8/build/toolchain.gypi index 95e2cd2..36d60c2 100644 --- a/deps/v8/build/toolchain.gypi +++ b/deps/v8/build/toolchain.gypi @@ -60,7 +60,19 @@ 'v8_enable_backtrace%': 0, - # Turns on compiler optimizations in Debug builds (#defines are unaffected). + # Speeds up Debug builds: + # 0 - compiler optimizations off (debuggable) (default). This may + # be 5x slower than Release (or worse). + # 1 - turn on compiler optimizations. and #undef DEBUG/#define NDEBUG. + # This may be hard or impossible to debug. This may still be + # 2x slower than Release (or worse). + # 2 - Turn on optimizations, and also #undef DEBUG / #define NDEBUG + # (but leave V8_ENABLE_CHECKS and most other assertions enabled. + # This may cause some v8 tests to fail in the Debug configuration. + # This roughly matches the performance of a Release build and can + # be used by embedders that need to build their own code as debug + # but don't want or need a debug version of V8. This should produce + # near-release speeds. 'v8_optimized_debug%': 0, # Enable profiling support. Only required on Windows. @@ -435,7 +447,6 @@ 'configurations': { 'Debug': { 'defines': [ - 'DEBUG', 'ENABLE_DISASSEMBLER', 'V8_ENABLE_CHECKS', 'OBJECT_PRINT', @@ -449,41 +460,96 @@ }, { 'RuntimeLibrary': '1', # /MTd }], - ['v8_optimized_debug==1', { - 'Optimization': '1', + ['v8_optimized_debug==0', { + 'Optimization': '0', + }, { + 'Optimization': '2', 'InlineFunctionExpansion': '2', 'EnableIntrinsicFunctions': 'true', 'FavorSizeOrSpeed': '0', 'StringPooling': 'true', 'BasicRuntimeChecks': '0', - }, { - 'Optimization': '0', + 'conditions': [ + ['component=="shared_library"', { + 'RuntimeLibrary': '2', #/MD + }, { + 'RuntimeLibrary': '0', #/MT + }], + ['v8_target_arch=="x64"', { + # TODO(2207): remove this option once the bug is fixed. + 'WholeProgramOptimization': 'true', + }], + ], }], ], }, 'VCLinkerTool': { - 'LinkIncremental': '2', + 'conditions': [ + ['v8_optimized_debug==0', { + 'LinkIncremental': '2', + }, { + 'LinkIncremental': '1', + 'OptimizeReferences': '2', + 'EnableCOMDATFolding': '2', + }], + ], }, }, 'conditions': [ + ['v8_optimized_debug==2', { + 'defines': [ + 'NDEBUG', + ], + }, { + 'defines': [ + 'DEBUG', + ], + }], ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', '-Wnon-virtual-dtor', '-Woverloaded-virtual', '<(wno_array_bounds)' ], 'conditions': [ + ['v8_optimized_debug==0', { + 'cflags!': [ + '-O0', + '-O3', + '-O2', + '-O1', + '-Os', + ], + 'cflags': [ + '-fdata-sections', + '-ffunction-sections', + ], + }], ['v8_optimized_debug==1', { 'cflags!': [ '-O0', + '-O3', # TODO(2807) should be -O1. '-O2', '-Os', ], 'cflags': [ '-fdata-sections', '-ffunction-sections', + '-O1', # TODO(2807) should be -O3. + ], + }], + ['v8_optimized_debug==2', { + 'cflags!': [ + '-O0', '-O1', + '-O2', + '-Os', + ], + 'cflags': [ + '-fdata-sections', + '-ffunction-sections', + '-O3', ], }], - ['v8_optimized_debug==1 and gcc_version==44 and clang==0', { + ['v8_optimized_debug!=0 and gcc_version==44 and clang==0', { 'cflags': [ # Avoid crashes with gcc 4.4 in the v8 test suite. '-fno-tree-vrp', @@ -512,11 +578,11 @@ ['OS=="mac"', { 'xcode_settings': { 'conditions': [ - ['v8_optimized_debug==1', { - 'GCC_OPTIMIZATION_LEVEL': '1', # -O1 - 'GCC_STRICT_ALIASING': 'YES', - }, { + ['v8_optimized_debug==0', { 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 + }, { + 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 + 'GCC_STRICT_ALIASING': 'YES', }], ], }, diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 3607740..eb166ab 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -2719,11 +2719,15 @@ class V8EXPORT Date : public Object { public: static Local New(double time); + // Deprecated, use Date::ValueOf() instead. + // TODO(svenpanne) Actually deprecate when Chrome is adapted. + double NumberValue() const { return ValueOf(); } + /** * A specialization of Value::NumberValue that is more efficient * because we know the structure of this object. */ - double NumberValue() const; + double ValueOf() const; V8_INLINE(static Date* Cast(v8::Value* obj)); @@ -2753,10 +2757,14 @@ class V8EXPORT NumberObject : public Object { public: static Local New(double value); + // Deprecated, use NumberObject::ValueOf() instead. + // TODO(svenpanne) Actually deprecate when Chrome is adapted. + double NumberValue() const { return ValueOf(); } + /** * Returns the Number held by the object. */ - double NumberValue() const; + double ValueOf() const; V8_INLINE(static NumberObject* Cast(v8::Value* obj)); @@ -2772,10 +2780,14 @@ class V8EXPORT BooleanObject : public Object { public: static Local New(bool value); + // Deprecated, use BooleanObject::ValueOf() instead. + // TODO(svenpanne) Actually deprecate when Chrome is adapted. + bool BooleanValue() const { return ValueOf(); } + /** * Returns the Boolean held by the object. */ - bool BooleanValue() const; + bool ValueOf() const; V8_INLINE(static BooleanObject* Cast(v8::Value* obj)); @@ -2791,10 +2803,14 @@ class V8EXPORT StringObject : public Object { public: static Local New(Handle value); + // Deprecated, use StringObject::ValueOf() instead. + // TODO(svenpanne) Actually deprecate when Chrome is adapted. + Local StringValue() const { return ValueOf(); } + /** * Returns the String held by the object. */ - Local StringValue() const; + Local ValueOf() const; V8_INLINE(static StringObject* Cast(v8::Value* obj)); @@ -2812,10 +2828,14 @@ class V8EXPORT SymbolObject : public Object { public: static Local New(Isolate* isolate, Handle value); + // Deprecated, use SymbolObject::ValueOf() instead. + // TODO(svenpanne) Actually deprecate when Chrome is adapted. + Local SymbolValue() const { return ValueOf(); } + /** * Returns the Symbol held by the object. */ - Local SymbolValue() const; + Local ValueOf() const; V8_INLINE(static SymbolObject* Cast(v8::Value* obj)); diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index 51db361..a43eb78 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -292,7 +292,7 @@ const AccessorDescriptor Accessors::ScriptType = { MaybeObject* Accessors::ScriptGetCompilationType(Object* object, void*) { Object* script = JSValue::cast(object)->value(); - return Script::cast(script)->compilation_type(); + return Smi::FromInt(Script::cast(script)->compilation_type()); } @@ -388,8 +388,7 @@ MaybeObject* Accessors::ScriptGetEvalFromScriptPosition(Object* object, void*) { Handle