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

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 test, bug spotted by bots. 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') | no next file with comments »
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..6684d50dc6c3cdce426c4be4617242b67ccc1cbc 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);
@@ -92,32 +88,6 @@ class BytecodeArrayBuilder {
DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArrayBuilder);
};
-// An interpreter register which is located in the function's register file
-// in its stack-frame.
-class Register {
- public:
- static const int kMaxRegisterIndex = 128;
- static const int kMinRegisterIndex = -127;
-
- explicit Register(int index) : index_(index) {
- DCHECK_LE(index_, kMaxRegisterIndex);
- DCHECK_GE(index_, kMinRegisterIndex);
- }
-
- int index() { return index_; }
-
- uint8_t ToOperand() { return static_cast<uint8_t>(-index_); }
- static Register FromOperand(uint8_t operand) {
- return Register(-static_cast<int8_t>(operand));
- }
-
- private:
- void* operator new(size_t size);
- void operator delete(void* p);
-
- int index_;
-};
-
// A stack-allocated class than allows the instantiator to allocate
// temporary registers that are cleaned up when scope is closed.
class TemporaryRegisterScope {
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698