OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 | 213 |
214 | 214 |
215 bool Object::IsSpecFunction() { | 215 bool Object::IsSpecFunction() { |
216 if (!Object::IsHeapObject()) return false; | 216 if (!Object::IsHeapObject()) return false; |
217 InstanceType type = HeapObject::cast(this)->map()->instance_type(); | 217 InstanceType type = HeapObject::cast(this)->map()->instance_type(); |
218 return type == JS_FUNCTION_TYPE || type == JS_FUNCTION_PROXY_TYPE; | 218 return type == JS_FUNCTION_TYPE || type == JS_FUNCTION_PROXY_TYPE; |
219 } | 219 } |
220 | 220 |
221 | 221 |
| 222 bool Object::IsTemplateInfo() { |
| 223 return IsObjectTemplateInfo() || IsFunctionTemplateInfo(); |
| 224 } |
| 225 |
| 226 |
222 bool Object::IsInternalizedString() { | 227 bool Object::IsInternalizedString() { |
223 if (!this->IsHeapObject()) return false; | 228 if (!this->IsHeapObject()) return false; |
224 uint32_t type = HeapObject::cast(this)->map()->instance_type(); | 229 uint32_t type = HeapObject::cast(this)->map()->instance_type(); |
225 STATIC_ASSERT(kNotInternalizedTag != 0); | 230 STATIC_ASSERT(kNotInternalizedTag != 0); |
226 return (type & (kIsNotStringMask | kIsNotInternalizedMask)) == | 231 return (type & (kIsNotStringMask | kIsNotInternalizedMask)) == |
227 (kStringTag | kInternalizedTag); | 232 (kStringTag | kInternalizedTag); |
228 } | 233 } |
229 | 234 |
230 | 235 |
231 bool Object::IsConsString() { | 236 bool Object::IsConsString() { |
(...skipping 6795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7027 #undef READ_SHORT_FIELD | 7032 #undef READ_SHORT_FIELD |
7028 #undef WRITE_SHORT_FIELD | 7033 #undef WRITE_SHORT_FIELD |
7029 #undef READ_BYTE_FIELD | 7034 #undef READ_BYTE_FIELD |
7030 #undef WRITE_BYTE_FIELD | 7035 #undef WRITE_BYTE_FIELD |
7031 #undef NOBARRIER_READ_BYTE_FIELD | 7036 #undef NOBARRIER_READ_BYTE_FIELD |
7032 #undef NOBARRIER_WRITE_BYTE_FIELD | 7037 #undef NOBARRIER_WRITE_BYTE_FIELD |
7033 | 7038 |
7034 } } // namespace v8::internal | 7039 } } // namespace v8::internal |
7035 | 7040 |
7036 #endif // V8_OBJECTS_INL_H_ | 7041 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |