OLD | NEW |
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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 value()->ObjectVerify(); | 1026 value()->ObjectVerify(); |
1027 } | 1027 } |
1028 | 1028 |
1029 void PromiseResolveThenableJobInfo::PromiseResolveThenableJobInfoVerify() { | 1029 void PromiseResolveThenableJobInfo::PromiseResolveThenableJobInfoVerify() { |
1030 Isolate* isolate = GetIsolate(); | 1030 Isolate* isolate = GetIsolate(); |
1031 CHECK(IsPromiseResolveThenableJobInfo()); | 1031 CHECK(IsPromiseResolveThenableJobInfo()); |
1032 CHECK(thenable()->IsJSReceiver()); | 1032 CHECK(thenable()->IsJSReceiver()); |
1033 CHECK(then()->IsJSReceiver()); | 1033 CHECK(then()->IsJSReceiver()); |
1034 CHECK(resolve()->IsJSFunction()); | 1034 CHECK(resolve()->IsJSFunction()); |
1035 CHECK(reject()->IsJSFunction()); | 1035 CHECK(reject()->IsJSFunction()); |
1036 CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate)); | 1036 VerifySmiField(kDebugIdOffset); |
1037 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate)); | 1037 VerifySmiField(kDebugNameOffset); |
1038 CHECK(context()->IsContext()); | 1038 CHECK(context()->IsContext()); |
1039 } | 1039 } |
1040 | 1040 |
1041 void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() { | 1041 void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() { |
1042 Isolate* isolate = GetIsolate(); | 1042 Isolate* isolate = GetIsolate(); |
1043 CHECK(IsPromiseReactionJobInfo()); | 1043 CHECK(IsPromiseReactionJobInfo()); |
1044 CHECK(promise()->IsJSPromise()); | 1044 CHECK(promise()->IsJSPromise()); |
1045 CHECK(value()->IsObject()); | 1045 CHECK(value()->IsObject()); |
1046 CHECK(tasks()->IsFixedArray() || tasks()->IsCallable()); | 1046 CHECK(tasks()->IsFixedArray() || tasks()->IsCallable()); |
1047 CHECK(deferred_promise()->IsUndefined(isolate) || | 1047 CHECK(deferred_promise()->IsUndefined(isolate) || |
1048 deferred_promise()->IsJSReceiver() || | 1048 deferred_promise()->IsJSReceiver() || |
1049 deferred_promise()->IsFixedArray()); | 1049 deferred_promise()->IsFixedArray()); |
1050 CHECK(deferred_on_resolve()->IsUndefined(isolate) || | 1050 CHECK(deferred_on_resolve()->IsUndefined(isolate) || |
1051 deferred_on_resolve()->IsCallable() || | 1051 deferred_on_resolve()->IsCallable() || |
1052 deferred_on_resolve()->IsFixedArray()); | 1052 deferred_on_resolve()->IsFixedArray()); |
1053 CHECK(deferred_on_reject()->IsUndefined(isolate) || | 1053 CHECK(deferred_on_reject()->IsUndefined(isolate) || |
1054 deferred_on_reject()->IsCallable() || | 1054 deferred_on_reject()->IsCallable() || |
1055 deferred_on_reject()->IsFixedArray()); | 1055 deferred_on_reject()->IsFixedArray()); |
1056 CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate)); | 1056 VerifySmiField(kDebugIdOffset); |
1057 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate)); | 1057 VerifySmiField(kDebugNameOffset); |
1058 CHECK(context()->IsContext()); | 1058 CHECK(context()->IsContext()); |
1059 } | 1059 } |
1060 | 1060 |
1061 void JSModuleNamespace::JSModuleNamespaceVerify() { | 1061 void JSModuleNamespace::JSModuleNamespaceVerify() { |
1062 CHECK(IsJSModuleNamespace()); | 1062 CHECK(IsJSModuleNamespace()); |
1063 VerifyPointer(module()); | 1063 VerifyPointer(module()); |
1064 } | 1064 } |
1065 | 1065 |
1066 void ModuleInfoEntry::ModuleInfoEntryVerify() { | 1066 void ModuleInfoEntry::ModuleInfoEntryVerify() { |
1067 Isolate* isolate = GetIsolate(); | 1067 Isolate* isolate = GetIsolate(); |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1556 | 1556 |
1557 // Both are done at the same time. | 1557 // Both are done at the same time. |
1558 CHECK_EQ(new_it.done(), old_it.done()); | 1558 CHECK_EQ(new_it.done(), old_it.done()); |
1559 } | 1559 } |
1560 | 1560 |
1561 | 1561 |
1562 #endif // DEBUG | 1562 #endif // DEBUG |
1563 | 1563 |
1564 } // namespace internal | 1564 } // namespace internal |
1565 } // namespace v8 | 1565 } // namespace v8 |
OLD | NEW |