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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 JSObject* holder, | 632 JSObject* holder, |
633 uint32_t key, | 633 uint32_t key, |
634 FixedArrayBase* backing_store) { | 634 FixedArrayBase* backing_store) { |
635 if (backing_store == NULL) { | 635 if (backing_store == NULL) { |
636 backing_store = holder->elements(); | 636 backing_store = holder->elements(); |
637 } | 637 } |
638 return ElementsAccessorSubclass::HasElementImpl( | 638 return ElementsAccessorSubclass::HasElementImpl( |
639 receiver, holder, key, backing_store); | 639 receiver, holder, key, backing_store); |
640 } | 640 } |
641 | 641 |
| 642 // TODO(ishell): Temporary wrapper until handlified. |
| 643 MUST_USE_RESULT virtual Handle<Object> Get( |
| 644 Handle<Object> receiver, |
| 645 Handle<JSObject> holder, |
| 646 uint32_t key, |
| 647 Handle<FixedArrayBase> backing_store) { |
| 648 CALL_HEAP_FUNCTION(holder->GetIsolate(), |
| 649 Get(*receiver, *holder, key, |
| 650 backing_store.is_null() |
| 651 ? NULL : *backing_store), |
| 652 Object); |
| 653 } |
| 654 |
642 MUST_USE_RESULT virtual MaybeObject* Get(Object* receiver, | 655 MUST_USE_RESULT virtual MaybeObject* Get(Object* receiver, |
643 JSObject* holder, | 656 JSObject* holder, |
644 uint32_t key, | 657 uint32_t key, |
645 FixedArrayBase* backing_store) { | 658 FixedArrayBase* backing_store) { |
646 if (backing_store == NULL) { | 659 if (backing_store == NULL) { |
647 backing_store = holder->elements(); | 660 backing_store = holder->elements(); |
648 } | 661 } |
649 | 662 |
650 if (!IsExternalArrayElementsKind(ElementsTraits::Kind) && | 663 if (!IsExternalArrayElementsKind(ElementsTraits::Kind) && |
651 FLAG_trace_js_array_abuse) { | 664 FLAG_trace_js_array_abuse) { |
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2043 UNREACHABLE(); | 2056 UNREACHABLE(); |
2044 break; | 2057 break; |
2045 } | 2058 } |
2046 | 2059 |
2047 array->set_elements(*elms); | 2060 array->set_elements(*elms); |
2048 array->set_length(Smi::FromInt(number_of_elements)); | 2061 array->set_length(Smi::FromInt(number_of_elements)); |
2049 return array; | 2062 return array; |
2050 } | 2063 } |
2051 | 2064 |
2052 } } // namespace v8::internal | 2065 } } // namespace v8::internal |
OLD | NEW |