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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 uint32_t from_start, | 777 uint32_t from_start, |
778 FixedArrayBase* to, | 778 FixedArrayBase* to, |
779 ElementsKind from_kind, | 779 ElementsKind from_kind, |
780 uint32_t to_start, | 780 uint32_t to_start, |
781 int packed_size, | 781 int packed_size, |
782 int copy_size) { | 782 int copy_size) { |
783 UNREACHABLE(); | 783 UNREACHABLE(); |
784 return NULL; | 784 return NULL; |
785 } | 785 } |
786 | 786 |
| 787 virtual void CopyElements( |
| 788 Handle<JSObject> from_holder, |
| 789 uint32_t from_start, |
| 790 ElementsKind from_kind, |
| 791 Handle<FixedArrayBase> to, |
| 792 uint32_t to_start, |
| 793 int copy_size, |
| 794 Handle<FixedArrayBase> from) { |
| 795 CALL_HEAP_FUNCTION_VOID(from_holder->GetIsolate(), |
| 796 CopyElements( |
| 797 from_holder.is_null() ? NULL : *from_holder, |
| 798 from_start, from_kind, *to, to_start, copy_size, |
| 799 from.is_null() ? NULL : *from)); |
| 800 } |
| 801 |
787 MUST_USE_RESULT virtual MaybeObject* CopyElements(JSObject* from_holder, | 802 MUST_USE_RESULT virtual MaybeObject* CopyElements(JSObject* from_holder, |
788 uint32_t from_start, | 803 uint32_t from_start, |
789 ElementsKind from_kind, | 804 ElementsKind from_kind, |
790 FixedArrayBase* to, | 805 FixedArrayBase* to, |
791 uint32_t to_start, | 806 uint32_t to_start, |
792 int copy_size, | 807 int copy_size, |
793 FixedArrayBase* from) { | 808 FixedArrayBase* from) { |
794 int packed_size = kPackedSizeNotKnown; | 809 int packed_size = kPackedSizeNotKnown; |
795 if (from == NULL) { | 810 if (from == NULL) { |
796 from = from_holder->elements(); | 811 from = from_holder->elements(); |
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2043 UNREACHABLE(); | 2058 UNREACHABLE(); |
2044 break; | 2059 break; |
2045 } | 2060 } |
2046 | 2061 |
2047 array->set_elements(*elms); | 2062 array->set_elements(*elms); |
2048 array->set_length(Smi::FromInt(number_of_elements)); | 2063 array->set_length(Smi::FromInt(number_of_elements)); |
2049 return array; | 2064 return array; |
2050 } | 2065 } |
2051 | 2066 |
2052 } } // namespace v8::internal | 2067 } } // namespace v8::internal |
OLD | NEW |