Commit Graph

16718 Commits

Author SHA1 Message Date
Alexander Udalov 288bbcae36 Refactor ExpressionCodegen#invokeMethodWithArguments
- for inlining purposes, take ResolvedCall.getCall() instead of a separate
  parameter
- split into two methods, the other one will be used for a more granular code
  generation of a method call
2014-07-18 16:26:40 +04:00
Alexander Udalov 04b54e9cb7 Simplify ExpressionCodegen#generateConstructorCall
Don't go through StackValue.CallReceiver because it handles a variety of cases
when a callable descriptor has a receiver argument, an expected this object, or
both. Constructors can't have receiver arguments, so the resulting code is
greatly simplified
2014-07-18 16:26:40 +04:00
Alexander Udalov 62ce4a034b Increase maximum heap size for Codegen Tests on Android
Also include all other arguments from "All Tests"
2014-07-18 04:11:18 +04:00
Alexander Udalov eb448627e1 Minor, delete unused method in JvmCodegenUtil 2014-07-17 19:18:06 +04:00
Alexander Udalov eaeb976903 Access private class property via field in Evaluate Expression 2014-07-17 19:18:05 +04:00
Alexander Udalov a07909bb52 Don't generate unnecessary accessors for private class properties 2014-07-17 19:18:05 +04:00
Alexander Udalov 4bdf7e3426 Use direct field access to trivial class properties
#KT-3845 Fixed
2014-07-17 19:18:05 +04:00
Alexander Udalov 1555a3756c Refactor and comment JvmCodegenUtil#couldUseDirectAccessToProperty()
Logic hasn't changed except the deleted isTopLevelDeclaration() call which
always returned false in this case because we checked that it's a class
property earlier
2014-07-17 19:18:05 +04:00
Evgeny Gerashchenko 79bb433810 Merge pull request #497 from bintree/master
Fixed KT-5493: NPE fix
2014-07-17 18:46:48 +04:00
Denis Zharkov 0b2b8ba816 Fixed KT-5493: NPE fix 2014-07-17 18:43:44 +04:00
Alexander Udalov da3fcae2ba Fix "optimizations" check box in bytecode toolwindow 2014-07-17 15:45:56 +04:00
Denis Zharkov 149ffdc8b9 Analyzer error handling: fix for printing bytecode in case of exception within optimization package 2014-07-17 15:37:07 +04:00
Ilya Ryzhenkov ea9e4375b0 Merge pull request #495 from JetBrains/rr/stdlib_maps
Map-related fixes and improvements in stdlib.
2014-07-17 01:30:24 +04:00
Ilya Ryzhenkov 3980664049 Tests for map functions. 2014-07-16 21:35:12 +04:00
Ilya Ryzhenkov 37874556ae Use different file for navigation test because of test framework limitation. 2014-07-16 21:35:11 +04:00
Ilya Ryzhenkov af8d0f7b9e Fix assertion arguments. 2014-07-16 21:35:11 +04:00
Zalim Bashorov 14ab3c4de1 JS stdlib: allowed use null as key and value in Map implementations. Added tests for using null in Set and Map implementations. 2014-07-16 21:35:11 +04:00
Zalim Bashorov 223a14a855 Moved MutableMap.set from Maps.kt to MapsJVM.kt to avoid ambiguity when compile MapTest.kt by JS backend. 2014-07-16 21:35:10 +04:00
Zalim Bashorov 9b081fd254 Minor: assert -> assertTrue 2014-07-16 21:35:10 +04:00
Ilya Ryzhenkov 4ea62071b5 Split tests into platform-independent and JVM. 2014-07-16 21:35:09 +04:00
Ilya Ryzhenkov 8cfbaf4749 Add StdLibMapTest, fix naming to convention StdLib* tests. 2014-07-16 21:35:09 +04:00
Ilya Ryzhenkov a9da7cfeea Use LinkedHashMap everywhere to preserve order. 2014-07-16 21:35:09 +04:00
Ilya Ryzhenkov cb17f0c635 Remove map iteration from ListSpecificTest - JS fails, but it is irrelevant to test. 2014-07-16 21:35:08 +04:00
Ilya Ryzhenkov 2855741572 Map.Entry.toPair 2014-07-16 21:35:08 +04:00
Ilya Ryzhenkov 0e656ce3ce collection.toMap(selector) 2014-07-16 21:35:08 +04:00
Ilya Ryzhenkov 3491c88793 Recover test for mutable List variable and move it to ListSpecificTests 2014-07-16 21:35:07 +04:00
Ilya Ryzhenkov ce5f7e9d61 Breaking change. Map operations revisited. 2014-07-16 21:35:07 +04:00
Ilya Ryzhenkov 4167359c08 Map.filter() returns Map instead of List of Entries 2014-07-16 21:35:06 +04:00
Ilya Ryzhenkov 6849fb8358 Map.toList() returns List of Pairs instead of List of Entries. 2014-07-16 21:35:06 +04:00
Ilya Ryzhenkov 7273f223f4 Remove Map.groupBy 2014-07-16 21:35:06 +04:00
Ilya Ryzhenkov 295ce5fdf8 Unify substringBefore/After and related functions, so that they always return receiver in case of missing delimiter by default. 2014-07-16 21:10:32 +04:00
Ilya Ryzhenkov e22ff87d81 Make LINE_SEPARATOR lazy property to not kick-in before system is setup. 2014-07-16 21:10:32 +04:00
Ilya Ryzhenkov 2b6fcc0b7c singleOrNull methods should never throw exception #KT-5424 Fixed 2014-07-16 21:10:32 +04:00
Ilya Ryzhenkov d4db837dec Fix fails() assertion which was silently swallowing exceptions. 2014-07-16 21:10:32 +04:00
Nikolay Krasko 0b7699b844 Fix silence turning integers with leading zero into doubles
#KT-4296 Fixed
2014-07-16 18:35:19 +04:00
Natalia Ukhorskaya 73e0ae1d1c Evaluate expression: support captured vals 2014-07-16 15:17:44 +04:00
Natalia Ukhorskaya 6440884a40 Add tests for tracing frame 2014-07-16 15:17:44 +04:00
Zalim Bashorov 670e71bdd6 Minor: update link to Kotlin website. 2014-07-15 23:50:30 +04:00
Denis Zharkov 0e683b0b99 Added "optimize" flag to settings everywhere 2014-07-15 21:34:32 +04:00
Denis Zharkov 433c9cd4a5 Fixed test in evaluateExpression (redundant boxing was removed) 2014-07-15 21:26:54 +04:00
Denis Zharkov 602e60f72e Merge conditions refinement 2014-07-15 21:26:54 +04:00
Denis Zharkov 0f5e29df9b tests added 2014-07-15 21:26:53 +04:00
Denis Zharkov e53e4fe257 fixed isSafeCast, so it doesn't use Class.forName() 2014-07-15 21:26:53 +04:00
Denis Zharkov 498e5ec192 Minor refactoring: analyze-method added 2014-07-15 21:26:53 +04:00
Denis Zharkov a412a96ff3 Changed strategy from enumeration of unsafe operations to permitted + INSTANCEOF added 2014-07-15 21:26:52 +04:00
Denis Zharkov 69d8d07a05 Refactoring: reordering methods to usage places 2014-07-15 21:26:52 +04:00
Denis Zharkov ebfd257408 Refactoring: extracted common logic of working with local variable table into getValuesStoredOrLoadedToVariable 2014-07-15 21:26:52 +04:00
Denis Zharkov 0f0d07c9fe Refactoring: extracted specific logic into RedundantBoxedValuesCollection class 2014-07-15 21:26:51 +04:00
Denis Zharkov cb3eef4b86 Optimization of type conversion with boxed values (transform Integer.valueOf(x). .. .longValue() -> I2L and etc) 2014-07-15 21:26:51 +04:00
Denis Zharkov 270e58cf4e Do not remove boxing when possibly unsuccessful CHECKCAST is performed 2014-07-15 21:26:50 +04:00