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

Unified Diff: src/objects.h

Issue 1607943003: [runtime] Introduce maps for the likely cases of FromPropertyDescriptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 4 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/contexts.h ('k') | src/property-descriptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 64b9aaad10dcc8997643b6d105c0a0e6149ced7e..9427227ac398fcb666b2b214bb96e72d586222ed 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2562,6 +2562,52 @@ class JSObject: public JSReceiver {
};
+// JSAccessorPropertyDescriptor is just a JSObject with a specific initial
+// map. This initial map adds in-object properties for "get", "set",
+// "enumerable" and "configurable" properties, as assigned by the
+// FromPropertyDescriptor function for regular accessor properties.
+class JSAccessorPropertyDescriptor: public JSObject {
+ public:
+ // Offsets of object fields.
+ static const int kGetOffset = JSObject::kHeaderSize;
+ static const int kSetOffset = kGetOffset + kPointerSize;
+ static const int kEnumerableOffset = kSetOffset + kPointerSize;
+ static const int kConfigurableOffset = kEnumerableOffset + kPointerSize;
+ static const int kSize = kConfigurableOffset + kPointerSize;
+ // Indices of in-object properties.
+ static const int kGetIndex = 0;
+ static const int kSetIndex = 1;
+ static const int kEnumerableIndex = 2;
+ static const int kConfigurableIndex = 3;
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(JSAccessorPropertyDescriptor);
+};
+
+
+// JSDataPropertyDescriptor is just a JSObject with a specific initial map.
+// This initial map adds in-object properties for "value", "writable",
+// "enumerable" and "configurable" properties, as assigned by the
+// FromPropertyDescriptor function for regular data properties.
+class JSDataPropertyDescriptor: public JSObject {
+ public:
+ // Offsets of object fields.
+ static const int kValueOffset = JSObject::kHeaderSize;
+ static const int kWritableOffset = kValueOffset + kPointerSize;
+ static const int kEnumerableOffset = kWritableOffset + kPointerSize;
+ static const int kConfigurableOffset = kEnumerableOffset + kPointerSize;
+ static const int kSize = kConfigurableOffset + kPointerSize;
+ // Indices of in-object properties.
+ static const int kValueIndex = 0;
+ static const int kWritableIndex = 1;
+ static const int kEnumerableIndex = 2;
+ static const int kConfigurableIndex = 3;
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataPropertyDescriptor);
+};
+
+
// Common superclass for FixedArrays that allow implementations to share
// common accessors and some code paths.
class FixedArrayBase: public HeapObject {
« no previous file with comments | « src/contexts.h ('k') | src/property-descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698