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 <iomanip> | 7 #include <iomanip> |
8 | 8 |
9 #include "src/frames.h" | 9 #include "src/frames.h" |
10 #include "src/interpreter/bytecode-traits.h" | 10 #include "src/interpreter/bytecode-traits.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 bool Bytecodes::WritesAccumulator(Bytecode bytecode) { | 236 bool Bytecodes::WritesAccumulator(Bytecode bytecode) { |
237 return (GetAccumulatorUse(bytecode) & AccumulatorUse::kWrite) == | 237 return (GetAccumulatorUse(bytecode) & AccumulatorUse::kWrite) == |
238 AccumulatorUse::kWrite; | 238 AccumulatorUse::kWrite; |
239 } | 239 } |
240 | 240 |
241 // static | 241 // static |
242 bool Bytecodes::WritesBooleanToAccumulator(Bytecode bytecode) { | 242 bool Bytecodes::WritesBooleanToAccumulator(Bytecode bytecode) { |
243 switch (bytecode) { | 243 switch (bytecode) { |
244 case Bytecode::kLdaTrue: | 244 case Bytecode::kLdaTrue: |
245 case Bytecode::kLdaFalse: | 245 case Bytecode::kLdaFalse: |
| 246 case Bytecode::kToBooleanLogicalNot: |
246 case Bytecode::kLogicalNot: | 247 case Bytecode::kLogicalNot: |
247 case Bytecode::kTestEqual: | 248 case Bytecode::kTestEqual: |
248 case Bytecode::kTestNotEqual: | 249 case Bytecode::kTestNotEqual: |
249 case Bytecode::kTestEqualStrict: | 250 case Bytecode::kTestEqualStrict: |
250 case Bytecode::kTestLessThan: | 251 case Bytecode::kTestLessThan: |
251 case Bytecode::kTestLessThanOrEqual: | 252 case Bytecode::kTestLessThanOrEqual: |
252 case Bytecode::kTestGreaterThan: | 253 case Bytecode::kTestGreaterThan: |
253 case Bytecode::kTestGreaterThanOrEqual: | 254 case Bytecode::kTestGreaterThanOrEqual: |
254 case Bytecode::kTestInstanceOf: | 255 case Bytecode::kTestInstanceOf: |
255 case Bytecode::kTestIn: | 256 case Bytecode::kTestIn: |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 } else { | 923 } else { |
923 std::ostringstream s; | 924 std::ostringstream s; |
924 s << "r" << index(); | 925 s << "r" << index(); |
925 return s.str(); | 926 return s.str(); |
926 } | 927 } |
927 } | 928 } |
928 | 929 |
929 } // namespace interpreter | 930 } // namespace interpreter |
930 } // namespace internal | 931 } // namespace internal |
931 } // namespace v8 | 932 } // namespace v8 |
OLD | NEW |