OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 SHARED_FUNCTION_INFO_TYPE); | 294 SHARED_FUNCTION_INFO_TYPE); |
295 } | 295 } |
296 | 296 |
297 | 297 |
298 bool Object::IsJSValue() { | 298 bool Object::IsJSValue() { |
299 return Object::IsHeapObject() | 299 return Object::IsHeapObject() |
300 && HeapObject::cast(this)->map()->instance_type() == JS_VALUE_TYPE; | 300 && HeapObject::cast(this)->map()->instance_type() == JS_VALUE_TYPE; |
301 } | 301 } |
302 | 302 |
303 | 303 |
| 304 bool Object::IsStringWrapper() { |
| 305 return IsJSValue() && JSValue::cast(this)->value()->IsString(); |
| 306 } |
| 307 |
| 308 |
304 bool Object::IsProxy() { | 309 bool Object::IsProxy() { |
305 return Object::IsHeapObject() | 310 return Object::IsHeapObject() |
306 && HeapObject::cast(this)->map()->instance_type() == PROXY_TYPE; | 311 && HeapObject::cast(this)->map()->instance_type() == PROXY_TYPE; |
307 } | 312 } |
308 | 313 |
309 | 314 |
310 bool Object::IsBoolean() { | 315 bool Object::IsBoolean() { |
311 return IsTrue() || IsFalse(); | 316 return IsTrue() || IsFalse(); |
312 } | 317 } |
313 | 318 |
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2355 #undef WRITE_INT_FIELD | 2360 #undef WRITE_INT_FIELD |
2356 #undef READ_SHORT_FIELD | 2361 #undef READ_SHORT_FIELD |
2357 #undef WRITE_SHORT_FIELD | 2362 #undef WRITE_SHORT_FIELD |
2358 #undef READ_BYTE_FIELD | 2363 #undef READ_BYTE_FIELD |
2359 #undef WRITE_BYTE_FIELD | 2364 #undef WRITE_BYTE_FIELD |
2360 | 2365 |
2361 | 2366 |
2362 } } // namespace v8::internal | 2367 } } // namespace v8::internal |
2363 | 2368 |
2364 #endif // V8_OBJECTS_INL_H_ | 2369 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |