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

Side by Side Diff: src/objects.h

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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
« no previous file with comments | « src/mips64/codegen-mips64.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2140 void PrintTransitions(std::ostream& os); // NOLINT 2140 void PrintTransitions(std::ostream& os); // NOLINT
2141 #endif 2141 #endif
2142 2142
2143 static void PrintElementsTransition( 2143 static void PrintElementsTransition(
2144 FILE* file, Handle<JSObject> object, 2144 FILE* file, Handle<JSObject> object,
2145 ElementsKind from_kind, Handle<FixedArrayBase> from_elements, 2145 ElementsKind from_kind, Handle<FixedArrayBase> from_elements,
2146 ElementsKind to_kind, Handle<FixedArrayBase> to_elements); 2146 ElementsKind to_kind, Handle<FixedArrayBase> to_elements);
2147 2147
2148 void PrintInstanceMigration(FILE* file, Map* original_map, Map* new_map); 2148 void PrintInstanceMigration(FILE* file, Map* original_map, Map* new_map);
2149 2149
2150 #ifdef DEBUG 2150 #if DCHECK_IS_ON
2151 // Structure for collecting spill information about JSObjects. 2151 // Structure for collecting spill information about JSObjects.
2152 class SpillInformation { 2152 class SpillInformation {
2153 public: 2153 public:
2154 void Clear(); 2154 void Clear();
2155 void Print(); 2155 void Print();
2156 int number_of_objects_; 2156 int number_of_objects_;
2157 int number_of_objects_with_fast_properties_; 2157 int number_of_objects_with_fast_properties_;
2158 int number_of_objects_with_fast_elements_; 2158 int number_of_objects_with_fast_elements_;
2159 int number_of_fast_used_fields_; 2159 int number_of_fast_used_fields_;
2160 int number_of_fast_unused_fields_; 2160 int number_of_fast_unused_fields_;
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
3064 static const int kDescriptorSize = 3; 3064 static const int kDescriptorSize = 3;
3065 3065
3066 #ifdef OBJECT_PRINT 3066 #ifdef OBJECT_PRINT
3067 // For our gdb macros, we should perhaps change these in the future. 3067 // For our gdb macros, we should perhaps change these in the future.
3068 void Print(); 3068 void Print();
3069 3069
3070 // Print all the descriptors. 3070 // Print all the descriptors.
3071 void PrintDescriptors(std::ostream& os); // NOLINT 3071 void PrintDescriptors(std::ostream& os); // NOLINT
3072 #endif 3072 #endif
3073 3073
3074 #ifdef DEBUG 3074 #if DCHECK_IS_ON
3075 // Is the descriptor array sorted and without duplicates? 3075 // Is the descriptor array sorted and without duplicates?
3076 bool IsSortedNoDuplicates(int valid_descriptors = -1); 3076 bool IsSortedNoDuplicates(int valid_descriptors = -1);
3077 3077
3078 // Is the descriptor array consistent with the back pointers in targets? 3078 // Is the descriptor array consistent with the back pointers in targets?
3079 bool IsConsistentWithBackPointers(Map* current_map); 3079 bool IsConsistentWithBackPointers(Map* current_map);
3080 3080
3081 // Are two DescriptorArrays equal? 3081 // Are two DescriptorArrays equal?
3082 bool IsEqualTo(DescriptorArray* other); 3082 bool IsEqualTo(DescriptorArray* other);
3083 #endif 3083 #endif
3084 3084
(...skipping 5489 matching lines...) Expand 10 before | Expand all | Expand 10 after
8574 inline bool IsIndirect(); 8574 inline bool IsIndirect();
8575 inline bool IsExternalOneByte(); 8575 inline bool IsExternalOneByte();
8576 inline bool IsExternalTwoByte(); 8576 inline bool IsExternalTwoByte();
8577 inline bool IsSequentialOneByte(); 8577 inline bool IsSequentialOneByte();
8578 inline bool IsSequentialTwoByte(); 8578 inline bool IsSequentialTwoByte();
8579 inline bool IsInternalized(); 8579 inline bool IsInternalized();
8580 inline StringRepresentationTag representation_tag(); 8580 inline StringRepresentationTag representation_tag();
8581 inline uint32_t encoding_tag(); 8581 inline uint32_t encoding_tag();
8582 inline uint32_t full_representation_tag(); 8582 inline uint32_t full_representation_tag();
8583 inline uint32_t size_tag(); 8583 inline uint32_t size_tag();
8584 #ifdef DEBUG 8584 #if DCHECK_IS_ON
8585 inline uint32_t type() { return type_; } 8585 inline uint32_t type() { return type_; }
8586 inline void invalidate() { valid_ = false; } 8586 inline void invalidate() { valid_ = false; }
8587 inline bool valid() { return valid_; } 8587 inline bool valid() { return valid_; }
8588 #else 8588 #else
8589 inline void invalidate() { } 8589 inline void invalidate() { }
8590 #endif 8590 #endif
8591 8591
8592 private: 8592 private:
8593 uint32_t type_; 8593 uint32_t type_;
8594 #ifdef DEBUG 8594 #if DCHECK_IS_ON
8595 inline void set_valid() { valid_ = true; } 8595 inline void set_valid() { valid_ = true; }
8596 bool valid_; 8596 bool valid_;
8597 #else 8597 #else
8598 inline void set_valid() { } 8598 inline void set_valid() { }
8599 #endif 8599 #endif
8600 }; 8600 };
8601 8601
8602 8602
8603 // The Name abstract class captures anything that can be used as a property 8603 // The Name abstract class captures anything that can be used as a property
8604 // name, i.e., strings and symbols. All names store a hash value. 8604 // name, i.e., strings and symbols. All names store a hash value.
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
11005 } else { 11005 } else {
11006 value &= ~(1 << bit_position); 11006 value &= ~(1 << bit_position);
11007 } 11007 }
11008 return value; 11008 return value;
11009 } 11009 }
11010 }; 11010 };
11011 11011
11012 } } // namespace v8::internal 11012 } } // namespace v8::internal
11013 11013
11014 #endif // V8_OBJECTS_H_ 11014 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips64/codegen-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698