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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 VerifyPointer(byte_length()); | 767 VerifyPointer(byte_length()); |
768 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber() | 768 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber() |
769 || byte_length()->IsUndefined()); | 769 || byte_length()->IsUndefined()); |
770 } | 770 } |
771 | 771 |
772 | 772 |
773 void JSArrayBufferView::JSArrayBufferViewVerify() { | 773 void JSArrayBufferView::JSArrayBufferViewVerify() { |
774 CHECK(IsJSArrayBufferView()); | 774 CHECK(IsJSArrayBufferView()); |
775 JSObjectVerify(); | 775 JSObjectVerify(); |
776 VerifyPointer(buffer()); | 776 VerifyPointer(buffer()); |
777 CHECK(buffer()->IsJSArrayBuffer() || buffer()->IsUndefined()); | 777 CHECK(buffer()->IsJSArrayBuffer() || buffer()->IsUndefined() |
| 778 || buffer() == Smi::FromInt(0)); |
778 | 779 |
779 VerifyPointer(byte_offset()); | 780 VerifyPointer(byte_offset()); |
780 CHECK(byte_offset()->IsSmi() || byte_offset()->IsHeapNumber() | 781 CHECK(byte_offset()->IsSmi() || byte_offset()->IsHeapNumber() |
781 || byte_offset()->IsUndefined()); | 782 || byte_offset()->IsUndefined()); |
782 | 783 |
783 VerifyPointer(byte_length()); | 784 VerifyPointer(byte_length()); |
784 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber() | 785 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber() |
785 || byte_length()->IsUndefined()); | 786 || byte_length()->IsUndefined()); |
786 } | 787 } |
787 | 788 |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 for (int i = 0; i < number_of_transitions(); ++i) { | 1158 for (int i = 0; i < number_of_transitions(); ++i) { |
1158 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1159 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1159 } | 1160 } |
1160 return true; | 1161 return true; |
1161 } | 1162 } |
1162 | 1163 |
1163 | 1164 |
1164 #endif // DEBUG | 1165 #endif // DEBUG |
1165 | 1166 |
1166 } } // namespace v8::internal | 1167 } } // namespace v8::internal |
OLD | NEW |