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