Version 3.4.7.
Fixed 64-bit build on FreeBSD.
Added API to set the property attributes for the prototype property on functions created from FunctionTemplates.
Bugfixes and performance work.
git-svn-id: http://v8.googlecode.com/svn/trunk@8431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap.cc b/src/heap.cc
index 58ad372..0ce5e34 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -523,11 +523,6 @@
GarbageCollectionEpilogue();
}
-
-#ifdef ENABLE_LOGGING_AND_PROFILING
- if (FLAG_log_gc) HeapProfiler::WriteSample();
-#endif
-
return next_gc_likely_to_collect_more;
}
@@ -2639,12 +2634,13 @@
MaybeObject* Heap::AllocateSubString(String* buffer,
- int start,
- int end,
- PretenureFlag pretenure) {
+ int start,
+ int end,
+ PretenureFlag pretenure) {
int length = end - start;
-
- if (length == 1) {
+ if (length == 0) {
+ return empty_string();
+ } else if (length == 1) {
return LookupSingleCharacterStringFromCode(buffer->Get(start));
} else if (length == 2) {
// Optimization for 2-byte strings often used as keys in a decompression
@@ -2984,9 +2980,6 @@
if (!maybe_result->ToObject(&result)) return maybe_result;
}
HeapObject::cast(result)->set_map(map);
-#ifdef ENABLE_LOGGING_AND_PROFILING
- isolate_->producer_heap_profile()->RecordJSObjectAllocation(result);
-#endif
return result;
}
@@ -3435,9 +3428,6 @@
JSObject::cast(clone)->set_properties(FixedArray::cast(prop));
}
// Return the new clone.
-#ifdef ENABLE_LOGGING_AND_PROFILING
- isolate_->producer_heap_profile()->RecordJSObjectAllocation(clone);
-#endif
return clone;
}
@@ -5122,11 +5112,6 @@
LOG(isolate_, IntPtrTEvent("heap-capacity", Capacity()));
LOG(isolate_, IntPtrTEvent("heap-available", Available()));
-#ifdef ENABLE_LOGGING_AND_PROFILING
- // This should be called only after initial objects have been created.
- isolate_->producer_heap_profile()->Setup();
-#endif
-
return true;
}