Commit Graph

2406 Commits

Author SHA1 Message Date
Mikhael Bogdanov 2dcc0bce46 Inline refactoring: more templates for captured fields
Support of complex lambda inlining cases
2014-03-13 10:36:54 +04:00
Natalia Ukhorskaya 4a8bcc614a Resolve compileTimeInitializer for variable in lazy resolve 2014-03-13 10:07:18 +04:00
Natalia Ukhorskaya 89d99d2848 Remove toInt() from rendering IntValue 2014-03-13 10:07:17 +04:00
Natalia Ukhorskaya df3ed5059c StorageManager for compile-time initializer 2014-03-13 10:07:12 +04:00
Natalia Ukhorskaya 17259a052e Write constant initializer for java properties 2014-03-13 10:07:11 +04:00
Natalia Ukhorskaya 74c4234c64 Add test for kotlin compiled property as annotation parameter 2014-03-13 10:07:10 +04:00
Natalia Ukhorskaya 9b5050dddd Serialize compile time constant for property initializer 2014-03-13 10:07:08 +04:00
Natalia Ukhorskaya 9672026a53 Add a superclass for byte, short, int, long compile-time constants 2014-03-13 10:07:01 +04:00
Mikhael Bogdanov 7fb9de2654 Fix for "NoSuchFieldError: this$0$inlined" 2014-03-09 11:21:00 +04:00
Svetlana Isakova 4771986b32 KT-4656 Wrong capturing a function literal variable.
#KT-4656 Fixed
 Reference for calleeExpression is recorded only in 'doResolveCallOrGetCachedResults'.
2014-03-08 20:55:45 +04:00
Svetlana Isakova b7f7063bf4 improved postProcess
collect (and cache) reachable instructions for local declarations
after processing all parent instructions
2014-03-07 21:08:18 +04:00
Svetlana Isakova fbbfb95861 added 'mergeDataWithLocalDeclarations' option
for collecting variable data for pseudocode

  removed using data from outer context
  for local declarations for 'variable initializers' analysis
2014-03-07 21:08:18 +04:00
Svetlana Isakova 18eaf483d3 added test for pseudocode memory overhead 2014-03-07 21:08:18 +04:00
Svetlana Isakova 7d46ff951e Jump after 'for' cycle to loop parameter change.
Not to the cycle body.
2014-03-07 21:08:17 +04:00
Svetlana Isakova e34385bbcf added tests to DataFlowTest
to be able to compare difference in the next commit
2014-03-07 21:08:17 +04:00
Svetlana Isakova 35c6a656c9 Store only data for variables declared in current lexical scope.
Remove data for other variables (when leaving a scope).
2014-03-07 21:08:17 +04:00
Svetlana Isakova 006f3ccbe9 Added/updated tests for LexicalScope. 2014-03-07 21:08:16 +04:00
Svetlana Isakova 6857694d1a added 'getParent' to Pseudocode
fixed DataFlowInfoTest:
variable data shouldn't be built for locals as independent declarations
2014-03-07 21:08:16 +04:00
Svetlana Isakova 88f2c32724 added DataFlowInfoTest 2014-03-07 21:08:16 +04:00
Svetlana Isakova 1fc4573a8c removed duplication of pseudocode in tests
for local functions
2014-03-07 21:08:15 +04:00
Svetlana Isakova ec47821567 restructured control flow tests 2014-03-07 21:08:14 +04:00
Andrey Breslav 2a0ccb95b1 Support quotes at the end of a raw string
Fix for KT-4650 Can't use double quote at the end of the raw string

