| 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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 return ElementsAccessorSubclass::CopyElementsImpl( | 785 return ElementsAccessorSubclass::CopyElementsImpl( |
| 786 from, from_start, to, from_kind, to_start, packed_size, copy_size); | 786 from, from_start, to, from_kind, to_start, packed_size, copy_size); |
| 787 } | 787 } |
| 788 | 788 |
| 789 MUST_USE_RESULT virtual MaybeObject* AddElementsToFixedArray( | 789 MUST_USE_RESULT virtual MaybeObject* AddElementsToFixedArray( |
| 790 Object* receiver, | 790 Object* receiver, |
| 791 JSObject* holder, | 791 JSObject* holder, |
| 792 FixedArray* to, | 792 FixedArray* to, |
| 793 FixedArrayBase* from) { | 793 FixedArrayBase* from) { |
| 794 int len0 = to->length(); | 794 int len0 = to->length(); |
| 795 #ifdef DEBUG | 795 #ifdef ENABLE_SLOW_ASSERTS |
| 796 if (FLAG_enable_slow_asserts) { | 796 if (FLAG_enable_slow_asserts) { |
| 797 for (int i = 0; i < len0; i++) { | 797 for (int i = 0; i < len0; i++) { |
| 798 ASSERT(!to->get(i)->IsTheHole()); | 798 ASSERT(!to->get(i)->IsTheHole()); |
| 799 } | 799 } |
| 800 } | 800 } |
| 801 #endif | 801 #endif |
| 802 if (from == NULL) { | 802 if (from == NULL) { |
| 803 from = holder->elements(); | 803 from = holder->elements(); |
| 804 } | 804 } |
| 805 | 805 |
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 UNREACHABLE(); | 2058 UNREACHABLE(); |
| 2059 break; | 2059 break; |
| 2060 } | 2060 } |
| 2061 | 2061 |
| 2062 array->set_elements(elms); | 2062 array->set_elements(elms); |
| 2063 array->set_length(Smi::FromInt(number_of_elements)); | 2063 array->set_length(Smi::FromInt(number_of_elements)); |
| 2064 return array; | 2064 return array; |
| 2065 } | 2065 } |
| 2066 | 2066 |
| 2067 } } // namespace v8::internal | 2067 } } // namespace v8::internal |
| OLD | NEW |