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

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

Issue 2567333002: [promises] port NewPromiseCapability to TF (Closed)
Patch Set: Make gcmole happy Created 3 years, 11 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/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/disasm.h" 8 #include "src/disasm.h"
9 #include "src/disassembler.h" 9 #include "src/disassembler.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 case JS_STRING_ITERATOR_TYPE: 195 case JS_STRING_ITERATOR_TYPE:
196 JSStringIterator::cast(this)->JSStringIteratorVerify(); 196 JSStringIterator::cast(this)->JSStringIteratorVerify();
197 break; 197 break;
198 case JS_WEAK_MAP_TYPE: 198 case JS_WEAK_MAP_TYPE:
199 JSWeakMap::cast(this)->JSWeakMapVerify(); 199 JSWeakMap::cast(this)->JSWeakMapVerify();
200 break; 200 break;
201 case JS_WEAK_SET_TYPE: 201 case JS_WEAK_SET_TYPE:
202 JSWeakSet::cast(this)->JSWeakSetVerify(); 202 JSWeakSet::cast(this)->JSWeakSetVerify();
203 break; 203 break;
204 case JS_PROMISE_CAPABILITY_TYPE:
205 JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify();
206 break;
204 case JS_PROMISE_TYPE: 207 case JS_PROMISE_TYPE:
205 JSPromise::cast(this)->JSPromiseVerify(); 208 JSPromise::cast(this)->JSPromiseVerify();
206 break; 209 break;
207 case JS_REGEXP_TYPE: 210 case JS_REGEXP_TYPE:
208 JSRegExp::cast(this)->JSRegExpVerify(); 211 JSRegExp::cast(this)->JSRegExpVerify();
209 break; 212 break;
210 case FILLER_TYPE: 213 case FILLER_TYPE:
211 break; 214 break;
212 case JS_PROXY_TYPE: 215 case JS_PROXY_TYPE:
213 JSProxy::cast(this)->JSProxyVerify(); 216 JSProxy::cast(this)->JSProxyVerify();
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 CHECK_LE(index(), String::kMaxLength); 879 CHECK_LE(index(), String::kMaxLength);
877 } 880 }
878 881
879 void JSWeakSet::JSWeakSetVerify() { 882 void JSWeakSet::JSWeakSetVerify() {
880 CHECK(IsJSWeakSet()); 883 CHECK(IsJSWeakSet());
881 JSObjectVerify(); 884 JSObjectVerify();
882 VerifyHeapPointer(table()); 885 VerifyHeapPointer(table());
883 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); 886 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
884 } 887 }
885 888
889 void JSPromiseCapability::JSPromiseCapabilityVerify() {
890 CHECK(IsJSPromiseCapability());
891 JSObjectVerify();
892 VerifyPointer(promise());
893 VerifyPointer(resolve());
894 VerifyPointer(reject());
895 }
896
886 void JSPromise::JSPromiseVerify() { 897 void JSPromise::JSPromiseVerify() {
887 CHECK(IsJSPromise()); 898 CHECK(IsJSPromise());
888 JSObjectVerify(); 899 JSObjectVerify();
889 Isolate* isolate = GetIsolate(); 900 Isolate* isolate = GetIsolate();
890 VerifySmiField(kStatusOffset); 901 VerifySmiField(kStatusOffset);
891 CHECK(result()->IsUndefined(isolate) || result()->IsObject()); 902 CHECK(result()->IsUndefined(isolate) || result()->IsObject());
892 CHECK(deferred_promise()->IsUndefined(isolate) || 903 CHECK(deferred_promise()->IsUndefined(isolate) ||
893 deferred_promise()->IsJSReceiver() || 904 deferred_promise()->IsJSReceiver() ||
894 deferred_promise()->IsFixedArray()); 905 deferred_promise()->IsFixedArray());
895 CHECK(deferred_on_resolve()->IsUndefined(isolate) || 906 CHECK(deferred_on_resolve()->IsUndefined(isolate) ||
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 1556
1546 // Both are done at the same time. 1557 // Both are done at the same time.
1547 CHECK_EQ(new_it.done(), old_it.done()); 1558 CHECK_EQ(new_it.done(), old_it.done());
1548 } 1559 }
1549 1560
1550 1561
1551 #endif // DEBUG 1562 #endif // DEBUG
1552 1563
1553 } // namespace internal 1564 } // namespace internal
1554 } // namespace v8 1565 } // 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