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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 } | 467 } |
468 return false; | 468 return false; |
469 } | 469 } |
470 | 470 |
471 // static | 471 // static |
472 bool Bytecodes::IsLdarOrStar(Bytecode bytecode) { | 472 bool Bytecodes::IsLdarOrStar(Bytecode bytecode) { |
473 return bytecode == Bytecode::kLdar || bytecode == Bytecode::kStar; | 473 return bytecode == Bytecode::kLdar || bytecode == Bytecode::kStar; |
474 } | 474 } |
475 | 475 |
476 // static | 476 // static |
| 477 bool Bytecodes::IsLdaSmiOrLdaZero(Bytecode bytecode) { |
| 478 return bytecode == Bytecode::kLdaSmi || bytecode == Bytecode::kLdaZero; |
| 479 } |
| 480 |
| 481 // static |
477 bool Bytecodes::IsBytecodeWithScalableOperands(Bytecode bytecode) { | 482 bool Bytecodes::IsBytecodeWithScalableOperands(Bytecode bytecode) { |
478 switch (bytecode) { | 483 switch (bytecode) { |
479 #define CASE(Name, ...) \ | 484 #define CASE(Name, ...) \ |
480 case Bytecode::k##Name: \ | 485 case Bytecode::k##Name: \ |
481 typedef BytecodeTraits<__VA_ARGS__> Name##Trait; \ | 486 typedef BytecodeTraits<__VA_ARGS__> Name##Trait; \ |
482 return Name##Trait::IsScalable(); | 487 return Name##Trait::IsScalable(); |
483 BYTECODE_LIST(CASE) | 488 BYTECODE_LIST(CASE) |
484 #undef CASE | 489 #undef CASE |
485 } | 490 } |
486 UNREACHABLE(); | 491 UNREACHABLE(); |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 if (!FLAG_always_opt && !FLAG_prepare_always_opt && | 945 if (!FLAG_always_opt && !FLAG_prepare_always_opt && |
941 pretenure == NOT_TENURED && is_function_scope) { | 946 pretenure == NOT_TENURED && is_function_scope) { |
942 result |= FastNewClosureBit::encode(true); | 947 result |= FastNewClosureBit::encode(true); |
943 } | 948 } |
944 return result; | 949 return result; |
945 } | 950 } |
946 | 951 |
947 } // namespace interpreter | 952 } // namespace interpreter |
948 } // namespace internal | 953 } // namespace internal |
949 } // namespace v8 | 954 } // namespace v8 |
OLD | NEW |