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

Side by Side Diff: src/objects-debug.cc

Issue 1371893002: objects-inl.h: Remove ACCESSORS_TO_SMI macro (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: undo last_script_id storage change Created 5 years, 2 months 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/objects.cc ('k') | src/objects-inl.h » ('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 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/disasm.h" 8 #include "src/disasm.h"
9 #include "src/disassembler.h" 9 #include "src/disassembler.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 HeapObject* ho = HeapObject::cast(p); 204 HeapObject* ho = HeapObject::cast(p);
205 CHECK(ho->GetHeap()->Contains(ho)); 205 CHECK(ho->GetHeap()->Contains(ho));
206 } 206 }
207 207
208 208
209 void Symbol::SymbolVerify() { 209 void Symbol::SymbolVerify() {
210 CHECK(IsSymbol()); 210 CHECK(IsSymbol());
211 CHECK(HasHashCode()); 211 CHECK(HasHashCode());
212 CHECK_GT(Hash(), 0u); 212 CHECK_GT(Hash(), 0u);
213 CHECK(name()->IsUndefined() || name()->IsString()); 213 CHECK(name()->IsUndefined() || name()->IsString());
214 CHECK(flags()->IsSmi());
215 } 214 }
216 215
217 216
218 void HeapNumber::HeapNumberVerify() { 217 void HeapNumber::HeapNumberVerify() {
219 CHECK(IsHeapNumber() || IsMutableHeapNumber()); 218 CHECK(IsHeapNumber() || IsMutableHeapNumber());
220 } 219 }
221 220
222 221
223 void Simd128Value::Simd128ValueVerify() { CHECK(IsSimd128Value()); } 222 void Simd128Value::Simd128ValueVerify() { CHECK(IsSimd128Value()); }
224 223
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 } else { 890 } else {
892 CHECK(prototype_users()->IsSmi()); 891 CHECK(prototype_users()->IsSmi());
893 } 892 }
894 CHECK(validity_cell()->IsCell() || validity_cell()->IsSmi()); 893 CHECK(validity_cell()->IsCell() || validity_cell()->IsSmi());
895 VerifyPointer(constructor_name()); 894 VerifyPointer(constructor_name());
896 } 895 }
897 896
898 897
899 void AccessorInfo::AccessorInfoVerify() { 898 void AccessorInfo::AccessorInfoVerify() {
900 VerifyPointer(name()); 899 VerifyPointer(name());
901 VerifyPointer(flag());
902 VerifyPointer(expected_receiver_type()); 900 VerifyPointer(expected_receiver_type());
903 } 901 }
904 902
905 903
906 void SloppyBlockWithEvalContextExtension:: 904 void SloppyBlockWithEvalContextExtension::
907 SloppyBlockWithEvalContextExtensionVerify() { 905 SloppyBlockWithEvalContextExtensionVerify() {
908 CHECK(IsSloppyBlockWithEvalContextExtension()); 906 CHECK(IsSloppyBlockWithEvalContextExtension());
909 VerifyObjectField(kScopeInfoOffset); 907 VerifyObjectField(kScopeInfoOffset);
910 VerifyObjectField(kExtensionOffset); 908 VerifyObjectField(kExtensionOffset);
911 } 909 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 CHECK(IsAllocationMemento()); 997 CHECK(IsAllocationMemento());
1000 VerifyHeapPointer(allocation_site()); 998 VerifyHeapPointer(allocation_site());
1001 CHECK(!IsValid() || GetAllocationSite()->IsAllocationSite()); 999 CHECK(!IsValid() || GetAllocationSite()->IsAllocationSite());
1002 } 1000 }
1003 1001
1004 1002
1005 void Script::ScriptVerify() { 1003 void Script::ScriptVerify() {
1006 CHECK(IsScript()); 1004 CHECK(IsScript());
1007 VerifyPointer(source()); 1005 VerifyPointer(source());
1008 VerifyPointer(name()); 1006 VerifyPointer(name());
1009 line_offset()->SmiVerify();
1010 column_offset()->SmiVerify();
1011 VerifyPointer(wrapper()); 1007 VerifyPointer(wrapper());
1012 type()->SmiVerify();
1013 VerifyPointer(line_ends()); 1008 VerifyPointer(line_ends());
1014 VerifyPointer(id());
1015 } 1009 }
1016 1010
1017 1011
1018 void NormalizedMapCache::NormalizedMapCacheVerify() { 1012 void NormalizedMapCache::NormalizedMapCacheVerify() {
1019 FixedArray::cast(this)->FixedArrayVerify(); 1013 FixedArray::cast(this)->FixedArrayVerify();
1020 if (FLAG_enable_slow_asserts) { 1014 if (FLAG_enable_slow_asserts) {
1021 for (int i = 0; i < length(); i++) { 1015 for (int i = 0; i < length(); i++) {
1022 Object* e = FixedArray::get(i); 1016 Object* e = FixedArray::get(i);
1023 if (e->IsMap()) { 1017 if (e->IsMap()) {
1024 Map::cast(e)->DictionaryMapVerify(); 1018 Map::cast(e)->DictionaryMapVerify();
1025 } else { 1019 } else {
1026 CHECK(e->IsUndefined()); 1020 CHECK(e->IsUndefined());
1027 } 1021 }
1028 } 1022 }
1029 } 1023 }
1030 } 1024 }
1031 1025
1032 1026
1033 void DebugInfo::DebugInfoVerify() { 1027 void DebugInfo::DebugInfoVerify() {
1034 CHECK(IsDebugInfo()); 1028 CHECK(IsDebugInfo());
1035 VerifyPointer(shared()); 1029 VerifyPointer(shared());
1036 VerifyPointer(code()); 1030 VerifyPointer(code());
1037 VerifyPointer(break_points()); 1031 VerifyPointer(break_points());
1038 } 1032 }
1039 1033
1040 1034
1041 void BreakPointInfo::BreakPointInfoVerify() { 1035 void BreakPointInfo::BreakPointInfoVerify() {
1042 CHECK(IsBreakPointInfo()); 1036 CHECK(IsBreakPointInfo());
1043 code_position()->SmiVerify();
1044 source_position()->SmiVerify();
1045 statement_position()->SmiVerify();
1046 VerifyPointer(break_point_objects()); 1037 VerifyPointer(break_point_objects());
1047 } 1038 }
1048 #endif // VERIFY_HEAP 1039 #endif // VERIFY_HEAP
1049 1040
1050 #ifdef DEBUG 1041 #ifdef DEBUG
1051 1042
1052 void JSObject::IncrementSpillStatistics(SpillInformation* info) { 1043 void JSObject::IncrementSpillStatistics(SpillInformation* info) {
1053 info->number_of_objects_++; 1044 info->number_of_objects_++;
1054 // Named properties 1045 // Named properties
1055 if (HasFastProperties()) { 1046 if (HasFastProperties()) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 1322
1332 // Both are done at the same time. 1323 // Both are done at the same time.
1333 CHECK_EQ(new_it.done(), old_it.done()); 1324 CHECK_EQ(new_it.done(), old_it.done());
1334 } 1325 }
1335 1326
1336 1327
1337 #endif // DEBUG 1328 #endif // DEBUG
1338 1329
1339 } // namespace internal 1330 } // namespace internal
1340 } // namespace v8 1331 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698