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 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1344 | 1344 |
1345 #define IS_TYPE_FUNCTION_DECL(type_) inline bool Is##type_(); | 1345 #define IS_TYPE_FUNCTION_DECL(type_) inline bool Is##type_(); |
1346 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) | 1346 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
1347 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) | 1347 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
1348 #undef IS_TYPE_FUNCTION_DECL | 1348 #undef IS_TYPE_FUNCTION_DECL |
1349 | 1349 |
1350 inline bool IsFixedArrayBase(); | 1350 inline bool IsFixedArrayBase(); |
1351 inline bool IsExternal(); | 1351 inline bool IsExternal(); |
1352 inline bool IsAccessorInfo(); | 1352 inline bool IsAccessorInfo(); |
1353 | 1353 |
1354 // Returns true if this object is an instance of the specified | |
1355 // function template. | |
1356 inline bool IsInstanceOf(FunctionTemplateInfo* type); | |
1357 | |
1358 inline bool IsStruct(); | 1354 inline bool IsStruct(); |
1359 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name(); | 1355 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name(); |
1360 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) | 1356 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) |
1361 #undef DECLARE_STRUCT_PREDICATE | 1357 #undef DECLARE_STRUCT_PREDICATE |
1362 | 1358 |
1363 INLINE(bool IsSpecObject()); | 1359 INLINE(bool IsSpecObject()); |
1364 INLINE(bool IsSpecFunction()); | 1360 INLINE(bool IsSpecFunction()); |
1365 | 1361 |
1366 // Oddball testing. | 1362 // Oddball testing. |
1367 INLINE(bool IsUndefined()); | 1363 INLINE(bool IsUndefined()); |
(...skipping 8891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10259 kIndexedPropertyHandlerOffset + kPointerSize; | 10255 kIndexedPropertyHandlerOffset + kPointerSize; |
10260 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; | 10256 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; |
10261 static const int kSignatureOffset = kClassNameOffset + kPointerSize; | 10257 static const int kSignatureOffset = kClassNameOffset + kPointerSize; |
10262 static const int kInstanceCallHandlerOffset = kSignatureOffset + kPointerSize; | 10258 static const int kInstanceCallHandlerOffset = kSignatureOffset + kPointerSize; |
10263 static const int kAccessCheckInfoOffset = | 10259 static const int kAccessCheckInfoOffset = |
10264 kInstanceCallHandlerOffset + kPointerSize; | 10260 kInstanceCallHandlerOffset + kPointerSize; |
10265 static const int kFlagOffset = kAccessCheckInfoOffset + kPointerSize; | 10261 static const int kFlagOffset = kAccessCheckInfoOffset + kPointerSize; |
10266 static const int kLengthOffset = kFlagOffset + kPointerSize; | 10262 static const int kLengthOffset = kFlagOffset + kPointerSize; |
10267 static const int kSize = kLengthOffset + kPointerSize; | 10263 static const int kSize = kLengthOffset + kPointerSize; |
10268 | 10264 |
| 10265 // Returns true if |object| is an instance of this function template. |
| 10266 bool IsTemplateFor(Object* object); |
| 10267 bool IsTemplateFor(Map* map); |
| 10268 |
10269 private: | 10269 private: |
10270 // Bit position in the flag, from least significant bit position. | 10270 // Bit position in the flag, from least significant bit position. |
10271 static const int kHiddenPrototypeBit = 0; | 10271 static const int kHiddenPrototypeBit = 0; |
10272 static const int kUndetectableBit = 1; | 10272 static const int kUndetectableBit = 1; |
10273 static const int kNeedsAccessCheckBit = 2; | 10273 static const int kNeedsAccessCheckBit = 2; |
10274 static const int kReadOnlyPrototypeBit = 3; | 10274 static const int kReadOnlyPrototypeBit = 3; |
10275 static const int kRemovePrototypeBit = 4; | 10275 static const int kRemovePrototypeBit = 4; |
10276 static const int kDoNotCacheBit = 5; | 10276 static const int kDoNotCacheBit = 5; |
10277 | 10277 |
10278 DISALLOW_IMPLICIT_CONSTRUCTORS(FunctionTemplateInfo); | 10278 DISALLOW_IMPLICIT_CONSTRUCTORS(FunctionTemplateInfo); |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10564 } else { | 10564 } else { |
10565 value &= ~(1 << bit_position); | 10565 value &= ~(1 << bit_position); |
10566 } | 10566 } |
10567 return value; | 10567 return value; |
10568 } | 10568 } |
10569 }; | 10569 }; |
10570 | 10570 |
10571 } } // namespace v8::internal | 10571 } } // namespace v8::internal |
10572 | 10572 |
10573 #endif // V8_OBJECTS_H_ | 10573 #endif // V8_OBJECTS_H_ |
OLD | NEW |