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

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: lookahead on more bytecodes (dispatch to Star nearly always) 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
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecodes.cc
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc
index 825014e465613ecb0073f5511ae333931e481ec2..61417e98351b54187501082bf8a7d9e7cbaf8395 100644
--- a/src/interpreter/bytecodes.cc
+++ b/src/interpreter/bytecodes.cc
@@ -569,6 +569,42 @@ 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:
+ case Bytecode::kLdaSmi:
+ case Bytecode::kLdaNull:
+ case Bytecode::kLdaTheHole:
+ case Bytecode::kLdaConstant:
+ case Bytecode::kAdd:
+ case Bytecode::kSub:
+ case Bytecode::kMul:
+ case Bytecode::kAddSmi:
+ case Bytecode::kSubSmi:
+ case Bytecode::kInc:
+ case Bytecode::kDec:
+ case Bytecode::kTypeOf:
+ case Bytecode::kCall:
+ case Bytecode::kNew:
+ case Bytecode::kToNumber:
+ case Bytecode::kCreateRegExpLiteral:
+ case Bytecode::kCreateArrayLiteral:
+ case Bytecode::kCreateObjectLiteral:
+ case Bytecode::kCreateMappedArguments:
+ case Bytecode::kCreateUnmappedArguments:
+ case Bytecode::kForInPrepare:
klaasb 2016/07/18 19:45:46 This one doesn't write the accumulator, but in all
rmcilroy 2016/07/19 10:03:55 As discussed offline, let's remove the ones which
+ case Bytecode::kForInStep:
+ case Bytecode::kResumeGenerator:
+ return true;
+ default:
+ return false;
+ }
+ }
+ return false;
+}
+
+// static
int Bytecodes::GetNumberOfRegistersRepresentedBy(OperandType operand_type) {
switch (operand_type) {
case OperandType::kMaybeReg:
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698