| OLD | NEW |
| 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/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 JSWeakSet::cast(this)->JSWeakSetVerify(); | 154 JSWeakSet::cast(this)->JSWeakSetVerify(); |
| 155 break; | 155 break; |
| 156 case JS_REGEXP_TYPE: | 156 case JS_REGEXP_TYPE: |
| 157 JSRegExp::cast(this)->JSRegExpVerify(); | 157 JSRegExp::cast(this)->JSRegExpVerify(); |
| 158 break; | 158 break; |
| 159 case FILLER_TYPE: | 159 case FILLER_TYPE: |
| 160 break; | 160 break; |
| 161 case JS_PROXY_TYPE: | 161 case JS_PROXY_TYPE: |
| 162 JSProxy::cast(this)->JSProxyVerify(); | 162 JSProxy::cast(this)->JSProxyVerify(); |
| 163 break; | 163 break; |
| 164 case JS_FUNCTION_PROXY_TYPE: | |
| 165 JSFunctionProxy::cast(this)->JSFunctionProxyVerify(); | |
| 166 break; | |
| 167 case FOREIGN_TYPE: | 164 case FOREIGN_TYPE: |
| 168 Foreign::cast(this)->ForeignVerify(); | 165 Foreign::cast(this)->ForeignVerify(); |
| 169 break; | 166 break; |
| 170 case SHARED_FUNCTION_INFO_TYPE: | 167 case SHARED_FUNCTION_INFO_TYPE: |
| 171 SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify(); | 168 SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify(); |
| 172 break; | 169 break; |
| 173 case JS_MESSAGE_OBJECT_TYPE: | 170 case JS_MESSAGE_OBJECT_TYPE: |
| 174 JSMessageObject::cast(this)->JSMessageObjectVerify(); | 171 JSMessageObject::cast(this)->JSMessageObjectVerify(); |
| 175 break; | 172 break; |
| 176 case JS_ARRAY_BUFFER_TYPE: | 173 case JS_ARRAY_BUFFER_TYPE: |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 } | 796 } |
| 800 | 797 |
| 801 | 798 |
| 802 void JSProxy::JSProxyVerify() { | 799 void JSProxy::JSProxyVerify() { |
| 803 CHECK(IsJSProxy()); | 800 CHECK(IsJSProxy()); |
| 804 VerifyPointer(handler()); | 801 VerifyPointer(handler()); |
| 805 CHECK(hash()->IsSmi() || hash()->IsUndefined()); | 802 CHECK(hash()->IsSmi() || hash()->IsUndefined()); |
| 806 } | 803 } |
| 807 | 804 |
| 808 | 805 |
| 809 void JSFunctionProxy::JSFunctionProxyVerify() { | |
| 810 CHECK(IsJSFunctionProxy()); | |
| 811 JSProxyVerify(); | |
| 812 VerifyPointer(call_trap()); | |
| 813 VerifyPointer(construct_trap()); | |
| 814 CHECK(map()->is_callable()); | |
| 815 } | |
| 816 | |
| 817 | |
| 818 void JSArrayBuffer::JSArrayBufferVerify() { | 806 void JSArrayBuffer::JSArrayBufferVerify() { |
| 819 CHECK(IsJSArrayBuffer()); | 807 CHECK(IsJSArrayBuffer()); |
| 820 JSObjectVerify(); | 808 JSObjectVerify(); |
| 821 VerifyPointer(byte_length()); | 809 VerifyPointer(byte_length()); |
| 822 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber() | 810 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber() |
| 823 || byte_length()->IsUndefined()); | 811 || byte_length()->IsUndefined()); |
| 824 } | 812 } |
| 825 | 813 |
| 826 | 814 |
| 827 void JSArrayBufferView::JSArrayBufferViewVerify() { | 815 void JSArrayBufferView::JSArrayBufferViewVerify() { |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 | 1290 |
| 1303 // Both are done at the same time. | 1291 // Both are done at the same time. |
| 1304 CHECK_EQ(new_it.done(), old_it.done()); | 1292 CHECK_EQ(new_it.done(), old_it.done()); |
| 1305 } | 1293 } |
| 1306 | 1294 |
| 1307 | 1295 |
| 1308 #endif // DEBUG | 1296 #endif // DEBUG |
| 1309 | 1297 |
| 1310 } // namespace internal | 1298 } // namespace internal |
| 1311 } // namespace v8 | 1299 } // namespace v8 |
| OLD | NEW |