[JS IR BE] Implement type check

* IrTypeOperator lowering
 * runtime support
 * refactoring
This commit is contained in:
Roman Artemev
2018-05-31 15:35:08 +03:00
parent 50eda3b8a0
commit 17d71f1e46
22 changed files with 673 additions and 89 deletions
@@ -142,7 +142,7 @@ class DataClassMembersGenerator(declarationGenerator: DeclarationGenerator) : De
buildMember(function, declaration) {
+irIfThenReturnTrue(irEqeqeq(irThis(), irOther()))
+irIfThenReturnFalse(irNotIs(irOther(), classDescriptor.defaultType, irClass.symbol))
val otherWithCast = irTemporary(irAs(irOther(), classDescriptor.defaultType, irClass.symbol), "other_with_cast")
val otherWithCast = irTemporary(irImplicitCast(irOther(), classDescriptor.defaultType, irClass.symbol), "other_with_cast")
for (property in properties) {
val arg1 = irGet(irThis(), getPropertyGetterSymbol(property))
val arg2 = irGet(irGet(otherWithCast.symbol), getPropertyGetterSymbol(property))