| 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // | 324 // |
| 325 // Try allocating an object with tags in PP[D] with no type arguments. | 325 // Try allocating an object with tags in PP[D] with no type arguments. |
| 326 // If allocation is successful, the result is stored in FP[rA], and | 326 // If allocation is successful, the result is stored in FP[rA], and |
| 327 // the next two instructions, which should be the (Allocate class; PopLocal) | 327 // the next two instructions, which should be the (Allocate class; PopLocal) |
| 328 // slow path are skipped | 328 // slow path are skipped |
| 329 // | 329 // |
| 330 // - AllocateT | 330 // - AllocateT |
| 331 // | 331 // |
| 332 // Allocate object of class SP[0] with type arguments SP[-1]. | 332 // Allocate object of class SP[0] with type arguments SP[-1]. |
| 333 // | 333 // |
| 334 // - AllocateTOpt rA, D |
| 335 // |
| 336 // Similar to AllocateOpt with the difference that the offset of the |
| 337 // type arguments in the resulting object is taken from the D field of the |
| 338 // following Nop instruction, and on success 4 instructions are skipped and |
| 339 // the object at the top of the stack is popped. |
| 340 // |
| 334 // - StoreIndexedTOS | 341 // - StoreIndexedTOS |
| 335 // | 342 // |
| 336 // Store SP[0] into array SP[-2] at index SP[-1]. No typechecking is done. | 343 // Store SP[0] into array SP[-2] at index SP[-1]. No typechecking is done. |
| 337 // SP[-2] is assumed to be a RawArray, SP[-1] to be a smi. | 344 // SP[-2] is assumed to be a RawArray, SP[-1] to be a smi. |
| 338 // | 345 // |
| 339 // - StoreIndexed rA, rB, rC | 346 // - StoreIndexed rA, rB, rC |
| 340 // | 347 // |
| 341 // Store FP[rC] into array FP[rA] at index FP[rB]. No typechecking is done. | 348 // Store FP[rC] into array FP[rA] at index FP[rB]. No typechecking is done. |
| 342 // FP[rA] is assumed to be a RawArray, FP[rB] to be a smi. | 349 // FP[rA] is assumed to be a RawArray, FP[rB] to be a smi. |
| 343 // | 350 // |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 // | 464 // |
| 458 // - SetFrame A | 465 // - SetFrame A |
| 459 // | 466 // |
| 460 // Reinitialize SP assuming that current frame has size A. | 467 // Reinitialize SP assuming that current frame has size A. |
| 461 // Used to drop temporaries from the stack in the exception handler. | 468 // Used to drop temporaries from the stack in the exception handler. |
| 462 // | 469 // |
| 463 // - AllocateContext D | 470 // - AllocateContext D |
| 464 // | 471 // |
| 465 // Allocate Context object assuming for D context variables. | 472 // Allocate Context object assuming for D context variables. |
| 466 // | 473 // |
| 474 // - AllocateUninitializedContext rA, D |
| 475 // |
| 476 // Allocates an uninitialized context for D variables, and places the result |
| 477 // in FP[rA]. On success, skips the next 2 instructions, which should be the |
| 478 // slow path (AllocateContext D; PopLocal rA). |
| 479 // |
| 467 // - CloneContext | 480 // - CloneContext |
| 468 // | 481 // |
| 469 // Clone context stored in TOS. | 482 // Clone context stored in TOS. |
| 470 // | 483 // |
| 471 // - MoveSpecial rA, D | 484 // - MoveSpecial rA, D |
| 472 // | 485 // |
| 473 // Copy special values from inside interpreter to FP[rA]. Currently only | 486 // Copy special values from inside interpreter to FP[rA]. Currently only |
| 474 // used to pass exception object (D = 0) and stack trace object (D = 1) to | 487 // used to pass exception object (D = 0) and stack trace object (D = 1) to |
| 475 // catch handler. | 488 // catch handler. |
| 476 // | 489 // |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 V(IfDGt, A_D, reg, reg, ___) \ | 708 V(IfDGt, A_D, reg, reg, ___) \ |
| 696 V(IfNeStrictNum, A_D, reg, reg, ___) \ | 709 V(IfNeStrictNum, A_D, reg, reg, ___) \ |
| 697 V(IfEqStrictNum, A_D, reg, reg, ___) \ | 710 V(IfEqStrictNum, A_D, reg, reg, ___) \ |
| 698 V(IfEqNull, A, reg, ___, ___) \ | 711 V(IfEqNull, A, reg, ___, ___) \ |
| 699 V(IfNeNull, A, reg, ___, ___) \ | 712 V(IfNeNull, A, reg, ___, ___) \ |
| 700 V(CreateArrayTOS, 0, ___, ___, ___) \ | 713 V(CreateArrayTOS, 0, ___, ___, ___) \ |
| 701 V(CreateArrayOpt, A_B_C, reg, reg, ___) \ | 714 V(CreateArrayOpt, A_B_C, reg, reg, ___) \ |
| 702 V(Allocate, D, lit, ___, ___) \ | 715 V(Allocate, D, lit, ___, ___) \ |
| 703 V(AllocateT, 0, ___, ___, ___) \ | 716 V(AllocateT, 0, ___, ___, ___) \ |
| 704 V(AllocateOpt, A_D, reg, lit, ___) \ | 717 V(AllocateOpt, A_D, reg, lit, ___) \ |
| 718 V(AllocateTOpt, A_D, reg, lit, ___) \ |
| 705 V(StoreIndexedTOS, 0, ___, ___, ___) \ | 719 V(StoreIndexedTOS, 0, ___, ___, ___) \ |
| 706 V(StoreIndexed, A_B_C, reg, reg, reg) \ | 720 V(StoreIndexed, A_B_C, reg, reg, reg) \ |
| 707 V(StoreIndexedUint8, A_B_C, reg, reg, reg) \ | 721 V(StoreIndexedUint8, A_B_C, reg, reg, reg) \ |
| 708 V(StoreIndexedExternalUint8, A_B_C, reg, reg, reg) \ | 722 V(StoreIndexedExternalUint8, A_B_C, reg, reg, reg) \ |
| 709 V(StoreIndexedOneByteString, A_B_C, reg, reg, reg) \ | 723 V(StoreIndexedOneByteString, A_B_C, reg, reg, reg) \ |
| 710 V(StoreIndexedUint32, A_B_C, reg, reg, reg) \ | 724 V(StoreIndexedUint32, A_B_C, reg, reg, reg) \ |
| 711 V(StoreIndexedFloat64, A_B_C, reg, reg, reg) \ | 725 V(StoreIndexedFloat64, A_B_C, reg, reg, reg) \ |
| 712 V(StoreIndexed8Float64, A_B_C, reg, reg, reg) \ | 726 V(StoreIndexed8Float64, A_B_C, reg, reg, reg) \ |
| 713 V(LoadIndexed, A_B_C, reg, reg, reg) \ | 727 V(LoadIndexed, A_B_C, reg, reg, reg) \ |
| 714 V(LoadIndexedUint8, A_B_C, reg, reg, reg) \ | 728 V(LoadIndexedUint8, A_B_C, reg, reg, reg) \ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 728 V(LoadFieldTOS, D, num, ___, ___) \ | 742 V(LoadFieldTOS, D, num, ___, ___) \ |
| 729 V(BooleanNegateTOS, 0, ___, ___, ___) \ | 743 V(BooleanNegateTOS, 0, ___, ___, ___) \ |
| 730 V(BooleanNegate, A_D, reg, reg, ___) \ | 744 V(BooleanNegate, A_D, reg, reg, ___) \ |
| 731 V(Throw, A, num, ___, ___) \ | 745 V(Throw, A, num, ___, ___) \ |
| 732 V(Entry, A_B_C, num, num, num) \ | 746 V(Entry, A_B_C, num, num, num) \ |
| 733 V(EntryOptional, A_B_C, num, num, num) \ | 747 V(EntryOptional, A_B_C, num, num, num) \ |
| 734 V(EntryOptimized, A_D, num, num, ___) \ | 748 V(EntryOptimized, A_D, num, num, ___) \ |
| 735 V(Frame, D, num, ___, ___) \ | 749 V(Frame, D, num, ___, ___) \ |
| 736 V(SetFrame, A, num, ___, num) \ | 750 V(SetFrame, A, num, ___, num) \ |
| 737 V(AllocateContext, D, num, ___, ___) \ | 751 V(AllocateContext, D, num, ___, ___) \ |
| 752 V(AllocateUninitializedContext, A_D, reg, num, ___) \ |
| 738 V(CloneContext, 0, ___, ___, ___) \ | 753 V(CloneContext, 0, ___, ___, ___) \ |
| 739 V(MoveSpecial, A_D, reg, num, ___) \ | 754 V(MoveSpecial, A_D, reg, num, ___) \ |
| 740 V(InstantiateType, D, lit, ___, ___) \ | 755 V(InstantiateType, D, lit, ___, ___) \ |
| 741 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \ | 756 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \ |
| 742 V(InstanceOf, A, num, ___, ___) \ | 757 V(InstanceOf, A, num, ___, ___) \ |
| 743 V(AssertAssignable, D, num, lit, ___) \ | 758 V(AssertAssignable, D, num, lit, ___) \ |
| 744 V(AssertBoolean, A, num, ___, ___) \ | 759 V(AssertBoolean, A, num, ___, ___) \ |
| 745 V(TestSmi, A_D, reg, reg, ___) \ | 760 V(TestSmi, A_D, reg, reg, ___) \ |
| 746 V(TestCids, A_D, reg, num, ___) \ | 761 V(TestCids, A_D, reg, num, ___) \ |
| 747 V(CheckSmi, A, reg, ___, ___) \ | 762 V(CheckSmi, A, reg, ___, ___) \ |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 | 905 |
| 891 // After a comparison, the condition NEXT_IS_TRUE means the following | 906 // After a comparison, the condition NEXT_IS_TRUE means the following |
| 892 // instruction is executed if the comparision is true and skipped over overwise. | 907 // instruction is executed if the comparision is true and skipped over overwise. |
| 893 // Conidition NEXT_IS_FALSE means the following instruction is executed if the | 908 // Conidition NEXT_IS_FALSE means the following instruction is executed if the |
| 894 // comparison is false and skipped over otherwise. | 909 // comparison is false and skipped over otherwise. |
| 895 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; | 910 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; |
| 896 | 911 |
| 897 } // namespace dart | 912 } // namespace dart |
| 898 | 913 |
| 899 #endif // VM_CONSTANTS_DBC_H_ | 914 #endif // VM_CONSTANTS_DBC_H_ |
| OLD | NEW |