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

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

Issue 19678023: ES6: Implement WeakSet (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reitveld is acting up Created 7 years, 5 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
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 break; 174 break;
175 case JS_SET_TYPE: 175 case JS_SET_TYPE:
176 JSSet::cast(this)->JSSetVerify(); 176 JSSet::cast(this)->JSSetVerify();
177 break; 177 break;
178 case JS_MAP_TYPE: 178 case JS_MAP_TYPE:
179 JSMap::cast(this)->JSMapVerify(); 179 JSMap::cast(this)->JSMapVerify();
180 break; 180 break;
181 case JS_WEAK_MAP_TYPE: 181 case JS_WEAK_MAP_TYPE:
182 JSWeakMap::cast(this)->JSWeakMapVerify(); 182 JSWeakMap::cast(this)->JSWeakMapVerify();
183 break; 183 break;
184 case JS_WEAK_SET_TYPE:
185 JSWeakSet::cast(this)->JSWeakSetVerify();
186 break;
184 case JS_REGEXP_TYPE: 187 case JS_REGEXP_TYPE:
185 JSRegExp::cast(this)->JSRegExpVerify(); 188 JSRegExp::cast(this)->JSRegExpVerify();
186 break; 189 break;
187 case FILLER_TYPE: 190 case FILLER_TYPE:
188 break; 191 break;
189 case JS_PROXY_TYPE: 192 case JS_PROXY_TYPE:
190 JSProxy::cast(this)->JSProxyVerify(); 193 JSProxy::cast(this)->JSProxyVerify();
191 break; 194 break;
192 case JS_FUNCTION_PROXY_TYPE: 195 case JS_FUNCTION_PROXY_TYPE:
193 JSFunctionProxy::cast(this)->JSFunctionProxyVerify(); 196 JSFunctionProxy::cast(this)->JSFunctionProxyVerify();
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 695
693 696
694 void JSWeakMap::JSWeakMapVerify() { 697 void JSWeakMap::JSWeakMapVerify() {
695 CHECK(IsJSWeakMap()); 698 CHECK(IsJSWeakMap());
696 JSObjectVerify(); 699 JSObjectVerify();
697 VerifyHeapPointer(table()); 700 VerifyHeapPointer(table());
698 CHECK(table()->IsHashTable() || table()->IsUndefined()); 701 CHECK(table()->IsHashTable() || table()->IsUndefined());
699 } 702 }
700 703
701 704
705 void JSWeakSet::JSWeakSetVerify() {
706 CHECK(IsJSWeakSet());
707 JSObjectVerify();
708 VerifyHeapPointer(table());
709 CHECK(table()->IsHashTable() || table()->IsUndefined());
710 }
711
712
702 void JSRegExp::JSRegExpVerify() { 713 void JSRegExp::JSRegExpVerify() {
703 JSObjectVerify(); 714 JSObjectVerify();
704 CHECK(data()->IsUndefined() || data()->IsFixedArray()); 715 CHECK(data()->IsUndefined() || data()->IsFixedArray());
705 switch (TypeTag()) { 716 switch (TypeTag()) {
706 case JSRegExp::ATOM: { 717 case JSRegExp::ATOM: {
707 FixedArray* arr = FixedArray::cast(data()); 718 FixedArray* arr = FixedArray::cast(data());
708 CHECK(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); 719 CHECK(arr->get(JSRegExp::kAtomPatternIndex)->IsString());
709 break; 720 break;
710 } 721 }
711 case JSRegExp::IRREGEXP: { 722 case JSRegExp::IRREGEXP: {
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 for (int i = 0; i < number_of_transitions(); ++i) { 1169 for (int i = 0; i < number_of_transitions(); ++i) {
1159 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1170 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1160 } 1171 }
1161 return true; 1172 return true;
1162 } 1173 }
1163 1174
1164 1175
1165 #endif // DEBUG 1176 #endif // DEBUG
1166 1177
1167 } } // namespace v8::internal 1178 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | src/objects-printer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698