* Checks whether this exports info is equally used. * @param {RuntimeSpec} runtimeA first runtime * @param {RuntimeSpec} runtimeB second runtime * @returns {boolean} true, when equally used
(runtimeA, runtimeB)
| 749 | * @returns {boolean} true, when equally used |
| 750 | */ |
| 751 | isEquallyUsed(runtimeA, runtimeB) { |
| 752 | if (this._redirectTo !== undefined) { |
| 753 | if (!this._redirectTo.isEquallyUsed(runtimeA, runtimeB)) return false; |
| 754 | } else if ( |
| 755 | this._otherExportsInfo.getUsed(runtimeA) !== |
| 756 | this._otherExportsInfo.getUsed(runtimeB) |
| 757 | ) { |
| 758 | return false; |
| 759 | } |
| 760 | if ( |
| 761 | this._sideEffectsOnlyInfo.getUsed(runtimeA) !== |
| 762 | this._sideEffectsOnlyInfo.getUsed(runtimeB) |
| 763 | ) { |
| 764 | return false; |
| 765 | } |
| 766 | for (const exportInfo of this.ownedExports) { |
| 767 | if (exportInfo.getUsed(runtimeA) !== exportInfo.getUsed(runtimeB)) { |
| 768 | return false; |
| 769 | } |
| 770 | } |
| 771 | return true; |
| 772 | } |
| 773 | |
| 774 | /** |
| 775 | * Returns usage status. |