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

Unified Diff: src/objects.h

Issue 10442129: Implement implicit instance checks for API accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 7 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 076368830a934e3fa16080923443d16f75e1c225..4d6e8c020b8dfdf0ae2c4d649470ffd431d96b5d 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8086,6 +8086,7 @@ class AccessorInfo: public Struct {
DECL_ACCESSORS(data, Object)
DECL_ACCESSORS(name, Object)
DECL_ACCESSORS(flag, Smi)
+ DECL_ACCESSORS(compatible, Object)
Sven Panne 2012/06/04 07:50:32 The name "compatible" is a bit unclear, something
Michael Starzinger 2012/06/04 09:11:15 Done. I agree, the name bothered me as well, "expe
inline bool all_can_read();
inline void set_all_can_read(bool value);
@@ -8099,6 +8100,9 @@ class AccessorInfo: public Struct {
inline PropertyAttributes property_attributes();
inline void set_property_attributes(PropertyAttributes attributes);
+ // Checks whether the given receiver is compatible with this accessor.
+ inline bool IsCompatibleReceiver(Object* receiver);
+
static inline AccessorInfo* cast(Object* obj);
#ifdef OBJECT_PRINT
@@ -8116,7 +8120,8 @@ class AccessorInfo: public Struct {
static const int kDataOffset = kSetterOffset + kPointerSize;
static const int kNameOffset = kDataOffset + kPointerSize;
static const int kFlagOffset = kNameOffset + kPointerSize;
- static const int kSize = kFlagOffset + kPointerSize;
+ static const int kCompatibleOffset = kFlagOffset + kPointerSize;
+ static const int kSize = kCompatibleOffset + kPointerSize;
private:
// Bit positions in flag.

Powered by Google App Engine
This is Rietveld 408576698