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

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

Issue 16631002: Separate Cell and PropertyCell spaces (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove Mips changes Created 7 years, 6 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 | Annotate | Revision Log
« 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 // 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 break; 156 break;
157 case JS_GLOBAL_PROXY_TYPE: 157 case JS_GLOBAL_PROXY_TYPE:
158 JSGlobalProxy::cast(this)->JSGlobalProxyVerify(); 158 JSGlobalProxy::cast(this)->JSGlobalProxyVerify();
159 break; 159 break;
160 case JS_GLOBAL_OBJECT_TYPE: 160 case JS_GLOBAL_OBJECT_TYPE:
161 JSGlobalObject::cast(this)->JSGlobalObjectVerify(); 161 JSGlobalObject::cast(this)->JSGlobalObjectVerify();
162 break; 162 break;
163 case JS_BUILTINS_OBJECT_TYPE: 163 case JS_BUILTINS_OBJECT_TYPE:
164 JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify(); 164 JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify();
165 break; 165 break;
166 case JS_GLOBAL_PROPERTY_CELL_TYPE: 166 case CELL_TYPE:
167 Cell::cast(this)->CellVerify();
168 break;
169 case PROPERTY_CELL_TYPE:
167 JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellVerify(); 170 JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellVerify();
168 break; 171 break;
169 case JS_ARRAY_TYPE: 172 case JS_ARRAY_TYPE:
170 JSArray::cast(this)->JSArrayVerify(); 173 JSArray::cast(this)->JSArrayVerify();
171 break; 174 break;
172 case JS_SET_TYPE: 175 case JS_SET_TYPE:
173 JSSet::cast(this)->JSSetVerify(); 176 JSSet::cast(this)->JSSetVerify();
174 break; 177 break;
175 case JS_MAP_TYPE: 178 case JS_MAP_TYPE:
176 JSMap::cast(this)->JSMapVerify(); 179 JSMap::cast(this)->JSMapVerify();
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 CHECK(number->IsSmi()); 611 CHECK(number->IsSmi());
609 int value = Smi::cast(number)->value(); 612 int value = Smi::cast(number)->value();
610 // Hidden oddballs have negative smis. 613 // Hidden oddballs have negative smis.
611 const int kLeastHiddenOddballNumber = -4; 614 const int kLeastHiddenOddballNumber = -4;
612 CHECK_LE(value, 1); 615 CHECK_LE(value, 1);
613 CHECK(value >= kLeastHiddenOddballNumber); 616 CHECK(value >= kLeastHiddenOddballNumber);
614 } 617 }
615 } 618 }
616 619
617 620
621 void Cell::CellVerify() {
622 CHECK(IsCell());
623 VerifyObjectField(kValueOffset);
624 }
625
626
618 void JSGlobalPropertyCell::JSGlobalPropertyCellVerify() { 627 void JSGlobalPropertyCell::JSGlobalPropertyCellVerify() {
619 CHECK(IsJSGlobalPropertyCell()); 628 CHECK(IsJSGlobalPropertyCell());
620 VerifyObjectField(kValueOffset); 629 VerifyObjectField(kValueOffset);
630 VerifyObjectField(kTypeOffset);
621 } 631 }
622 632
623 633
624 void Code::CodeVerify() { 634 void Code::CodeVerify() {
625 CHECK(IsAligned(reinterpret_cast<intptr_t>(instruction_start()), 635 CHECK(IsAligned(reinterpret_cast<intptr_t>(instruction_start()),
626 kCodeAlignment)); 636 kCodeAlignment));
627 relocation_info()->Verify(); 637 relocation_info()->Verify();
628 Address last_gc_pc = NULL; 638 Address last_gc_pc = NULL;
629 for (RelocIterator it(this); !it.done(); it.next()) { 639 for (RelocIterator it(this); !it.done(); it.next()) {
630 it.rinfo()->Verify(); 640 it.rinfo()->Verify();
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 for (int i = 0; i < number_of_transitions(); ++i) { 1136 for (int i = 0; i < number_of_transitions(); ++i) {
1127 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1137 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1128 } 1138 }
1129 return true; 1139 return true;
1130 } 1140 }
1131 1141
1132 1142
1133 #endif // DEBUG 1143 #endif // DEBUG
1134 1144
1135 } } // namespace v8::internal 1145 } } // namespace v8::internal
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