From c8b6ef248e5fc32df62041ec83463923bc8bdc68 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 5 Dec 2009 15:27:56 +0100 Subject: [PATCH] upgrade v8 to 2.0.3 --- deps/v8/ChangeLog | 25 +- deps/v8/SConstruct | 24 +- deps/v8/include/v8.h | 20 +- deps/v8/src/SConscript | 4 + deps/v8/src/accessors.cc | 70 +- deps/v8/src/accessors.h | 10 +- deps/v8/src/api.cc | 46 +- deps/v8/src/arm/assembler-arm.h | 1 + deps/v8/src/arm/codegen-arm.cc | 131 +++- deps/v8/src/arm/codegen-arm.h | 3 + deps/v8/src/arm/constants-arm.h | 27 +- deps/v8/src/arm/debug-arm.cc | 2 +- deps/v8/src/arm/fast-codegen-arm.cc | 316 ++++++--- deps/v8/src/arm/ic-arm.cc | 13 +- deps/v8/src/arm/macro-assembler-arm.cc | 52 +- deps/v8/src/arm/macro-assembler-arm.h | 7 + deps/v8/src/arm/stub-cache-arm.cc | 5 +- deps/v8/src/array.js | 36 +- deps/v8/src/ast.h | 1 + deps/v8/src/bootstrapper.cc | 26 +- deps/v8/src/code-stubs.h | 1 + deps/v8/src/codegen.cc | 1 + deps/v8/src/compiler.cc | 50 +- deps/v8/src/d8.cc | 8 +- deps/v8/src/debug-delay.js | 21 + deps/v8/src/debug.h | 11 - deps/v8/src/dtoa-config.c | 8 +- deps/v8/src/factory.cc | 5 +- deps/v8/src/fast-codegen.cc | 37 +- deps/v8/src/fast-codegen.h | 13 +- deps/v8/src/flag-definitions.h | 8 +- deps/v8/src/global-handles.cc | 20 + deps/v8/src/global-handles.h | 2 + deps/v8/src/handles.cc | 48 +- deps/v8/src/handles.h | 3 +- deps/v8/src/heap-inl.h | 4 +- deps/v8/src/heap.cc | 193 ++---- deps/v8/src/heap.h | 95 +-- deps/v8/src/ia32/assembler-ia32.h | 2 + deps/v8/src/ia32/codegen-ia32.cc | 312 ++++++++- deps/v8/src/ia32/codegen-ia32.h | 34 + deps/v8/src/ia32/debug-ia32.cc | 8 +- deps/v8/src/ia32/fast-codegen-ia32.cc | 319 +++++++--- deps/v8/src/ia32/ic-ia32.cc | 39 +- deps/v8/src/ia32/macro-assembler-ia32.cc | 145 +++++ deps/v8/src/ia32/macro-assembler-ia32.h | 39 +- deps/v8/src/ia32/stub-cache-ia32.cc | 10 +- deps/v8/src/log.cc | 60 +- deps/v8/src/log.h | 9 + deps/v8/src/messages.js | 65 +- deps/v8/src/mirror-delay.js | 24 +- deps/v8/src/objects-debug.cc | 65 +- deps/v8/src/objects-inl.h | 152 +---- deps/v8/src/objects.cc | 132 ++-- deps/v8/src/objects.h | 506 +++++---------- deps/v8/src/platform-freebsd.cc | 5 - deps/v8/src/platform-linux.cc | 5 - deps/v8/src/platform-macos.cc | 5 - deps/v8/src/platform-openbsd.cc | 597 ++++++++++++++++++ deps/v8/src/platform-posix.cc | 9 +- deps/v8/src/runtime.cc | 124 ++-- deps/v8/src/runtime.h | 11 +- deps/v8/src/runtime.js | 10 +- deps/v8/src/serialize.cc | 87 ++- deps/v8/src/string-stream.cc | 2 +- deps/v8/src/stub-cache.cc | 6 + deps/v8/src/stub-cache.h | 4 +- deps/v8/src/utils.cc | 9 + deps/v8/src/utils.h | 3 + deps/v8/src/v8-counters.h | 5 +- deps/v8/src/version.cc | 2 +- deps/v8/src/x64/assembler-x64.h | 6 + deps/v8/src/x64/codegen-x64.cc | 127 +++- deps/v8/src/x64/codegen-x64.h | 3 + deps/v8/src/x64/debug-x64.cc | 7 +- deps/v8/src/x64/fast-codegen-x64.cc | 325 +++++++--- deps/v8/src/x64/ic-x64.cc | 39 +- deps/v8/src/x64/macro-assembler-x64.cc | 34 + deps/v8/src/x64/macro-assembler-x64.h | 9 + deps/v8/src/x64/stub-cache-x64.cc | 8 +- deps/v8/test/cctest/test-alloc.cc | 4 +- deps/v8/test/cctest/test-api.cc | 231 ++++++- deps/v8/test/cctest/test-debug.cc | 8 +- deps/v8/test/cctest/test-heap.cc | 3 +- deps/v8/test/cctest/test-log.cc | 75 +++ deps/v8/test/cctest/test-serialize.cc | 37 +- deps/v8/test/cctest/test-strings.cc | 117 +++- .../mjsunit/arguments-read-and-assignment.js | 164 +++++ deps/v8/test/mjsunit/compiler/jsnatives.js | 33 + .../test/mjsunit/compiler/objectliterals.js | 57 ++ deps/v8/test/mjsunit/regress/regress-526.js | 32 + deps/v8/test/mjsunit/regress/regress-r3391.js | 77 +++ deps/v8/test/mjsunit/string-add.js | 20 + deps/v8/test/mjsunit/typeof.js | 40 ++ deps/v8/tools/codemap.js | 2 +- deps/v8/tools/gyp/v8.gyp | 11 + deps/v8/tools/presubmit.py | 71 ++- deps/v8/tools/utils.py | 2 + deps/v8/tools/v8.xcodeproj/project.pbxproj | 16 + 99 files changed, 4250 insertions(+), 1460 deletions(-) create mode 100644 deps/v8/src/platform-openbsd.cc create mode 100644 deps/v8/test/mjsunit/arguments-read-and-assignment.js create mode 100644 deps/v8/test/mjsunit/compiler/jsnatives.js create mode 100644 deps/v8/test/mjsunit/compiler/objectliterals.js create mode 100644 deps/v8/test/mjsunit/regress/regress-526.js create mode 100644 deps/v8/test/mjsunit/regress/regress-r3391.js create mode 100644 deps/v8/test/mjsunit/typeof.js diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index bf2c244b41..825431cdec 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,26 @@ +2009-12-03: Version 2.0.3 + + Optimized handling and adding of strings, for-in and Array.join. + + Heap serialization is now non-destructive. + + Improved profiler support with information on time spend in C++ + callbacks registered through the API. + + Added commands to the debugger protocol for starting/stopping + profiling. + + Enabled the non-optimizing compiler for top-level code. + + Changed the API to only allow strings to be set as data objects on + Contexts and scripts to avoid potentially keeping global objects + around for too long (issue 528). + + OpenBSD support patch by Peter Valchev . + + Fixed bugs. + + 2009-11-24: Version 2.0.2 Improved profiler support. @@ -34,7 +57,7 @@ Reverted a change which caused crashes in RegExp replace. - Reverted a change which caused Chromium ui_tests failure. + Reverted a change which caused Chromium ui_tests failure. 2009-10-28: Version 1.3.17 diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct index 4da9b5b4f1..edaa66b75b 100755 --- a/deps/v8/SConstruct +++ b/deps/v8/SConstruct @@ -149,6 +149,11 @@ LIBRARY_FLAGS = { 'LIBPATH' : ['/usr/local/lib'], 'CCFLAGS': ['-ansi'], }, + 'os:openbsd': { + 'CPPPATH' : ['/usr/local/include'], + 'LIBPATH' : ['/usr/local/lib'], + 'CCFLAGS': ['-ansi'], + }, 'os:win32': { 'CCFLAGS': ['-DWIN32'], 'CXXFLAGS': ['-DWIN32'], @@ -298,6 +303,9 @@ MKSNAPSHOT_EXTRA_FLAGS = { 'os:freebsd': { 'LIBS': ['execinfo', 'pthread'] }, + 'os:openbsd': { + 'LIBS': ['execinfo', 'pthread'] + }, 'os:win32': { 'LIBS': ['winmm', 'ws2_32'], }, @@ -344,6 +352,9 @@ CCTEST_EXTRA_FLAGS = { 'os:freebsd': { 'LIBS': ['execinfo', 'pthread'] }, + 'os:openbsd': { + 'LIBS': ['execinfo', 'pthread'] + }, 'os:win32': { 'LIBS': ['winmm', 'ws2_32'] }, @@ -397,7 +408,11 @@ SAMPLE_FLAGS = { }, 'os:freebsd': { 'LIBPATH' : ['/usr/local/lib'], - 'LIBS': ['execinfo', 'pthread'] + 'LIBS': ['execinfo', 'pthread'] + }, + 'os:openbsd': { + 'LIBPATH' : ['/usr/local/lib'], + 'LIBS': ['execinfo', 'pthread'] }, 'os:win32': { 'LIBS': ['winmm', 'ws2_32'] @@ -504,6 +519,9 @@ D8_FLAGS = { 'os:freebsd': { 'LIBS': ['pthread'], }, + 'os:openbsd': { + 'LIBS': ['pthread'], + }, 'os:android': { 'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib'], 'LINKFLAGS': ANDROID_LINKFLAGS, @@ -544,7 +562,7 @@ def GuessToolchain(os): OS_GUESS = utils.GuessOS() TOOLCHAIN_GUESS = GuessToolchain(OS_GUESS) -ARCH_GUESS = utils.GuessArchitecture() or "" +ARCH_GUESS = utils.GuessArchitecture() SIMPLE_OPTIONS = { @@ -554,7 +572,7 @@ SIMPLE_OPTIONS = { 'help': 'the toolchain to use (' + TOOLCHAIN_GUESS + ')' }, 'os': { - 'values': ['freebsd', 'linux', 'macos', 'win32', 'android'], + 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd'], 'default': OS_GUESS, 'help': 'the os to build for (' + OS_GUESS + ')' }, diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 78b46136fd..a8ee8d4329 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -598,7 +598,7 @@ class V8EXPORT Script { * with the debugger as this data object is only available through the * debugger API. */ - void SetData(Handle data); + void SetData(Handle data); }; @@ -2634,7 +2634,7 @@ class V8EXPORT Context { * with the debugger to provide additional information on the context through * the debugger API. */ - void SetData(Handle data); + void SetData(Handle data); Local GetData(); /** @@ -2819,6 +2819,18 @@ template <> struct SmiConstants<8> { const int kSmiShiftSize = SmiConstants::kSmiShiftSize; const int kSmiValueSize = SmiConstants::kSmiValueSize; +template struct InternalConstants; + +// Internal constants for 32-bit systems. +template <> struct InternalConstants<4> { + static const int kStringResourceOffset = 3 * sizeof(void*); +}; + +// Internal constants for 64-bit systems. +template <> struct InternalConstants<8> { + static const int kStringResourceOffset = 2 * sizeof(void*); +}; + /** * This class exports constants and functionality from within v8 that * is necessary to implement inline functions in the v8 api. Don't @@ -2831,7 +2843,9 @@ class Internals { // the implementation of v8. static const int kHeapObjectMapOffset = 0; static const int kMapInstanceTypeOffset = sizeof(void*) + sizeof(int); - static const int kStringResourceOffset = 2 * sizeof(void*); + static const int kStringResourceOffset = + InternalConstants::kStringResourceOffset; + static const int kProxyProxyOffset = sizeof(void*); static const int kJSObjectHeaderSize = 3 * sizeof(void*); static const int kFullStringRepresentationMask = 0x07; diff --git a/deps/v8/src/SConscript b/deps/v8/src/SConscript index cfa462f50f..3b0df17188 100755 --- a/deps/v8/src/SConscript +++ b/deps/v8/src/SConscript @@ -159,6 +159,7 @@ SOURCES = { """), 'simulator:arm': ['arm/simulator-arm.cc'], 'os:freebsd': ['platform-freebsd.cc', 'platform-posix.cc'], + 'os:openbsd': ['platform-openbsd.cc', 'platform-posix.cc'], 'os:linux': ['platform-linux.cc', 'platform-posix.cc'], 'os:android': ['platform-linux.cc', 'platform-posix.cc'], 'os:macos': ['platform-macos.cc', 'platform-posix.cc'], @@ -187,6 +188,9 @@ D8_FILES = { 'os:freebsd': [ 'd8-posix.cc' ], + 'os:openbsd': [ + 'd8-posix.cc' + ], 'os:win32': [ 'd8-windows.cc' ], diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index 734c36445d..56cf135981 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -315,14 +315,11 @@ Object* Accessors::ScriptGetLineEnds(Object* object, void*) { HandleScope scope; Handle