Version 3.14.2
ARM: allowed VFP3 instructions when hardfloat is enabled. (Chromium issue 152506)
Fixed instance_descriptors() and PushStackTraceAndDie regressions. (Chromium issue 151749)
Made GDBJIT interface compile again. (issue 1804)
Fixed Accessors::FunctionGetPrototype's proto chain traversal. (Chromium issue 143967)
Made sure that names of temporaries do not clash with real variables. (issue 2322)
Rejected local module declarations. (Chromium issue 150628)
Rejected uses of lexical for-loop variable on the RHS. (issue 2322)
Fixed slot recording of code target patches. (Chromium issue 152615,chromium:144230)
Changed the Android makefile to use GCC 4.6 instead of GCC 4.4.3.
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@12693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/factory.cc b/src/factory.cc
index 462af59..a2bb939 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -112,10 +112,11 @@
}
-Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors) {
+Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors,
+ int slack) {
ASSERT(0 <= number_of_descriptors);
CALL_HEAP_FUNCTION(isolate(),
- DescriptorArray::Allocate(number_of_descriptors),
+ DescriptorArray::Allocate(number_of_descriptors, slack),
DescriptorArray);
}
@@ -1284,10 +1285,26 @@
result->shared()->DontAdaptArguments();
// Recursively copy parent templates' accessors, 'data' may be modified.
+ int max_number_of_additional_properties = 0;
+ FunctionTemplateInfo* info = *obj;
+ while (true) {
+ Object* props = info->property_accessors();
+ if (!props->IsUndefined()) {
+ Handle<Object> props_handle(props);
+ NeanderArray props_array(props_handle);
+ max_number_of_additional_properties += props_array.length();
+ }
+ Object* parent = info->parent_template();
+ if (parent->IsUndefined()) break;
+ info = FunctionTemplateInfo::cast(parent);
+ }
+
+ Map::EnsureDescriptorSlack(map, max_number_of_additional_properties);
+
while (true) {
Handle<Object> props = Handle<Object>(obj->property_accessors());
if (!props->IsUndefined()) {
- Map::CopyAppendCallbackDescriptors(map, props);
+ Map::AppendCallbackDescriptors(map, props);
}
Handle<Object> parent = Handle<Object>(obj->parent_template());
if (parent->IsUndefined()) break;