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

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

Issue 8372027: Implement Harmony sets and maps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Andreas Rossberg. Created 9 years, 1 month 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
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_SET_TYPE:
160 JSSet::cast(this)->JSSetVerify();
161 break;
162 case JS_MAP_TYPE:
163 JSMap::cast(this)->JSMapVerify();
164 break;
159 case JS_WEAK_MAP_TYPE: 165 case JS_WEAK_MAP_TYPE:
160 JSWeakMap::cast(this)->JSWeakMapVerify(); 166 JSWeakMap::cast(this)->JSWeakMapVerify();
161 break; 167 break;
162 case JS_REGEXP_TYPE: 168 case JS_REGEXP_TYPE:
163 JSRegExp::cast(this)->JSRegExpVerify(); 169 JSRegExp::cast(this)->JSRegExpVerify();
164 break; 170 break;
165 case FILLER_TYPE: 171 case FILLER_TYPE:
166 break; 172 break;
167 case JS_PROXY_TYPE: 173 case JS_PROXY_TYPE:
168 JSProxy::cast(this)->JSProxyVerify(); 174 JSProxy::cast(this)->JSProxyVerify();
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 499
494 void JSArray::JSArrayVerify() { 500 void JSArray::JSArrayVerify() {
495 JSObjectVerify(); 501 JSObjectVerify();
496 ASSERT(length()->IsNumber() || length()->IsUndefined()); 502 ASSERT(length()->IsNumber() || length()->IsUndefined());
497 ASSERT(elements()->IsUndefined() || 503 ASSERT(elements()->IsUndefined() ||
498 elements()->IsFixedArray() || 504 elements()->IsFixedArray() ||
499 elements()->IsFixedDoubleArray()); 505 elements()->IsFixedDoubleArray());
500 } 506 }
501 507
502 508
509 void JSSet::JSSetVerify() {
510 CHECK(IsJSSet());
511 JSObjectVerify();
512 VerifyHeapPointer(table());
513 ASSERT(table()->IsHashTable() || table()->IsUndefined());
514 }
515
516
517 void JSMap::JSMapVerify() {
518 CHECK(IsJSMap());
519 JSObjectVerify();
520 VerifyHeapPointer(table());
521 ASSERT(table()->IsHashTable() || table()->IsUndefined());
522 }
523
524
503 void JSWeakMap::JSWeakMapVerify() { 525 void JSWeakMap::JSWeakMapVerify() {
504 CHECK(IsJSWeakMap()); 526 CHECK(IsJSWeakMap());
505 JSObjectVerify(); 527 JSObjectVerify();
506 VerifyHeapPointer(table()); 528 VerifyHeapPointer(table());
507 ASSERT(table()->IsHashTable() || table()->IsUndefined()); 529 ASSERT(table()->IsHashTable() || table()->IsUndefined());
508 } 530 }
509 531
510 532
511 void JSRegExp::JSRegExpVerify() { 533 void JSRegExp::JSRegExpVerify() {
512 JSObjectVerify(); 534 JSObjectVerify();
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 ASSERT(e->IsUndefined()); 847 ASSERT(e->IsUndefined());
826 } 848 }
827 } 849 }
828 } 850 }
829 } 851 }
830 852
831 853
832 #endif // DEBUG 854 #endif // DEBUG
833 855
834 } } // namespace v8::internal 856 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698