| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 255 |
| 256 // static | 256 // static |
| 257 bool Bytecodes::IsJump(Bytecode bytecode) { | 257 bool Bytecodes::IsJump(Bytecode bytecode) { |
| 258 return IsJumpImmediate(bytecode) || IsJumpConstant(bytecode) || | 258 return IsJumpImmediate(bytecode) || IsJumpConstant(bytecode) || |
| 259 IsJumpConstantWide(bytecode); | 259 IsJumpConstantWide(bytecode); |
| 260 } | 260 } |
| 261 | 261 |
| 262 | 262 |
| 263 // static | 263 // static |
| 264 bool Bytecodes::IsCallOrNew(Bytecode bytecode) { | 264 bool Bytecodes::IsCallOrNew(Bytecode bytecode) { |
| 265 return bytecode == Bytecode::kCall || bytecode == Bytecode::kNew || | 265 return bytecode == Bytecode::kCall || bytecode == Bytecode::kTailCall || |
| 266 bytecode == Bytecode::kCallWide || bytecode == Bytecode::kNewWide; | 266 bytecode == Bytecode::kNew || bytecode == Bytecode::kCallWide || |
| 267 bytecode == Bytecode::kTailCallWide || bytecode == Bytecode::kNewWide; |
| 267 } | 268 } |
| 268 | 269 |
| 269 // static | 270 // static |
| 270 bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) { | 271 bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) { |
| 271 return bytecode == Bytecode::kReturn || IsJump(bytecode); | 272 return bytecode == Bytecode::kReturn || IsJump(bytecode); |
| 272 } | 273 } |
| 273 | 274 |
| 274 // static | 275 // static |
| 275 bool Bytecodes::IsIndexOperandType(OperandType operand_type) { | 276 bool Bytecodes::IsIndexOperandType(OperandType operand_type) { |
| 276 return operand_type == OperandType::kIdx8 || | 277 return operand_type == OperandType::kIdx8 || |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 } else { | 600 } else { |
| 600 std::ostringstream s; | 601 std::ostringstream s; |
| 601 s << "r" << index(); | 602 s << "r" << index(); |
| 602 return s.str(); | 603 return s.str(); |
| 603 } | 604 } |
| 604 } | 605 } |
| 605 | 606 |
| 606 } // namespace interpreter | 607 } // namespace interpreter |
| 607 } // namespace internal | 608 } // namespace internal |
| 608 } // namespace v8 | 609 } // namespace v8 |
| OLD | NEW |