| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 // - InstantiateTypeArgumentsTOS D | 519 // - InstantiateTypeArgumentsTOS D |
| 520 // | 520 // |
| 521 // Instantiate type arguments PP[D] with instantiator SP[0]. | 521 // Instantiate type arguments PP[D] with instantiator SP[0]. |
| 522 // | 522 // |
| 523 // - InstanceOf A | 523 // - InstanceOf A |
| 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 A, 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 // If A is 1, then the instance may be a Smi. |
| 533 // | 534 // |
| 534 // - BadTypeError | 535 // - BadTypeError |
| 535 // | 536 // |
| 536 // If SP[-3] is non-null, throws a BadType error by calling into the runtime. | 537 // 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 // Assumes that the stack is arranged the same as for AssertAssignable. |
| 538 // | 539 // |
| 539 // - AssertBoolean A | 540 // - AssertBoolean A |
| 540 // | 541 // |
| 541 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0). | 542 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0). |
| 542 // | 543 // |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 V(Frame, D, num, ___, ___) \ | 791 V(Frame, D, num, ___, ___) \ |
| 791 V(SetFrame, A, num, ___, num) \ | 792 V(SetFrame, A, num, ___, num) \ |
| 792 V(AllocateContext, D, num, ___, ___) \ | 793 V(AllocateContext, D, num, ___, ___) \ |
| 793 V(AllocateUninitializedContext, A_D, reg, num, ___) \ | 794 V(AllocateUninitializedContext, A_D, reg, num, ___) \ |
| 794 V(CloneContext, 0, ___, ___, ___) \ | 795 V(CloneContext, 0, ___, ___, ___) \ |
| 795 V(MoveSpecial, A_D, reg, num, ___) \ | 796 V(MoveSpecial, A_D, reg, num, ___) \ |
| 796 V(InstantiateType, D, lit, ___, ___) \ | 797 V(InstantiateType, D, lit, ___, ___) \ |
| 797 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \ | 798 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \ |
| 798 V(InstanceOf, A, num, ___, ___) \ | 799 V(InstanceOf, A, num, ___, ___) \ |
| 799 V(BadTypeError, 0, ___, ___, ___) \ | 800 V(BadTypeError, 0, ___, ___, ___) \ |
| 800 V(AssertAssignable, D, num, lit, ___) \ | 801 V(AssertAssignable, A_D, num, lit, ___) \ |
| 801 V(AssertBoolean, A, num, ___, ___) \ | 802 V(AssertBoolean, A, num, ___, ___) \ |
| 802 V(TestSmi, A_D, reg, reg, ___) \ | 803 V(TestSmi, A_D, reg, reg, ___) \ |
| 803 V(TestCids, A_D, reg, num, ___) \ | 804 V(TestCids, A_D, reg, num, ___) \ |
| 804 V(CheckSmi, A, reg, ___, ___) \ | 805 V(CheckSmi, A, reg, ___, ___) \ |
| 805 V(CheckEitherNonSmi, A_D, reg, reg, ___) \ | 806 V(CheckEitherNonSmi, A_D, reg, reg, ___) \ |
| 806 V(CheckClassId, A_D, reg, num, ___) \ | 807 V(CheckClassId, A_D, reg, num, ___) \ |
| 807 V(CheckDenseSwitch, A_D, reg, num, ___) \ | 808 V(CheckDenseSwitch, A_D, reg, num, ___) \ |
| 808 V(CheckCids, A_B_C, reg, num, ___) \ | 809 V(CheckCids, A_B_C, reg, num, ___) \ |
| 809 V(CheckStack, 0, ___, ___, ___) \ | 810 V(CheckStack, 0, ___, ___, ___) \ |
| 810 V(DebugStep, 0, ___, ___, ___) \ | 811 V(DebugStep, 0, ___, ___, ___) \ |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 | 948 |
| 948 // After a comparison, the condition NEXT_IS_TRUE means the following | 949 // After a comparison, the condition NEXT_IS_TRUE means the following |
| 949 // instruction is executed if the comparision is true and skipped over overwise. | 950 // instruction is executed if the comparision is true and skipped over overwise. |
| 950 // Conidition NEXT_IS_FALSE means the following instruction is executed if the | 951 // Conidition NEXT_IS_FALSE means the following instruction is executed if the |
| 951 // comparison is false and skipped over otherwise. | 952 // comparison is false and skipped over otherwise. |
| 952 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; | 953 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; |
| 953 | 954 |
| 954 } // namespace dart | 955 } // namespace dart |
| 955 | 956 |
| 956 #endif // VM_CONSTANTS_DBC_H_ | 957 #endif // VM_CONSTANTS_DBC_H_ |
| OLD | NEW |