Push version 2.1.1 to trunk.
[ES5] Implemented Object.defineProperty.
Improved profiler support.
Added SetPrototype method in the public V8 API.
Added GetScriptOrigin and GetScriptLineNumber methods to Function objects in the API.
Performance improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@3905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap.cc b/src/heap.cc
index 5f4d815..fc4e666 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -1498,12 +1498,6 @@
#endif
-void Heap::CreateCEntryDebugBreakStub() {
- DebuggerStatementStub stub;
- set_debugger_statement_code(*stub.GetCode());
-}
-
-
void Heap::CreateJSEntryStub() {
JSEntryStub stub;
set_js_entry_code(*stub.GetCode());
@@ -1531,7 +1525,6 @@
// }
// To workaround the problem, make separate functions without inlining.
Heap::CreateCEntryStub();
- Heap::CreateCEntryDebugBreakStub();
Heap::CreateJSEntryStub();
Heap::CreateJSConstructEntryStub();
#if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP
@@ -1774,6 +1767,7 @@
Object* Heap::NumberToString(Object* number) {
+ Counters::number_to_string_runtime.Increment();
Object* cached = GetNumberStringCache(number);
if (cached != undefined_value()) {
return cached;
@@ -2389,12 +2383,13 @@
map->set_unused_property_fields(in_object_properties);
map->set_prototype(prototype);
- // If the function has only simple this property assignments add field
- // descriptors for these to the initial map as the object cannot be
- // constructed without having these properties.
+ // If the function has only simple this property assignments add
+ // field descriptors for these to the initial map as the object
+ // cannot be constructed without having these properties. Guard by
+ // the inline_new flag so we only change the map if we generate a
+ // specialized construct stub.
ASSERT(in_object_properties <= Map::kMaxPreAllocatedPropertyFields);
- if (fun->shared()->has_only_simple_this_property_assignments() &&
- fun->shared()->this_property_assignments_count() > 0) {
+ if (fun->shared()->CanGenerateInlineConstructor(prototype)) {
int count = fun->shared()->this_property_assignments_count();
if (count > in_object_properties) {
count = in_object_properties;