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

Unified Diff: src/objects.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
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 572)
+++ src/objects.cc (working copy)
@@ -2580,14 +2580,15 @@
if (obj->IsFailure()) return obj;
// Fill in the content
FixedArray* result = FixedArray::cast(obj);
+ WriteBarrierMode mode = result->GetWriteBarrierMode();
for (int i = 0; i < len0; i++) {
- result->set(i, get(i));
+ result->set(i, get(i), mode);
}
// Fill in the extra keys.
int index = 0;
for (int y = 0; y < len1; y++) {
if (!HasKey(this, other->get(y))) {
- result->set(len0 + index, other->get(y));
+ result->set(len0 + index, other->get(y), mode);
index++;
}
}
@@ -2601,14 +2602,14 @@
Object* obj = Heap::AllocateFixedArray(new_length);
if (obj->IsFailure()) return obj;
FixedArray* result = FixedArray::cast(obj);
- WriteBarrierMode mode = result->GetWriteBarrierMode();
// Copy the content
int len = length();
if (new_length < len) len = new_length;
+ result->set_map(map());
+ WriteBarrierMode mode = result->GetWriteBarrierMode();
for (int i = 0; i < len; i++) {
result->set(i, get(i), mode);
}
- result->set_map(map());
return result;
}
@@ -4047,11 +4048,6 @@
}
-int JSFunction::NumberOfLiterals() {
- return literals()->length();
-}
-
-
Object* JSFunction::SetInstancePrototype(Object* value) {
ASSERT(value->IsJSObject());
@@ -5974,7 +5970,7 @@
int entry = cache->FindInsertionEntry(k, key.Hash());
int index = EntryToIndex(entry);
cache->set(index, k);
- cache->set(index + 1, Smi::FromInt(value));
+ cache->set(index + 1, Smi::FromInt(value), SKIP_WRITE_BARRIER);
cache->ElementAdded();
return cache;
}

Powered by Google App Engine
This is Rietveld 408576698