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

Unified Diff: src/objects.cc

Issue 7863: - Optimized CopyFixedArray and CopyJSObject. (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
« src/objects.h ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 546)
+++ src/objects.cc (working copy)
@@ -910,33 +910,6 @@
}
-Object* JSObject::Copy(PretenureFlag pretenure) {
- // Never used to copy functions. If functions need to be copied we
- // have to be careful to clear the literals array.
- ASSERT(!IsJSFunction());
-
- // Copy the elements and properties.
- Object* elem = FixedArray::cast(elements())->Copy();
- if (elem->IsFailure()) return elem;
- Object* prop = properties()->Copy();
- if (prop->IsFailure()) return prop;
-
- // Make the clone.
- Object* clone = (pretenure == NOT_TENURED) ?
- Heap::Allocate(map(), NEW_SPACE) :
- Heap::Allocate(map(), OLD_POINTER_SPACE);
- if (clone->IsFailure()) return clone;
- JSObject::cast(clone)->CopyBody(this);
-
- // Set the new elements and properties.
- JSObject::cast(clone)->set_elements(FixedArray::cast(elem));
- JSObject::cast(clone)->set_properties(FixedArray::cast(prop));
-
- // Return the new clone.
- return clone;
-}
-
-
Object* JSObject::AddFastPropertyUsingMap(Map* new_map,
String* name,
Object* value) {
« src/objects.h ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698