OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
| 724 |
715 | 725 |
716 void Foreign::ForeignVerify() { | 726 void Foreign::ForeignVerify() { |
717 CHECK(IsForeign()); | 727 CHECK(IsForeign()); |
718 } | 728 } |
719 | 729 |
720 | 730 |
721 void AccessorInfo::AccessorInfoVerify() { | 731 void AccessorInfo::AccessorInfoVerify() { |
722 VerifyPointer(name()); | 732 VerifyPointer(name()); |
723 VerifyPointer(flag()); | 733 VerifyPointer(flag()); |
724 VerifyPointer(expected_receiver_type()); | 734 VerifyPointer(expected_receiver_type()); |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 for (int i = 0; i < number_of_transitions(); ++i) { | 1070 for (int i = 0; i < number_of_transitions(); ++i) { |
1061 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1071 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1062 } | 1072 } |
1063 return true; | 1073 return true; |
1064 } | 1074 } |
1065 | 1075 |
1066 | 1076 |
1067 #endif // DEBUG | 1077 #endif // DEBUG |
1068 | 1078 |
1069 } } // namespace v8::internal | 1079 } } // namespace v8::internal |
OLD | NEW |