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

Unified Diff: src/interpreter/bytecode-array-builder.h

Issue 1325983002: [Intepreter] Extend and move Register class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bug in test. Created 5 years, 3 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 | « no previous file | src/interpreter/bytecode-array-builder.cc » ('j') | src/interpreter/bytecodes.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index 8a45c73bbbcbb4a7bd44ca05142c8ad63da08b4d..cc34eb3cdffa228980849b188b4218108ad7aa3f 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -8,7 +8,6 @@
#include <vector>
#include "src/ast.h"
-#include "src/frames.h"
#include "src/identity-map.h"
#include "src/interpreter/bytecodes.h"
#include "src/zone.h"
@@ -58,9 +57,6 @@ class BytecodeArrayBuilder {
BytecodeArrayBuilder& Return();
private:
- static const int kLastParamRegisterIndex =
- -InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize;
-
static Bytecode BytecodeForBinaryOperation(Token::Value op);
void Output(Bytecode bytecode, uint8_t r0, uint8_t r1, uint8_t r2);
@@ -106,9 +102,9 @@ class Register {
int index() { return index_; }
- uint8_t ToOperand() { return static_cast<uint8_t>(-index_); }
+ uint8_t ToOperand() { return Bytecodes::RegisterIndexToOperand(index_); }
static Register FromOperand(uint8_t operand) {
- return Register(-static_cast<int8_t>(operand));
+ return Register(Bytecodes::RegisterIndexFromOperand(operand));
}
private:
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.cc » ('j') | src/interpreter/bytecodes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698