Changeset 37845 in webkit for trunk/JavaScriptCore/kjs/RegExpObject.cpp
- Timestamp:
- Oct 24, 2008, 9:22:51 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/RegExpObject.cpp
r37684 r37845 30 30 namespace JSC { 31 31 32 static JSValue PtrregExpObjectGlobal(ExecState*, const Identifier&, const PropertySlot&);33 static JSValue PtrregExpObjectIgnoreCase(ExecState*, const Identifier&, const PropertySlot&);34 static JSValue PtrregExpObjectMultiline(ExecState*, const Identifier&, const PropertySlot&);35 static JSValue PtrregExpObjectSource(ExecState*, const Identifier&, const PropertySlot&);36 static JSValue PtrregExpObjectLastIndex(ExecState*, const Identifier&, const PropertySlot&);37 static void setRegExpObjectLastIndex(ExecState*, JSObject*, JSValue Ptr);32 static JSValue* regExpObjectGlobal(ExecState*, const Identifier&, const PropertySlot&); 33 static JSValue* regExpObjectIgnoreCase(ExecState*, const Identifier&, const PropertySlot&); 34 static JSValue* regExpObjectMultiline(ExecState*, const Identifier&, const PropertySlot&); 35 static JSValue* regExpObjectSource(ExecState*, const Identifier&, const PropertySlot&); 36 static JSValue* regExpObjectLastIndex(ExecState*, const Identifier&, const PropertySlot&); 37 static void setRegExpObjectLastIndex(ExecState*, JSObject*, JSValue*); 38 38 39 39 } // namespace JSC … … 72 72 } 73 73 74 JSValue PtrregExpObjectGlobal(ExecState*, const Identifier&, const PropertySlot& slot)74 JSValue* regExpObjectGlobal(ExecState*, const Identifier&, const PropertySlot& slot) 75 75 { 76 76 return jsBoolean(asRegExpObject(slot.slotBase())->regExp()->global()); 77 77 } 78 78 79 JSValue PtrregExpObjectIgnoreCase(ExecState*, const Identifier&, const PropertySlot& slot)79 JSValue* regExpObjectIgnoreCase(ExecState*, const Identifier&, const PropertySlot& slot) 80 80 { 81 81 return jsBoolean(asRegExpObject(slot.slotBase())->regExp()->ignoreCase()); 82 82 } 83 83 84 JSValue PtrregExpObjectMultiline(ExecState*, const Identifier&, const PropertySlot& slot)84 JSValue* regExpObjectMultiline(ExecState*, const Identifier&, const PropertySlot& slot) 85 85 { 86 86 return jsBoolean(asRegExpObject(slot.slotBase())->regExp()->multiline()); 87 87 } 88 88 89 JSValue PtrregExpObjectSource(ExecState* exec, const Identifier&, const PropertySlot& slot)89 JSValue* regExpObjectSource(ExecState* exec, const Identifier&, const PropertySlot& slot) 90 90 { 91 91 return jsString(exec, asRegExpObject(slot.slotBase())->regExp()->pattern()); 92 92 } 93 93 94 JSValue PtrregExpObjectLastIndex(ExecState* exec, const Identifier&, const PropertySlot& slot)94 JSValue* regExpObjectLastIndex(ExecState* exec, const Identifier&, const PropertySlot& slot) 95 95 { 96 96 return jsNumber(exec, asRegExpObject(slot.slotBase())->lastIndex()); 97 97 } 98 98 99 void RegExpObject::put(ExecState* exec, const Identifier& propertyName, JSValue Ptrvalue, PutPropertySlot& slot)99 void RegExpObject::put(ExecState* exec, const Identifier& propertyName, JSValue* value, PutPropertySlot& slot) 100 100 { 101 101 lookupPut<RegExpObject, JSObject>(exec, propertyName, value, ExecState::regExpTable(exec), this, slot); 102 102 } 103 103 104 void setRegExpObjectLastIndex(ExecState* exec, JSObject* baseObject, JSValue Ptrvalue)104 void setRegExpObjectLastIndex(ExecState* exec, JSObject* baseObject, JSValue* value) 105 105 { 106 106 asRegExpObject(baseObject)->setLastIndex(value->toInteger(exec)); … … 144 144 } 145 145 146 JSValue PtrRegExpObject::test(ExecState* exec, const ArgList& args)146 JSValue* RegExpObject::test(ExecState* exec, const ArgList& args) 147 147 { 148 148 return jsBoolean(match(exec, args)); 149 149 } 150 150 151 JSValue PtrRegExpObject::exec(ExecState* exec, const ArgList& args)151 JSValue* RegExpObject::exec(ExecState* exec, const ArgList& args) 152 152 { 153 153 if (match(exec, args)) … … 156 156 } 157 157 158 static JSValue Ptr callRegExpObject(ExecState* exec, JSObject* function, JSValuePtr, const ArgList& args)158 static JSValue* callRegExpObject(ExecState* exec, JSObject* function, JSValue*, const ArgList& args) 159 159 { 160 160 return asRegExpObject(function)->exec(exec, args);
Note:
See TracChangeset
for help on using the changeset viewer.