krzema12 / kotlin-python

Python target for the Kotlin Programming Language. See https://github.com/krzema12/kotlin-python/tree/python-backend/python
https://discuss.kotlinlang.org/t/idea-python-backend/19852
48 stars 1 forks source link

Sync with kotlin 1 5 21 #7

Closed SerVB closed 3 years ago

SerVB commented 3 years ago

Well, the PR is quite big, but I've only made the last commit: I've fixed some compilation problems, picked changes from JS module, and updated some info. Maybe you even don't want to review it (but I advice checking the updated README at least). The diff is still small because this PR doesn't include my changes to the IR transformer, I will update those PRs later.

$ python3 diff.py
vvv ../../compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/compiler.kt vvv
-        val transformer = IrModuleToJsTransformer(
+        val transformer = IrModuleToPyTransformer(
-        val transformer = IrModuleToJsTransformer(
+        val transformer = IrModuleToPyTransformer(
-    val transformer = IrModuleToJsTransformer(context, null, true, nameTables)
+    val transformer = IrModuleToPyTransformer(context, null, true, nameTables)
vvv ../../compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/JsLoweringPhases.kt vvv
-    jsCodeOutliningPhase,
+//    jsCodeOutliningPhase,
-    varargLoweringPhase,
+//    varargLoweringPhase,
vvv ../../compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/lower/JsCodeOutliningLowering.kt vvv
+        TODO() /*
-        }
+        }*/
vvv ../../compiler/ir/backend.py/src/org/jetbrains/kotlin/ir/backend/py/utils/JsStaticContext.kt vvv
-    val intrinsics = JsIntrinsicTransformers(backendContext)
-    val classModels = mutableMapOf<IrClassSymbol, JsIrClassModel>()
+//    val intrinsics = JsIntrinsicTransformers(backendContext)
+//    val classModels = mutableMapOf<IrClassSymbol, JsIrClassModel>()
skipped: 289
found: 293
total: 305
krzema12 commented 3 years ago

Github says "This branch cannot be rebased due to conflicts". Could you take a look?

SerVB commented 3 years ago

Yeah, I guess it's because it contains a merge commit, so GH can't rebase it. Don't you mind if we just merge this PR? "Create a merge commit" button is available for me even in this PR.

By the way, sorry for early ping – let's wait until the CI finishes. I will add you to reviewers once again after that.

krzema12 commented 3 years ago

Sure, I didn't mean to dig to deep into this PR, all I wanted to check is the number of passing box tests - if we don't have any regression :)

SerVB commented 3 years ago

all I wanted to check is the number of passing box tests - if we don't have any regression

It's hard to say. The numbers of both passing and total tests are now bigger.

SerVB commented 3 years ago

image