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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 } else { | 569 } else { |
568 std::ostringstream s; | 570 std::ostringstream s; |
569 s << "r" << index(); | 571 s << "r" << index(); |
570 return s.str(); | 572 return s.str(); |
571 } | 573 } |
572 } | 574 } |
573 | 575 |
574 } // namespace interpreter | 576 } // namespace interpreter |
575 } // namespace internal | 577 } // namespace internal |
576 } // namespace v8 | 578 } // namespace v8 |
OLD | NEW |