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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } | 189 } |
190 | 190 |
191 | 191 |
192 // static | 192 // static |
193 bool Bytecodes::IsConditionalJumpImmediate(Bytecode bytecode) { | 193 bool Bytecodes::IsConditionalJumpImmediate(Bytecode bytecode) { |
194 return bytecode == Bytecode::kJumpIfTrue || | 194 return bytecode == Bytecode::kJumpIfTrue || |
195 bytecode == Bytecode::kJumpIfFalse || | 195 bytecode == Bytecode::kJumpIfFalse || |
196 bytecode == Bytecode::kJumpIfToBooleanTrue || | 196 bytecode == Bytecode::kJumpIfToBooleanTrue || |
197 bytecode == Bytecode::kJumpIfToBooleanFalse || | 197 bytecode == Bytecode::kJumpIfToBooleanFalse || |
198 bytecode == Bytecode::kJumpIfNull || | 198 bytecode == Bytecode::kJumpIfNull || |
199 bytecode == Bytecode::kJumpIfUndefined; | 199 bytecode == Bytecode::kJumpIfUndefined || |
| 200 bytecode == Bytecode::kJumpIfHole || |
| 201 bytecode == Bytecode::kJumpIfNotHole; |
200 } | 202 } |
201 | 203 |
202 | 204 |
203 // static | 205 // static |
204 bool Bytecodes::IsConditionalJumpConstant(Bytecode bytecode) { | 206 bool Bytecodes::IsConditionalJumpConstant(Bytecode bytecode) { |
205 return bytecode == Bytecode::kJumpIfTrueConstant || | 207 return bytecode == Bytecode::kJumpIfTrueConstant || |
206 bytecode == Bytecode::kJumpIfFalseConstant || | 208 bytecode == Bytecode::kJumpIfFalseConstant || |
207 bytecode == Bytecode::kJumpIfToBooleanTrueConstant || | 209 bytecode == Bytecode::kJumpIfToBooleanTrueConstant || |
208 bytecode == Bytecode::kJumpIfToBooleanFalseConstant || | 210 bytecode == Bytecode::kJumpIfToBooleanFalseConstant || |
209 bytecode == Bytecode::kJumpIfNullConstant || | 211 bytecode == Bytecode::kJumpIfNullConstant || |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 } else { | 579 } else { |
578 std::ostringstream s; | 580 std::ostringstream s; |
579 s << "r" << index(); | 581 s << "r" << index(); |
580 return s.str(); | 582 return s.str(); |
581 } | 583 } |
582 } | 584 } |
583 | 585 |
584 } // namespace interpreter | 586 } // namespace interpreter |
585 } // namespace internal | 587 } // namespace internal |
586 } // namespace v8 | 588 } // namespace v8 |
OLD | NEW |