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

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 2684993002: [interpreter] Create custom call opcodes for specific argument counts (Closed)
Patch Set: Fix golden files again Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-pipeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 5b732c0c1b5f68caa2cdcb6c8ddc3e743741dc52..c66be795e035eb83fda425e9f0b2227bd8721e0f 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -1003,9 +1003,26 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable,
if (tail_call_mode == TailCallMode::kDisallow) {
if (call_type == Call::NAMED_PROPERTY_CALL ||
call_type == Call::KEYED_PROPERTY_CALL) {
- OutputCallProperty(callable, args, args.register_count(), feedback_slot);
+ if (args.register_count() == 1) {
+ OutputCallProperty0(callable, args[0], feedback_slot);
+ } else if (args.register_count() == 2) {
+ OutputCallProperty1(callable, args[0], args[1], feedback_slot);
+ } else if (args.register_count() == 3) {
+ OutputCallProperty2(callable, args[0], args[1], args[2], feedback_slot);
+ } else {
+ OutputCallProperty(callable, args, args.register_count(),
+ feedback_slot);
+ }
} else {
- OutputCall(callable, args, args.register_count(), feedback_slot);
+ if (args.register_count() == 1) {
+ OutputCall0(callable, args[0], feedback_slot);
+ } else if (args.register_count() == 2) {
+ OutputCall1(callable, args[0], args[1], feedback_slot);
+ } else if (args.register_count() == 3) {
+ OutputCall2(callable, args[0], args[1], args[2], feedback_slot);
+ } else {
+ OutputCall(callable, args, args.register_count(), feedback_slot);
+ }
}
} else {
DCHECK(tail_call_mode == TailCallMode::kAllow);
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-pipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698