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

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

Issue 2554013002: Revert of Create JSPromise (Closed)
Patch Set: Created 4 years 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.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 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 break; 97 break;
98 case ODDBALL_TYPE: 98 case ODDBALL_TYPE:
99 Oddball::cast(this)->OddballVerify(); 99 Oddball::cast(this)->OddballVerify();
100 break; 100 break;
101 case JS_OBJECT_TYPE: 101 case JS_OBJECT_TYPE:
102 case JS_ERROR_TYPE: 102 case JS_ERROR_TYPE:
103 case JS_ARGUMENTS_TYPE: 103 case JS_ARGUMENTS_TYPE:
104 case JS_API_OBJECT_TYPE: 104 case JS_API_OBJECT_TYPE:
105 case JS_SPECIAL_API_OBJECT_TYPE: 105 case JS_SPECIAL_API_OBJECT_TYPE:
106 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: 106 case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
107 case JS_PROMISE_TYPE:
107 JSObject::cast(this)->JSObjectVerify(); 108 JSObject::cast(this)->JSObjectVerify();
108 break; 109 break;
109 case JS_GENERATOR_OBJECT_TYPE: 110 case JS_GENERATOR_OBJECT_TYPE:
110 JSGeneratorObject::cast(this)->JSGeneratorObjectVerify(); 111 JSGeneratorObject::cast(this)->JSGeneratorObjectVerify();
111 break; 112 break;
112 case JS_VALUE_TYPE: 113 case JS_VALUE_TYPE:
113 JSValue::cast(this)->JSValueVerify(); 114 JSValue::cast(this)->JSValueVerify();
114 break; 115 break;
115 case JS_DATE_TYPE: 116 case JS_DATE_TYPE:
116 JSDate::cast(this)->JSDateVerify(); 117 JSDate::cast(this)->JSDateVerify();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 198
198 case JS_STRING_ITERATOR_TYPE: 199 case JS_STRING_ITERATOR_TYPE:
199 JSStringIterator::cast(this)->JSStringIteratorVerify(); 200 JSStringIterator::cast(this)->JSStringIteratorVerify();
200 break; 201 break;
201 case JS_WEAK_MAP_TYPE: 202 case JS_WEAK_MAP_TYPE:
202 JSWeakMap::cast(this)->JSWeakMapVerify(); 203 JSWeakMap::cast(this)->JSWeakMapVerify();
203 break; 204 break;
204 case JS_WEAK_SET_TYPE: 205 case JS_WEAK_SET_TYPE:
205 JSWeakSet::cast(this)->JSWeakSetVerify(); 206 JSWeakSet::cast(this)->JSWeakSetVerify();
206 break; 207 break;
207 case JS_PROMISE_TYPE:
208 JSPromise::cast(this)->JSPromiseVerify();
209 break;
210 case JS_REGEXP_TYPE: 208 case JS_REGEXP_TYPE:
211 JSRegExp::cast(this)->JSRegExpVerify(); 209 JSRegExp::cast(this)->JSRegExpVerify();
212 break; 210 break;
213 case FILLER_TYPE: 211 case FILLER_TYPE:
214 break; 212 break;
215 case JS_PROXY_TYPE: 213 case JS_PROXY_TYPE:
216 JSProxy::cast(this)->JSProxyVerify(); 214 JSProxy::cast(this)->JSProxyVerify();
217 break; 215 break;
218 case FOREIGN_TYPE: 216 case FOREIGN_TYPE:
219 Foreign::cast(this)->ForeignVerify(); 217 Foreign::cast(this)->ForeignVerify();
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 CHECK_LE(index(), String::kMaxLength); 877 CHECK_LE(index(), String::kMaxLength);
880 } 878 }
881 879
882 void JSWeakSet::JSWeakSetVerify() { 880 void JSWeakSet::JSWeakSetVerify() {
883 CHECK(IsJSWeakSet()); 881 CHECK(IsJSWeakSet());
884 JSObjectVerify(); 882 JSObjectVerify();
885 VerifyHeapPointer(table()); 883 VerifyHeapPointer(table());
886 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); 884 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
887 } 885 }
888 886
889 void JSPromise::JSPromiseVerify() {
890 CHECK(IsJSPromise());
891 JSObjectVerify();
892 Isolate* isolate = GetIsolate();
893 CHECK(result()->IsUndefined(isolate) || result()->IsObject());
894 CHECK(deferred()->IsUndefined(isolate) || deferred()->IsJSObject() ||
895 deferred()->IsFixedArray());
896 CHECK(fulfill_reactions()->IsUndefined(isolate) ||
897 fulfill_reactions()->IsCallable() ||
898 fulfill_reactions()->IsFixedArray());
899 CHECK(reject_reactions()->IsUndefined(isolate) ||
900 reject_reactions()->IsCallable() || reject_reactions()->IsFixedArray());
901 }
902 887
903 void JSRegExp::JSRegExpVerify() { 888 void JSRegExp::JSRegExpVerify() {
904 JSObjectVerify(); 889 JSObjectVerify();
905 Isolate* isolate = GetIsolate(); 890 Isolate* isolate = GetIsolate();
906 CHECK(data()->IsUndefined(isolate) || data()->IsFixedArray()); 891 CHECK(data()->IsUndefined(isolate) || data()->IsFixedArray());
907 switch (TypeTag()) { 892 switch (TypeTag()) {
908 case JSRegExp::ATOM: { 893 case JSRegExp::ATOM: {
909 FixedArray* arr = FixedArray::cast(data()); 894 FixedArray* arr = FixedArray::cast(data());
910 CHECK(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); 895 CHECK(arr->get(JSRegExp::kAtomPatternIndex)->IsString());
911 break; 896 break;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 CHECK(reject()->IsJSFunction()); 1004 CHECK(reject()->IsJSFunction());
1020 CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate)); 1005 CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate));
1021 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate)); 1006 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate));
1022 CHECK(context()->IsContext()); 1007 CHECK(context()->IsContext());
1023 } 1008 }
1024 1009
1025 void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() { 1010 void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() {
1026 Isolate* isolate = GetIsolate(); 1011 Isolate* isolate = GetIsolate();
1027 CHECK(IsPromiseReactionJobInfo()); 1012 CHECK(IsPromiseReactionJobInfo());
1028 CHECK(value()->IsObject()); 1013 CHECK(value()->IsObject());
1029 CHECK(tasks()->IsFixedArray() || tasks()->IsCallable()); 1014 CHECK(tasks()->IsJSArray() || tasks()->IsCallable());
1030 CHECK(deferred()->IsFixedArray() || deferred()->IsJSObject()); 1015 CHECK(deferred()->IsJSObject() || deferred()->IsUndefined(isolate));
1031 CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate)); 1016 CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate));
1032 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate)); 1017 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate));
1033 CHECK(context()->IsContext()); 1018 CHECK(context()->IsContext());
1034 } 1019 }
1035 1020
1036 void JSModuleNamespace::JSModuleNamespaceVerify() { 1021 void JSModuleNamespace::JSModuleNamespaceVerify() {
1037 CHECK(IsJSModuleNamespace()); 1022 CHECK(IsJSModuleNamespace());
1038 VerifyPointer(module()); 1023 VerifyPointer(module());
1039 } 1024 }
1040 1025
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 1521
1537 // Both are done at the same time. 1522 // Both are done at the same time.
1538 CHECK_EQ(new_it.done(), old_it.done()); 1523 CHECK_EQ(new_it.done(), old_it.done());
1539 } 1524 }
1540 1525
1541 1526
1542 #endif // DEBUG 1527 #endif // DEBUG
1543 1528
1544 } // namespace internal 1529 } // namespace internal
1545 } // namespace v8 1530 } // namespace v8
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