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

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

Issue 6368051: A MessageObject is a purely internal object to hold information about (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 9 years, 10 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 JSRegExp::cast(this)->JSRegExpVerify(); 151 JSRegExp::cast(this)->JSRegExpVerify();
152 break; 152 break;
153 case FILLER_TYPE: 153 case FILLER_TYPE:
154 break; 154 break;
155 case PROXY_TYPE: 155 case PROXY_TYPE:
156 Proxy::cast(this)->ProxyVerify(); 156 Proxy::cast(this)->ProxyVerify();
157 break; 157 break;
158 case SHARED_FUNCTION_INFO_TYPE: 158 case SHARED_FUNCTION_INFO_TYPE:
159 SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify(); 159 SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify();
160 break; 160 break;
161 case JS_MESSAGE_OBJECT_TYPE:
162 JSMessageObject::cast(this)->JSMessageObjectVerify();
163 break;
161 164
162 #define MAKE_STRUCT_CASE(NAME, Name, name) \ 165 #define MAKE_STRUCT_CASE(NAME, Name, name) \
163 case NAME##_TYPE: \ 166 case NAME##_TYPE: \
164 Name::cast(this)->Name##Verify(); \ 167 Name::cast(this)->Name##Verify(); \
165 break; 168 break;
166 STRUCT_LIST(MAKE_STRUCT_CASE) 169 STRUCT_LIST(MAKE_STRUCT_CASE)
167 #undef MAKE_STRUCT_CASE 170 #undef MAKE_STRUCT_CASE
168 171
169 default: 172 default:
170 UNREACHABLE(); 173 UNREACHABLE();
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 292
290 293
291 void JSValue::JSValueVerify() { 294 void JSValue::JSValueVerify() {
292 Object* v = value(); 295 Object* v = value();
293 if (v->IsHeapObject()) { 296 if (v->IsHeapObject()) {
294 VerifyHeapPointer(v); 297 VerifyHeapPointer(v);
295 } 298 }
296 } 299 }
297 300
298 301
302 void JSMessageObject::JSMessageObjectVerify() {
303 CHECK(IsJSMessageObject());
304 CHECK(type()->IsString());
305 CHECK(arguments()->IsJSArray());
306 VerifyObjectField(kStartPositionOffset);
307 VerifyObjectField(kEndPositionOffset);
308 VerifyObjectField(kArgumentsOffset);
309 VerifyObjectField(kScriptOffset);
310 VerifyObjectField(kStackTraceOffset);
311 VerifyObjectField(kStackFramesOffset);
312 }
313
314
299 void String::StringVerify() { 315 void String::StringVerify() {
300 CHECK(IsString()); 316 CHECK(IsString());
301 CHECK(length() >= 0 && length() <= Smi::kMaxValue); 317 CHECK(length() >= 0 && length() <= Smi::kMaxValue);
302 if (IsSymbol()) { 318 if (IsSymbol()) {
303 CHECK(!Heap::InNewSpace(this)); 319 CHECK(!Heap::InNewSpace(this));
304 } 320 }
305 } 321 }
306 322
307 323
308 void JSFunction::JSFunctionVerify() { 324 void JSFunction::JSFunctionVerify() {
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 ASSERT(e->IsUndefined()); 713 ASSERT(e->IsUndefined());
698 } 714 }
699 } 715 }
700 } 716 }
701 } 717 }
702 718
703 719
704 #endif // DEBUG 720 #endif // DEBUG
705 721
706 } } // namespace v8::internal 722 } } // 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