summaryrefslogtreecommitdiffstats
path: root/src/v8/0002-Add-a-bit-field-3-to-Map.patch
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2011-08-16 10:50:00 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-29 10:16:01 +0200
commit9830cb8e5992a352ec6508491ab52e8f2a9da877 (patch)
tree9baa3969878a1e070c56c9a3a67143c2d96ee5d6 /src/v8/0002-Add-a-bit-field-3-to-Map.patch
parent13b3545e833f6175f686c9776e1510db3f3f11eb (diff)
Add QtV8 library to QtBase
This adds Aaron's copy of V8 to src/3rdparty/v8 (as a git submodule), and builds it as a "normal" Qt library (without any dependencies on Qt itself). The library can be added to a project with QT += v8-private V8 API headers are available as private includes, e.g. #include <private/v8.h> The API is private because we're exposing a third-party API directly, and we don't want to (and cannot) make source or binary compatibility guarantees for it. Since we want the V8 public API headers to be private headers in Qt, syncqt and sync.profile were extended to understand a new configuration option, the @allmoduleheadersprivate array, that tells syncqt whether all the library headers should be treated as private even though they don't follow the _p.h Qt convention. The V8 project files, patches and autotests are copied from the QtDeclarative repository. The next step after this commit is to remove QtDeclarative's copy of V8 and link with QtV8 instead. Task-number: QTBUG-20963 Change-Id: Ib8820362cdbc8fa662a5e97db841656cf38d1b62 Reviewed-on: http://codereview.qt.nokia.com/3092 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/v8/0002-Add-a-bit-field-3-to-Map.patch')
-rw-r--r--src/v8/0002-Add-a-bit-field-3-to-Map.patch118
1 files changed, 118 insertions, 0 deletions
diff --git a/src/v8/0002-Add-a-bit-field-3-to-Map.patch b/src/v8/0002-Add-a-bit-field-3-to-Map.patch
new file mode 100644
index 0000000000..dda9fa0dff
--- /dev/null
+++ b/src/v8/0002-Add-a-bit-field-3-to-Map.patch
@@ -0,0 +1,118 @@
+From 7c9cfff80b7864d5687432d424074e51712c4a07 Mon Sep 17 00:00:00 2001
+From: Aaron Kennedy <aaron.kennedy@nokia.com>
+Date: Mon, 23 May 2011 15:55:26 +1000
+Subject: [PATCH 02/13] Add a bit field 3 to Map
+
+Bit field 3 will be used to add QML specific map flags.
+---
+ src/heap.cc | 2 ++
+ src/objects-inl.h | 10 ++++++++++
+ src/objects.cc | 2 ++
+ src/objects.h | 9 ++++++++-
+ 4 files changed, 22 insertions(+), 1 deletions(-)
+
+diff --git a/src/heap.cc b/src/heap.cc
+index 930c97b..900f462 100644
+--- a/src/heap.cc
++++ b/src/heap.cc
+@@ -1573,6 +1573,7 @@ MaybeObject* Heap::AllocatePartialMap(InstanceType instance_type,
+ reinterpret_cast<Map*>(result)->set_unused_property_fields(0);
+ reinterpret_cast<Map*>(result)->set_bit_field(0);
+ reinterpret_cast<Map*>(result)->set_bit_field2(0);
++ reinterpret_cast<Map*>(result)->set_bit_field3(0);
+ return result;
+ }
+
+@@ -1599,6 +1600,7 @@ MaybeObject* Heap::AllocateMap(InstanceType instance_type, int instance_size) {
+ map->set_unused_property_fields(0);
+ map->set_bit_field(0);
+ map->set_bit_field2((1 << Map::kIsExtensible) | (1 << Map::kHasFastElements));
++ map->set_bit_field3(0);
+
+ // If the map object is aligned fill the padding area with Smi 0 objects.
+ if (Map::kPadStart < Map::kSize) {
+diff --git a/src/objects-inl.h b/src/objects-inl.h
+index c82080d..cce3edd 100644
+--- a/src/objects-inl.h
++++ b/src/objects-inl.h
+@@ -2430,6 +2430,16 @@ void Map::set_bit_field2(byte value) {
+ }
+
+
++byte Map::bit_field3() {
++ return READ_BYTE_FIELD(this, kBitField3Offset);
++}
++
++
++void Map::set_bit_field3(byte value) {
++ WRITE_BYTE_FIELD(this, kBitField3Offset, value);
++}
++
++
+ void Map::set_non_instance_prototype(bool value) {
+ if (value) {
+ set_bit_field(bit_field() | (1 << kHasNonInstancePrototype));
+diff --git a/src/objects.cc b/src/objects.cc
+index dc4b260..79d7240 100644
+--- a/src/objects.cc
++++ b/src/objects.cc
+@@ -3614,6 +3614,7 @@ MaybeObject* Map::CopyDropDescriptors() {
+ }
+ Map::cast(result)->set_bit_field(bit_field());
+ Map::cast(result)->set_bit_field2(bit_field2());
++ Map::cast(result)->set_bit_field3(bit_field3());
+ Map::cast(result)->set_is_shared(false);
+ Map::cast(result)->ClearCodeCache(heap);
+ return result;
+@@ -3642,6 +3643,7 @@ MaybeObject* Map::CopyNormalized(PropertyNormalizationMode mode,
+
+ Map::cast(result)->set_bit_field(bit_field());
+ Map::cast(result)->set_bit_field2(bit_field2());
++ Map::cast(result)->set_bit_field3(bit_field3());
+
+ Map::cast(result)->set_is_shared(sharing == SHARED_NORMALIZED_MAP);
+
+diff --git a/src/objects.h b/src/objects.h
+index 6e26f57..07e1089 100644
+--- a/src/objects.h
++++ b/src/objects.h
+@@ -3597,6 +3597,10 @@ class Map: public HeapObject {
+ inline byte bit_field2();
+ inline void set_bit_field2(byte value);
+
++ // Bit field 3.
++ inline byte bit_field3();
++ inline void set_bit_field3(byte value);
++
+ // Tells whether the object in the prototype property will be used
+ // for instances created from this function. If the prototype
+ // property is set to a value that is not a JSObject, the prototype
+@@ -3844,7 +3848,7 @@ class Map: public HeapObject {
+ // Layout description.
+ static const int kInstanceSizesOffset = HeapObject::kHeaderSize;
+ static const int kInstanceAttributesOffset = kInstanceSizesOffset + kIntSize;
+- static const int kPrototypeOffset = kInstanceAttributesOffset + kIntSize;
++ static const int kPrototypeOffset = POINTER_SIZE_ALIGN(kInstanceAttributesOffset + 2 * kIntSize);
+ static const int kConstructorOffset = kPrototypeOffset + kPointerSize;
+ static const int kInstanceDescriptorsOffset =
+ kConstructorOffset + kPointerSize;
+@@ -3876,6 +3880,7 @@ class Map: public HeapObject {
+ static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 1;
+ static const int kBitFieldOffset = kInstanceAttributesOffset + 2;
+ static const int kBitField2Offset = kInstanceAttributesOffset + 3;
++ static const int kBitField3Offset = kInstanceAttributesOffset + 4;
+
+ STATIC_CHECK(kInstanceTypeOffset == Internals::kMapInstanceTypeOffset);
+
+@@ -3898,6 +3903,8 @@ class Map: public HeapObject {
+ static const int kIsShared = 5;
+ static const int kHasExternalArrayElements = 6;
+
++ // Bit positions for bit field 3
++
+ // Layout of the default cache. It holds alternating name and code objects.
+ static const int kCodeCacheEntrySize = 2;
+ static const int kCodeCacheEntryNameOffset = 0;
+--
+1.7.2.3
+