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