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

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

Issue 2081733004: Rip out most of our outdated modules implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 5 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.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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 case JS_ARGUMENTS_TYPE: 103 case JS_ARGUMENTS_TYPE:
104 case JS_API_OBJECT_TYPE: 104 case JS_API_OBJECT_TYPE:
105 case JS_SPECIAL_API_OBJECT_TYPE: 105 case JS_SPECIAL_API_OBJECT_TYPE:
106 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: 106 case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
107 case JS_PROMISE_TYPE: 107 case JS_PROMISE_TYPE:
108 JSObject::cast(this)->JSObjectVerify(); 108 JSObject::cast(this)->JSObjectVerify();
109 break; 109 break;
110 case JS_GENERATOR_OBJECT_TYPE: 110 case JS_GENERATOR_OBJECT_TYPE:
111 JSGeneratorObject::cast(this)->JSGeneratorObjectVerify(); 111 JSGeneratorObject::cast(this)->JSGeneratorObjectVerify();
112 break; 112 break;
113 case JS_MODULE_TYPE:
114 JSModule::cast(this)->JSModuleVerify();
115 break;
116 case JS_VALUE_TYPE: 113 case JS_VALUE_TYPE:
117 JSValue::cast(this)->JSValueVerify(); 114 JSValue::cast(this)->JSValueVerify();
118 break; 115 break;
119 case JS_DATE_TYPE: 116 case JS_DATE_TYPE:
120 JSDate::cast(this)->JSDateVerify(); 117 JSDate::cast(this)->JSDateVerify();
121 break; 118 break;
122 case JS_BOUND_FUNCTION_TYPE: 119 case JS_BOUND_FUNCTION_TYPE:
123 JSBoundFunction::cast(this)->JSBoundFunctionVerify(); 120 JSBoundFunction::cast(this)->JSBoundFunctionVerify();
124 break; 121 break;
125 case JS_FUNCTION_TYPE: 122 case JS_FUNCTION_TYPE:
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 // object is allocated but its fields are all undefined, as it hasn't yet been 422 // object is allocated but its fields are all undefined, as it hasn't yet been
426 // initialized by the generator. Hence these weak checks. 423 // initialized by the generator. Hence these weak checks.
427 VerifyObjectField(kFunctionOffset); 424 VerifyObjectField(kFunctionOffset);
428 VerifyObjectField(kContextOffset); 425 VerifyObjectField(kContextOffset);
429 VerifyObjectField(kReceiverOffset); 426 VerifyObjectField(kReceiverOffset);
430 VerifyObjectField(kOperandStackOffset); 427 VerifyObjectField(kOperandStackOffset);
431 VerifyObjectField(kContinuationOffset); 428 VerifyObjectField(kContinuationOffset);
432 } 429 }
433 430
434 431
435 void JSModule::JSModuleVerify() {
436 VerifyObjectField(kContextOffset);
437 VerifyObjectField(kScopeInfoOffset);
438 CHECK(context()->IsUndefined(GetIsolate()) ||
439 Context::cast(context())->IsModuleContext());
440 }
441
442
443 void JSValue::JSValueVerify() { 432 void JSValue::JSValueVerify() {
444 Object* v = value(); 433 Object* v = value();
445 if (v->IsHeapObject()) { 434 if (v->IsHeapObject()) {
446 VerifyHeapPointer(v); 435 VerifyHeapPointer(v);
447 } 436 }
448 } 437 }
449 438
450 439
451 void JSDate::JSDateVerify() { 440 void JSDate::JSDateVerify() {
452 if (value()->IsHeapObject()) { 441 if (value()->IsHeapObject()) {
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 1319
1331 // Both are done at the same time. 1320 // Both are done at the same time.
1332 CHECK_EQ(new_it.done(), old_it.done()); 1321 CHECK_EQ(new_it.done(), old_it.done());
1333 } 1322 }
1334 1323
1335 1324
1336 #endif // DEBUG 1325 #endif // DEBUG
1337 1326
1338 } // namespace internal 1327 } // namespace internal
1339 } // namespace v8 1328 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698