Commit Graph

37396 Commits

Author SHA1 Message Date
Tianyu Geng d3e8cc577c FIR checker: fix local type approximation on delegated property
Previously types of delegated property is not approximated, which can
cause local types to leak through public APIs.
2021-09-16 22:38:08 +03:00
Tianyu Geng 76e192fc8a FIR Checker: check AMBIGUOUS_ANONYMOUS_TYPE_INFERRED
Also change
org.jetbrains.kotlin.fir.types.TypeUtilsKt#hideLocalTypeIfNeeded to skip
approximating anonymous objects if there are multiple super type refs so
that resolution behaves the same (for uncompilable code).

Note that this change does not implement check for
ApproximateAnonymousReturnTypesInPrivateInlineFunctions as the check is
already turned on in 1.5 and will likely not needed when FIR becomes
stable.
2021-09-16 22:38:06 +03:00
Igor Laevsky 6432388778 [WASM] Don't handle ref.cast of nulls. Spec was updated a while ago 2021-09-16 20:24:45 +03:00
Igor Laevsky 15668e2266 [WASM] Lower Unit to Void in order to mark statements with no result 2021-09-16 20:24:44 +03:00
Igor Laevsky 9685695769 [WASM] Fold redundant patterns with drop instruction on a wasm level 2021-09-16 20:24:43 +03:00
Alexander Likhachev 612b96bd54 [Daemon] Introduce the way to get Kotlin daemon compiler version
#KT-48294 In Progress
2021-09-16 13:25:18 +00:00
Svyatoslav Kuzmich 0abc798da9 [Wasm] Add JS interop tests 2021-09-16 14:20:35 +03:00
Svyatoslav Kuzmich a32b86d016 [Wasm] Simple support for external classes and interfaces
* Map these types to Wasm externref
* Don't generate any declaration code for now

Casting and accessing members is not supported yet
2021-09-16 14:20:35 +03:00
Svyatoslav Kuzmich 35a5c9ea71 [Wasm] Support exporting functions via @kotlin.js.JsExport
Previously we exported main function only.
Extend this feature to arbitrary number of annotated functions.
Type restrictions and conversions are similar to imported functions.
2021-09-16 14:20:35 +03:00
Svyatoslav Kuzmich c0d48e3417 [Wasm] Support external functions 2021-09-16 14:14:58 +03:00
Svyatoslav Kuzmich 7e399202a2 [Wasm] Support generating browser-compatible JS harness
* Use fetch and instantiateStreaming
* Call main export if it is present
* Produce a variable with module name that contains a
  promise of module exports
2021-09-16 14:14:58 +03:00
Igor Chevdar e194a07358 [tests] Added some tests 2021-09-16 10:54:14 +00:00
Andrey Uskov 8f963bed7c Optimized performance of recordPackageLookup
#KT-47909 Fixed
2021-09-16 12:07:55 +03:00
Elena Lepilkina 45493b6542 [IR] Support simple cases of inlining fake override getters/setters 2021-09-16 07:55:15 +00:00
Ilmir Usmanov 9e4f234941 Minor. Add space after when
Co-authored-by: Louis CAD <louis.cognault@gmail.com>
2021-09-15 22:28:32 +02:00
Ilmir Usmanov 755b92b0e9 Document coroutines codegen. Remove mentions of experimental coroutines 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 4d1545d522 More minor changes 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 6a150fffe6 Minor spelling changes 2021-09-15 22:28:32 +02:00
Ilmir Usmanov de3ffc4a89 Remove obsolete FIXME 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 0372d9050a Clarify tail-call optimization for functions returning Unit
Review fixes.
2021-09-15 22:28:32 +02:00
Ilmir Usmanov 1cdae75dc3 Document coroutines codegen: debug 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 995062cb19 Document coroutines codegen: callable references
returning inline classes
2021-09-15 22:28:32 +02:00
Ilmir Usmanov fce06305b9 Document coroutines codegen: inliner part 3: returning inline classes
Update the information, mention, that there are two markers, not just
one
2021-09-15 22:28:32 +02:00
Ilmir Usmanov 7d41451fba Document coroutines codegen: inliner part 3: minor grammar fixes 2021-09-15 22:28:32 +02:00
Ilmir Usmanov a736d4fef1 Document coroutines codegen: callable references 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 3276ef6cf8 Document coroutines codegen: Returning Inline Classes 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 25af290266 Document coroutines codegen: inliner part 3: crossroutines 2021-09-15 22:28:32 +02:00
Ilmir Usmanov ddaab2c2bb Document coroutines codegen: inliner part 2 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 771b0c006f Document coroutines codegen: inliner part 1 2021-09-15 22:28:32 +02:00
Ilmir Usmanov e2c5f9d245 Document coroutines codegen: functions 2021-09-15 22:28:32 +02:00
Ilmir Usmanov a8aac955d9 Document coroutines codegen: split long lines 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 7263b6e5d6 Document coroutines codegen: rest of suspend lambda 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 0814c5cc93 Document coroutines codegen: superclasses 2021-09-15 22:28:32 +02:00
Ilmir Usmanov bfd0291572 Document coroutines codegen: interception 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 8b604b8ce1 Document coroutines codegen: intrinsics part 2 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 611c1b1a38 Document coroutines codegen: intrinsics 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 0943a31675 Document coroutines codegen: spilling 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 57e69202e8 Document coroutines codegen: resume with exception 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 7e047ac96f Document coroutines codegen: resume with result 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 355b36ead9 Document coroutines codegen: suspend function views 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 48fb31080e Document coroutines codegen: CPS 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 307e01e6b6 Document coroutines codegen: suspend markers: JS & Native 2021-09-15 22:28:32 +02:00
Ilmir Usmanov f7cf5f435f Document coroutines codegen: suspend markers 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 1d7a661624 Document coroutines codegen: state-machine 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 5fd08b3ee5 Document coroutines codegen: simple lambda example 2021-09-15 22:28:32 +02:00
Ilmir Usmanov 25edda02f4 Document coroutines codegen: introduction 2021-09-15 22:28:32 +02:00
Roman Golyshev 642591770e [FIR] Calculate lazy initializers in properties with backing fields
More tests should be added in the future
2021-09-15 18:33:43 +00:00
Roman Golyshev bb2b0107c6 [FIR] Render backing fields by FirRenderer 2021-09-15 18:33:43 +00:00
pyos 36b02082a6 FIR: try to load as Java class if KotlinClassFinder returns null
The IDE implementation of KotlinClassFinder does not always return the
class file contents.
2021-09-15 19:15:17 +03:00
Mikhail Glukhikh b5e37cb201 Unmute now passing FIR visualizer test #KT-44811 Fixed 2021-09-15 17:11:56 +03:00