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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 default: | 438 default: |
439 break; | 439 break; |
440 } | 440 } |
441 UNREACHABLE(); | 441 UNREACHABLE(); |
442 return Bytecode::kIllegal; | 442 return Bytecode::kIllegal; |
443 } | 443 } |
444 | 444 |
445 // static | 445 // static |
446 bool Bytecodes::IsCallOrNew(Bytecode bytecode) { | 446 bool Bytecodes::IsCallOrNew(Bytecode bytecode) { |
447 return bytecode == Bytecode::kCall || bytecode == Bytecode::kTailCall || | 447 return bytecode == Bytecode::kCall || bytecode == Bytecode::kTailCall || |
| 448 bytecode == Bytecode::kCallWithFeedback || |
| 449 bytecode == Bytecode::kTailCallWithFeedback || |
448 bytecode == Bytecode::kNew; | 450 bytecode == Bytecode::kNew; |
449 } | 451 } |
450 | 452 |
451 // static | 453 // static |
| 454 bool Bytecodes::IsTailCall(Bytecode bytecode) { |
| 455 return bytecode == Bytecode::kTailCall || |
| 456 bytecode == Bytecode::kTailCallWithFeedback; |
| 457 } |
| 458 |
| 459 // static |
452 bool Bytecodes::IsCallRuntime(Bytecode bytecode) { | 460 bool Bytecodes::IsCallRuntime(Bytecode bytecode) { |
453 return bytecode == Bytecode::kCallRuntime || | 461 return bytecode == Bytecode::kCallRuntime || |
454 bytecode == Bytecode::kCallRuntimeForPair || | 462 bytecode == Bytecode::kCallRuntimeForPair || |
455 bytecode == Bytecode::kInvokeIntrinsic; | 463 bytecode == Bytecode::kInvokeIntrinsic; |
456 } | 464 } |
457 | 465 |
458 // static | 466 // static |
459 bool Bytecodes::IsDebugBreak(Bytecode bytecode) { | 467 bool Bytecodes::IsDebugBreak(Bytecode bytecode) { |
460 switch (bytecode) { | 468 switch (bytecode) { |
461 #define CASE(Name, ...) case Bytecode::k##Name: | 469 #define CASE(Name, ...) case Bytecode::k##Name: |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 if (!FLAG_always_opt && !FLAG_prepare_always_opt && | 953 if (!FLAG_always_opt && !FLAG_prepare_always_opt && |
946 pretenure == NOT_TENURED && is_function_scope) { | 954 pretenure == NOT_TENURED && is_function_scope) { |
947 result |= FastNewClosureBit::encode(true); | 955 result |= FastNewClosureBit::encode(true); |
948 } | 956 } |
949 return result; | 957 return result; |
950 } | 958 } |
951 | 959 |
952 } // namespace interpreter | 960 } // namespace interpreter |
953 } // namespace internal | 961 } // namespace internal |
954 } // namespace v8 | 962 } // namespace v8 |
OLD | NEW |