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

Unified Diff: src/objects.cc

Issue 143693003: Retry landing "Implement zone-allocated types" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments Created 6 years, 11 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/objects.h ('k') | src/types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 9c1a9cd69f5ee0ceba6416fdba0a2309660f541b..636113d439e3f21288435e1dae6df74b27bab3b1 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -7905,6 +7905,14 @@ MaybeObject* PolymorphicCodeCacheHashTable::Put(MapHandleList* maps,
}
+void FixedArray::Shrink(int new_length) {
+ ASSERT(0 <= new_length && new_length <= length());
+ if (new_length < length()) {
+ RightTrimFixedArray<FROM_MUTATOR>(GetHeap(), this, length() - new_length);
+ }
+}
+
+
MaybeObject* FixedArray::AddKeysFromJSArray(JSArray* array) {
ElementsAccessor* accessor = array->GetElementsAccessor();
MaybeObject* maybe_result =
« no previous file with comments | « src/objects.h ('k') | src/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698