Changeset 80743 in webkit for trunk/Source/JavaScriptCore/runtime/RegExpObject.h
- Timestamp:
- Mar 10, 2011, 12:31:21 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/RegExpObject.h
r79211 r80743 29 29 class RegExpObject : public JSObjectWithGlobalObject { 30 30 public: 31 typedef JSObjectWithGlobalObject Base; 32 31 33 RegExpObject(JSGlobalObject* globalObject, NonNullPassRefPtr<Structure>, NonNullPassRefPtr<RegExp>); 32 34 virtual ~RegExpObject(); … … 35 37 RegExp* regExp() const { return d->regExp.get(); } 36 38 37 void setLastIndex(double lastIndex) { d->lastIndex = lastIndex; } 38 double lastIndex() const { return d->lastIndex; } 39 void setLastIndex(size_t lastIndex) 40 { 41 d->lastIndex.setWithoutWriteBarrier(jsNumber(lastIndex)); 42 } 43 void setLastIndex(JSGlobalData& globalData, JSValue lastIndex) 44 { 45 d->lastIndex.set(globalData, this, lastIndex); 46 } 47 JSValue getLastIndex() const 48 { 49 return d->lastIndex.get(); 50 } 39 51 40 52 JSValue test(ExecState*); … … 53 65 54 66 protected: 55 static const unsigned StructureFlags = Overrides GetOwnPropertySlot | JSObjectWithGlobalObject::StructureFlags;56 67 static const unsigned StructureFlags = OverridesMarkChildren | OverridesGetOwnPropertySlot | JSObjectWithGlobalObject::StructureFlags; 68 57 69 private: 70 virtual void markChildren(MarkStack&); 71 58 72 bool match(ExecState*); 59 73 … … 61 75 WTF_MAKE_FAST_ALLOCATED; 62 76 public: 63 RegExpObjectData(NonNullPassRefPtr<RegExp> regExp , double lastIndex)77 RegExpObjectData(NonNullPassRefPtr<RegExp> regExp) 64 78 : regExp(regExp) 65 , lastIndex(lastIndex)66 79 { 80 lastIndex.setWithoutWriteBarrier(jsNumber(0)); 67 81 } 68 82 69 83 RefPtr<RegExp> regExp; 70 doublelastIndex;84 WriteBarrier<Unknown> lastIndex; 71 85 }; 72 86 #if COMPILER(MSVC)
Note:
See TracChangeset
for help on using the changeset viewer.