Commit Graph

214 Commits

Author SHA1 Message Date
Alexander Udalov 9ae6feb2c5 Temporarily remove JvmPackageName and tests, but keep the implementation
This is needed because we want the compiler code to stay as much the
same in master and in 1.2 as possible
2017-09-13 23:23:36 +03:00
Alexander Udalov d07b628e0c Support JvmPackageName annotation in JVM back-end
This annotation is currently internal because we only commit to its
support for our own libraries. It will be used to change JVM package
names of declarations in JDK-specific stdlib additions (now called
kotlin-stdlib-jre7/8), both to preserve source compatibility of the old
Kotlin code and to solve the split package problem (KT-19258)
2017-09-13 22:59:03 +03:00
Alexey Andreev 834cd1d93d Fix testdata for new JS inliner 2017-09-04 15:33:07 +03:00
Mikhael Bogdanov 8af7a25f8e Update maxStack on synthetic instruction insertion
#KT-19723 Fixed
2017-08-17 20:02:29 +02:00
Mikhael Bogdanov 79ecc7fd5c Don't recognize nullable function types as inlinable
#KT-19679 Fixed
2017-08-17 14:24:00 +02:00
Mikhael Bogdanov 15f401a473 Copy annotation and attributes on class transformation during inline 2017-08-08 09:50:42 +02:00
Mikhael Bogdanov ff676c050f Properly generate inner classes when compiling source for inline
KT-19175: Compiler generates different bytecode when classes are compiled separately or together

 #KT-19175 Fixed
2017-07-26 20:31:14 +02:00
Alexander Udalov 2611c7de7e Restore anonymous classes for local delegate metadatas in inline functions
The problem is that now that the local delegated property metadata is in
the $$delegatedProperties array of the containing class, the access to
it from code calling an inline function with a local delegated property
is illegal.

Currently it seems to be a lot of work to support this rather rare case
properly (see the comment in ExpressionCodegen.getVariableMetadataValue)
so we postpone it and return the old behavior of using the anonymous
KProperty subclass for metadata
2017-07-14 15:13:12 +03:00
Mikhael Bogdanov 2808e45b89 Enable test in js, native 2017-07-05 11:15:38 +02:00
Mikhael Bogdanov 8121c1d3c4 Update test to support js-backend 2017-07-04 10:12:42 +02:00
Mikhael Bogdanov 8666b95dd2 Delete local variables on default mask expantion
#KT-18792 Fixed
2017-07-03 17:01:06 +02:00
Mikhael Bogdanov 01e2f8e32c Preventively allocate slots for additional default parameters
Otherwise they are corrupted by inline
2017-07-03 17:01:06 +02:00
Mikhael Bogdanov 49252f6eec Properly process primitive receiver on inlining bound callable references
#KT-18728 Fixed
2017-07-03 10:51:51 +02:00
Mikhael Bogdanov 4f914fafca Calculate default mask shift properly
#KT-18689 Fixed
2017-06-29 14:57:42 +02:00
Igor Chevdar d7e4350d42 Ignored/fixed some tests for Kotlin/Native 2017-06-28 12:54:32 +03:00
Alexey Andreev d3a5201ecc Intrinsify String?.plus in JS BE
See KT-8020
2017-06-20 10:40:21 +03:00
Mikhael Bogdanov 3f7bf8467a Process non-aload0 outer access in constructor during inline
#KT-17972 Fixed
2017-05-26 09:24:10 +02:00
Alexey Andreev 0e31c14a86 Implement inlining of default parameters in JS BE
Fix KT-17910
2017-05-25 14:38:53 +03:00
Mikhael Bogdanov 47fec6c9d5 Wrap captured local delegated property into Delegate
#KT-16864 Fixed
2017-05-19 09:53:19 +02:00
Mikhael Bogdanov 511c9f86b1 Add new test on receiver clash during default lambda inlining 2017-05-18 18:18:15 +02:00
Mikhael Bogdanov ec23df1d29 Extract callable reference tests to separate directory 2017-05-18 18:18:15 +02:00
Mikhael Bogdanov f4a388cf71 Add new tests for default lambda inlining 2017-05-18 18:18:14 +02:00
Mikhael Bogdanov d9dc2bd443 Minor. Fix review remarks 2017-05-17 10:20:04 +02:00
Mikhael Bogdanov fd561c6cb9 Support default bound callable reference inlining
#KT-6884 Fixed
2017-05-17 10:20:03 +02:00
Mikhael Bogdanov 05d2aa700b Support default property reference inlining 2017-05-17 10:19:55 +02:00
Mikhael Bogdanov a96fada230 Switch tests for default lambda inlining on language level 1.2 2017-05-17 10:19:55 +02:00
Mikhael Bogdanov 0ac23c789e Add diagnostics for default lambda inlining 2017-05-17 10:19:54 +02:00
Mikhael Bogdanov 6730fa2bbf Support default inline lambda reification 2017-05-17 10:19:51 +02:00
Mikhael Bogdanov 309051bd21 Obtain reification marker on default lambda extraction.
Add reification tests.
2017-05-17 10:19:44 +02:00
Mikhael Bogdanov 3e50203283 Add source mapping tests for default lambda inlining 2017-05-17 10:19:42 +02:00
Mikhael Bogdanov 97bcf9f538 Add default lambda inlining prototype 2017-05-11 11:06:47 +02:00
Mikhael Bogdanov 84eeed51b1 Restore accidentally removed parameter index passing to call generator
Parameter index was removed in
 7690a8bc3e commit:
 "Get rid of redundant 'afterParameterPut' method from call generators"

  #KT-17653 Fixed
