| 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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 Isolate* isolate = array->GetIsolate(); | 759 Isolate* isolate = array->GetIsolate(); |
| 760 return ElementsAccessorSubclass::SetLengthImpl( | 760 return ElementsAccessorSubclass::SetLengthImpl( |
| 761 array, length, handle(array->elements(), isolate)); | 761 array, length, handle(array->elements(), isolate)); |
| 762 } | 762 } |
| 763 | 763 |
| 764 MUST_USE_RESULT static Handle<Object> SetLengthImpl( | 764 MUST_USE_RESULT static Handle<Object> SetLengthImpl( |
| 765 Handle<JSObject> obj, | 765 Handle<JSObject> obj, |
| 766 Handle<Object> length, | 766 Handle<Object> length, |
| 767 Handle<FixedArrayBase> backing_store); | 767 Handle<FixedArrayBase> backing_store); |
| 768 | 768 |
| 769 MUST_USE_RESULT virtual MaybeObject* SetCapacityAndLength( | 769 virtual void SetCapacityAndLength( |
| 770 JSArray* array, | 770 Handle<JSArray> array, |
| 771 int capacity, | 771 int capacity, |
| 772 int length) V8_FINAL V8_OVERRIDE { | 772 int length) V8_FINAL V8_OVERRIDE { |
| 773 return ElementsAccessorSubclass::SetFastElementsCapacityAndLength( | 773 CALL_HEAP_FUNCTION_VOID( |
| 774 array, | 774 array->GetIsolate(), |
| 775 capacity, | 775 ElementsAccessorSubclass::SetFastElementsCapacityAndLength( |
| 776 length); | 776 *array, |
| 777 capacity, |
| 778 length)); |
| 777 } | 779 } |
| 778 | 780 |
| 779 MUST_USE_RESULT static MaybeObject* SetFastElementsCapacityAndLength( | 781 MUST_USE_RESULT static MaybeObject* SetFastElementsCapacityAndLength( |
| 780 JSObject* obj, | 782 JSObject* obj, |
| 781 int capacity, | 783 int capacity, |
| 782 int length) { | 784 int length) { |
| 783 UNIMPLEMENTED(); | 785 UNIMPLEMENTED(); |
| 784 return obj; | 786 return obj; |
| 785 } | 787 } |
| 786 | 788 |
| (...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 UNREACHABLE(); | 2097 UNREACHABLE(); |
| 2096 break; | 2098 break; |
| 2097 } | 2099 } |
| 2098 | 2100 |
| 2099 array->set_elements(*elms); | 2101 array->set_elements(*elms); |
| 2100 array->set_length(Smi::FromInt(number_of_elements)); | 2102 array->set_length(Smi::FromInt(number_of_elements)); |
| 2101 return array; | 2103 return array; |
| 2102 } | 2104 } |
| 2103 | 2105 |
| 2104 } } // namespace v8::internal | 2106 } } // namespace v8::internal |
| OLD | NEW |