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

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

Issue 2345823002: [modules] Turn JSModule into Module. (Closed)
Patch Set: Address comments. Created 4 years, 3 months 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-body-descriptors-inl.h ('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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
172 case FOREIGN_TYPE: 169 case FOREIGN_TYPE:
173 Foreign::cast(this)->ForeignVerify(); 170 Foreign::cast(this)->ForeignVerify();
174 break; 171 break;
175 case SHARED_FUNCTION_INFO_TYPE: 172 case SHARED_FUNCTION_INFO_TYPE:
176 SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify(); 173 SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify();
177 break; 174 break;
178 case JS_MESSAGE_OBJECT_TYPE: 175 case JS_MESSAGE_OBJECT_TYPE:
179 JSMessageObject::cast(this)->JSMessageObjectVerify(); 176 JSMessageObject::cast(this)->JSMessageObjectVerify();
180 break; 177 break;
181 case JS_ARRAY_BUFFER_TYPE: 178 case JS_ARRAY_BUFFER_TYPE:
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 CHECK(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); 824 CHECK(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi());
828 break; 825 break;
829 } 826 }
830 default: 827 default:
831 CHECK_EQ(JSRegExp::NOT_COMPILED, TypeTag()); 828 CHECK_EQ(JSRegExp::NOT_COMPILED, TypeTag());
832 CHECK(data()->IsUndefined(isolate)); 829 CHECK(data()->IsUndefined(isolate));
833 break; 830 break;
834 } 831 }
835 } 832 }
836 833
837 void JSModule::JSModuleVerify() { CHECK(IsJSModule()); }
838
839 void JSProxy::JSProxyVerify() { 834 void JSProxy::JSProxyVerify() {
840 CHECK(IsJSProxy()); 835 CHECK(IsJSProxy());
841 VerifyPointer(target()); 836 VerifyPointer(target());
842 VerifyPointer(handler()); 837 VerifyPointer(handler());
843 Isolate* isolate = GetIsolate(); 838 Isolate* isolate = GetIsolate();
844 CHECK_EQ(target()->IsCallable(), map()->is_callable()); 839 CHECK_EQ(target()->IsCallable(), map()->is_callable());
845 CHECK_EQ(target()->IsConstructor(), map()->is_constructor()); 840 CHECK_EQ(target()->IsConstructor(), map()->is_constructor());
846 CHECK(hash()->IsSmi() || hash()->IsUndefined(isolate)); 841 CHECK(hash()->IsSmi() || hash()->IsUndefined(isolate));
847 CHECK(map()->prototype()->IsNull(isolate)); 842 CHECK(map()->prototype()->IsNull(isolate));
848 // There should be no properties on a Proxy. 843 // There should be no properties on a Proxy.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 void Foreign::ForeignVerify() { 892 void Foreign::ForeignVerify() {
898 CHECK(IsForeign()); 893 CHECK(IsForeign());
899 } 894 }
900 895
901 896
902 void Box::BoxVerify() { 897 void Box::BoxVerify() {
903 CHECK(IsBox()); 898 CHECK(IsBox());
904 value()->ObjectVerify(); 899 value()->ObjectVerify();
905 } 900 }
906 901
902 void Module::ModuleVerify() {
903 CHECK(IsModule());
904 exports()->ObjectVerify();
905 // TODO(neis): Check more.
906 }
907 907
908 void PrototypeInfo::PrototypeInfoVerify() { 908 void PrototypeInfo::PrototypeInfoVerify() {
909 CHECK(IsPrototypeInfo()); 909 CHECK(IsPrototypeInfo());
910 if (prototype_users()->IsWeakFixedArray()) { 910 if (prototype_users()->IsWeakFixedArray()) {
911 WeakFixedArray::cast(prototype_users())->FixedArrayVerify(); 911 WeakFixedArray::cast(prototype_users())->FixedArrayVerify();
912 } else { 912 } else {
913 CHECK(prototype_users()->IsSmi()); 913 CHECK(prototype_users()->IsSmi());
914 } 914 }
915 CHECK(validity_cell()->IsCell() || validity_cell()->IsSmi()); 915 CHECK(validity_cell()->IsCell() || validity_cell()->IsSmi());
916 } 916 }
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 1336
1337 // Both are done at the same time. 1337 // Both are done at the same time.
1338 CHECK_EQ(new_it.done(), old_it.done()); 1338 CHECK_EQ(new_it.done(), old_it.done());
1339 } 1339 }
1340 1340
1341 1341
1342 #endif // DEBUG 1342 #endif // DEBUG
1343 1343
1344 } // namespace internal 1344 } // namespace internal
1345 } // namespace v8 1345 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698