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 719 matching lines...) Loading... |
730 } | 730 } |
731 | 731 |
732 MUST_USE_RESULT static AccessorPair* GetAccessorPairImpl( | 732 MUST_USE_RESULT static AccessorPair* GetAccessorPairImpl( |
733 Object* receiver, | 733 Object* receiver, |
734 JSObject* obj, | 734 JSObject* obj, |
735 uint32_t key, | 735 uint32_t key, |
736 FixedArrayBase* backing_store) { | 736 FixedArrayBase* backing_store) { |
737 return NULL; | 737 return NULL; |
738 } | 738 } |
739 | 739 |
| 740 // TODO(ishell): Temporary wrapper until handlified. |
| 741 MUST_USE_RESULT virtual Handle<Object> SetLength( |
| 742 Handle<JSArray> array, |
| 743 Handle<Object> length) { |
| 744 CALL_HEAP_FUNCTION(array->GetIsolate(), |
| 745 SetLength(*array, *length), |
| 746 Object); |
| 747 } |
| 748 |
740 MUST_USE_RESULT virtual MaybeObject* SetLength(JSArray* array, | 749 MUST_USE_RESULT virtual MaybeObject* SetLength(JSArray* array, |
741 Object* length) { | 750 Object* length) { |
742 return ElementsAccessorSubclass::SetLengthImpl( | 751 return ElementsAccessorSubclass::SetLengthImpl( |
743 array, length, array->elements()); | 752 array, length, array->elements()); |
744 } | 753 } |
745 | 754 |
746 MUST_USE_RESULT static MaybeObject* SetLengthImpl( | 755 MUST_USE_RESULT static MaybeObject* SetLengthImpl( |
747 JSObject* obj, | 756 JSObject* obj, |
748 Object* length, | 757 Object* length, |
749 FixedArrayBase* backing_store); | 758 FixedArrayBase* backing_store); |
(...skipping 1246 matching lines...) Loading... |
1996 UNREACHABLE(); | 2005 UNREACHABLE(); |
1997 break; | 2006 break; |
1998 } | 2007 } |
1999 | 2008 |
2000 array->set_elements(*elms); | 2009 array->set_elements(*elms); |
2001 array->set_length(Smi::FromInt(number_of_elements)); | 2010 array->set_length(Smi::FromInt(number_of_elements)); |
2002 return array; | 2011 return array; |
2003 } | 2012 } |
2004 | 2013 |
2005 } } // namespace v8::internal | 2014 } } // namespace v8::internal |
OLD | NEW |