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

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

Issue 2165633003: Revert of [Interpreter] Collect type feedback for 'new' in the bytecode handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/compiler.h" 7 #include "src/compiler.h"
8 #include "src/globals.h" 8 #include "src/globals.h"
9 #include "src/interpreter/bytecode-array-writer.h" 9 #include "src/interpreter/bytecode-array-writer.h"
10 #include "src/interpreter/bytecode-dead-code-optimizer.h" 10 #include "src/interpreter/bytecode-dead-code-optimizer.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 int feedback_slot, 562 int feedback_slot,
563 TailCallMode tail_call_mode) { 563 TailCallMode tail_call_mode) {
564 Bytecode bytecode = BytecodeForCall(tail_call_mode); 564 Bytecode bytecode = BytecodeForCall(tail_call_mode);
565 Output(bytecode, RegisterOperand(callable), RegisterOperand(receiver_args), 565 Output(bytecode, RegisterOperand(callable), RegisterOperand(receiver_args),
566 UnsignedOperand(receiver_args_count), UnsignedOperand(feedback_slot)); 566 UnsignedOperand(receiver_args_count), UnsignedOperand(feedback_slot));
567 return *this; 567 return *this;
568 } 568 }
569 569
570 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor, 570 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor,
571 Register first_arg, 571 Register first_arg,
572 size_t arg_count, 572 size_t arg_count) {
573 int feedback_slot_id) {
574 if (!first_arg.is_valid()) { 573 if (!first_arg.is_valid()) {
575 DCHECK_EQ(0u, arg_count); 574 DCHECK_EQ(0u, arg_count);
576 first_arg = Register(0); 575 first_arg = Register(0);
577 } 576 }
578 Output(Bytecode::kNew, RegisterOperand(constructor), 577 Output(Bytecode::kNew, RegisterOperand(constructor),
579 RegisterOperand(first_arg), UnsignedOperand(arg_count), 578 RegisterOperand(first_arg), UnsignedOperand(arg_count));
580 UnsignedOperand(feedback_slot_id));
581 return *this; 579 return *this;
582 } 580 }
583 581
584 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime( 582 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime(
585 Runtime::FunctionId function_id, Register first_arg, size_t arg_count) { 583 Runtime::FunctionId function_id, Register first_arg, size_t arg_count) {
586 DCHECK_EQ(1, Runtime::FunctionForId(function_id)->result_size); 584 DCHECK_EQ(1, Runtime::FunctionForId(function_id)->result_size);
587 DCHECK(Bytecodes::SizeForUnsignedOperand(function_id) <= OperandSize::kShort); 585 DCHECK(Bytecodes::SizeForUnsignedOperand(function_id) <= OperandSize::kShort);
588 if (!first_arg.is_valid()) { 586 if (!first_arg.is_valid()) {
589 DCHECK_EQ(0u, arg_count); 587 DCHECK_EQ(0u, arg_count);
590 first_arg = Register(0); 588 first_arg = Register(0);
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 return Bytecode::kTailCall; 932 return Bytecode::kTailCall;
935 default: 933 default:
936 UNREACHABLE(); 934 UNREACHABLE();
937 } 935 }
938 return Bytecode::kIllegal; 936 return Bytecode::kIllegal;
939 } 937 }
940 938
941 } // namespace interpreter 939 } // namespace interpreter
942 } // namespace internal 940 } // namespace internal
943 } // namespace v8 941 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698