Index: src/interpreter/bytecodes.h |
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h |
index f98882a5dd427950d38feae4d85ed431eba70542..50c338dc9583693c892b194c901191184ad5d42f 100644 |
--- a/src/interpreter/bytecodes.h |
+++ b/src/interpreter/bytecodes.h |
@@ -48,7 +48,10 @@ namespace interpreter { |
V(StaGlobal, OperandType::kIdx8) \ |
\ |
/* Context operations */ \ |
+ V(PushContext, OperandType::kReg8) \ |
+ V(PopContext, OperandType::kReg8) \ |
V(LdaContextSlot, OperandType::kReg8, OperandType::kIdx8) \ |
+ V(StaContextSlot, OperandType::kReg8, OperandType::kIdx8) \ |
\ |
/* Register-accumulator transfers */ \ |
V(Ldar, OperandType::kReg8) \ |
@@ -68,10 +71,6 @@ namespace interpreter { |
V(KeyedStoreICStrict, OperandType::kReg8, OperandType::kReg8, \ |
OperandType::kIdx8) \ |
\ |
- /* Context operations */ \ |
- V(PushContext, OperandType::kReg8) \ |
- V(PopContext, OperandType::kReg8) \ |
- \ |
/* Binary Operators */ \ |
V(Add, OperandType::kReg8) \ |
V(Sub, OperandType::kReg8) \ |
@@ -206,6 +205,9 @@ class Register { |
Register reg4 = Register(), |
Register reg5 = Register()); |
+ bool operator==(const Register& o) const { return o.index() == index(); } |
+ bool operator!=(const Register& o) const { return o.index() != index(); } |
+ |
private: |
static const int kIllegalIndex = kMaxInt; |