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

Unified Diff: src/interpreter/bytecodes.h

Issue 1894063002: [Interpreter] Remove register file register and replace with LoadParentFramePointer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix gcc Created 4 years, 8 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-array-builder.cc ('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 23612713aaf80563c8e235c90acbea1cef391465..44f93cd76ab764da98b81e70b68063a121bbada5 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -9,6 +9,7 @@
// Clients of this interface shouldn't depend on lots of interpreter internals.
// Do not include anything from src/interpreter here!
+#include "src/frames.h"
#include "src/utils.h"
namespace v8 {
@@ -335,8 +336,6 @@ class Register {
int index() const { return index_; }
bool is_parameter() const { return index() < 0; }
bool is_valid() const { return index_ != kInvalidIndex; }
- bool is_byte_operand() const;
- bool is_short_operand() const;
static Register FromParameterIndex(int index, int parameter_count);
int ToParameterIndex(int parameter_count) const;
@@ -356,8 +355,20 @@ class Register {
static Register new_target();
bool is_new_target() const;
- int32_t ToOperand() const { return -index_; }
- static Register FromOperand(int32_t operand) { return Register(-operand); }
+ // Returns the register for the bytecode array.
+ static Register bytecode_array();
+ bool is_bytecode_array() const;
+
+ // Returns the register for the saved bytecode offset.
+ static Register bytecode_offset();
+ bool is_bytecode_offset() const;
+
+ OperandSize SizeOfOperand() const;
+
+ int32_t ToOperand() const { return kRegisterFileStartOffset - index_; }
+ static Register FromOperand(int32_t operand) {
+ return Register(kRegisterFileStartOffset - operand);
+ }
static bool AreContiguous(Register reg1, Register reg2,
Register reg3 = Register(),
@@ -387,6 +398,8 @@ class Register {
private:
static const int kInvalidIndex = kMaxInt;
+ static const int kRegisterFileStartOffset =
+ InterpreterFrameConstants::kRegisterFileFromFp / kPointerSize;
void* operator new(size_t size);
void operator delete(void* p);
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698