Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/runtime/runtime-array.cc

Issue 2571563004: [Turbofan] Implement super calls with spread bytecode in assembly code. (Closed)
Patch Set: Rebase on master Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/builtins/x64/builtins-x64.cc ('K') | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/conversions-inl.h" 9 #include "src/conversions-inl.h"
10 #include "src/elements.h" 10 #include "src/elements.h"
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 Handle<JSFunction> spread_iterable_function = isolate->spread_iterable(); 641 Handle<JSFunction> spread_iterable_function = isolate->spread_iterable();
642 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 642 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
643 isolate, spread, 643 isolate, spread,
644 Execution::Call(isolate, spread_iterable_function, 644 Execution::Call(isolate, spread_iterable_function,
645 isolate->factory()->undefined_value(), 1, &spread)); 645 isolate->factory()->undefined_value(), 1, &spread));
646 } 646 }
647 647
648 return *spread; 648 return *spread;
649 } 649 }
650 650
651 RUNTIME_FUNCTION(Runtime_SpreadIterablePrepareFixed) {
652 HandleScope scope(isolate);
653 DCHECK_EQ(1, args.length());
654 CONVERT_ARG_HANDLE_CHECKED(Object, spread, 0);
655
656 // Iterate over the spread if we need to.
657 if (spread->IterationHasObservableEffects()) {
658 Handle<JSFunction> spread_iterable_function = isolate->spread_iterable();
659 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
660 isolate, spread,
661 Execution::Call(isolate, spread_iterable_function,
662 isolate->factory()->undefined_value(), 1, &spread));
663 }
664 // Return the backing store fixed array.
665 Handle<JSArray> spread_array = Handle<JSArray>::cast(spread);
666 uint32_t spread_length;
667 CHECK(spread_array->length()->ToArrayIndex(&spread_length));
668
669 FixedArrayBase* a = spread_array->elements();
670 a->set_length(spread_length);
671 return a;
672 }
673
651 } // namespace internal 674 } // namespace internal
652 } // namespace v8 675 } // namespace v8
OLDNEW
« src/builtins/x64/builtins-x64.cc ('K') | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698