From bc2eac1ef3e6902f8fed65f72b70b582f93bcb19 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 7 Sep 2011 10:51:39 +1000 Subject: Update V8 This fixes a few bugs in QML mode name resolution and simplifies our V8 patchset a little by folding some patches together. Change-Id: Ia528a43ac8ccad95ac81bcdff5d05aaeab4b48b2 Reviewed-on: http://codereview.qt.nokia.com/4294 Reviewed-by: Aaron Kennedy --- src/v8/0005-Introduce-a-QML-compilation-mode.patch | 509 ++++++++++++--------- 1 file changed, 294 insertions(+), 215 deletions(-) (limited to 'src/v8/0005-Introduce-a-QML-compilation-mode.patch') diff --git a/src/v8/0005-Introduce-a-QML-compilation-mode.patch b/src/v8/0005-Introduce-a-QML-compilation-mode.patch index 3c1cab2497..d1b4d4d510 100644 --- a/src/v8/0005-Introduce-a-QML-compilation-mode.patch +++ b/src/v8/0005-Introduce-a-QML-compilation-mode.patch @@ -1,7 +1,7 @@ -From fd7d475e298e5b63cd6383c78cc900635c82aa38 Mon Sep 17 00:00:00 2001 +From 60c1a26bf89d3b06bcdd8408fcee89a018120f32 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 23 May 2011 18:26:19 +1000 -Subject: [PATCH 05/16] Introduce a QML compilation mode +Subject: [PATCH 05/14] 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,8 +15,8 @@ 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 | 18 ++++++++-- - src/api.cc | 52 ++++++++++++++++++++++++----- + include/v8.h | 18 +++++++-- + src/api.cc | 52 ++++++++++++++++++++++----- src/arm/code-stubs-arm.cc | 4 ++ src/arm/full-codegen-arm.cc | 26 ++++++++------ src/arm/lithium-arm.cc | 2 +- @@ -27,10 +27,10 @@ runs. src/ast.h | 1 + src/code-stubs.h | 2 +- src/compiler.cc | 15 +++++++- - src/compiler.h | 22 ++++++++++-- - src/contexts.cc | 23 +++++++++++++ + src/compiler.h | 22 +++++++++-- + src/contexts.cc | 35 ++++++++++++++++++ src/contexts.h | 4 ++ - src/execution.cc | 28 +++++++++++++-- + src/execution.cc | 28 ++++++++++++-- src/execution.h | 6 +++ src/full-codegen.cc | 3 +- src/full-codegen.h | 1 + @@ -43,14 +43,14 @@ runs. src/ia32/lithium-ia32.cc | 2 +- src/ia32/lithium-ia32.h | 6 +++- src/ia32/macro-assembler-ia32.h | 5 +++ - src/objects-inl.h | 12 +++++++ + src/objects-inl.h | 12 ++++++ src/objects.h | 5 +++ - src/parser.cc | 27 +++++++++++++-- + src/parser.cc | 27 ++++++++++++-- src/parser.h | 4 ++- src/prettyprinter.cc | 3 ++ - src/runtime.cc | 68 ++++++++++++++++++++++++------------- + src/runtime.cc | 72 ++++++++++++++++++++++++------------- src/runtime.h | 8 ++-- - src/scopes.cc | 10 +++++ + src/scopes.cc | 59 +++++++++++++++++++++++++++++++ src/scopes.h | 7 ++++ src/variables.cc | 3 +- src/variables.h | 5 +++ @@ -60,10 +60,10 @@ runs. src/x64/lithium-x64.cc | 2 +- src/x64/lithium-x64.h | 6 +++ src/x64/macro-assembler-x64.h | 5 +++ - 45 files changed, 391 insertions(+), 108 deletions(-) + 45 files changed, 455 insertions(+), 109 deletions(-) diff --git a/include/v8.h b/include/v8.h -index 7f06ae7..a858eae 100644 +index 205e856..d78ab1f 100644 --- a/include/v8.h +++ b/include/v8.h @@ -577,6 +577,10 @@ class ScriptOrigin { @@ -74,7 +74,7 @@ index 7f06ae7..a858eae 100644 + Default = 0x00, + QmlMode = 0x01 + }; - + /** * Compiles the specified script (context-independent). @@ -596,7 +600,8 @@ class V8EXPORT Script { @@ -84,7 +84,7 @@ index 7f06ae7..a858eae 100644 - Handle script_data = Handle()); + Handle script_data = Handle(), + CompileFlags = Default); - + /** * Compiles the specified script using the specified file name @@ -609,7 +614,8 @@ class V8EXPORT Script { @@ -94,7 +94,7 @@ index 7f06ae7..a858eae 100644 - Handle file_name); + Handle file_name, + CompileFlags = Default); - + /** * Compiles the specified script (bound to current context). @@ -630,7 +636,8 @@ class V8EXPORT Script { @@ -104,7 +104,7 @@ index 7f06ae7..a858eae 100644 - Handle script_data = Handle()); + Handle script_data = Handle(), + CompileFlags = Default); - + /** * Compiles the specified script using the specified file name @@ -647,7 +654,8 @@ class V8EXPORT Script { @@ -114,7 +114,7 @@ index 7f06ae7..a858eae 100644 - Handle script_data = Handle()); + Handle script_data = Handle(), + CompileFlags = Default); - + /** * Runs the script returning the resulting value. If the script is @@ -657,6 +665,7 @@ class V8EXPORT Script { @@ -122,15 +122,15 @@ index 7f06ae7..a858eae 100644 */ Local Run(); + Local Run(Handle qml); - + /** * Returns the script id value. -@@ -3326,6 +3335,7 @@ class V8EXPORT Context { +@@ -3327,6 +3336,7 @@ class V8EXPORT Context { * JavaScript frames an empty handle is returned. */ static Local GetCalling(); + static Local GetCallingQmlGlobal(); - + /** * Sets the security token for the context. To access an object in diff --git a/src/api.cc b/src/api.cc @@ -158,18 +158,18 @@ index 1a6fbbb..39767f4 100644 EXCEPTION_BAILOUT_CHECK(isolate, Local