Jake Wharton
aaf533df16
IR lowering for computing trimIndent/trimMargin on constants
2019-05-14 20:19:43 +02:00
Svyatoslav Kuzmich
28406b6bc4
[JS IR BE] Enable unconditional validation
2019-05-14 16:23:43 +03:00
Svyatoslav Kuzmich
b07690fccf
Phaser: Implement dumper and verifier as general actions
2019-05-14 16:23:43 +03:00
Svyatoslav Kuzmich
0702b88bf3
[IR BE] Update parents in ArrayConstructorLowering
2019-05-14 16:23:42 +03:00
Mads Ager
b1e8a7cfce
JVM: Generate LVT entry for this in @JvmOverload methods.
...
This change also makes sure that no line numbers are generated
in the wrappers in the JVM_IR backend.
Change-Id: If6c37f8a20894455abddb526039df059e02015a3
2019-05-14 15:14:07 +02:00
Martin Petrov
ccf2941f4a
Use spaces instead of tabs to indent -Xlist-phases.
...
In Terminal.app and xterm the output columns get misaligned when using tabs.
Tabbed output only renders correctly when `tabstop=1`.
2019-05-14 15:54:01 +03:00
Svyatoslav Kuzmich
91d16ee947
[CLI] Extract :compiler:cli-js from :compiler:cli
2019-05-14 15:49:50 +03:00
pyos
40696f65c3
JVM_IR: generate WhenMappings for enum ordinal subjects
2019-05-13 19:09:07 +03:00
pyos
fb194e982e
Copy EnumWhenLowering from Kotlin/Native
2019-05-13 19:09:07 +03:00
Steven Schäfer
1e08b3c7da
Simplify findLocalIndex in ExpressionCodegen
2019-05-13 18:34:00 +03:00
Steven Schäfer
b04dc69157
Access this through the dispatch parameter when available
2019-05-13 18:34:00 +03:00
Steven Schäfer
9b9236efcb
Fix parameter indices in SyntheticAccessorLowering
2019-05-13 18:34:00 +03:00
Roman Artemev
db5396c1c2
[JS IR BE] Fix main function detector
...
- Do not consider extension functions as main candidate
2019-05-13 15:26:09 +03:00
Svyatoslav Kuzmich
bd3953c09f
[JS IR BE] Turn on strict mode in generated code.
...
Fix multiple import of the same javascript module.
2019-05-13 13:41:11 +03:00
Svyatoslav Kuzmich
0f90aa5f80
[JS IR BE] BridgeConstruction: Fix init order of receivers and type parameters
2019-05-13 13:40:30 +03:00
Mads Ager
e8fbd42f7c
JVM_IR: Support access flag jvm annotations on fields and methods.
2019-05-13 08:34:52 +02:00
Jiaxiang Chen
0020e953e1
Change order of line number geneartion for function call, and also force
...
line number generation after visiting inline functions.
2019-05-11 13:38:24 +02:00
Steven Schäfer
570ee38256
Implement special cases for the hashCode intrinsic in JVM_IR
2019-05-10 09:40:57 +02:00
Ting-Yuan Huang
1c3b895fc0
Generate accessors for super calls if necessary
...
Current implementation of calls with super qualifier relies on
invokespecial, which has some more constraints than regular virtual
invocations. When those constraints aren't met, accessors are needed.
2019-05-10 08:57:37 +02:00
pyos
3171129c3c
JS_IR: remove traces of @kotlin.native.internal.InlineConstructor
...
This is a hack used by Kotlin/Native purely to implement Array
constructors. Since there's a lowering that does that, and inline
constructors are not part of the language (although they theoretically
could be), the code is redundant.
(cherry picked from commit a74fae246b )
2019-05-09 11:54:35 +02:00
pyos
08da078842
JVM_IR: implement IrReturnableBlock codegen
...
(cherry picked from commit 530ad368fe )
2019-05-09 11:54:26 +02:00
pyos
683f8417d3
Add a common JVM/JS lowering for Array(size, function)
...
and remove the hack from JVM_IR codegen that replaces this call with
hardcoded inline function bytecode.
(cherry picked from commit 4a29e3cfcf )
2019-05-09 11:54:18 +02:00
max-kammerer
e74e0ea013
Revert "Add a common JVM/JS lowering for Array(size, function)"
...
This reverts commit 4a29e3cfcf .
2019-05-09 11:49:34 +02:00
max-kammerer
856a1649c6
Revert "JVM_IR: implement IrReturnableBlock codegen"
...
This reverts commit 530ad368fe .
2019-05-09 11:49:34 +02:00
max-kammerer
05d352769b
Revert "JS_IR: remove traces of @kotlin.native.internal.InlineConstructor"
...
This reverts commit a74fae246b .
2019-05-09 11:49:34 +02:00
pyos
a74fae246b
JS_IR: remove traces of @kotlin.native.internal.InlineConstructor
...
This is a hack used by Kotlin/Native purely to implement Array
constructors. Since there's a lowering that does that, and inline
constructors are not part of the language (although they theoretically
could be), the code is redundant.
2019-05-09 08:03:18 +02:00
pyos
530ad368fe
JVM_IR: implement IrReturnableBlock codegen
2019-05-09 08:03:18 +02:00
pyos
4a29e3cfcf
Add a common JVM/JS lowering for Array(size, function)
...
and remove the hack from JVM_IR codegen that replaces this call with
hardcoded inline function bytecode.
2019-05-09 08:03:18 +02:00
Svyatoslav Kuzmich
f4bb1354c9
[JS IR BE] Support friend modules
2019-05-08 23:34:00 +03:00
Svyatoslav Kuzmich
e3bcabeae3
[JS IR] stdlib: Fix bugs in Long.toString(radix)
2019-05-07 21:49:12 +03:00
Svyatoslav Kuzmich
331625a9bb
[JS IR BE] Lower kotlin.js.Json external interface methods
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
d6c9375196
[JS IR BE] Preserve package fqName when moving external declarations out
...
Create separate package fragment for each fqName of external declaration package
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
2741ecaaad
[JS IR BE] Materialize Unit object during upcasts in AutoBoxingTransformer
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
58bed0f932
[JS IR BE] Fix types of in secondary ctor lowering
...
Type of IrDelegatingConstructorCall is 'kotlin.Unit'
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
d6761d323c
[JS IR BE] Fix return targets inside state machine
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
feeb6e9862
[JS IR BE] Fix type for lowered cast expression
...
Safe cast result type is different from its type operand.
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
fc0a0f41d2
[JS IR BE] Fix: patch parents problems
...
* Patch parents for state machine builder
* Patch parents for declarations inside default value of actual parameter
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
130d2d00c3
[JS IR BE] Fix unboxing empty inline class varargs
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
0aae760469
[JS IR BE] Fix block decomposition lowering for dynamic expressions
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
17178628fb
[JS IR BE] Support bridges for special methods
...
Mostly reused from JVM IR lowering.
Shared logic moved to common backend module.
2019-05-06 19:34:25 +03:00
pyos
90f11211d3
JVM_IR: wrap performInline in enterIntoInlining/exitFromInliningOf
2019-05-06 16:23:28 +02:00
Georgy Bronnikov
bfe148efd5
IR: mostly remove descriptors from codegen
2019-05-01 20:08:20 +03:00
Georgy Bronnikov
9923d956aa
JVM_IR: rework IrIntrinsicMethods
2019-05-01 20:08:20 +03:00
Georgy Bronnikov
98d309d03b
IR: declaration builders for receiver parameters
2019-05-01 20:08:20 +03:00
Georgy Bronnikov
ad70a68671
JVM_IR: correct some type parameter bugs
2019-05-01 20:08:20 +03:00
Georgy Bronnikov
3e6171aefc
JVM_IR: redirect super calls to DefaultImpls where necessary
2019-05-01 11:47:44 +03:00
Alexander Udalov
e22594acde
JVM IR: slightly change field renaming convention implementation
...
Prefer to rename fields from the class, not from the companion, to be
more in line with the old backend's behavior. This has no effect on the
behavior of current tests but removes differences in metadata (since
metadata has information about every property->field mapping) in some of
them
2019-04-30 13:15:29 +02:00
Alexander Udalov
6cc293a0c5
JVM IR: record FIELD_FOR_PROPERTY for property delegates
...
Delegated properties now have their $delegate fields recorded in the
metadata (in `ClassCodegen.generateField`). This part of metadata is
used by `KPropertyN.getDelegate` functions, so almost all tests on
getDelegate are now unmuted
2019-04-30 13:15:29 +02:00
pyos
c77e8a8c2d
JVM_IR: remove another redundant lowering
2019-04-30 08:20:37 +02:00
Jiaxiang Chen
4b99d85322
Optimize JVM byte code generation for conditional conjunction
...
Implement an intrinsic method for boolean.and operation, and replace
ANDAND condition with a call to such intrinsic method.
2019-04-29 13:28:18 +02:00