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

Unified Diff: src/interpreter/bytecodes.cc

Issue 2142273003: [interpreter] Inline Star on dispatch for some bytecodes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed nitpicks 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 side-by-side diff with in-line comments
Download patch
Index: src/interpreter/bytecodes.cc
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc
index 825014e465613ecb0073f5511ae333931e481ec2..21ec29f4b614473110e459dceeca64e73b9cdec5 100644
--- a/src/interpreter/bytecodes.cc
+++ b/src/interpreter/bytecodes.cc
@@ -569,6 +569,32 @@ bool Bytecodes::IsRegisterOutputOperandType(OperandType operand_type) {
}
// static
+bool Bytecodes::IsStarLookahead(Bytecode bytecode, OperandScale operand_scale) {
+ if (operand_scale == OperandScale::kSingle) {
+ switch (bytecode) {
+ case Bytecode::kLdaZero:
oth 2016/07/18 08:05:40 Is there data driving the selected bytecodes here?
klaasb 2016/07/18 09:48:54 Some experiments are in the earlier patchsets (alt
+ case Bytecode::kLdaSmi:
+ case Bytecode::kLdaNull:
+ case Bytecode::kLdaConstant:
+ case Bytecode::kMov:
rmcilroy 2016/07/18 11:07:51 kMov seems an unusual one since it doesn't update
klaasb 2016/07/18 15:15:28 I thought about that too. It is the top 10-20 for
+ case Bytecode::kAdd:
+ case Bytecode::kSub:
+ case Bytecode::kMul:
+ case Bytecode::kAddSmi:
+ case Bytecode::kSubSmi:
+ case Bytecode::kInc:
+ case Bytecode::kDec:
+ case Bytecode::kCall:
+ case Bytecode::kNew:
+ return true;
+ default:
+ return false;
+ }
+ }
+ return false;
+}
+
+// static
int Bytecodes::GetNumberOfRegistersRepresentedBy(OperandType operand_type) {
switch (operand_type) {
case OperandType::kMaybeReg:

Powered by Google App Engine
This is Rietveld 408576698