#KT-4650 Fixed
2014-03-07 19:38:58 +04:00
Mikhael Bogdanov e54ece8d12 Field access chain update on lambda regeneration 2014-03-07 16:12:10 +04:00
Alexey Sedunov d2f6b55cb5 Box qualified names of package directives into dot-qualified expressions 2014-03-04 19:45:30 +04:00
Mikhael Bogdanov 16fbe1d5dd Abi version increased: inline calls in runtime (otherwise client inlining wouldn't work) 2014-03-03 15:52:25 +04:00
Mikhael Bogdanov ee136d6594 Default inline flag = true 2014-03-03 15:43:45 +04:00
Mikhael Bogdanov 4f5b20a8db Test framework for inline 2014-03-03 15:43:35 +04:00
Alexander Udalov 6eae950812 Increase ABI version after renaming "jet"->"kotlin" 2014-03-02 19:55:29 +04:00
Alexander Udalov 6e23af2ba3 Split Library.kt into several files
For better readbility and discoverability. Also rename String.compareTo
parameter to "other", since that is the name of parameter of other compareTo's
2014-03-02 19:55:27 +04:00
Alexander Udalov f7b6457139 Replace "jet" package name with "kotlin" in testData 2014-03-02 19:55:26 +04:00
Alexander Udalov f2b4c7fa3e Fix LoadBuiltinsTest after renaming "jet" to "kotlin" 2014-03-02 19:55:25 +04:00
Alexander Udalov b3a9721571 Store receiver parameter in JVM intrinsics map
To differentiate between "String?.plus" extension in builtins and
"Iterable<*>.plus" extension in stdlib (they have the same owner, name and
value parameter count)
2014-03-02 19:55:25 +04:00
Alexander Udalov 11cc7f46f4 Remove "Iterator.iterator()" intrinsic, add stdlib function 2014-03-02 19:55:24 +04:00
Alexander Udalov 6b0fce8cd5 Unsorted replacements "jet" -> "kotlin"
#KT-2896 Fixed
2014-03-02 19:55:15 +04:00
Alexander Udalov 0da92e22a2 Move jet.JetObject -> kotlin.jvm.internal.KObject
Don't use JetObject as a marker class in KotlinRuntimeLibraryUtil anymore,
since there are other classes for this purpose (KotlinPackage, Unit)
2014-03-02 19:54:58 +04:00
Alexander Udalov 5d6d4406cb Move FunctionImpl classes from package "jet" to "kotlin" 2014-03-02 19:54:56 +04:00
Alexander Udalov b68e47f705 Move JVM-specific annotations out of built-ins
Move 'volatile' and 'synchronized' to package 'kotlin' in stdlib. Also delete
'atomic', since its support was never implemented
2014-03-02 19:54:55 +04:00
Alexander Udalov 774e5f0535 Sort out JVM intrinsics for equals, hashCode, toString 2014-03-02 19:54:55 +04:00
Alexander Udalov 3dcd85bdb4 Add toString() to Any, fix all tests
#KT-4517 Fixed
2014-03-02 19:54:49 +04:00
Alexander Udalov ec30d52978 Delete Hashable, pull up its members to Any
Extensions on nullable types remain in Library.kt

 #KT-1741 Obsolete
 #KT-2805 Obsolete
 #KT-1365 Fixed
 #KT-4517 In Progress
2014-03-02 19:54:08 +04:00
Alexander Udalov 9537b68724 Load 'equals' parameter from Java code with the name 'other'
This fixes a lot of warnings on mixed Kotlin+Java code about different names
for the same parameter because we always loaded 'equals' parameter with the
name 'p0', whereas in Kotlin we usually name it 'other'
2014-02-28 21:48:29 +04:00
Ilya Klyuchnikov 68da8bcf6b test fix 2014-02-28 16:24:19 +04:00
Alexander Udalov 8425f2e668 Copy type parameters for JVM function accessors
Otherwise generic signature wasn't correctly written to accessors, resulting in
classfiles not being valid and javac failing to compile Java sources against
them
2014-02-26 21:22:57 +04:00
Andrey Breslav fbdba0f48d Test data fixed 2014-02-26 20:48:45 +04:00
Andrey Breslav a7135fee06 Report CLASS_OBJECT_NOT_ALLOWED for local classes 2014-02-26 19:42:05 +04:00
Tuomas Tynkkynen 3e451c5811 Disallow break or continue across a function boundary
Code containing breaks or continues that attempt to jump across a
function boundary weren't detected during analysis but would crash
the compiler during code generation. Add diagnostics for these kinds
of errors.

Example:

fun f() {
    while (true) {
        fun inner() {
            continue
        }
    }
}

 #KT-4334 Fixed
2014-02-26 00:14:42 +02:00
Alexander Udalov 4968afebf8 Don't generate bodies of built-in stub methods into interfaces 2014-02-24 21:44:42 +04:00
Alexander Udalov 4a603f1268 Minor, specify types for clarity 2014-02-21 20:38:02 +04:00
Alexander Udalov eb7b757e38 Fix VerifyError on rangeTo on primitive types 2014-02-19 17:46:18 +04:00
Alexander Udalov 8c97d9ebb3 Fix rangeTo between Float and Long
Float.rangeTo(Long) and Long.rangeTo(Float) now both return FloatRange for
consistency with other binary operations between floats and longs which, in
turn, return float to be consistent with Java
2014-02-19 17:46:18 +04:00