| 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 RUNTIME_VM_CONSTANTS_DBC_H_ | 5 #ifndef RUNTIME_VM_CONSTANTS_DBC_H_ |
| 6 #define RUNTIME_VM_CONSTANTS_DBC_H_ | 6 #define RUNTIME_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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 // Clone context stored in TOS. | 528 // Clone context stored in TOS. |
| 529 // | 529 // |
| 530 // - MoveSpecial rA, D | 530 // - MoveSpecial rA, D |
| 531 // | 531 // |
| 532 // Copy special values from inside interpreter to FP[rA]. Currently only | 532 // Copy special values from inside interpreter to FP[rA]. Currently only |
| 533 // used to pass exception object (D = 0) and stack trace object (D = 1) to | 533 // used to pass exception object (D = 0) and stack trace object (D = 1) to |
| 534 // catch handler. | 534 // catch handler. |
| 535 // | 535 // |
| 536 // - InstantiateType D | 536 // - InstantiateType D |
| 537 // | 537 // |
| 538 // Instantiate type PP[D] with instantiator type arguments SP[0]. | 538 // Instantiate type PP[D] with instantiator type arguments SP[-1] and |
| 539 // function type arguments SP[0]. |
| 539 // | 540 // |
| 540 // - InstantiateTypeArgumentsTOS D | 541 // - InstantiateTypeArgumentsTOS D |
| 541 // | 542 // |
| 542 // Instantiate type arguments PP[D] with instantiator SP[0]. | 543 // Instantiate type arguments PP[D] with instantiator type arguments SP[-1] |
| 544 // and function type arguments SP[0]. |
| 543 // | 545 // |
| 544 // - InstanceOf | 546 // - InstanceOf |
| 545 // | 547 // |
| 546 // Test if instance SP[-3] with type arguments SP[-2] is a subtype of SP[-1] | 548 // Test if instance SP[-4] with instantiator type arguments SP[-3] and |
| 547 // using SubtypeTestCache SP[0], with result placed at top of stack. | 549 // function type arguments SP[-2] is a subtype of type SP[-1] using |
| 550 // SubtypeTestCache SP[0], with result placed at top of stack. |
| 548 // | 551 // |
| 549 // - AssertAssignable A, D | 552 // - AssertAssignable A, D |
| 550 // | 553 // |
| 551 // Assert that SP[-3] is assignable to variable named SP[0] of type | 554 // Assert that instance SP[-4] is assignable to variable named SP[0] of |
| 552 // SP[-1] with type arguments SP[-2] using SubtypeTestCache PP[D]. | 555 // type SP[-1] with instantiator type arguments SP[-3] and function type |
| 556 // arguments SP[-2] using SubtypeTestCache PP[D]. |
| 553 // If A is 1, then the instance may be a Smi. | 557 // If A is 1, then the instance may be a Smi. |
| 554 // | 558 // |
| 555 // - BadTypeError | 559 // - BadTypeError |
| 556 // | 560 // |
| 557 // If SP[-3] is non-null, throws a BadType error by calling into the runtime. | 561 // If SP[-4] is non-null, throws a BadType error by calling into the runtime. |
| 558 // Assumes that the stack is arranged the same as for AssertAssignable. | 562 // Assumes that the stack is arranged the same as for AssertAssignable. |
| 559 // | 563 // |
| 560 // - AssertBoolean A | 564 // - AssertBoolean A |
| 561 // | 565 // |
| 562 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0). | 566 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0). |
| 563 // | 567 // |
| 564 // - TestSmi rA, rD | 568 // - TestSmi rA, rD |
| 565 // | 569 // |
| 566 // If FP[rA] & FP[rD] != 0, then skip the next instruction. FP[rA] and FP[rD] | 570 // If FP[rA] & FP[rD] != 0, then skip the next instruction. FP[rA] and FP[rD] |
| 567 // must be Smis. | 571 // must be Smis. |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 | 987 |
| 984 // After a comparison, the condition NEXT_IS_TRUE means the following | 988 // After a comparison, the condition NEXT_IS_TRUE means the following |
| 985 // instruction is executed if the comparision is true and skipped over overwise. | 989 // instruction is executed if the comparision is true and skipped over overwise. |
| 986 // Conidition NEXT_IS_FALSE means the following instruction is executed if the | 990 // Conidition NEXT_IS_FALSE means the following instruction is executed if the |
| 987 // comparison is false and skipped over otherwise. | 991 // comparison is false and skipped over otherwise. |
| 988 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; | 992 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; |
| 989 | 993 |
| 990 } // namespace dart | 994 } // namespace dart |
| 991 | 995 |
| 992 #endif // RUNTIME_VM_CONSTANTS_DBC_H_ | 996 #endif // RUNTIME_VM_CONSTANTS_DBC_H_ |
| OLD | NEW |