Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: src/heap.cc

Issue 8103: - Fixed performance regression caused by ComputeContextSlotReceiver.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 572)
+++ src/heap.cc (working copy)
@@ -1378,12 +1378,11 @@
Object* result = Allocate(map, NEW_SPACE);
if (result->IsFailure()) return result;
-
+ ASSERT(InNewSpace(result));
ConsString* cons_string = ConsString::cast(result);
- cons_string->set_first(first);
- cons_string->set_second(second);
+ cons_string->set_first(first, SKIP_WRITE_BARRIER);
+ cons_string->set_second(second, SKIP_WRITE_BARRIER);
cons_string->set_length(length);
-
return result;
}
@@ -1615,7 +1614,7 @@
function->set_shared(shared);
function->set_prototype_or_initial_map(prototype);
function->set_context(undefined_value());
- function->set_literals(empty_fixed_array());
+ function->set_literals(empty_fixed_array(), SKIP_WRITE_BARRIER);
return function;
}
@@ -1676,14 +1675,6 @@
Smi::FromInt(length),
SKIP_WRITE_BARRIER);
- // Allocate the elements if needed.
- if (length > 0) {
- // Allocate the fixed array.
- Object* obj = Heap::AllocateFixedArray(length);
- if (obj->IsFailure()) return obj;
- JSObject::cast(result)->set_elements(FixedArray::cast(obj));
- }
-
// Check the state of the object
ASSERT(JSObject::cast(result)->HasFastProperties());
ASSERT(JSObject::cast(result)->HasFastElements());
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698