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

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

Issue 2915793002: [api] Prototype WeakRef implementation
Patch Set: Created 3 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
« no previous file with comments | « src/objects-body-descriptors-inl.h ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/assembler-inl.h" 7 #include "src/assembler-inl.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/disasm.h" 9 #include "src/disasm.h"
10 #include "src/disassembler.h" 10 #include "src/disassembler.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 break; 209 break;
210 case JS_ASYNC_FROM_SYNC_ITERATOR_TYPE: 210 case JS_ASYNC_FROM_SYNC_ITERATOR_TYPE:
211 JSAsyncFromSyncIterator::cast(this)->JSAsyncFromSyncIteratorVerify(); 211 JSAsyncFromSyncIterator::cast(this)->JSAsyncFromSyncIteratorVerify();
212 break; 212 break;
213 case JS_WEAK_MAP_TYPE: 213 case JS_WEAK_MAP_TYPE:
214 JSWeakMap::cast(this)->JSWeakMapVerify(); 214 JSWeakMap::cast(this)->JSWeakMapVerify();
215 break; 215 break;
216 case JS_WEAK_SET_TYPE: 216 case JS_WEAK_SET_TYPE:
217 JSWeakSet::cast(this)->JSWeakSetVerify(); 217 JSWeakSet::cast(this)->JSWeakSetVerify();
218 break; 218 break;
219 case JS_WEAK_REF_TYPE:
220 JSWeakRef::cast(this)->JSWeakRefVerify();
221 break;
219 case JS_PROMISE_CAPABILITY_TYPE: 222 case JS_PROMISE_CAPABILITY_TYPE:
220 JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify(); 223 JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify();
221 break; 224 break;
222 case JS_PROMISE_TYPE: 225 case JS_PROMISE_TYPE:
223 JSPromise::cast(this)->JSPromiseVerify(); 226 JSPromise::cast(this)->JSPromiseVerify();
224 break; 227 break;
225 case JS_REGEXP_TYPE: 228 case JS_REGEXP_TYPE:
226 JSRegExp::cast(this)->JSRegExpVerify(); 229 JSRegExp::cast(this)->JSRegExpVerify();
227 break; 230 break;
228 case FILLER_TYPE: 231 case FILLER_TYPE:
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 JSObjectVerify(); 965 JSObjectVerify();
963 VerifyHeapPointer(sync_iterator()); 966 VerifyHeapPointer(sync_iterator());
964 } 967 }
965 968
966 void JSWeakSet::JSWeakSetVerify() { 969 void JSWeakSet::JSWeakSetVerify() {
967 CHECK(IsJSWeakSet()); 970 CHECK(IsJSWeakSet());
968 JSObjectVerify(); 971 JSObjectVerify();
969 VerifyHeapPointer(table()); 972 VerifyHeapPointer(table());
970 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); 973 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
971 } 974 }
975 void JSWeakRef::JSWeakRefVerify() {
976 CHECK(IsJSWeakRef());
977 JSObjectVerify();
978 VerifyHeapPointer(table());
979 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
980 }
972 981
973 void JSPromiseCapability::JSPromiseCapabilityVerify() { 982 void JSPromiseCapability::JSPromiseCapabilityVerify() {
974 CHECK(IsJSPromiseCapability()); 983 CHECK(IsJSPromiseCapability());
975 JSObjectVerify(); 984 JSObjectVerify();
976 VerifyPointer(promise()); 985 VerifyPointer(promise());
977 VerifyPointer(resolve()); 986 VerifyPointer(resolve());
978 VerifyPointer(reject()); 987 VerifyPointer(reject());
979 } 988 }
980 989
981 void JSPromise::JSPromiseVerify() { 990 void JSPromise::JSPromiseVerify() {
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 1646
1638 // Both are done at the same time. 1647 // Both are done at the same time.
1639 CHECK_EQ(new_it.done(), old_it.done()); 1648 CHECK_EQ(new_it.done(), old_it.done());
1640 } 1649 }
1641 1650
1642 1651
1643 #endif // DEBUG 1652 #endif // DEBUG
1644 1653
1645 } // namespace internal 1654 } // namespace internal
1646 } // namespace v8 1655 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698