Alexander Udalov
a269e9bc00
JVM IR: fix typo in condition in KCallableNamePropertyLowering
...
This however makes testLocalFunctionName fail because currently
isSubclassOf (incorrectly) returns false and therefore an anonymous
class is generated and the name is taken from there. The name there is
"box$OK" which is incorrect. The isSubclassOf issue is KT-28198 and will
be fixed separately; the incorrect name issue will be investigated later
2019-03-12 18:49:41 +01:00
Steven Schäfer
9ea39d2b7c
Fix return types for while loops.
2019-03-12 09:33:00 +01:00
Steven Schäfer
4c8425caeb
Run ExpectDeclarationsRemoving in the JVM_IR backend.
2019-03-12 09:29:00 +01:00
Alexander Udalov
dd0b087b92
Add StackValue.put(InstructionAdapter) for convenience
2019-03-11 18:36:09 +01:00
Steven Schäfer
eec25dbea2
Avoid true condition generation for do while loop, since it confuses the Java verifier.
...
Change-Id: I96eca6623a91a8365090768f42c6e865b612e1cc
2019-03-06 16:04:23 +01:00
Ting-Yuan Huang
c1d721a15f
when: emit lookupswitch/tableswitch if possible
...
A lookupswitch or tableswitch can be used if all conditions are equality
checks to constants. To be more specific, it can be done if:
1. All conditions are CALL 'EQEQ(Any?, Any?)': Boolean
2. All types of variables involved in comparison are in the same group
of Char/Byte/Short/Int, String or enum.
3. All arg0 refer to the same value.
4. All arg1 are IrConst<*>.
Change-Id: Ifd7cb618395f6c5cc64601018b446f0bb7f5891c
2019-03-06 13:33:55 +01:00
Igor Chevdar
2c7b05a67b
Wrapped descriptors: supported complex annotations
2019-03-06 13:25:06 +03:00
Alexander Udalov
e3779b1883
Minor, relax parameter type of AsmUtil.putJavaLangClassInstance
2019-03-05 17:58:10 +01:00
Alexander Udalov
9d94a54f03
Simplify ExternalDependenciesGenerator
...
Remove unused parameters, inline inner class
2019-03-05 16:28:34 +01:00
Alexander Udalov
4b712bd14b
Remove dependency of backend-common on descriptors.jvm
2019-03-05 16:28:34 +01:00
Alexander Udalov
d7fd4987ae
Remove dependency of ir.tree on frontend.java
2019-03-05 16:28:34 +01:00
Alexander Udalov
45e8d2e1df
Do not use JVM-specific code for SAM conversions in psi2ir
...
Extract all JVM-specific code into GeneratorExtensions.SamConversion.
This is needed in order to remove dependency of ir.tree on frontend.java
2019-03-05 16:28:33 +01:00
Alexander Udalov
aaa2bad719
Do not use IR_EXTERNAL_JAVA_DECLARATION_STUB in DeclarationStubGenerator
...
This code is common across backends and it should not depend on
JVM-specific behavior. Introduce GeneratorExtensions to reverse the
dependency here
2019-03-05 16:28:33 +01:00
romanart
5d6f42e4e6
Fix rebase
2019-03-04 23:24:17 +03:00
Roman Artemev
3770d310f1
Deserialization code clean up
2019-03-04 23:24:17 +03:00
Roman Artemev
a19bdd0c18
[JS IR BE] Refactored klibs proto files
2019-03-04 23:24:16 +03:00
Roman Artemev
cae800b24e
[JS IR BE] Fix deserialization performance
2019-03-04 23:24:15 +03:00
Roman Artemev
079f2534c7
[JS IR BE] Support compilation and tests against klib
2019-03-04 23:24:15 +03:00
Roman Artemev
b99377fd69
[JS IR BE] Fix backend to be able compile test against klib
2019-03-04 23:24:15 +03:00
Roman Artemev
b0b6b359b1
[JS IR BE] Do not produce KotlinType creating IrType
2019-03-04 23:24:14 +03:00
Roman Artemev
6863f9e4f3
[JS IR BE] Make backend be able work with unbound symbols
...
* Fix array type deserialization
* Prepare to compilation against klibs
2019-03-04 23:24:14 +03:00
Roman Artemev
2334ea2742
[JS IR BE] Support IrDynamicExpression in proto and deserializer
2019-03-04 23:24:13 +03:00
Roman Artemev
44010cc6ef
[JS IR BE] Refactored compiler interface
2019-03-04 23:24:13 +03:00
Roman Artemev
67f0d49ea1
[JS IR BE] Fix rebase
2019-03-04 23:24:13 +03:00
Roman Artemev
b2cfef4902
[JS IR BE] Lazy initialize lowering properties
2019-03-04 23:24:12 +03:00
Roman Artemev
c95d99dbe0
[JS IR BE] Use symbol instead of declaration
2019-03-04 23:24:12 +03:00
Roman Artemev
862ccd05df
[JS IR BE] Merge native fixes into Ir Serializer
2019-03-04 23:24:12 +03:00
Roman Artemev
813fef6f26
[JS IR BE] Get rid of usages of KotlinType
2019-03-04 23:24:11 +03:00
Roman Artemev
d034ce106e
[JS IR BE] Implement isPrimitiveArray with pure Ir
2019-03-04 23:24:11 +03:00
Roman Artemev
3a444cd0f3
[JS IR BE] Move IrSerializer from native to JS
...
* Fix issues
2019-03-04 23:24:10 +03:00
Roman Artemev
5384f23f30
[JS IR BE] Extract metadata deserializer to keep binary compatibility
...
* add UniqId extension to metadata protobuf
2019-03-04 23:24:10 +03:00
Roman Artemev
3718edb6bc
[JS IR BE] Some preparation for IrSerialization
2019-03-04 23:24:09 +03:00
Svyatoslav Kuzmich
e11fda1c49
[JS IR BE] Skip external methods in js default arguments stub generators
2019-02-28 20:13:56 +03:00
Svyatoslav Kuzmich
8da076c1ed
[JS IR BE] Fix basic reflection for primitive types
2019-02-28 20:13:56 +03:00
Svyatoslav Kuzmich
a01407eec9
[JS IR BE] Don't mangle Any::equals method
2019-02-28 20:13:56 +03:00
Svyatoslav Kuzmich
27005d7c2e
[JS IR BE] Basic support for external varargs
2019-02-28 20:13:56 +03:00
Svyatoslav Kuzmich
0d9218b017
[JS IR BE] Refactor namer
2019-02-28 20:13:55 +03:00
Svyatoslav Kuzmich
e9cdad1143
[JS IR BE] Remove support for dynamic symbols and descriptors
...
Dynamic expressions in IR are now represented as IrDynamicOperatorExpression
We don't have dynamic functions, dynamic dispatch receivers anymore
2019-02-28 20:13:55 +03:00
Svyatoslav Kuzmich
d323dce2b6
[JS IR BE] Fix codegen for nested external objects
2019-02-28 20:13:55 +03:00
Georgy Bronnikov
5ff1337ec8
Add some phase checkers
2019-02-28 11:53:02 +03:00
Georgy Bronnikov
da13d3288e
Check pre- and postconditions on phases
2019-02-28 11:53:02 +03:00
Mark Punzalan
d4d5a6011c
Flatten nested string concatenation expressions into a single IrStringConcatenation, in a separate lowering phase.
...
Consolidating these into IrStringConcatenations allows the backend to produce efficient code for string concatenations (e.g., using StringBuilder for JVM).
2019-02-27 08:36:35 +01:00
Alexander Gorshenev
888641e7f1
Use file symbol instead of a file name string in IrReturnableBlockImpl
2019-02-26 13:54:04 +03:00
Svyatoslav Kuzmich
569187a751
[JS IR BE] Use Char boxing rules of current backend
2019-02-25 15:09:26 +03:00
Svyatoslav Kuzmich
de020ed58a
[JS IR BE] Generate and export JS properties
2019-02-25 15:09:26 +03:00
Svyatoslav Kuzmich
fc5636b7c1
[JS IR BE] Fix: Don't generate built-in "Function" interface
2019-02-25 15:09:26 +03:00
Svyatoslav Kuzmich
1184c158e4
[JS IR BE] Support @JsName in bridges
2019-02-25 15:09:26 +03:00
Svyatoslav Kuzmich
e09a6f0007
[JS IR BE] Fix codegen for external companion objects
2019-02-25 15:09:25 +03:00
Svyatoslav Kuzmich
c4ffe36a21
[JS IR BE] Add CharSequence type check
2019-02-25 15:09:25 +03:00
Svyatoslav Kuzmich
74c8f54fc8
[JS IR BE] Support cast to native interface
2019-02-25 15:09:25 +03:00