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

Side by Side Diff: src/interpreter/bytecode-array-builder.cc

Issue 2629363002: [Ignition/turbo] Add a CallWithSpread bytecode. (Closed)
Patch Set: refactor OnlyLastArgIsSpread Created 3 years, 11 months 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/bytecode-array-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 6
7 #include "src/globals.h" 7 #include "src/globals.h"
8 #include "src/interpreter/bytecode-array-writer.h" 8 #include "src/interpreter/bytecode-array-writer.h"
9 #include "src/interpreter/bytecode-dead-code-optimizer.h" 9 #include "src/interpreter/bytecode-dead-code-optimizer.h"
10 #include "src/interpreter/bytecode-label.h" 10 #include "src/interpreter/bytecode-label.h"
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 } else { 887 } else {
888 OutputCall(callable, args, args.register_count(), feedback_slot); 888 OutputCall(callable, args, args.register_count(), feedback_slot);
889 } 889 }
890 } else { 890 } else {
891 DCHECK(tail_call_mode == TailCallMode::kAllow); 891 DCHECK(tail_call_mode == TailCallMode::kAllow);
892 OutputTailCall(callable, args, args.register_count(), feedback_slot); 892 OutputTailCall(callable, args, args.register_count(), feedback_slot);
893 } 893 }
894 return *this; 894 return *this;
895 } 895 }
896 896
897 BytecodeArrayBuilder& BytecodeArrayBuilder::CallWithSpread(RegisterList args) {
898 OutputCallWithSpread(args, args.register_count());
899 return *this;
900 }
901
897 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor, 902 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor,
898 RegisterList args, 903 RegisterList args,
899 int feedback_slot_id) { 904 int feedback_slot_id) {
900 OutputNew(constructor, args, args.register_count(), feedback_slot_id); 905 OutputNew(constructor, args, args.register_count(), feedback_slot_id);
901 return *this; 906 return *this;
902 } 907 }
903 908
904 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime( 909 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime(
905 Runtime::FunctionId function_id, RegisterList args) { 910 Runtime::FunctionId function_id, RegisterList args) {
906 DCHECK_EQ(1, Runtime::FunctionForId(function_id)->result_size); 911 DCHECK_EQ(1, Runtime::FunctionForId(function_id)->result_size);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 RegisterList reg_list) { 1051 RegisterList reg_list) {
1047 DCHECK(RegisterListIsValid(reg_list)); 1052 DCHECK(RegisterListIsValid(reg_list));
1048 if (register_optimizer_) 1053 if (register_optimizer_)
1049 register_optimizer_->PrepareOutputRegisterList(reg_list); 1054 register_optimizer_->PrepareOutputRegisterList(reg_list);
1050 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); 1055 return static_cast<uint32_t>(reg_list.first_register().ToOperand());
1051 } 1056 }
1052 1057
1053 } // namespace interpreter 1058 } // namespace interpreter
1054 } // namespace internal 1059 } // namespace internal
1055 } // namespace v8 1060 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698