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

Unified Diff: src/objects.h

Issue 11299004: Use the property load IC for accessing the array length. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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.h
diff --git a/src/objects.h b/src/objects.h
index c86c0b2f431bd08890b7250d4d59d30e770f7e25..c7325e5966990648de02a52d6a811fd201b3bb8b 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8353,7 +8353,7 @@ class Foreign: public HeapObject {
DISALLOW_IMPLICIT_CONSTRUCTORS(Foreign);
};
-
+class PropertyIndex;
Jakob Kummerow 2012/11/16 12:57:10 nit: two empty lines between top-level definitions
Massi 2012/11/19 12:26:15 Done.
// The JSArray describes JavaScript Arrays
// Such an array can be in one of two modes:
// - fast, backing storage is a FixedArray and length <= elements.length();
@@ -8406,6 +8406,9 @@ class JSArray: public JSObject {
static const int kLengthOffset = JSObject::kHeaderSize;
static const int kSize = kLengthOffset + kPointerSize;
+ static inline PropertyIndex ArrayLengthIndex();
+ STATIC_ASSERT(kLengthOffset % kPointerSize == 0);
+
private:
// Expand the fixed array backing of a fast-case JSArray to at least
// the requested size.

Powered by Google App Engine
This is Rietveld 408576698