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

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

Issue 7607031: Update gc branch to bleeding_edge revision 8862. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Fix bug in weak-map merge Created 9 years, 4 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 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 break; 149 break;
150 case JS_BUILTINS_OBJECT_TYPE: 150 case JS_BUILTINS_OBJECT_TYPE:
151 JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify(); 151 JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify();
152 break; 152 break;
153 case JS_GLOBAL_PROPERTY_CELL_TYPE: 153 case JS_GLOBAL_PROPERTY_CELL_TYPE:
154 JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellVerify(); 154 JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellVerify();
155 break; 155 break;
156 case JS_ARRAY_TYPE: 156 case JS_ARRAY_TYPE:
157 JSArray::cast(this)->JSArrayVerify(); 157 JSArray::cast(this)->JSArrayVerify();
158 break; 158 break;
159 case JS_WEAK_MAP_TYPE:
160 JSWeakMap::cast(this)->JSWeakMapVerify();
161 break;
159 case JS_REGEXP_TYPE: 162 case JS_REGEXP_TYPE:
160 JSRegExp::cast(this)->JSRegExpVerify(); 163 JSRegExp::cast(this)->JSRegExpVerify();
161 break; 164 break;
162 case FILLER_TYPE: 165 case FILLER_TYPE:
163 break; 166 break;
164 case JS_PROXY_TYPE: 167 case JS_PROXY_TYPE:
165 JSProxy::cast(this)->JSProxyVerify(); 168 JSProxy::cast(this)->JSProxyVerify();
166 break; 169 break;
167 case FOREIGN_TYPE: 170 case FOREIGN_TYPE:
168 Foreign::cast(this)->ForeignVerify(); 171 Foreign::cast(this)->ForeignVerify();
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } else { 317 } else {
315 e->Verify(); 318 e->Verify();
316 } 319 }
317 } 320 }
318 } 321 }
319 322
320 323
321 void FixedDoubleArray::FixedDoubleArrayVerify() { 324 void FixedDoubleArray::FixedDoubleArrayVerify() {
322 for (int i = 0; i < length(); i++) { 325 for (int i = 0; i < length(); i++) {
323 if (!is_the_hole(i)) { 326 if (!is_the_hole(i)) {
324 double value = get(i); 327 double value = get_scalar(i);
325 ASSERT(!isnan(value) || 328 ASSERT(!isnan(value) ||
326 (BitCast<uint64_t>(value) == 329 (BitCast<uint64_t>(value) ==
327 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double()))); 330 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())));
328 } 331 }
329 } 332 }
330 } 333 }
331 334
332 335
333 void JSValue::JSValueVerify() { 336 void JSValue::JSValueVerify() {
334 Object* v = value(); 337 Object* v = value();
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 457
455 void JSArray::JSArrayVerify() { 458 void JSArray::JSArrayVerify() {
456 JSObjectVerify(); 459 JSObjectVerify();
457 ASSERT(length()->IsNumber() || length()->IsUndefined()); 460 ASSERT(length()->IsNumber() || length()->IsUndefined());
458 ASSERT(elements()->IsUndefined() || 461 ASSERT(elements()->IsUndefined() ||
459 elements()->IsFixedArray() || 462 elements()->IsFixedArray() ||
460 elements()->IsFixedDoubleArray()); 463 elements()->IsFixedDoubleArray());
461 } 464 }
462 465
463 466
467 void JSWeakMap::JSWeakMapVerify() {
468 CHECK(IsJSWeakMap());
469 JSObjectVerify();
470 VerifyHeapPointer(table());
471 ASSERT(table()->IsHashTable());
472 }
473
474
464 void JSRegExp::JSRegExpVerify() { 475 void JSRegExp::JSRegExpVerify() {
465 JSObjectVerify(); 476 JSObjectVerify();
466 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); 477 ASSERT(data()->IsUndefined() || data()->IsFixedArray());
467 switch (TypeTag()) { 478 switch (TypeTag()) {
468 case JSRegExp::ATOM: { 479 case JSRegExp::ATOM: {
469 FixedArray* arr = FixedArray::cast(data()); 480 FixedArray* arr = FixedArray::cast(data());
470 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); 481 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString());
471 break; 482 break;
472 } 483 }
473 case JSRegExp::IRREGEXP: { 484 case JSRegExp::IRREGEXP: {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 ASSERT(e->IsUndefined()); 779 ASSERT(e->IsUndefined());
769 } 780 }
770 } 781 }
771 } 782 }
772 } 783 }
773 784
774 785
775 #endif // DEBUG 786 #endif // DEBUG
776 787
777 } } // namespace v8::internal 788 } } // 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