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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 // | 524 // |
525 // Test if instance SP[-3] with type arguments SP[-2] is (A = 0) or is not | 525 // Test if instance SP[-3] with type arguments SP[-2] is (A = 0) or is not |
526 // (A = 1) a subtype of SP[-1] using SubtypeTestCache SP[0], with result | 526 // (A = 1) a subtype of SP[-1] using SubtypeTestCache SP[0], with result |
527 // placed at top of stack. | 527 // placed at top of stack. |
528 // | 528 // |
529 // - AssertAssignable D | 529 // - AssertAssignable D |
530 // | 530 // |
531 // Assert that SP[-3] is assignable to variable named SP[0] of type | 531 // Assert that SP[-3] is assignable to variable named SP[0] of type |
532 // SP[-1] with type arguments SP[-2] using SubtypeTestCache PP[D]. | 532 // SP[-1] with type arguments SP[-2] using SubtypeTestCache PP[D]. |
533 // | 533 // |
| 534 // - BadTypeError |
| 535 // |
| 536 // If SP[-3] is non-null, throws a BadType error by calling into the runtime. |
| 537 // Assumes that the stack is arranged the same as for AssertAssignable. |
| 538 // |
534 // - AssertBoolean A | 539 // - AssertBoolean A |
535 // | 540 // |
536 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0). | 541 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0). |
537 // | 542 // |
538 // - TestSmi rA, rD | 543 // - TestSmi rA, rD |
539 // | 544 // |
540 // If FP[rA] & FP[rD] != 0, then skip the next instruction. FP[rA] and FP[rD] | 545 // If FP[rA] & FP[rD] != 0, then skip the next instruction. FP[rA] and FP[rD] |
541 // must be Smis. | 546 // must be Smis. |
542 // | 547 // |
543 // - TestCids rA, D | 548 // - TestCids rA, D |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 V(EntryOptimized, A_D, num, num, ___) \ | 789 V(EntryOptimized, A_D, num, num, ___) \ |
785 V(Frame, D, num, ___, ___) \ | 790 V(Frame, D, num, ___, ___) \ |
786 V(SetFrame, A, num, ___, num) \ | 791 V(SetFrame, A, num, ___, num) \ |
787 V(AllocateContext, D, num, ___, ___) \ | 792 V(AllocateContext, D, num, ___, ___) \ |
788 V(AllocateUninitializedContext, A_D, reg, num, ___) \ | 793 V(AllocateUninitializedContext, A_D, reg, num, ___) \ |
789 V(CloneContext, 0, ___, ___, ___) \ | 794 V(CloneContext, 0, ___, ___, ___) \ |
790 V(MoveSpecial, A_D, reg, num, ___) \ | 795 V(MoveSpecial, A_D, reg, num, ___) \ |
791 V(InstantiateType, D, lit, ___, ___) \ | 796 V(InstantiateType, D, lit, ___, ___) \ |
792 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \ | 797 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \ |
793 V(InstanceOf, A, num, ___, ___) \ | 798 V(InstanceOf, A, num, ___, ___) \ |
| 799 V(BadTypeError, 0, ___, ___, ___) \ |
794 V(AssertAssignable, D, num, lit, ___) \ | 800 V(AssertAssignable, D, num, lit, ___) \ |
795 V(AssertBoolean, A, num, ___, ___) \ | 801 V(AssertBoolean, A, num, ___, ___) \ |
796 V(TestSmi, A_D, reg, reg, ___) \ | 802 V(TestSmi, A_D, reg, reg, ___) \ |
797 V(TestCids, A_D, reg, num, ___) \ | 803 V(TestCids, A_D, reg, num, ___) \ |
798 V(CheckSmi, A, reg, ___, ___) \ | 804 V(CheckSmi, A, reg, ___, ___) \ |
799 V(CheckEitherNonSmi, A_D, reg, reg, ___) \ | 805 V(CheckEitherNonSmi, A_D, reg, reg, ___) \ |
800 V(CheckClassId, A_D, reg, num, ___) \ | 806 V(CheckClassId, A_D, reg, num, ___) \ |
801 V(CheckDenseSwitch, A_D, reg, num, ___) \ | 807 V(CheckDenseSwitch, A_D, reg, num, ___) \ |
802 V(CheckCids, A_B_C, reg, num, ___) \ | 808 V(CheckCids, A_B_C, reg, num, ___) \ |
803 V(CheckStack, 0, ___, ___, ___) \ | 809 V(CheckStack, 0, ___, ___, ___) \ |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 | 947 |
942 // After a comparison, the condition NEXT_IS_TRUE means the following | 948 // After a comparison, the condition NEXT_IS_TRUE means the following |
943 // instruction is executed if the comparision is true and skipped over overwise. | 949 // instruction is executed if the comparision is true and skipped over overwise. |
944 // Conidition NEXT_IS_FALSE means the following instruction is executed if the | 950 // Conidition NEXT_IS_FALSE means the following instruction is executed if the |
945 // comparison is false and skipped over otherwise. | 951 // comparison is false and skipped over otherwise. |
946 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; | 952 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; |
947 | 953 |
948 } // namespace dart | 954 } // namespace dart |
949 | 955 |
950 #endif // VM_CONSTANTS_DBC_H_ | 956 #endif // VM_CONSTANTS_DBC_H_ |
OLD | NEW |