Index: src/interpreter/bytecodes.h |
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h |
index efc531dc78b73b55a72c0d763b66fbf6534b4d06..2c2420c3d56c064de4cbac1776c4127c325d13b0 100644 |
--- a/src/interpreter/bytecodes.h |
+++ b/src/interpreter/bytecodes.h |
@@ -104,9 +104,11 @@ namespace interpreter { |
\ |
/* Cast operators */ \ |
V(ToBoolean, OperandType::kNone) \ |
+ V(ToName, OperandType::kNone) \ |
\ |
/* Literals */ \ |
V(CreateArrayLiteral, OperandType::kIdx8, OperandType::kImm8) \ |
+ V(CreateObjectLiteral, OperandType::kIdx8, OperandType::kImm8) \ |
\ |
/* Closure allocation */ \ |
V(CreateClosure, OperandType::kImm8) \ |
@@ -174,6 +176,7 @@ class Register { |
return index_; |
} |
bool is_parameter() const { return index() < 0; } |
+ bool is_valid() const { return index_ != kIllegalIndex; } |
static Register FromParameterIndex(int index, int parameter_count); |
int ToParameterIndex(int parameter_count) const; |
@@ -190,6 +193,11 @@ class Register { |
static Register FromOperand(uint8_t operand); |
uint8_t ToOperand() const; |
+ static bool AreContiguous(Register reg1, Register reg2, |
+ Register reg3 = Register(), |
+ Register reg4 = Register(), |
+ Register reg5 = Register()); |
+ |
private: |
static const int kIllegalIndex = kMaxInt; |