2017-05-03 12:56:15 +02:00
Mikhael Bogdanov a7c9e14805 Don't generate default arguments for inline call 2017-04-28 12:19:09 +02:00
Mikhael Bogdanov 02cc5f6bc1 Expand default parameters conditions on inlining default function
#KT-14564 Fixed
 #KT-10848 Fixed
 #KT-12497 Fixed
2017-04-28 12:19:07 +02:00
Dmitry Petrov a39a0abb2a Traverse store-load chains for POP instructions
POP instructions can be only live usages for functional parameters,
e.g., when corresponding invoke is in dead code (KT-17591).
2017-04-26 12:42:45 +03:00
Dmitry Petrov 996a08a3f7 Add tests with loop in store-load chains on noinline function parameters 2017-04-26 12:42:33 +03:00
Zalim Bashorov c021af0fef KJS: fix non-local return inside catch block 2017-04-19 20:20:21 +03:00
Mikhael Bogdanov 23698f93e0 Fix reification for crossinline lambdas inlined into object literal
Inline lambda could capture reified parameter of containing inline function ('a' function)
when it is inlined in another one.
If it's inlined in any anonymous object we should track it and
add reification marker to such anonymous object instance creation
to rewrite it on inlining bytecode of 'a' function.

  #KT-15997 Fixed
2017-03-14 15:54:13 +01:00
Ilya Matveev 8a3fa2e4e5 Fix expected SMAPs after test muting for native 2017-03-10 19:59:37 +03:00
Ilya Matveev a5e4e0284e Mute some box tests for native backend
This patch mutes the following test categories:
   * Tests with java dependencies (System class,
     java stdlib, jvm-oriented annotations etc).
   * Coroutines tests.
   * Reflection tests.
   * Tests with an inheritance from the standard
     collections.
2017-03-10 19:59:37 +03:00
Mikhael Bogdanov 4d47c0fd63 Partial fix for KT-16193: Incremental compilation generates invalid bytecode for crossinlined functions; avoid IllegalAccessError 2017-03-01 14:45:11 +01:00
Mikhael Bogdanov a8625b632d Fix for KT-16411, KT-16412: Exception from compiler when try call SAM constructor where argument is callable reference to nested class inside object
#Fixed KT-16411
  #Fixed KT-16412
2017-02-21 11:40:25 +01:00
Denis Zharkov e16b0524b6 Fix inline codegen on local functions inside inlined lambda
The problem was that anonymous classes wasn't regenerated
although they capture another anonymous class that is a subject
for regeneration

 #KT-8689 Fixed
2017-02-17 13:48:19 +03:00
Alexey Andreev d35ddc1017 JS: unmute tests that now pass 2017-01-24 20:09:32 +03:00
Alexey Andreev 7a0f75f164 JS: refactor generation of callable references to functions 2017-01-24 20:09:29 +03:00
Anton Bannykh 07bb7ef4d3 JS: extension lambdas translated same as local lambdas (KT-13312 fixed) 2017-01-23 20:09:36 +03:00
Alexey Andreev 7d170c0fcd JS: fix translation of reassignment of inline properties. See KT-15590 2017-01-12 18:12:38 +03:00
Mikhael Bogdanov 5071baf970 Support increment and '*=' operations on inline properties 2017-01-10 14:09:42 +01:00
Mikhael Bogdanov dc4cdbf82d Fix for KT-14162: Support @InlineOnly on inline properties
#KT-14162 Fixed
2017-01-10 14:09:41 +01:00
Mikhael Bogdanov 2566a7a25e Rename receiver$0 in CallableReference to receiver
#KT-15449 Fixed
2016-12-29 16:57:02 +01:00