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

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

Issue 2212343002: 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, 4 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 int feedback_slot, 581 int feedback_slot,
582 TailCallMode tail_call_mode) { 582 TailCallMode tail_call_mode) {
583 Bytecode bytecode = BytecodeForCall(tail_call_mode); 583 Bytecode bytecode = BytecodeForCall(tail_call_mode);
584 Output(bytecode, RegisterOperand(callable), RegisterOperand(receiver_args), 584 Output(bytecode, RegisterOperand(callable), RegisterOperand(receiver_args),
585 UnsignedOperand(receiver_args_count), UnsignedOperand(feedback_slot)); 585 UnsignedOperand(receiver_args_count), UnsignedOperand(feedback_slot));
586 return *this; 586 return *this;
587 } 587 }
588 588
589 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor, 589 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor,
590 Register first_arg, 590 Register first_arg,
591 size_t arg_count, 591 size_t arg_count) {
592 int feedback_slot_id) {
593 if (!first_arg.is_valid()) { 592 if (!first_arg.is_valid()) {
594 DCHECK_EQ(0u, arg_count); 593 DCHECK_EQ(0u, arg_count);
595 first_arg = Register(0); 594 first_arg = Register(0);
596 } 595 }
597 Output(Bytecode::kNew, RegisterOperand(constructor), 596 Output(Bytecode::kNew, RegisterOperand(constructor),
598 RegisterOperand(first_arg), UnsignedOperand(arg_count), 597 RegisterOperand(first_arg), UnsignedOperand(arg_count));
599 UnsignedOperand(feedback_slot_id));
600 return *this; 598 return *this;
601 } 599 }
602 600
603 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime( 601 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime(
604 Runtime::FunctionId function_id, Register first_arg, size_t arg_count) { 602 Runtime::FunctionId function_id, Register first_arg, size_t arg_count) {
605 DCHECK_EQ(1, Runtime::FunctionForId(function_id)->result_size); 603 DCHECK_EQ(1, Runtime::FunctionForId(function_id)->result_size);
606 DCHECK(Bytecodes::SizeForUnsignedOperand(function_id) <= OperandSize::kShort); 604 DCHECK(Bytecodes::SizeForUnsignedOperand(function_id) <= OperandSize::kShort);
607 if (!first_arg.is_valid()) { 605 if (!first_arg.is_valid()) {
608 DCHECK_EQ(0u, arg_count); 606 DCHECK_EQ(0u, arg_count);
609 first_arg = Register(0); 607 first_arg = Register(0);
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 return Bytecode::kTailCall; 960 return Bytecode::kTailCall;
963 default: 961 default:
964 UNREACHABLE(); 962 UNREACHABLE();
965 } 963 }
966 return Bytecode::kIllegal; 964 return Bytecode::kIllegal;
967 } 965 }
968 966
969 } // namespace interpreter 967 } // namespace interpreter
970 } // namespace internal 968 } // namespace internal
971 } // namespace v8 969 } // 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