| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_CONSTANTS_DBC_H_ | 5 #ifndef VM_CONSTANTS_DBC_H_ |
| 6 #define VM_CONSTANTS_DBC_H_ | 6 #define VM_CONSTANTS_DBC_H_ |
| 7 | 7 |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 V(Move, A_X, reg, xeg, ___) \ | 522 V(Move, A_X, reg, xeg, ___) \ |
| 523 V(Swap, A_X, reg, xeg, ___) \ | 523 V(Swap, A_X, reg, xeg, ___) \ |
| 524 V(Push, X, xeg, ___, ___) \ | 524 V(Push, X, xeg, ___, ___) \ |
| 525 V(LoadConstant, A_D, reg, lit, ___) \ | 525 V(LoadConstant, A_D, reg, lit, ___) \ |
| 526 V(LoadClassId, A_D, reg, reg, ___) \ | 526 V(LoadClassId, A_D, reg, reg, ___) \ |
| 527 V(LoadClassIdTOS, 0, ___, ___, ___) \ | 527 V(LoadClassIdTOS, 0, ___, ___, ___) \ |
| 528 V(PushConstant, D, lit, ___, ___) \ | 528 V(PushConstant, D, lit, ___, ___) \ |
| 529 V(StoreLocal, X, xeg, ___, ___) \ | 529 V(StoreLocal, X, xeg, ___, ___) \ |
| 530 V(PopLocal, X, xeg, ___, ___) \ | 530 V(PopLocal, X, xeg, ___, ___) \ |
| 531 V(StaticCall, A_D, num, num, ___) \ | 531 V(StaticCall, A_D, num, num, ___) \ |
| 532 V(OptimizedStaticCall, A_D, num, num, ___) \ |
| 532 V(InstanceCall1, A_D, num, num, ___) \ | 533 V(InstanceCall1, A_D, num, num, ___) \ |
| 533 V(InstanceCall2, A_D, num, num, ___) \ | 534 V(InstanceCall2, A_D, num, num, ___) \ |
| 534 V(InstanceCall1Opt, A_D, num, num, ___) \ | 535 V(InstanceCall1Opt, A_D, num, num, ___) \ |
| 535 V(InstanceCall2Opt, A_D, num, num, ___) \ | 536 V(InstanceCall2Opt, A_D, num, num, ___) \ |
| 536 V(NativeCall, 0, ___, ___, ___) \ | 537 V(NativeCall, 0, ___, ___, ___) \ |
| 537 V(NativeBootstrapCall, 0, ___, ___, ___) \ | 538 V(NativeBootstrapCall, 0, ___, ___, ___) \ |
| 538 V(OneByteStringFromCharCode, A_X, reg, xeg, ___) \ | 539 V(OneByteStringFromCharCode, A_X, reg, xeg, ___) \ |
| 539 V(StringToCharCode, A_X, reg, xeg, ___) \ | 540 V(StringToCharCode, A_X, reg, xeg, ___) \ |
| 540 V(AddTOS, 0, ___, ___, ___) \ | 541 V(AddTOS, 0, ___, ___, ___) \ |
| 541 V(SubTOS, 0, ___, ___, ___) \ | 542 V(SubTOS, 0, ___, ___, ___) \ |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 return (bc >> kDShift) & kDMask; | 688 return (bc >> kDShift) & kDMask; |
| 688 } | 689 } |
| 689 | 690 |
| 690 DART_FORCE_INLINE static Opcode DecodeOpcode(Instr bc) { | 691 DART_FORCE_INLINE static Opcode DecodeOpcode(Instr bc) { |
| 691 return static_cast<Opcode>(bc & 0xFF); | 692 return static_cast<Opcode>(bc & 0xFF); |
| 692 } | 693 } |
| 693 | 694 |
| 694 DART_FORCE_INLINE static bool IsCallOpcode(Instr instr) { | 695 DART_FORCE_INLINE static bool IsCallOpcode(Instr instr) { |
| 695 switch (DecodeOpcode(instr)) { | 696 switch (DecodeOpcode(instr)) { |
| 696 case Bytecode::kStaticCall: | 697 case Bytecode::kStaticCall: |
| 698 case Bytecode::kOptimizedStaticCall: |
| 697 case Bytecode::kInstanceCall1: | 699 case Bytecode::kInstanceCall1: |
| 698 case Bytecode::kInstanceCall2: | 700 case Bytecode::kInstanceCall2: |
| 699 case Bytecode::kInstanceCall1Opt: | 701 case Bytecode::kInstanceCall1Opt: |
| 700 case Bytecode::kInstanceCall2Opt: | 702 case Bytecode::kInstanceCall2Opt: |
| 701 case Bytecode::kDebugBreak: | 703 case Bytecode::kDebugBreak: |
| 702 return true; | 704 return true; |
| 703 | 705 |
| 704 default: | 706 default: |
| 705 return false; | 707 return false; |
| 706 } | 708 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 | 747 |
| 746 // After a comparison, the condition NEXT_IS_TRUE means the following | 748 // After a comparison, the condition NEXT_IS_TRUE means the following |
| 747 // instruction is executed if the comparision is true and skipped over overwise. | 749 // instruction is executed if the comparision is true and skipped over overwise. |
| 748 // Conidition NEXT_IS_FALSE means the following instruction is executed if the | 750 // Conidition NEXT_IS_FALSE means the following instruction is executed if the |
| 749 // comparison is false and skipped over otherwise. | 751 // comparison is false and skipped over otherwise. |
| 750 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; | 752 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; |
| 751 | 753 |
| 752 } // namespace dart | 754 } // namespace dart |
| 753 | 755 |
| 754 #endif // VM_CONSTANTS_DBC_H_ | 756 #endif // VM_CONSTANTS_DBC_H_ |
| OLD | NEW |