From e8fd6f2fd1d1f20d5c3931aefb55c40d5531962b Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 17 Nov 2011 16:33:41 +0100 Subject: [PATCH] Update V8 Change-Id: Ie6157e0baa55271707b3e00ed80b67ab79f4f570 Reviewed-by: Kent Hansen --- src/3rdparty/v8 | 2 +- ...shing-and-comparison-methods-to-v8-String.patch | 6 +- ...back-mode-for-named-property-interceptors.patch | 4 +- ...0003-Generalize-external-object-resources.patch | 4 +- src/v8/0004-Introduce-a-QML-compilation-mode.patch | 241 +++++++++++++++++---- ...5-Allow-access-to-the-calling-script-data.patch | 6 +- .../0006-Add-custom-object-compare-callback.patch | 20 +- ...07-Allow-a-script-to-be-flagged-as-native.patch | 6 +- ...-Add-new-v8-api-to-check-if-a-value-is-an.patch | 6 +- src/v8/0009-Fix-deprecated-Python-code.patch | 6 +- .../0010-Remove-execute-flag-from-v8-debug.h.patch | 6 +- src/v8/0011-Fix-warnings.patch | 6 +- ...2-Add-flag-to-avoid-breakpoint-relocation.patch | 147 +++++++++++++ 13 files changed, 382 insertions(+), 78 deletions(-) create mode 100644 src/v8/0012-Add-flag-to-avoid-breakpoint-relocation.patch diff --git a/src/3rdparty/v8 b/src/3rdparty/v8 index 03d5b02..d28b6a0 160000 --- a/src/3rdparty/v8 +++ b/src/3rdparty/v8 @@ -1 +1 @@ -Subproject commit 03d5b0219d5bdd14012c97906de9074d80d6e2de +Subproject commit d28b6a024826aaa48a8b3e69c096d01c91aff2c9 diff --git a/src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch b/src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch index 7b7064b..cb9f4a2 100644 --- a/src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch +++ b/src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch @@ -1,7 +1,7 @@ From 0a86a97f554c4aaa727da1c4481ca6368c68bf85 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Tue, 4 Oct 2011 15:04:21 +1000 -Subject: [PATCH 01/11] Add hashing and comparison methods to v8::String +Subject: [PATCH 01/12] Add hashing and comparison methods to v8::String This allows us to more rapidly search for a v8::String inside a hash of QStrings. @@ -303,7 +303,7 @@ index 9a87ac5..2946d02 100644 class SubStringAsciiSymbolKey : public HashTableKey { diff --git a/src/objects.h b/src/objects.h -index f7d2180..d96e5f9 100644 +index f7d21802..d96e5f9 100644 --- a/src/objects.h +++ b/src/objects.h @@ -6201,6 +6201,9 @@ class String: public HeapObject { @@ -332,5 +332,5 @@ index f7d2180..d96e5f9 100644 private: DISALLOW_IMPLICIT_CONSTRUCTORS(SeqString); -- -1.7.6 +1.7.7.3 diff --git a/src/v8/0002-Add-a-fallback-mode-for-named-property-interceptors.patch b/src/v8/0002-Add-a-fallback-mode-for-named-property-interceptors.patch index 1859153..35db5c2 100644 --- a/src/v8/0002-Add-a-fallback-mode-for-named-property-interceptors.patch +++ b/src/v8/0002-Add-a-fallback-mode-for-named-property-interceptors.patch @@ -1,7 +1,7 @@ From 20eca1d4ce4c56b599a052d496f4660f9ca9c978 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 27 Oct 2011 11:31:56 +0100 -Subject: [PATCH 02/11] Add a "fallback" mode for named property interceptors +Subject: [PATCH 02/12] Add a "fallback" mode for named property interceptors By default interceptors are called before the normal property resolution on objects. When an interceptor is installed as a @@ -357,5 +357,5 @@ index 9c23c2c..0e256c1 100644 return isolate->heap()->undefined_value(); } -- -1.7.6 +1.7.7.3 diff --git a/src/v8/0003-Generalize-external-object-resources.patch b/src/v8/0003-Generalize-external-object-resources.patch index 45e8b73..ba384a6 100644 --- a/src/v8/0003-Generalize-external-object-resources.patch +++ b/src/v8/0003-Generalize-external-object-resources.patch @@ -1,7 +1,7 @@ From 74974cee335e6c22ea99fd9a4bbb9c7fa7323d80 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Tue, 4 Oct 2011 16:06:09 +1000 -Subject: [PATCH 03/11] Generalize external object resources +Subject: [PATCH 03/12] Generalize external object resources V8 was already able to manage and finalize an external string resource. This change generalizes that mechanism to handle a @@ -591,5 +591,5 @@ index ed40061..c38d461 100644 -- -1.7.6 +1.7.7.3 diff --git a/src/v8/0004-Introduce-a-QML-compilation-mode.patch b/src/v8/0004-Introduce-a-QML-compilation-mode.patch index 9b921eb..2082b12 100644 --- a/src/v8/0004-Introduce-a-QML-compilation-mode.patch +++ b/src/v8/0004-Introduce-a-QML-compilation-mode.patch @@ -1,7 +1,7 @@ -From b4bb5845077f9b2ad4359360d2e071ed992ede10 Mon Sep 17 00:00:00 2001 +From ae1c497cf2235df9d73d3c5d3c2b40bcde7e534f Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 27 Oct 2011 13:34:16 +0100 -Subject: [PATCH 04/11] Introduce a QML compilation mode +Subject: [PATCH 04/12] Introduce a QML compilation mode In QML mode, there is a second global object - known as the QML global object. During property resolution, if a property is not @@ -15,54 +15,56 @@ closures etc. created during the run will retain a reference to this object, so different objects can be passed in different script runs. --- - include/v8.h | 19 ++++++++-- - src/api.cc | 52 ++++++++++++++++++++++++----- + include/v8.h | 19 +++++++-- + src/api.cc | 52 +++++++++++++++++++---- src/arm/code-stubs-arm.cc | 4 ++ - src/arm/full-codegen-arm.cc | 28 +++++++++------- + src/arm/full-codegen-arm.cc | 28 +++++++----- src/arm/lithium-arm.cc | 4 +- - src/arm/lithium-arm.h | 12 ++++++- - src/arm/lithium-codegen-arm.cc | 9 +++-- - src/arm/macro-assembler-arm.h | 5 +++ - src/ast-inl.h | 5 +++ - src/ast.cc | 5 +++ + src/arm/lithium-arm.h | 12 +++++- + src/arm/lithium-codegen-arm.cc | 9 ++-- + src/arm/macro-assembler-arm.h | 5 ++ + src/ast-inl.h | 5 ++ + src/ast.cc | 5 ++ src/ast.h | 1 + src/code-stubs.h | 2 +- - src/compiler.cc | 15 +++++++- - src/compiler.h | 16 +++++++-- - src/contexts.cc | 35 +++++++++++++++++++ + src/compiler.cc | 15 ++++++- + src/compiler.h | 16 ++++++- + src/contexts.cc | 35 ++++++++++++++++ src/contexts.h | 4 ++ - src/execution.cc | 31 ++++++++++++++--- + src/execution.cc | 31 ++++++++++++-- src/execution.h | 8 ++++ src/full-codegen.cc | 3 +- src/full-codegen.h | 1 + src/heap.cc | 4 ++ - src/hydrogen-instructions.cc | 5 +++ - src/hydrogen-instructions.h | 21 ++++++++++-- + src/hydrogen-instructions.cc | 5 ++ + src/hydrogen-instructions.h | 21 ++++++++- src/hydrogen.cc | 4 ++ - src/ia32/code-stubs-ia32.cc | 5 +++ - src/ia32/full-codegen-ia32.cc | 28 +++++++++------- - src/ia32/lithium-codegen-ia32.cc | 9 +++-- + src/ia32/code-stubs-ia32.cc | 5 ++ + src/ia32/full-codegen-ia32.cc | 28 +++++++----- + src/ia32/lithium-codegen-ia32.cc | 9 ++-- src/ia32/lithium-ia32.cc | 4 +- src/ia32/lithium-ia32.h | 12 +++++- - src/ia32/macro-assembler-ia32.h | 3 ++ + src/ia32/macro-assembler-ia32.h | 3 + src/objects-inl.h | 2 + - src/objects.h | 4 ++ - src/parser.cc | 28 +++++++++++++-- - src/parser.h | 4 ++- - src/prettyprinter.cc | 3 ++ - src/runtime.cc | 68 +++++++++++++++++++++++++------------- + src/objects.h | 7 +++ + src/parser.cc | 28 +++++++++++-- + src/parser.h | 4 +- + src/prettyprinter.cc | 3 + + src/runtime.cc | 84 +++++++++++++++++++++++++------------- src/runtime.h | 8 ++-- - src/scopes.cc | 63 +++++++++++++++++++++++++++++++++++ + src/scopeinfo.cc | 28 ++++++++++--- + src/scopeinfo.h | 1 + + src/scopes.cc | 63 ++++++++++++++++++++++++++++ src/scopes.h | 8 ++++ src/variables.cc | 3 +- - src/variables.h | 5 +++ + src/variables.h | 5 ++ src/x64/code-stubs-x64.cc | 4 ++ - src/x64/full-codegen-x64.cc | 28 +++++++++------- - src/x64/lithium-codegen-x64.cc | 9 +++-- + src/x64/full-codegen-x64.cc | 28 +++++++----- + src/x64/lithium-codegen-x64.cc | 9 ++-- src/x64/lithium-x64.cc | 4 +- - src/x64/lithium-x64.h | 12 +++++++ - src/x64/macro-assembler-x64.h | 5 +++ - 47 files changed, 494 insertions(+), 118 deletions(-) + src/x64/lithium-x64.h | 12 +++++ + src/x64/macro-assembler-x64.h | 5 ++ + 49 files changed, 531 insertions(+), 129 deletions(-) diff --git a/include/v8.h b/include/v8.h index 3ef4dd6..193e2fe 100644 @@ -1272,10 +1274,20 @@ index 6a80c9c..2e83fb7 100644 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, name_should_print_as_anonymous, diff --git a/src/objects.h b/src/objects.h -index c38d461..73e7f8b 100644 +index c38d461..b71eaac 100644 --- a/src/objects.h +++ b/src/objects.h -@@ -4929,6 +4929,9 @@ class SharedFunctionInfo: public HeapObject { +@@ -3120,6 +3120,9 @@ class SerializedScopeInfo : public FixedArray { + // Is this scope a strict mode scope? + bool IsStrictMode(); + ++ // Is this scope a qml mode scope? ++ bool IsQmlMode(); ++ + // Return the number of stack slots for code. + int NumberOfStackSlots(); + +@@ -4929,6 +4932,9 @@ class SharedFunctionInfo: public HeapObject { inline StrictModeFlag strict_mode_flag(); inline void set_strict_mode_flag(StrictModeFlag strict_mode_flag); @@ -1285,7 +1297,7 @@ index c38d461..73e7f8b 100644 // False if the function definitely does not allocate an arguments object. DECL_BOOLEAN_ACCESSORS(uses_arguments) -@@ -5150,6 +5153,7 @@ class SharedFunctionInfo: public HeapObject { +@@ -5150,6 +5156,7 @@ class SharedFunctionInfo: public HeapObject { kCodeAgeShift, kOptimizationDisabled = kCodeAgeShift + kCodeAgeSize, kStrictModeFunction, @@ -1421,7 +1433,7 @@ index 37c76ce..73812fd 100644 PrintLiteralIndented(buf.start(), value, true); } diff --git a/src/runtime.cc b/src/runtime.cc -index 0e256c1..5746c20 100644 +index 0e256c1..b64e66b 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -1307,19 +1307,23 @@ static Failure* ThrowRedeclarationError(Isolate* isolate, @@ -1601,7 +1613,56 @@ index 0e256c1..5746c20 100644 } -@@ -12034,6 +12053,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluate) { +@@ -11220,10 +11239,12 @@ class ScopeIterator { + ZoneScope zone_scope(isolate, DELETE_ON_EXIT); + Handle