From 268bcbde7c62e7bc781c79c8b07ea067bd4b9b59 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 30 Oct 2010 11:13:37 -0700 Subject: [PATCH] Upgrade V8 to 2.5.2 --- deps/v8/ChangeLog | 14 + deps/v8/SConstruct | 2 - deps/v8/include/v8.h | 11 +- deps/v8/src/accessors.cc | 86 +- deps/v8/src/accessors.h | 60 +- deps/v8/src/api.cc | 52 +- deps/v8/src/api.h | 35 +- deps/v8/src/arm/codegen-arm.cc | 55 +- deps/v8/src/arm/cpu-arm.cc | 7 +- deps/v8/src/arm/ic-arm.cc | 7 +- deps/v8/src/arm/macro-assembler-arm.cc | 22 + deps/v8/src/arm/regexp-macro-assembler-arm.cc | 2 +- deps/v8/src/arm/simulator-arm.cc | 4 +- deps/v8/src/arm/simulator-arm.h | 66 +- deps/v8/src/arm/stub-cache-arm.cc | 324 ++-- deps/v8/src/assembler.cc | 10 +- deps/v8/src/assembler.h | 3 +- deps/v8/src/bootstrapper.cc | 15 +- deps/v8/src/builtins.cc | 193 ++- deps/v8/src/cached-powers.cc | 57 +- deps/v8/src/cached-powers.h | 30 +- deps/v8/src/code-stubs.cc | 14 +- deps/v8/src/code-stubs.h | 4 +- deps/v8/src/compilation-cache.cc | 16 +- deps/v8/src/debug.cc | 12 +- deps/v8/src/double.h | 61 +- deps/v8/src/execution.cc | 22 +- deps/v8/src/execution.h | 2 +- deps/v8/src/factory.cc | 30 +- deps/v8/src/fast-dtoa.cc | 14 +- deps/v8/src/global-handles.cc | 5 +- deps/v8/src/global-handles.h | 5 +- deps/v8/src/globals.h | 19 +- deps/v8/src/handles-inl.h | 10 +- deps/v8/src/handles.cc | 25 +- deps/v8/src/handles.h | 45 +- deps/v8/src/heap-inl.h | 76 +- deps/v8/src/heap.cc | 1089 +++++++------ deps/v8/src/heap.h | 219 +-- deps/v8/src/ia32/assembler-ia32.cc | 11 +- deps/v8/src/ia32/assembler-ia32.h | 1 - deps/v8/src/ia32/code-stubs-ia32.cc | 72 +- deps/v8/src/ia32/macro-assembler-ia32.cc | 214 ++- deps/v8/src/ia32/macro-assembler-ia32.h | 36 +- .../src/ia32/regexp-macro-assembler-ia32.cc | 2 +- deps/v8/src/ia32/simulator-ia32.h | 21 +- deps/v8/src/ia32/stub-cache-ia32.cc | 394 ++--- deps/v8/src/ic.cc | 330 ++-- deps/v8/src/ic.h | 32 +- deps/v8/src/liveedit.cc | 43 +- deps/v8/src/liveedit.h | 7 +- deps/v8/src/log.cc | 13 +- deps/v8/src/mark-compact.cc | 48 +- deps/v8/src/mark-compact.h | 3 +- deps/v8/src/messages.cc | 4 +- deps/v8/src/objects-debug.cc | 32 +- deps/v8/src/objects-inl.h | 103 +- deps/v8/src/objects.cc | 1307 ++++++++++------ deps/v8/src/objects.h | 515 +++--- deps/v8/src/parser.cc | 4 +- deps/v8/src/platform-freebsd.cc | 5 +- deps/v8/src/platform-linux.cc | 93 +- deps/v8/src/platform-macos.cc | 6 +- deps/v8/src/profile-generator.cc | 4 +- deps/v8/src/property.h | 8 +- deps/v8/src/runtime.cc | 1393 ++++++++++------- deps/v8/src/runtime.h | 45 +- deps/v8/src/serialize.cc | 35 +- deps/v8/src/spaces-inl.h | 8 +- deps/v8/src/spaces.cc | 30 +- deps/v8/src/spaces.h | 50 +- deps/v8/src/strtod.cc | 205 ++- deps/v8/src/stub-cache.cc | 827 ++++++---- deps/v8/src/stub-cache.h | 460 +++--- deps/v8/src/top.cc | 63 +- deps/v8/src/top.h | 26 +- deps/v8/src/v8.cc | 6 +- deps/v8/src/version.cc | 2 +- deps/v8/src/x64/assembler-x64.cc | 8 +- deps/v8/src/x64/code-stubs-x64.cc | 36 +- deps/v8/src/x64/macro-assembler-x64.cc | 199 ++- deps/v8/src/x64/macro-assembler-x64.h | 29 +- deps/v8/src/x64/regexp-macro-assembler-x64.cc | 2 +- deps/v8/src/x64/simulator-x64.h | 23 +- deps/v8/src/x64/stub-cache-x64.cc | 343 ++-- deps/v8/test/cctest/test-alloc.cc | 7 +- deps/v8/test/cctest/test-api.cc | 80 +- deps/v8/test/cctest/test-assembler-arm.cc | 49 +- deps/v8/test/cctest/test-assembler-ia32.cc | 62 +- deps/v8/test/cctest/test-compiler.cc | 22 +- deps/v8/test/cctest/test-disasm-ia32.cc | 7 +- deps/v8/test/cctest/test-heap.cc | 159 +- deps/v8/test/cctest/test-log-stack-tracer.cc | 36 +- deps/v8/test/cctest/test-log.cc | 4 +- deps/v8/test/cctest/test-mark-compact.cc | 95 +- deps/v8/test/cctest/test-serialize.cc | 14 +- deps/v8/test/cctest/test-spaces.cc | 18 +- deps/v8/test/cctest/test-strings.cc | 2 +- deps/v8/test/cctest/test-strtod.cc | 48 + deps/v8/test/mjsunit/bugs/bug-617.js | 44 + deps/v8/test/mjsunit/define-property-gc.js | 45 + deps/v8/test/mjsunit/math-min-max.js | 5 +- deps/v8/test/mjsunit/string-case.js | 43 + deps/v8/tools/windows-tick-processor.bat | 3 +- 104 files changed, 6294 insertions(+), 4270 deletions(-) create mode 100644 deps/v8/test/mjsunit/bugs/bug-617.js create mode 100644 deps/v8/test/mjsunit/define-property-gc.js diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index 36ed4fcdbc..07859597bf 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,17 @@ +2010-10-27: Version 2.5.2 + + Improved sampler resolution on Linux. + + Allowed forcing the use of a simulator from the build script + independently of the host architecture. + + Fixed FreeBSD port (Issue 912). + + Made windows-tick-processor respect D8_PATH. + + Implemented --noinline-new flag fully on IA32, X64 and ARM platforms. + + 2010-10-20: Version 2.5.1 Fixed bug causing spurious out of memory exceptions diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct index 05213fba7f..7107e917df 100644 --- a/deps/v8/SConstruct +++ b/deps/v8/SConstruct @@ -207,7 +207,6 @@ LIBRARY_FLAGS = { 'simulator:arm': { 'CCFLAGS': ['-m32'], 'LINKFLAGS': ['-m32'], - 'CPPDEFINES': ['USE_SIMULATOR'] }, 'arch:mips': { 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], @@ -219,7 +218,6 @@ LIBRARY_FLAGS = { 'simulator:mips': { 'CCFLAGS': ['-m32'], 'LINKFLAGS': ['-m32'], - 'CPPDEFINES': ['USE_SIMULATOR'] }, 'arch:x64': { 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index ef9a41168c..89502cb915 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -467,16 +467,21 @@ class V8EXPORT HandleScope { // typedef in the ImplementationUtilities class. class V8EXPORT Data { public: - int extensions; internal::Object** next; internal::Object** limit; + int level; + inline void Initialize() { - extensions = -1; next = limit = NULL; + level = 0; } }; + + void Leave(); - Data previous_; + + internal::Object** prev_next_; + internal::Object** prev_limit_; // Allow for the active closing of HandleScopes which allows to pass a handle // from the HandleScope being closed to the next top most HandleScope. diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index 3c49846601..7c21659ebc 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -50,7 +50,7 @@ static C* FindInPrototypeChain(Object* obj, bool* found_it) { // Entry point that never should be called. -Object* Accessors::IllegalSetter(JSObject*, Object*, void*) { +MaybeObject* Accessors::IllegalSetter(JSObject*, Object*, void*) { UNREACHABLE(); return NULL; } @@ -62,7 +62,7 @@ Object* Accessors::IllegalGetAccessor(Object* object, void*) { } -Object* Accessors::ReadOnlySetAccessor(JSObject*, Object* value, void*) { +MaybeObject* Accessors::ReadOnlySetAccessor(JSObject*, Object* value, void*) { // According to ECMA-262, section 8.6.2.2, page 28, setting // read-only properties must be silently ignored. return value; @@ -74,7 +74,7 @@ Object* Accessors::ReadOnlySetAccessor(JSObject*, Object* value, void*) { // -Object* Accessors::ArrayGetLength(Object* object, void*) { +MaybeObject* Accessors::ArrayGetLength(Object* object, void*) { // Traverse the prototype chain until we reach an array. bool found_it = false; JSArray* holder = FindInPrototypeChain(object, &found_it); @@ -96,7 +96,7 @@ Object* Accessors::FlattenNumber(Object* value) { } -Object* Accessors::ArraySetLength(JSObject* object, Object* value, void*) { +MaybeObject* Accessors::ArraySetLength(JSObject* object, Object* value, void*) { value = FlattenNumber(value); // Need to call methods that may trigger GC. @@ -144,7 +144,7 @@ const AccessorDescriptor Accessors::ArrayLength = { // -Object* Accessors::StringGetLength(Object* object, void*) { +MaybeObject* Accessors::StringGetLength(Object* object, void*) { Object* value = object; if (object->IsJSValue()) value = JSValue::cast(object)->value(); if (value->IsString()) return Smi::FromInt(String::cast(value)->length()); @@ -166,7 +166,7 @@ const AccessorDescriptor Accessors::StringLength = { // -Object* Accessors::ScriptGetSource(Object* object, void*) { +MaybeObject* Accessors::ScriptGetSource(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->source(); } @@ -184,7 +184,7 @@ const AccessorDescriptor Accessors::ScriptSource = { // -Object* Accessors::ScriptGetName(Object* object, void*) { +MaybeObject* Accessors::ScriptGetName(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->name(); } @@ -202,7 +202,7 @@ const AccessorDescriptor Accessors::ScriptName = { // -Object* Accessors::ScriptGetId(Object* object, void*) { +MaybeObject* Accessors::ScriptGetId(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->id(); } @@ -220,7 +220,7 @@ const AccessorDescriptor Accessors::ScriptId = { // -Object* Accessors::ScriptGetLineOffset(Object* object, void*) { +MaybeObject* Accessors::ScriptGetLineOffset(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->line_offset(); } @@ -238,7 +238,7 @@ const AccessorDescriptor Accessors::ScriptLineOffset = { // -Object* Accessors::ScriptGetColumnOffset(Object* object, void*) { +MaybeObject* Accessors::ScriptGetColumnOffset(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->column_offset(); } @@ -256,7 +256,7 @@ const AccessorDescriptor Accessors::ScriptColumnOffset = { // -Object* Accessors::ScriptGetData(Object* object, void*) { +MaybeObject* Accessors::ScriptGetData(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->data(); } @@ -274,7 +274,7 @@ const AccessorDescriptor Accessors::ScriptData = { // -Object* Accessors::ScriptGetType(Object* object, void*) { +MaybeObject* Accessors::ScriptGetType(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->type(); } @@ -292,7 +292,7 @@ const AccessorDescriptor Accessors::ScriptType = { // -Object* Accessors::ScriptGetCompilationType(Object* object, void*) { +MaybeObject* Accessors::ScriptGetCompilationType(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->compilation_type(); } @@ -310,7 +310,7 @@ const AccessorDescriptor Accessors::ScriptCompilationType = { // -Object* Accessors::ScriptGetLineEnds(Object* object, void*) { +MaybeObject* Accessors::ScriptGetLineEnds(Object* object, void*) { HandleScope scope; Handle