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

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

Issue 7529007: Preliminary Harmony weak maps API implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make sure the constructor can be called directly. 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 break; 146 break;
147 case JS_BUILTINS_OBJECT_TYPE: 147 case JS_BUILTINS_OBJECT_TYPE:
148 JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify(); 148 JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify();
149 break; 149 break;
150 case JS_GLOBAL_PROPERTY_CELL_TYPE: 150 case JS_GLOBAL_PROPERTY_CELL_TYPE:
151 JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellVerify(); 151 JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellVerify();
152 break; 152 break;
153 case JS_ARRAY_TYPE: 153 case JS_ARRAY_TYPE:
154 JSArray::cast(this)->JSArrayVerify(); 154 JSArray::cast(this)->JSArrayVerify();
155 break; 155 break;
156 case JS_WEAK_MAP_TYPE:
157 JSWeakMap::cast(this)->JSWeakMapVerify();
158 break;
156 case JS_REGEXP_TYPE: 159 case JS_REGEXP_TYPE:
157 JSRegExp::cast(this)->JSRegExpVerify(); 160 JSRegExp::cast(this)->JSRegExpVerify();
158 break; 161 break;
159 case FILLER_TYPE: 162 case FILLER_TYPE:
160 break; 163 break;
161 case JS_PROXY_TYPE: 164 case JS_PROXY_TYPE:
162 JSProxy::cast(this)->JSProxyVerify(); 165 JSProxy::cast(this)->JSProxyVerify();
163 break; 166 break;
164 case FOREIGN_TYPE: 167 case FOREIGN_TYPE:
165 Foreign::cast(this)->ForeignVerify(); 168 Foreign::cast(this)->ForeignVerify();
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 449
447 void JSArray::JSArrayVerify() { 450 void JSArray::JSArrayVerify() {
448 JSObjectVerify(); 451 JSObjectVerify();
449 ASSERT(length()->IsNumber() || length()->IsUndefined()); 452 ASSERT(length()->IsNumber() || length()->IsUndefined());
450 ASSERT(elements()->IsUndefined() || 453 ASSERT(elements()->IsUndefined() ||
451 elements()->IsFixedArray() || 454 elements()->IsFixedArray() ||
452 elements()->IsFixedDoubleArray()); 455 elements()->IsFixedDoubleArray());
453 } 456 }
454 457
455 458
459 void JSWeakMap::JSWeakMapVerify() {
460 CHECK(IsJSWeakMap());
461 JSObjectVerify();
462 VerifyHeapPointer(table());
463 ASSERT(table()->IsHashTable());
464 }
465
466
456 void JSRegExp::JSRegExpVerify() { 467 void JSRegExp::JSRegExpVerify() {
457 JSObjectVerify(); 468 JSObjectVerify();
458 ASSERT(data()->IsUndefined() || data()->IsFixedArray()); 469 ASSERT(data()->IsUndefined() || data()->IsFixedArray());
459 switch (TypeTag()) { 470 switch (TypeTag()) {
460 case JSRegExp::ATOM: { 471 case JSRegExp::ATOM: {
461 FixedArray* arr = FixedArray::cast(data()); 472 FixedArray* arr = FixedArray::cast(data());
462 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); 473 ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString());
463 break; 474 break;
464 } 475 }
465 case JSRegExp::IRREGEXP: { 476 case JSRegExp::IRREGEXP: {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 ASSERT(e->IsUndefined()); 771 ASSERT(e->IsUndefined());
761 } 772 }
762 } 773 }
763 } 774 }
764 } 775 }
765 776
766 777
767 #endif // DEBUG 778 #endif // DEBUG
768 779
769 } } // namespace v8::internal 780 } } // 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