OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 bool Object::IsJSFunctionResultCache() { | 758 bool Object::IsJSFunctionResultCache() { |
759 if (!IsFixedArray()) return false; | 759 if (!IsFixedArray()) return false; |
760 FixedArray* self = FixedArray::cast(this); | 760 FixedArray* self = FixedArray::cast(this); |
761 int length = self->length(); | 761 int length = self->length(); |
762 if (length < JSFunctionResultCache::kEntriesIndex) return false; | 762 if (length < JSFunctionResultCache::kEntriesIndex) return false; |
763 if ((length - JSFunctionResultCache::kEntriesIndex) | 763 if ((length - JSFunctionResultCache::kEntriesIndex) |
764 % JSFunctionResultCache::kEntrySize != 0) { | 764 % JSFunctionResultCache::kEntrySize != 0) { |
765 return false; | 765 return false; |
766 } | 766 } |
767 #ifdef DEBUG | 767 #ifdef DEBUG |
768 reinterpret_cast<JSFunctionResultCache*>(this)->JSFunctionResultCacheVerify(); | 768 if (FLAG_verify_heap) { |
| 769 reinterpret_cast<JSFunctionResultCache*>(this)-> |
| 770 JSFunctionResultCacheVerify(); |
| 771 } |
769 #endif | 772 #endif |
770 return true; | 773 return true; |
771 } | 774 } |
772 | 775 |
773 | 776 |
774 bool Object::IsNormalizedMapCache() { | 777 bool Object::IsNormalizedMapCache() { |
775 if (!IsFixedArray()) return false; | 778 if (!IsFixedArray()) return false; |
776 if (FixedArray::cast(this)->length() != NormalizedMapCache::kEntries) { | 779 if (FixedArray::cast(this)->length() != NormalizedMapCache::kEntries) { |
777 return false; | 780 return false; |
778 } | 781 } |
779 #ifdef DEBUG | 782 #ifdef DEBUG |
780 reinterpret_cast<NormalizedMapCache*>(this)->NormalizedMapCacheVerify(); | 783 if (FLAG_verify_heap) { |
| 784 reinterpret_cast<NormalizedMapCache*>(this)->NormalizedMapCacheVerify(); |
| 785 } |
781 #endif | 786 #endif |
782 return true; | 787 return true; |
783 } | 788 } |
784 | 789 |
785 | 790 |
786 bool Object::IsCompilationCacheTable() { | 791 bool Object::IsCompilationCacheTable() { |
787 return IsHashTable(); | 792 return IsHashTable(); |
788 } | 793 } |
789 | 794 |
790 | 795 |
(...skipping 3947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4738 #undef WRITE_INT_FIELD | 4743 #undef WRITE_INT_FIELD |
4739 #undef READ_SHORT_FIELD | 4744 #undef READ_SHORT_FIELD |
4740 #undef WRITE_SHORT_FIELD | 4745 #undef WRITE_SHORT_FIELD |
4741 #undef READ_BYTE_FIELD | 4746 #undef READ_BYTE_FIELD |
4742 #undef WRITE_BYTE_FIELD | 4747 #undef WRITE_BYTE_FIELD |
4743 | 4748 |
4744 | 4749 |
4745 } } // namespace v8::internal | 4750 } } // namespace v8::internal |
4746 | 4751 |
4747 #endif // V8_OBJECTS_INL_H_ | 4752 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |