| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 | 159 |
| 160 | 160 |
| 161 // static | 161 // static |
| 162 bool Bytecodes::IsConditionalJumpImmediate(Bytecode bytecode) { | 162 bool Bytecodes::IsConditionalJumpImmediate(Bytecode bytecode) { |
| 163 return bytecode == Bytecode::kJumpIfTrue || | 163 return 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 || | 167 bytecode == Bytecode::kJumpIfNull || |
| 168 bytecode == Bytecode::kJumpIfUndefined; | 168 bytecode == Bytecode::kJumpIfUndefined || |
| 169 bytecode == Bytecode::kJumpIfHole || |
| 170 bytecode == Bytecode::kJumpIfNotHole; |
| 169 } | 171 } |
| 170 | 172 |
| 171 | 173 |
| 172 // static | 174 // static |
| 173 bool Bytecodes::IsConditionalJumpConstant(Bytecode bytecode) { | 175 bool Bytecodes::IsConditionalJumpConstant(Bytecode bytecode) { |
| 174 return bytecode == Bytecode::kJumpIfTrueConstant || | 176 return bytecode == Bytecode::kJumpIfTrueConstant || |
| 175 bytecode == Bytecode::kJumpIfFalseConstant || | 177 bytecode == Bytecode::kJumpIfFalseConstant || |
| 176 bytecode == Bytecode::kJumpIfToBooleanTrueConstant || | 178 bytecode == Bytecode::kJumpIfToBooleanTrueConstant || |
| 177 bytecode == Bytecode::kJumpIfToBooleanFalseConstant || | 179 bytecode == Bytecode::kJumpIfToBooleanFalseConstant || |
| 178 bytecode == Bytecode::kJumpIfNullConstant || | 180 bytecode == Bytecode::kJumpIfNullConstant || |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 } | 467 } |
| 466 if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) { | 468 if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) { |
| 467 return false; | 469 return false; |
| 468 } | 470 } |
| 469 return true; | 471 return true; |
| 470 } | 472 } |
| 471 | 473 |
| 472 } // namespace interpreter | 474 } // namespace interpreter |
| 473 } // namespace internal | 475 } // namespace internal |
| 474 } // namespace v8 | 476 } // namespace v8 |
| OLD | NEW |