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

Unified Diff: src/heap.cc

Issue 1770001: Use Heap::CreateFillerArrayAt to create a filler instead of copied code. (Closed)
Patch Set: Created 10 years, 8 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/builtins.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index eb478846a3957d51c72b6264edf870f817d02189..0cd17917a6af909a23b006f83906820f5bfac787 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -2188,9 +2188,11 @@ void Heap::CreateFillerObjectAt(Address addr, int size) {
if (size == 0) return;
HeapObject* filler = HeapObject::FromAddress(addr);
if (size == kPointerSize) {
- filler->set_map(Heap::one_pointer_filler_map());
+ filler->set_map(one_pointer_filler_map());
+ } else if (size == 2 * kPointerSize) {
+ filler->set_map(two_pointer_filler_map());
} else {
- filler->set_map(Heap::byte_array_map());
+ filler->set_map(byte_array_map());
ByteArray::cast(filler)->set_length(ByteArray::LengthFor(size));
}
}
« no previous file with comments | « src/builtins.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698