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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 VerifyPointer(module_namespace()); | 1008 VerifyPointer(module_namespace()); |
1009 VerifyPointer(requested_modules()); | 1009 VerifyPointer(requested_modules()); |
1010 VerifySmiField(kHashOffset); | 1010 VerifySmiField(kHashOffset); |
1011 | 1011 |
1012 CHECK((!instantiated() && code()->IsSharedFunctionInfo()) || | 1012 CHECK((!instantiated() && code()->IsSharedFunctionInfo()) || |
1013 (instantiated() && !evaluated() && code()->IsJSFunction()) || | 1013 (instantiated() && !evaluated() && code()->IsJSFunction()) || |
1014 (instantiated() && evaluated() && code()->IsModuleInfo())); | 1014 (instantiated() && evaluated() && code()->IsModuleInfo())); |
1015 | 1015 |
1016 CHECK(module_namespace()->IsUndefined(GetIsolate()) || | 1016 CHECK(module_namespace()->IsUndefined(GetIsolate()) || |
1017 module_namespace()->IsJSModuleNamespace()); | 1017 module_namespace()->IsJSModuleNamespace()); |
| 1018 if (module_namespace()->IsJSModuleNamespace()) { |
| 1019 CHECK_EQ(JSModuleNamespace::cast(module_namespace())->module(), this); |
| 1020 } |
1018 | 1021 |
1019 // TODO(neis): Check more. | 1022 CHECK_EQ(requested_modules()->length(), info()->module_requests()->length()); |
| 1023 |
| 1024 CHECK_NE(hash(), 0); |
1020 } | 1025 } |
1021 | 1026 |
1022 void PrototypeInfo::PrototypeInfoVerify() { | 1027 void PrototypeInfo::PrototypeInfoVerify() { |
1023 CHECK(IsPrototypeInfo()); | 1028 CHECK(IsPrototypeInfo()); |
1024 CHECK(weak_cell()->IsWeakCell() || weak_cell()->IsUndefined(GetIsolate())); | 1029 CHECK(weak_cell()->IsWeakCell() || weak_cell()->IsUndefined(GetIsolate())); |
1025 if (prototype_users()->IsWeakFixedArray()) { | 1030 if (prototype_users()->IsWeakFixedArray()) { |
1026 WeakFixedArray::cast(prototype_users())->FixedArrayVerify(); | 1031 WeakFixedArray::cast(prototype_users())->FixedArrayVerify(); |
1027 } else { | 1032 } else { |
1028 CHECK(prototype_users()->IsSmi()); | 1033 CHECK(prototype_users()->IsSmi()); |
1029 } | 1034 } |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1458 | 1463 |
1459 // Both are done at the same time. | 1464 // Both are done at the same time. |
1460 CHECK_EQ(new_it.done(), old_it.done()); | 1465 CHECK_EQ(new_it.done(), old_it.done()); |
1461 } | 1466 } |
1462 | 1467 |
1463 | 1468 |
1464 #endif // DEBUG | 1469 #endif // DEBUG |
1465 | 1470 |
1466 } // namespace internal | 1471 } // namespace internal |
1467 } // namespace v8 | 1472 } // namespace v8 |
OLD | NEW |