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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 JSWeakSet::cast(this)->JSWeakSetVerify(); | 159 JSWeakSet::cast(this)->JSWeakSetVerify(); |
160 break; | 160 break; |
161 case JS_REGEXP_TYPE: | 161 case JS_REGEXP_TYPE: |
162 JSRegExp::cast(this)->JSRegExpVerify(); | 162 JSRegExp::cast(this)->JSRegExpVerify(); |
163 break; | 163 break; |
164 case FILLER_TYPE: | 164 case FILLER_TYPE: |
165 break; | 165 break; |
166 case JS_PROXY_TYPE: | 166 case JS_PROXY_TYPE: |
167 JSProxy::cast(this)->JSProxyVerify(); | 167 JSProxy::cast(this)->JSProxyVerify(); |
168 break; | 168 break; |
| 169 case JS_MODULE_TYPE: |
| 170 JSModule::cast(this)->JSModuleVerify(); |
| 171 break; |
169 case FOREIGN_TYPE: | 172 case FOREIGN_TYPE: |
170 Foreign::cast(this)->ForeignVerify(); | 173 Foreign::cast(this)->ForeignVerify(); |
171 break; | 174 break; |
172 case SHARED_FUNCTION_INFO_TYPE: | 175 case SHARED_FUNCTION_INFO_TYPE: |
173 SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify(); | 176 SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify(); |
174 break; | 177 break; |
175 case JS_MESSAGE_OBJECT_TYPE: | 178 case JS_MESSAGE_OBJECT_TYPE: |
176 JSMessageObject::cast(this)->JSMessageObjectVerify(); | 179 JSMessageObject::cast(this)->JSMessageObjectVerify(); |
177 break; | 180 break; |
178 case JS_ARRAY_BUFFER_TYPE: | 181 case JS_ARRAY_BUFFER_TYPE: |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 CHECK(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); | 827 CHECK(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); |
825 break; | 828 break; |
826 } | 829 } |
827 default: | 830 default: |
828 CHECK_EQ(JSRegExp::NOT_COMPILED, TypeTag()); | 831 CHECK_EQ(JSRegExp::NOT_COMPILED, TypeTag()); |
829 CHECK(data()->IsUndefined(isolate)); | 832 CHECK(data()->IsUndefined(isolate)); |
830 break; | 833 break; |
831 } | 834 } |
832 } | 835 } |
833 | 836 |
| 837 void JSModule::JSModuleVerify() { CHECK(IsJSModule()); } |
834 | 838 |
835 void JSProxy::JSProxyVerify() { | 839 void JSProxy::JSProxyVerify() { |
836 CHECK(IsJSProxy()); | 840 CHECK(IsJSProxy()); |
837 VerifyPointer(target()); | 841 VerifyPointer(target()); |
838 VerifyPointer(handler()); | 842 VerifyPointer(handler()); |
839 Isolate* isolate = GetIsolate(); | 843 Isolate* isolate = GetIsolate(); |
840 CHECK_EQ(target()->IsCallable(), map()->is_callable()); | 844 CHECK_EQ(target()->IsCallable(), map()->is_callable()); |
841 CHECK_EQ(target()->IsConstructor(), map()->is_constructor()); | 845 CHECK_EQ(target()->IsConstructor(), map()->is_constructor()); |
842 CHECK(hash()->IsSmi() || hash()->IsUndefined(isolate)); | 846 CHECK(hash()->IsSmi() || hash()->IsUndefined(isolate)); |
843 CHECK(map()->prototype()->IsNull(isolate)); | 847 CHECK(map()->prototype()->IsNull(isolate)); |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 | 1336 |
1333 // Both are done at the same time. | 1337 // Both are done at the same time. |
1334 CHECK_EQ(new_it.done(), old_it.done()); | 1338 CHECK_EQ(new_it.done(), old_it.done()); |
1335 } | 1339 } |
1336 | 1340 |
1337 | 1341 |
1338 #endif // DEBUG | 1342 #endif // DEBUG |
1339 | 1343 |
1340 } // namespace internal | 1344 } // namespace internal |
1341 } // namespace v8 | 1345 } // namespace v8 |
OLD | NEW |