| OLD | NEW | 
|    1 // Copyright 2015 the V8 project authors. All rights reserved. |    1 // Copyright 2015 the V8 project authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #include "src/interpreter/bytecodes.h" |    5 #include "src/interpreter/bytecodes.h" | 
|    6  |    6  | 
|    7 #include "src/frames.h" |    7 #include "src/frames.h" | 
|    8 #include "src/interpreter/bytecode-traits.h" |    8 #include "src/interpreter/bytecode-traits.h" | 
|    9  |    9  | 
|   10 namespace v8 { |   10 namespace v8 { | 
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  156   UNREACHABLE(); |  156   UNREACHABLE(); | 
|  157   return OperandSize::kNone; |  157   return OperandSize::kNone; | 
|  158 } |  158 } | 
|  159  |  159  | 
|  160  |  160  | 
|  161 // static |  161 // static | 
|  162 bool Bytecodes::IsJump(Bytecode bytecode) { |  162 bool Bytecodes::IsJump(Bytecode bytecode) { | 
|  163   return bytecode == Bytecode::kJump || bytecode == Bytecode::kJumpIfTrue || |  163   return bytecode == Bytecode::kJump || bytecode == Bytecode::kJumpIfTrue || | 
|  164          bytecode == Bytecode::kJumpIfFalse || |  164          bytecode == Bytecode::kJumpIfFalse || | 
|  165          bytecode == Bytecode::kJumpIfToBooleanTrue || |  165          bytecode == Bytecode::kJumpIfToBooleanTrue || | 
|  166          bytecode == Bytecode::kJumpIfToBooleanFalse; |  166          bytecode == Bytecode::kJumpIfToBooleanFalse || | 
 |  167          bytecode == Bytecode::kJumpIfNull || | 
 |  168          bytecode == Bytecode::kJumpIfUndefined; | 
|  167 } |  169 } | 
|  168  |  170  | 
|  169  |  171  | 
|  170 // static |  172 // static | 
|  171 bool Bytecodes::IsJumpConstant(Bytecode bytecode) { |  173 bool Bytecodes::IsJumpConstant(Bytecode bytecode) { | 
|  172   return bytecode == Bytecode::kJumpConstant || |  174   return bytecode == Bytecode::kJumpConstant || | 
|  173          bytecode == Bytecode::kJumpIfTrueConstant || |  175          bytecode == Bytecode::kJumpIfTrueConstant || | 
|  174          bytecode == Bytecode::kJumpIfFalseConstant || |  176          bytecode == Bytecode::kJumpIfFalseConstant || | 
|  175          bytecode == Bytecode::kJumpIfToBooleanTrueConstant || |  177          bytecode == Bytecode::kJumpIfToBooleanTrueConstant || | 
|  176          bytecode == Bytecode::kJumpIfToBooleanFalseConstant; |  178          bytecode == Bytecode::kJumpIfToBooleanFalseConstant || | 
 |  179          bytecode == Bytecode::kJumpIfNull || | 
 |  180          bytecode == Bytecode::kJumpIfUndefinedConstant; | 
|  177 } |  181 } | 
|  178  |  182  | 
|  179  |  183  | 
|  180 // static |  184 // static | 
|  181 uint16_t Bytecodes::ShortOperandFromBytes(const uint8_t* bytes) { |  185 uint16_t Bytecodes::ShortOperandFromBytes(const uint8_t* bytes) { | 
|  182   return *reinterpret_cast<const uint16_t*>(bytes); |  186   return *reinterpret_cast<const uint16_t*>(bytes); | 
|  183 } |  187 } | 
|  184  |  188  | 
|  185  |  189  | 
|  186 // static |  190 // static | 
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  347   } |  351   } | 
|  348   if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) { |  352   if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) { | 
|  349     return false; |  353     return false; | 
|  350   } |  354   } | 
|  351   return true; |  355   return true; | 
|  352 } |  356 } | 
|  353  |  357  | 
|  354 }  // namespace interpreter |  358 }  // namespace interpreter | 
|  355 }  // namespace internal |  359 }  // namespace internal | 
|  356 }  // namespace v8 |  360 }  // namespace v8 | 
| OLD | NEW |