Changeset 160204 in webkit for trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp
- Timestamp:
- Dec 5, 2013, 5:19:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp
r160133 r160204 40 40 namespace JSC { 41 41 42 static EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);43 static EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);44 static EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);45 static EncodedJSValue regExpObjectSource(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);42 static JSValue regExpObjectGlobal(ExecState*, JSValue, PropertyName); 43 static JSValue regExpObjectIgnoreCase(ExecState*, JSValue, PropertyName); 44 static JSValue regExpObjectMultiline(ExecState*, JSValue, PropertyName); 45 static JSValue regExpObjectSource(ExecState*, JSValue, PropertyName); 46 46 47 47 } // namespace JSC … … 156 156 } 157 157 158 static inline RegExpObject* asRegExpObject(EncodedJSValue value) 159 { 160 return jsCast<RegExpObject*>(JSValue::decode(value)); 161 } 162 163 EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 164 { 165 return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->global())); 166 } 167 168 EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 169 { 170 return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->ignoreCase())); 158 JSValue regExpObjectGlobal(ExecState*, JSValue slotBase, PropertyName) 159 { 160 return jsBoolean(asRegExpObject(slotBase)->regExp()->global()); 161 } 162 163 JSValue regExpObjectIgnoreCase(ExecState*, JSValue slotBase, PropertyName) 164 { 165 return jsBoolean(asRegExpObject(slotBase)->regExp()->ignoreCase()); 171 166 } 172 167 173 EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)168 JSValue regExpObjectMultiline(ExecState*, JSValue slotBase, PropertyName) 174 169 { 175 return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->multiline()));170 return jsBoolean(asRegExpObject(slotBase)->regExp()->multiline()); 176 171 } 177 172 … … 282 277 } 283 278 284 285 286 EncodedJSValue regExpObjectSource(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 279 JSValue regExpObjectSource(ExecState* exec, JSValue slotBase, PropertyName) 287 280 { 288 281 String pattern = asRegExpObject(slotBase)->regExp()->pattern(); 289 282 if (pattern.is8Bit()) 290 return JSValue::encode(regExpObjectSourceInternal(exec, pattern, pattern.characters8(), pattern.length()));291 return JSValue::encode(regExpObjectSourceInternal(exec, pattern, pattern.characters16(), pattern.length()));283 return regExpObjectSourceInternal(exec, pattern, pattern.characters8(), pattern.length()); 284 return regExpObjectSourceInternal(exec, pattern, pattern.characters16(), pattern.length()); 292 285 } 293 286
Note:
See TracChangeset
for help on using the changeset viewer.