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

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

Issue 2407423002: [modules] Implement @@iterator on namespace objects. (Closed)
Patch Set: Created 4 years, 2 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
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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 break; 136 break;
137 case WEAK_CELL_TYPE: 137 case WEAK_CELL_TYPE:
138 WeakCell::cast(this)->WeakCellVerify(); 138 WeakCell::cast(this)->WeakCellVerify();
139 break; 139 break;
140 case JS_ARRAY_TYPE: 140 case JS_ARRAY_TYPE:
141 JSArray::cast(this)->JSArrayVerify(); 141 JSArray::cast(this)->JSArrayVerify();
142 break; 142 break;
143 case JS_MODULE_NAMESPACE_TYPE: 143 case JS_MODULE_NAMESPACE_TYPE:
144 JSModuleNamespace::cast(this)->JSModuleNamespaceVerify(); 144 JSModuleNamespace::cast(this)->JSModuleNamespaceVerify();
145 break; 145 break;
146 case JS_FIXED_ARRAY_ITERATOR_TYPE:
147 JSFixedArrayIterator::cast(this)->JSFixedArrayIteratorVerify();
148 break;
146 case JS_SET_TYPE: 149 case JS_SET_TYPE:
147 JSSet::cast(this)->JSSetVerify(); 150 JSSet::cast(this)->JSSetVerify();
148 break; 151 break;
149 case JS_MAP_TYPE: 152 case JS_MAP_TYPE:
150 JSMap::cast(this)->JSMapVerify(); 153 JSMap::cast(this)->JSMapVerify();
151 break; 154 break;
152 case JS_SET_ITERATOR_TYPE: 155 case JS_SET_ITERATOR_TYPE:
153 JSSetIterator::cast(this)->JSSetIteratorVerify(); 156 JSSetIterator::cast(this)->JSSetIteratorVerify();
154 break; 157 break;
155 case JS_MAP_ITERATOR_TYPE: 158 case JS_MAP_ITERATOR_TYPE:
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 reject()->ObjectVerify(); 923 reject()->ObjectVerify();
921 before_debug_event()->ObjectVerify(); 924 before_debug_event()->ObjectVerify();
922 after_debug_event()->ObjectVerify(); 925 after_debug_event()->ObjectVerify();
923 } 926 }
924 927
925 void JSModuleNamespace::JSModuleNamespaceVerify() { 928 void JSModuleNamespace::JSModuleNamespaceVerify() {
926 CHECK(IsJSModuleNamespace()); 929 CHECK(IsJSModuleNamespace());
927 module()->ObjectVerify(); 930 module()->ObjectVerify();
928 } 931 }
929 932
933 void JSFixedArrayIterator::JSFixedArrayIteratorVerify() {
934 CHECK(IsJSFixedArrayIterator());
935 CHECK(next()->IsJSFunction());
936 CHECK(array()->IsFixedArray());
937 VerifySmiField(kIndexOffset);
938
939 CHECK_LE(index(), array()->length());
940 }
941
930 void Module::ModuleVerify() { 942 void Module::ModuleVerify() {
931 Isolate* isolate = GetIsolate(); 943 Isolate* isolate = GetIsolate();
932 CHECK(IsModule()); 944 CHECK(IsModule());
933 CHECK(code()->IsSharedFunctionInfo() || code()->IsJSFunction()); 945 CHECK(code()->IsSharedFunctionInfo() || code()->IsJSFunction());
934 code()->ObjectVerify(); 946 code()->ObjectVerify();
935 exports()->ObjectVerify(); 947 exports()->ObjectVerify();
936 requested_modules()->ObjectVerify(); 948 requested_modules()->ObjectVerify();
937 VerifySmiField(kFlagsOffset); 949 VerifySmiField(kFlagsOffset);
938 embedder_data()->ObjectVerify(); 950 embedder_data()->ObjectVerify();
939 VerifySmiField(kHashOffset); 951 VerifySmiField(kHashOffset);
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 1385
1374 // Both are done at the same time. 1386 // Both are done at the same time.
1375 CHECK_EQ(new_it.done(), old_it.done()); 1387 CHECK_EQ(new_it.done(), old_it.done());
1376 } 1388 }
1377 1389
1378 1390
1379 #endif // DEBUG 1391 #endif // DEBUG
1380 1392
1381 } // namespace internal 1393 } // namespace internal
1382 } // namespace v8 1394 } // namespace v8
OLDNEW
« src/factory.cc ('K') | « 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