Commit Graph

15288 Commits

Author SHA1 Message Date
Denis Zharkov 95345a9bd4 Tests for switchOptimization: shuffled and added sparse version 2014-04-25 18:17:36 +04:00
Denis Zharkov ad14ee9061 Switch in when-expression: choice between lookupswitch and table switch (heuristically) 2014-04-25 18:17:36 +04:00
Denis Zharkov 1952781e4b SwitchOptimization: generating `lookupswitch' opcode for 'when' in case of integral types 2014-04-25 18:17:36 +04:00
Denis Zharkov c73533d214 Switch Optimization 2014-04-25 18:16:24 +04:00
Ross Hanson ecaa7b61dd KT-4568 Bugfix: Reformatted code to adhere to style guides. Removed unreachable cases in when expression for ConvertNegatedExpression. Fixed last element access. Changed array list to simple list. 2014-04-25 16:59:50 +04:00
Ross Hanson a5f7ac63a8 KT-4568: Cleaned up some of the code in ConvertNegatedBooleanSequence to match the other DeMorgan intention 2014-04-25 16:59:49 +04:00
Ross Hanson 4de6960443 KT-4568 Bug Fix: Refactored the convertNegatedExpressionWithDemorgansLaw intention to better handle longer and more complex expressions. Fixed bug and added appropriate test cases as well. 2014-04-25 16:59:49 +04:00
Alexander Udalov de273c0418 Minor, use kotlin.Pair instead of intellij 2014-04-24 18:17:50 +04:00
Lingzhang 6066d19de5 Added KT-4579 makeTypeExplicitInLambda and makeTypeImplicitInLambda intentions 2014-04-24 18:11:43 +04:00
Natalia Ukhorskaya 1ef785eb1a Eval4j: delete IDEA project files 2014-04-24 16:48:17 +04:00
Natalia Ukhorskaya 73f1ea3bcc Eval4j: fix ReadMe 2014-04-24 16:48:02 +04:00
Natalia Ukhorskaya f23d95031c Remove MockPsiDocumentManager: it is registered in CoreProjectEnvironment 2014-04-24 16:38:50 +04:00
Natalia Ukhorskaya 805da98fa1 Remove hamcrest library, it is included in idea full 2014-04-24 16:38:48 +04:00
Natalia Ukhorskaya aefed988a3 Add run configuration for Eval4j tests 2014-04-24 16:38:34 +04:00
Natalia Ukhorskaya a8ea10de27 add common test suite for eval4j 2014-04-24 16:37:14 +04:00
Natalia Ukhorskaya 1e0a4ddbdd Eval4j: always cast int to byte, short, boolean and char when they are expected 2014-04-24 16:35:47 +04:00
Andrey Breslav 5536f4da07 Test data generated from both files separated in 717f03f474 2014-04-24 16:22:43 +04:00
Alexander Udalov 1efdd33dbd Refactor codegen hierarchy
- pull generate() and a bunch of abstract methods from ClassBodyCodegen up to
  MemberCodegen
- implement these methods in ScriptCodegen and PackagePartCodegen
- make MemberCodegen generic on the type of the element it is generating
2014-04-24 16:10:16 +04:00
Alexander Udalov ff8e282c4a Simplify mapToCallableMethod 2014-04-24 16:10:16 +04:00
Alexander Udalov 722c15b747 Simplify mapOwner/mapToCallableMethod 2014-04-24 16:10:15 +04:00
Alexander Udalov 61675de305 Optimize PropertyMetadataImpl instance creation
Create all property metadatas in <clinit> and save them to a static array
$propertyMetadata. Getter/setter of each delegated property will then just
obtain the corresponding instance from that array

 #KT-4232 Fixed
2014-04-24 16:10:15 +04:00
Alexander Udalov 925b27238c Minor, simplify StackValue.ArrayElement 2014-04-24 16:10:15 +04:00
Alexander Udalov 678520364a Refactor property initialization codegen
Move a lot of the code from ImplementationBodyCodegen up to MemberCodegen, make
methods non-static (consequently get rid of a lot of parameters), reuse the
same code in PackagePartCodegen
2014-04-24 16:10:14 +04:00
Alexander Udalov 6803fec053 Simplify clinit codegen, delete code duplication
Logic for <clinit> generation was present both in PackagePartCodegen and in
ClassBodyCodegen, move it to MemberCodegen
2014-04-24 16:10:14 +04:00
Alexander Udalov be47897e18 Minor, ValueArgument.asElement returns JetElement 2014-04-24 16:10:14 +04:00
Alexander Udalov f7235e9d82 Fix abstract nested class in enums in JVM back-end
It caused InstantiationError because the enum had an incorrect ACC_ABSTRACT
flag
2014-04-24 16:10:13 +04:00
Alexander Udalov 129b643898 Minor, reformat in ImplementationBodyCodegen 2014-04-24 16:10:13 +04:00
Alexander Udalov 7f873026be Remove code duplication in property accessor codegen 2014-04-24 16:10:12 +04:00
Alexander Udalov 55836884d5 Minor refactorings in JetTypeMapper: renames, inlines, etc. 2014-04-24 16:10:12 +04:00
Alexander Udalov d913dfb1aa Correctly map declaration owner in JVM codegen
"context.contextKind()" was incorrect in
ExpressionCodegen.intermediateValueForProperty(), because it represents the
context of the call site, not the context of the property declaration

 #KT-4878 Fixed
2014-04-24 16:10:12 +04:00
Alexander Udalov fbf9f5f7d0 Don't generate bridges for equals(), hashCode(), toString()
Otherwise an assertion is failing in the algorithm which is related to an
inconsistency of java.lang.Object inheritance in JDR (KT-4890)
2014-04-24 16:10:12 +04:00
Alexander Udalov 6b348bfc6e Make Ref fields volatile
Otherwise local shared variables are not safe to use from several threads
2014-04-24 16:10:11 +04:00
Alexander Udalov af421f53da Rename FQNAMES -> FQ_NAMES 2014-04-24 16:10:11 +04:00
Zalim Bashorov 525709bced Added MIN_JAVA_VERSION directive for intentions and fixed failed test(convertIfToAssert/inapplicableCauseSent.kt). 2014-04-24 15:37:35 +04:00
Tal Man f61db2decc Intention to transform an if an AssertionError throw into an assert 2014-04-24 15:36:34 +04:00
Ilya Ryzhenkov d06b9abd4f Add platform independent part of Range tests to JS stdlib test run 2014-04-24 12:59:43 +04:00
Ilya Ryzhenkov 717f03f474 Split tests into platform independent and JVM parts to run subset of tests in JS 2014-04-24 12:59:43 +04:00
Ilya Ryzhenkov ee8a7d6825 Include Ranges extension functions and Numbers NaN checks for JS 2014-04-24 12:59:43 +04:00
Ilya Ryzhenkov a6c01f82b2 Make isNaN check language independent, working in JVM & JS 2014-04-24 12:59:43 +04:00
Ilya Ryzhenkov a825b13a4b Restore tests on streams, add test for filterNotNull 2014-04-24 12:59:42 +04:00
Ilya Ryzhenkov 87745c05ae Fix filterNotNull and mapNotNull for streams. 2014-04-24 12:59:42 +04:00
Ilya Ryzhenkov 118126c744 Add toList() operation on Maps 2014-04-24 12:59:42 +04:00
Ilya Ryzhenkov 5537ff5f3c Add toSortedList operation for Streams 2014-04-24 12:59:42 +04:00
Ilya Ryzhenkov 9a7758bf4e Remove bogus filterIsInstance* on strings. 2014-04-24 12:59:42 +04:00
Ilya Ryzhenkov 6562ee4967 Rename "collection" parameter to "destination" in *To() functions. 2014-04-24 12:59:41 +04:00
Ilya Ryzhenkov e43d08d228 Fix typo 2014-04-24 12:59:41 +04:00
Ilya Ryzhenkov 89c1260627 Fix formatting in Engine and templates 2014-04-24 12:59:41 +04:00
Ilya Ryzhenkov f14ca2cf89 Extension method to convert Enumeration to List 2014-04-24 12:59:41 +04:00
Ilya Ryzhenkov cbc0e6404e Support String in generators, and migrate generated functions. 2014-04-24 12:59:41 +04:00
Ilya Ryzhenkov d9d5631a16 Optimize selection functions, add guard checks. 2014-04-24 12:59:41 +04:00