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

Unified Diff: src/interpreter/bytecodes.h

Issue 1997653002: [interpreter] Bytecode register optimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Decouple a test from implementation. Created 4 years, 7 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/bytecode-traits.h ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index b5f1a1ba52327ec0d8d470817a8f0d6b60949d2b..00712de3bdd94352eb74039fce89559330ad307f 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -387,6 +387,11 @@ class Register final {
static Register bytecode_offset();
bool is_bytecode_offset() const;
+ // Returns a register that can be used to represent the accumulator
+ // within code in the interpreter, but should never be emitted in
+ // bytecode.
+ static Register virtual_accumulator();
+
OperandSize SizeOfOperand() const;
int32_t ToOperand() const { return kRegisterFileStartOffset - index_; }
@@ -505,6 +510,10 @@ class Bytecodes {
static OperandSize GetOperandSize(Bytecode bytecode, int i,
OperandScale operand_scale);
+ // Returns a pointer to an array of the operand sizes for |bytecode|.
+ static const OperandSize* GetOperandSizes(Bytecode bytecode,
+ OperandScale operand_scale);
+
// Returns the offset of the i-th operand of |bytecode| relative to the start
// of the bytecode.
static int GetOperandOffset(Bytecode bytecode, int i,
@@ -642,9 +651,10 @@ class Bytecodes {
// Return the OperandScale required for bytecode emission of
// operand sizes.
+ static OperandScale OperandSizesToScale(OperandSize size0);
+ static OperandScale OperandSizesToScale(OperandSize size0, OperandSize size1);
static OperandScale OperandSizesToScale(
- OperandSize size0, OperandSize size1 = OperandSize::kByte,
- OperandSize size2 = OperandSize::kByte,
+ OperandSize size0, OperandSize size1, OperandSize size2,
OperandSize size3 = OperandSize::kByte);
private:
« no previous file with comments | « src/interpreter/bytecode-traits.h ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698