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

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

Issue 2209633002: [Interpreter] Assign feedback slots for binary operations and use them in ignition. (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
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 void BytecodeArrayBuilder::Output(Bytecode bytecode) { 147 void BytecodeArrayBuilder::Output(Bytecode bytecode) {
148 DCHECK(OperandsAreValid(bytecode, 0)); 148 DCHECK(OperandsAreValid(bytecode, 0));
149 BytecodeNode node(bytecode); 149 BytecodeNode node(bytecode);
150 AttachSourceInfo(&node); 150 AttachSourceInfo(&node);
151 pipeline()->Write(&node); 151 pipeline()->Write(&node);
152 } 152 }
153 153
154 BytecodeArrayBuilder& BytecodeArrayBuilder::BinaryOperation(Token::Value op, 154 BytecodeArrayBuilder& BytecodeArrayBuilder::BinaryOperation(Token::Value op,
155 Register reg) { 155 Register reg,
156 Output(BytecodeForBinaryOperation(op), RegisterOperand(reg)); 156 int feedback_slot) {
157 Output(BytecodeForBinaryOperation(op), RegisterOperand(reg),
158 UnsignedOperand(feedback_slot));
157 return *this; 159 return *this;
158 } 160 }
159 161
160 BytecodeArrayBuilder& BytecodeArrayBuilder::CountOperation(Token::Value op) { 162 BytecodeArrayBuilder& BytecodeArrayBuilder::CountOperation(Token::Value op,
161 Output(BytecodeForCountOperation(op)); 163 int feedback_slot) {
164 Output(BytecodeForCountOperation(op), UnsignedOperand(feedback_slot));
162 return *this; 165 return *this;
163 } 166 }
164 167
165 BytecodeArrayBuilder& BytecodeArrayBuilder::LogicalNot() { 168 BytecodeArrayBuilder& BytecodeArrayBuilder::LogicalNot() {
166 Output(Bytecode::kToBooleanLogicalNot); 169 Output(Bytecode::kToBooleanLogicalNot);
167 return *this; 170 return *this;
168 } 171 }
169 172
170 173
171 BytecodeArrayBuilder& BytecodeArrayBuilder::TypeOf() { 174 BytecodeArrayBuilder& BytecodeArrayBuilder::TypeOf() {
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 return Bytecode::kTailCall; 959 return Bytecode::kTailCall;
957 default: 960 default:
958 UNREACHABLE(); 961 UNREACHABLE();
959 } 962 }
960 return Bytecode::kIllegal; 963 return Bytecode::kIllegal;
961 } 964 }
962 965
963 } // namespace interpreter 966 } // namespace interpreter
964 } // namespace internal 967 } // namespace internal
965 } // namespace v8 968 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698