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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
921 before_debug_event()->ObjectVerify(); | 921 before_debug_event()->ObjectVerify(); |
922 after_debug_event()->ObjectVerify(); | 922 after_debug_event()->ObjectVerify(); |
923 } | 923 } |
924 | 924 |
925 void JSModuleNamespace::JSModuleNamespaceVerify() { | 925 void JSModuleNamespace::JSModuleNamespaceVerify() { |
926 CHECK(IsJSModuleNamespace()); | 926 CHECK(IsJSModuleNamespace()); |
927 module()->ObjectVerify(); | 927 module()->ObjectVerify(); |
928 } | 928 } |
929 | 929 |
930 void Module::ModuleVerify() { | 930 void Module::ModuleVerify() { |
931 Isolate* isolate = GetIsolate(); | |
932 CHECK(IsModule()); | 931 CHECK(IsModule()); |
933 CHECK(code()->IsSharedFunctionInfo() || code()->IsJSFunction()); | 932 |
933 CHECK((!instantiated() && code()->IsSharedFunctionInfo()) || | |
934 (instantiated() && !evaluated() && code()->IsJSFunction()) || | |
935 (instantiated() && evaluated() && code()->IsModuleInfo())); | |
936 | |
934 code()->ObjectVerify(); | 937 code()->ObjectVerify(); |
adamk
2016/10/11 15:54:05
Maybe just remove all these ObjectVerify calls whi
| |
938 embedder_data()->ObjectVerify(); | |
935 exports()->ObjectVerify(); | 939 exports()->ObjectVerify(); |
936 requested_modules()->ObjectVerify(); | 940 requested_modules()->ObjectVerify(); |
937 VerifySmiField(kFlagsOffset); | 941 |
938 embedder_data()->ObjectVerify(); | |
939 VerifySmiField(kHashOffset); | 942 VerifySmiField(kHashOffset); |
940 CHECK(module_namespace()->IsUndefined(isolate) || | 943 |
944 CHECK(module_namespace()->IsUndefined(GetIsolate()) || | |
941 module_namespace()->IsJSModuleNamespace()); | 945 module_namespace()->IsJSModuleNamespace()); |
946 | |
942 // TODO(neis): Check more. | 947 // TODO(neis): Check more. |
943 } | 948 } |
944 | 949 |
945 void PrototypeInfo::PrototypeInfoVerify() { | 950 void PrototypeInfo::PrototypeInfoVerify() { |
946 CHECK(IsPrototypeInfo()); | 951 CHECK(IsPrototypeInfo()); |
947 if (prototype_users()->IsWeakFixedArray()) { | 952 if (prototype_users()->IsWeakFixedArray()) { |
948 WeakFixedArray::cast(prototype_users())->FixedArrayVerify(); | 953 WeakFixedArray::cast(prototype_users())->FixedArrayVerify(); |
949 } else { | 954 } else { |
950 CHECK(prototype_users()->IsSmi()); | 955 CHECK(prototype_users()->IsSmi()); |
951 } | 956 } |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1373 | 1378 |
1374 // Both are done at the same time. | 1379 // Both are done at the same time. |
1375 CHECK_EQ(new_it.done(), old_it.done()); | 1380 CHECK_EQ(new_it.done(), old_it.done()); |
1376 } | 1381 } |
1377 | 1382 |
1378 | 1383 |
1379 #endif // DEBUG | 1384 #endif // DEBUG |
1380 | 1385 |
1381 } // namespace internal | 1386 } // namespace internal |
1382 } // namespace v8 | 1387 } // namespace v8 |
OLD | NEW |