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

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

Issue 7366: Split window support from V8. ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 case JS_ARRAY_TYPE: 120 case JS_ARRAY_TYPE:
121 case JS_REGEXP_TYPE: 121 case JS_REGEXP_TYPE:
122 JSObject::cast(this)->JSObjectPrint(); 122 JSObject::cast(this)->JSObjectPrint();
123 break; 123 break;
124 case ODDBALL_TYPE: 124 case ODDBALL_TYPE:
125 Oddball::cast(this)->to_string()->Print(); 125 Oddball::cast(this)->to_string()->Print();
126 break; 126 break;
127 case JS_FUNCTION_TYPE: 127 case JS_FUNCTION_TYPE:
128 JSFunction::cast(this)->JSFunctionPrint(); 128 JSFunction::cast(this)->JSFunctionPrint();
129 break; 129 break;
130 case JS_GLOBAL_PROXY_TYPE:
131 JSGlobalProxy::cast(this)->JSGlobalProxyPrint();
132 break;
130 case JS_GLOBAL_OBJECT_TYPE: 133 case JS_GLOBAL_OBJECT_TYPE:
131 JSGlobalObject::cast(this)->JSGlobalObjectPrint(); 134 JSGlobalObject::cast(this)->JSGlobalObjectPrint();
132 break; 135 break;
133 case JS_BUILTINS_OBJECT_TYPE: 136 case JS_BUILTINS_OBJECT_TYPE:
134 JSBuiltinsObject::cast(this)->JSBuiltinsObjectPrint(); 137 JSBuiltinsObject::cast(this)->JSBuiltinsObjectPrint();
135 break; 138 break;
136 case JS_VALUE_TYPE: 139 case JS_VALUE_TYPE:
137 PrintF("Value wrapper around:"); 140 PrintF("Value wrapper around:");
138 JSValue::cast(this)->value()->Print(); 141 JSValue::cast(this)->value()->Print();
139 break; 142 break;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 break; 194 break;
192 case JS_OBJECT_TYPE: 195 case JS_OBJECT_TYPE:
193 JSObject::cast(this)->JSObjectVerify(); 196 JSObject::cast(this)->JSObjectVerify();
194 break; 197 break;
195 case JS_VALUE_TYPE: 198 case JS_VALUE_TYPE:
196 JSValue::cast(this)->JSValueVerify(); 199 JSValue::cast(this)->JSValueVerify();
197 break; 200 break;
198 case JS_FUNCTION_TYPE: 201 case JS_FUNCTION_TYPE:
199 JSFunction::cast(this)->JSFunctionVerify(); 202 JSFunction::cast(this)->JSFunctionVerify();
200 break; 203 break;
204 case JS_GLOBAL_PROXY_TYPE:
205 JSGlobalProxy::cast(this)->JSGlobalProxyVerify();
206 break;
201 case JS_GLOBAL_OBJECT_TYPE: 207 case JS_GLOBAL_OBJECT_TYPE:
202 JSGlobalObject::cast(this)->JSGlobalObjectVerify(); 208 JSGlobalObject::cast(this)->JSGlobalObjectVerify();
203 break; 209 break;
204 case JS_BUILTINS_OBJECT_TYPE: 210 case JS_BUILTINS_OBJECT_TYPE:
205 JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify(); 211 JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify();
206 break; 212 break;
207 case JS_ARRAY_TYPE: 213 case JS_ARRAY_TYPE:
208 JSArray::cast(this)->JSArrayVerify(); 214 JSArray::cast(this)->JSArrayVerify();
209 break; 215 break;
210 case JS_REGEXP_TYPE: 216 case JS_REGEXP_TYPE:
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 VerifyObjectField(kNameOffset); 550 VerifyObjectField(kNameOffset);
545 VerifyObjectField(kCodeOffset); 551 VerifyObjectField(kCodeOffset);
546 VerifyObjectField(kInstanceClassNameOffset); 552 VerifyObjectField(kInstanceClassNameOffset);
547 VerifyObjectField(kExternalReferenceDataOffset); 553 VerifyObjectField(kExternalReferenceDataOffset);
548 VerifyObjectField(kLazyLoadDataOffset); 554 VerifyObjectField(kLazyLoadDataOffset);
549 VerifyObjectField(kScriptOffset); 555 VerifyObjectField(kScriptOffset);
550 VerifyObjectField(kDebugInfoOffset); 556 VerifyObjectField(kDebugInfoOffset);
551 } 557 }
552 558
553 559
560 void JSGlobalProxy::JSGlobalProxyPrint() {
561 PrintF("global_proxy");
562 JSObjectPrint();
563 PrintF("context : ");
564 context()->ShortPrint();
565 PrintF("\n");
566 }
567
568
569 void JSGlobalProxy::JSGlobalProxyVerify() {
570 CHECK(IsJSGlobalProxy());
571 JSObjectVerify();
572 VerifyObjectField(JSGlobalProxy::kContextOffset);
573 // Make sure that this object has no properties, elements.
574 CHECK(properties()->length() == 0);
575 CHECK(elements()->length() == 0);
576 }
577
578
554 void JSGlobalObject::JSGlobalObjectPrint() { 579 void JSGlobalObject::JSGlobalObjectPrint() {
555 PrintF("global "); 580 PrintF("global ");
556 JSObjectPrint(); 581 JSObjectPrint();
582 PrintF("global context : ");
583 global_context()->ShortPrint();
584 PrintF("\n");
557 } 585 }
558 586
559 587
560 void JSGlobalObject::JSGlobalObjectVerify() { 588 void JSGlobalObject::JSGlobalObjectVerify() {
561 CHECK(IsJSGlobalObject()); 589 CHECK(IsJSGlobalObject());
562 JSObjectVerify(); 590 JSObjectVerify();
563 for (int i = GlobalObject::kBuiltinsOffset; 591 for (int i = GlobalObject::kBuiltinsOffset;
564 i < JSGlobalObject::kSize; 592 i < JSGlobalObject::kSize;
565 i += kPointerSize) { 593 i += kPointerSize) {
566 VerifyObjectField(i); 594 VerifyObjectField(i);
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 } 1043 }
1016 current = hash; 1044 current = hash;
1017 } 1045 }
1018 return true; 1046 return true;
1019 } 1047 }
1020 1048
1021 1049
1022 #endif // DEBUG 1050 #endif // DEBUG
1023 1051
1024 } } // namespace v8::internal 1052 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698