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

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

Issue 1150953002: Generalize HeapObject alignment requirements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments. Created 5 years, 7 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.h ('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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/jsregexp.h" 10 #include "src/jsregexp.h"
(...skipping 29 matching lines...) Expand all
40 40
41 41
42 void HeapObject::HeapObjectVerify() { 42 void HeapObject::HeapObjectVerify() {
43 InstanceType instance_type = map()->instance_type(); 43 InstanceType instance_type = map()->instance_type();
44 44
45 if (instance_type < FIRST_NONSTRING_TYPE) { 45 if (instance_type < FIRST_NONSTRING_TYPE) {
46 String::cast(this)->StringVerify(); 46 String::cast(this)->StringVerify();
47 return; 47 return;
48 } 48 }
49 49
50 // TODO(yangguo): Use this check once crbug/436911 has been fixed.
51 // DCHECK(!NeedsToEnsureDoubleAlignment() ||
52 // IsAligned(OffsetFrom(address()), kDoubleAlignment));
53
54 switch (instance_type) { 50 switch (instance_type) {
55 case SYMBOL_TYPE: 51 case SYMBOL_TYPE:
56 Symbol::cast(this)->SymbolVerify(); 52 Symbol::cast(this)->SymbolVerify();
57 break; 53 break;
58 case MAP_TYPE: 54 case MAP_TYPE:
59 Map::cast(this)->MapVerify(); 55 Map::cast(this)->MapVerify();
60 break; 56 break;
61 case HEAP_NUMBER_TYPE: 57 case HEAP_NUMBER_TYPE:
62 case MUTABLE_HEAP_NUMBER_TYPE: 58 case MUTABLE_HEAP_NUMBER_TYPE:
63 HeapNumber::cast(this)->HeapNumberVerify(); 59 HeapNumber::cast(this)->HeapNumberVerify();
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 ? it.rinfo()->target_cell() 1276 ? it.rinfo()->target_cell()
1281 : it.rinfo()->target_object(); 1277 : it.rinfo()->target_object();
1282 CHECK(!CanLeak(target, heap, skip_weak_cell)); 1278 CHECK(!CanLeak(target, heap, skip_weak_cell));
1283 } 1279 }
1284 } 1280 }
1285 1281
1286 1282
1287 #endif // DEBUG 1283 #endif // DEBUG
1288 1284
1289 } } // namespace v8::internal 1285 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698