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

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

Issue 13064003: First steps towards implementing ArrayBuffer &co in V8 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added forgotten tests Created 7 years, 9 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 break; 188 break;
189 case FOREIGN_TYPE: 189 case FOREIGN_TYPE:
190 Foreign::cast(this)->ForeignVerify(); 190 Foreign::cast(this)->ForeignVerify();
191 break; 191 break;
192 case SHARED_FUNCTION_INFO_TYPE: 192 case SHARED_FUNCTION_INFO_TYPE:
193 SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify(); 193 SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify();
194 break; 194 break;
195 case JS_MESSAGE_OBJECT_TYPE: 195 case JS_MESSAGE_OBJECT_TYPE:
196 JSMessageObject::cast(this)->JSMessageObjectVerify(); 196 JSMessageObject::cast(this)->JSMessageObjectVerify();
197 break; 197 break;
198 case JS_ARRAY_BUFFER_TYPE:
199 JSArrayBuffer::cast(this)->JSArrayBufferVerify();
200 break;
198 201
199 #define MAKE_STRUCT_CASE(NAME, Name, name) \ 202 #define MAKE_STRUCT_CASE(NAME, Name, name) \
200 case NAME##_TYPE: \ 203 case NAME##_TYPE: \
201 Name::cast(this)->Name##Verify(); \ 204 Name::cast(this)->Name##Verify(); \
202 break; 205 break;
203 STRUCT_LIST(MAKE_STRUCT_CASE) 206 STRUCT_LIST(MAKE_STRUCT_CASE)
204 #undef MAKE_STRUCT_CASE 207 #undef MAKE_STRUCT_CASE
205 208
206 default: 209 default:
207 UNREACHABLE(); 210 UNREACHABLE();
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 } 708 }
706 709
707 710
708 void JSFunctionProxy::JSFunctionProxyVerify() { 711 void JSFunctionProxy::JSFunctionProxyVerify() {
709 CHECK(IsJSFunctionProxy()); 712 CHECK(IsJSFunctionProxy());
710 JSProxyVerify(); 713 JSProxyVerify();
711 VerifyPointer(call_trap()); 714 VerifyPointer(call_trap());
712 VerifyPointer(construct_trap()); 715 VerifyPointer(construct_trap());
713 } 716 }
714 717
718 void JSArrayBuffer::JSArrayBufferVerify() {
719 CHECK(IsJSArrayBuffer());
720 JSObjectVerify();
721 VerifyPointer(byte_length());
722 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber()
723 || byte_length()->IsUndefined());
724 }
725
715 726
716 void Foreign::ForeignVerify() { 727 void Foreign::ForeignVerify() {
717 CHECK(IsForeign()); 728 CHECK(IsForeign());
718 } 729 }
719 730
720 731
721 void AccessorInfo::AccessorInfoVerify() { 732 void AccessorInfo::AccessorInfoVerify() {
722 VerifyPointer(name()); 733 VerifyPointer(name());
723 VerifyPointer(flag()); 734 VerifyPointer(flag());
724 VerifyPointer(expected_receiver_type()); 735 VerifyPointer(expected_receiver_type());
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 for (int i = 0; i < number_of_transitions(); ++i) { 1071 for (int i = 0; i < number_of_transitions(); ++i) {
1061 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1072 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1062 } 1073 }
1063 return true; 1074 return true;
1064 } 1075 }
1065 1076
1066 1077
1067 #endif // DEBUG 1078 #endif // DEBUG
1068 1079
1069 } } // namespace v8::internal 1080 } } // 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