Changeset 160133 in webkit for trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp
- Timestamp:
- Dec 4, 2013, 3:20:48 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp
r156668 r160133 40 40 namespace JSC { 41 41 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);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); 46 46 47 47 } // namespace JSC … … 156 156 } 157 157 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()); 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())); 166 171 } 167 172 168 JSValue regExpObjectMultiline(ExecState*, JSValue slotBase, PropertyName)173 EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 169 174 { 170 return jsBoolean(asRegExpObject(slotBase)->regExp()->multiline());175 return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->multiline())); 171 176 } 172 177 … … 277 282 } 278 283 279 JSValue regExpObjectSource(ExecState* exec, JSValue slotBase, PropertyName) 284 285 286 EncodedJSValue regExpObjectSource(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 280 287 { 281 288 String pattern = asRegExpObject(slotBase)->regExp()->pattern(); 282 289 if (pattern.is8Bit()) 283 return regExpObjectSourceInternal(exec, pattern, pattern.characters8(), pattern.length());284 return regExpObjectSourceInternal(exec, pattern, pattern.characters16(), pattern.length());290 return JSValue::encode(regExpObjectSourceInternal(exec, pattern, pattern.characters8(), pattern.length())); 291 return JSValue::encode(regExpObjectSourceInternal(exec, pattern, pattern.characters16(), pattern.length())); 285 292 } 286 293
Note:
See TracChangeset
for help on using the changeset viewer.