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

Side by Side Diff: src/objects-inl.h

Issue 8381040: Move some heap verification code in under the --verify-heap flag to speed (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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/objects.cc ('k') | src/runtime.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 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
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
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_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698