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

Unified Diff: src/objects-inl.h

Issue 647013: Make setting length on arrays faster. (Closed)
Patch Set: Porting to ARM and x64 Created 10 years, 10 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.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 4355fe9e1fb6b72db3400b1b227ee32d0301b0e0..455a84c8d0747a098841270b4f7db3f4bfb3bf51 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2773,6 +2773,13 @@ bool JSObject::HasIndexedInterceptor() {
}
+bool JSObject::AllowsSetElementsLength() {
+ bool result = elements()->IsFixedArray();
+ ASSERT(result == (!HasPixelElements() && !HasExternalArrayElements()));
+ return result;
+}
+
+
StringDictionary* JSObject::property_dictionary() {
ASSERT(!HasFastProperties());
return StringDictionary::cast(properties());
« no previous file with comments | « src/objects.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698