Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: src/objects.h

Issue 67613005: Move template instance check from Object to FunctionTemplateInfo::IsTemplateFor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/builtins.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698