OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/messages.h" | 8 #include "src/messages.h" |
9 #include "src/runtime/runtime-utils.h" | 9 #include "src/runtime/runtime-utils.h" |
10 | 10 |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 IterateTypedArrayElements<ExternalFloat64Array, double>( | 698 IterateTypedArrayElements<ExternalFloat64Array, double>( |
699 isolate, receiver, false, false, visitor); | 699 isolate, receiver, false, false, visitor); |
700 break; | 700 break; |
701 } | 701 } |
702 case FLOAT64_ELEMENTS: { | 702 case FLOAT64_ELEMENTS: { |
703 IterateTypedArrayElements<FixedFloat64Array, double>( | 703 IterateTypedArrayElements<FixedFloat64Array, double>( |
704 isolate, receiver, false, false, visitor); | 704 isolate, receiver, false, false, visitor); |
705 break; | 705 break; |
706 } | 706 } |
707 case SLOPPY_ARGUMENTS_ELEMENTS: { | 707 case SLOPPY_ARGUMENTS_ELEMENTS: { |
708 ElementsAccessor* accessor = receiver->GetElementsAccessor(); | |
709 for (uint32_t index = 0; index < length; index++) { | 708 for (uint32_t index = 0; index < length; index++) { |
710 HandleScope loop_scope(isolate); | 709 HandleScope loop_scope(isolate); |
711 if (accessor->HasElement(receiver, index)) { | 710 Handle<Object> element; |
712 Handle<Object> element; | 711 ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
713 ASSIGN_RETURN_ON_EXCEPTION_VALUE( | 712 isolate, element, Object::GetElement(isolate, receiver, index), |
714 isolate, element, accessor->Get(receiver, receiver, index), | 713 false); |
715 false); | 714 visitor->visit(index, element); |
716 visitor->visit(index, element); | |
717 } | |
718 } | 715 } |
719 break; | 716 break; |
720 } | 717 } |
721 } | 718 } |
722 visitor->increase_index_offset(length); | 719 visitor->increase_index_offset(length); |
723 return true; | 720 return true; |
724 } | 721 } |
725 | 722 |
726 | 723 |
727 static bool IsConcatSpreadable(Isolate* isolate, Handle<Object> obj) { | 724 static bool IsConcatSpreadable(Isolate* isolate, Handle<Object> obj) { |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 | 1323 |
1327 RUNTIME_FUNCTION(Runtime_FastOneByteArrayJoin) { | 1324 RUNTIME_FUNCTION(Runtime_FastOneByteArrayJoin) { |
1328 SealHandleScope shs(isolate); | 1325 SealHandleScope shs(isolate); |
1329 DCHECK(args.length() == 2); | 1326 DCHECK(args.length() == 2); |
1330 // Returning undefined means that this fast path fails and one has to resort | 1327 // Returning undefined means that this fast path fails and one has to resort |
1331 // to a slow path. | 1328 // to a slow path. |
1332 return isolate->heap()->undefined_value(); | 1329 return isolate->heap()->undefined_value(); |
1333 } | 1330 } |
1334 } // namespace internal | 1331 } // namespace internal |
1335 } // namespace v8 | 1332 } // namespace v8 |
OLD | NEW |