Changeset 161033 in webkit for trunk/Source/JavaScriptCore/runtime/PutPropertySlot.h
- Timestamp:
- Dec 23, 2013, 4:11:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/PutPropertySlot.h
r154199 r161033 28 28 #define PutPropertySlot_h 29 29 30 #include "JSCJSValue.h" 31 30 32 #include <wtf/Assertions.h> 31 33 … … 37 39 class PutPropertySlot { 38 40 public: 39 enum Type { Uncachable, ExistingProperty, NewProperty };41 enum Type { Uncachable, ExistingProperty, NewProperty, CustomProperty }; 40 42 enum Context { UnknownContext, PutById, PutByIdEval }; 43 typedef void (*PutValueFunc)(ExecState*, EncodedJSValue base, EncodedJSValue value); 41 44 42 PutPropertySlot( bool isStrictMode = false, Context context = UnknownContext)45 PutPropertySlot(JSValue thisValue, bool isStrictMode = false, Context context = UnknownContext) 43 46 : m_type(Uncachable) 44 47 , m_base(0) 48 , m_thisValue(thisValue) 45 49 , m_isStrictMode(isStrictMode) 46 50 , m_context(context) 51 , m_putFunction(nullptr) 47 52 { 48 53 } … … 61 66 m_offset = offset; 62 67 } 68 69 void setCustomProperty(JSObject* base, PutValueFunc function) 70 { 71 m_type = CustomProperty; 72 m_base = base; 73 m_putFunction = function; 74 } 63 75 64 76 Context context() const { return static_cast<Context>(m_context); } … … 66 78 Type type() const { return m_type; } 67 79 JSObject* base() const { return m_base; } 80 JSValue thisValue() const { return m_thisValue; } 68 81 69 82 bool isStrictMode() const { return m_isStrictMode; } 70 bool isCacheable() const { return m_type != Uncachable ; }83 bool isCacheable() const { return m_type != Uncachable && m_type != CustomProperty; } 71 84 PropertyOffset cachedOffset() const 72 85 { … … 78 91 Type m_type; 79 92 JSObject* m_base; 93 JSValue m_thisValue; 80 94 PropertyOffset m_offset; 81 95 bool m_isStrictMode; 82 96 uint8_t m_context; 97 PutValueFunc m_putFunction; 98 83 99 }; 84 100
Note:
See TracChangeset
for help on using the changeset viewer.