Commit Graph

2990 Commits

Author SHA1 Message Date
Natalia Ukhorskaya 40c4022c98 Debugger tests: add custom library 2014-08-27 15:57:57 +04:00
Alexander Udalov 7dd0613f96 Fix NoErrorsInStdlibTest
stdlib was analyzed with an older version of itself in the classpath. But
without that older version stdlib still depends on a built-in part
(builtins, runtime.jvm, reflection), so we compile those as a separate library
beforehand
2014-08-26 21:12:09 +04:00
Alexander Udalov e14ec050b4 Minor, update obsolete message in JetTestUtils 2014-08-25 19:11:53 +04:00
Alexander Udalov 8bdad92eff Minor, fix warnings and inspections in JetTestUtils 2014-08-25 19:05:30 +04:00
Alexander Udalov 087eec4521 Regenerate tests after recent generator improvements 2014-08-25 19:00:09 +04:00
Alexander Udalov fb3ef047fc Test generator: inline the constant FQ name 2014-08-25 19:00:04 +04:00
Alexander Udalov d5d4cff701 Minor, remove dependency of everything on "descriptor.loader.java"
Everything already depends on "frontend.java" which exports
"descriptor.loader.java"
2014-08-25 17:53:18 +04:00
Alexander Udalov 2ea9a2cfc9 Generate annotations on enum entry constants in bytecode
#KT-5665 Fixed
2014-08-25 17:50:08 +04:00
Pavel V. Talanov 7a1d5d63dc Rename: AnalyzerFacadeForJvm(Js) -> TopDownAnalyzerFacadeForJvm(Js) 2014-08-22 23:16:55 +04:00
Pavel V. Talanov db5303c019 Implement modules in IDE
IDE:
Rewrite AnalyzerFacade and implementations for JS and JVM to support creating separate analyzers for each module
Introduce ModuleInfo which is an intermediate entity between configuration (tests or idea modules) and ModuleDescriptor
Implement IdeaModuleInfos which represent IDEA modules, sdks and libraries
Add (somewhat thin) test checking their behaviour
Implement getModuleInfo() - utility to obtain IdeaModuleInfo for PsiElement
Drop Project.getLazyResolveSession() - not possible to obtain resolve session for the whole project any more
Adjust JavaResolveExtension accordingly
KotlinSignature Intention/Marker - make sure that analyzed element is cls element (he's not in resolve scope otherwise)

LightClasses:
Create separate package light classes for each module
Java code can only reference light class from the first module among it's dependencies
Duplicate jvm signature is only reported on package declarations inside one module

Injectors:
Receive GlobalSearchScope as paramer for VirtualFileFinder and JavaClassFinder
which allows to narrow analyzer scope

JDR:
Introduce ModuleClassResolver resolves java classes in correct java descriptor resolver (corresponding ModuleDescriptor)
Add test checking that java classes belong to correct module

Debugger:
Provide context to analyze files created by debugger in

Converter:
Postprocessor now needs a context to analyze resulting code in

JetPsiFactory:
Add verification that files created by psi factory are not analyzed without context (that is almost never a good idea)

Other:
Use new API in various tests, utilities, run configuration producers and builtin serializers
Various "TODO: (module refactoring)" which mark the unfinished parts
2014-08-22 22:58:54 +04:00
Nikolay Krasko dbdc30fd94 Ignore decompiler problem, just show trouble declarations 2014-08-21 17:57:19 +04:00
Andrey Breslav 1933e30905 Test data split between compiledJava tests and compiledKotlin tests
Basically, this commit splits test data from the from java-txt-kt to two pairs java-txt and kt-txt.
This commit leads to some duplication in test data.
This is temporary: in the platform types branch the test data for LoadJava tests will be changed dramatically, so duplication will go away
2014-08-21 12:22:22 +04:00
Denis Mekhanikov 1533c0e9f3 Support more than 32 default arguments
#KT-4675 Fixed
2014-08-20 20:47:34 +04:00
Evgeny Gerashchenko 184ddbc9e1 Removed passing incremental cache base dir via module script. 2014-08-20 13:46:29 +04:00
Evgeny Gerashchenko 5fade9a5a6 Made incremental cache per-module.
Reused IDEA framework which manages per-module storage.
2014-08-20 13:46:26 +04:00
Alexander Udalov 99d4f97aef Fix access to top level delegated property from another property
#KT-5612 Fixed
2014-08-14 10:43:50 +04:00
Alexander Udalov 9e971ed2b9 Minor, add test on enum assignability to kotlin.Enum 2014-08-13 17:19:56 +04:00
Alexander Udalov 226bfe65f0 Don't make traits and annotations inherit from KObject
#KT-5609 Fixed
2014-08-13 17:19:56 +04:00
Alexander Udalov 47d5f83d04 Report unmet trait requirements
#KT-3006 Fixed
2014-08-13 17:19:55 +04:00
Alexander Udalov 9c00e1c94d Scripts: coerce result to the actual expression type
#KT-5622 Fixed
2014-08-13 17:19:53 +04:00
Alexander Udalov 844845c6e3 REPL: sanitize stack traces
Don't include our compiler's and preloader's internal code, reflection, native
methods etc. Also delete "substring" matching logic from tests
2014-08-13 15:42:10 +04:00
Alexander Udalov 6eb5567895 REPL: fix open parenthesis not triggering "incomplete"
Check if all of the syntax errors are at EOF, not that there's a single one.
In case of open parenthesis two syntax errors are reported for some reason
2014-08-13 15:13:25 +04:00
Alexander Udalov 4213ce318e REPL: don't fail on a callable reference
There should probably be a special kind of property, but at least it won't
throw an exception for now
2014-08-13 15:13:24 +04:00
Alexander Udalov 415fe7a5e6 Initial support for classes in scripts and REPL 2014-08-13 15:13:22 +04:00
Alexander Udalov c873806b54 Refactor "incomplete line" handling in REPL tests 2014-08-13 15:13:21 +04:00
Alexander Udalov 9f718005b9 Convert AbstractReplInterpreterTest to Kotlin 2014-08-13 15:13:21 +04:00
Alexander Udalov 77417639ef Rename AbstractReplInterpreterTest file to .kt 2014-08-13 15:13:20 +04:00
Alexander Udalov c6dfa866cd Refactor REPL tests: use empty line instead of "null" 2014-08-13 15:13:19 +04:00
Alexander Udalov 44246349a5 Minor, inline ReplSessionTestFile 2014-08-13 15:13:19 +04:00
Alexander Udalov f4b8874efa Refactor REPL tests
Drop SimpleLinesParser, simplify logic
2014-08-13 15:13:18 +04:00
Alexander Udalov d373c09cfb Generate REPL interpreter tests 2014-08-13 15:13:17 +04:00
Alexander Udalov 9ae95c1e5c Generate codegen tests on scripts 2014-08-13 15:13:17 +04:00
Alexander Udalov b54d2ac0c5 CLI: don't fail on a wrong "-script" usage 2014-08-13 11:10:42 +04:00
Alexander Udalov 96b7ad075c Minor, use a simple MessageCollector in ScriptTest 2014-08-13 11:10:40 +04:00
Alexander Udalov 1d2dbca27a Minor, move utility method out of an interface 2014-08-13 11:10:40 +04:00
Alexander Udalov 97e57e3e3d CLI: change "-suppress warnings" option to "-nowarn"
Following the rule of the least surprise: this option is named "-nowarn" in
other JVM language compilers. Besides, having an option with an argument which
can take exactly one predefined value is sort of confusing
2014-08-13 11:10:40 +04:00
Alexander Udalov cf431ffab0 CLI: change argument naming convention
As in all other Unix/POSIX tools and JVM language compilers, multiple words
comprising the argument name should be lowercase, separated by dashes
2014-08-13 11:10:40 +04:00
Alexander Udalov 45a57011d8 Simplify and enable by default inline/optimize/assertions
Inline, optimize, call assertions, param assertions are turned on by default
now almost everywhere; invert their meaning
2014-08-13 11:10:37 +04:00
Alexander Udalov 160cde09d6 CLI: Support "-X" advanced options, simplify some boolean options 2014-08-13 11:10:37 +04:00
Pavel V. Talanov 6588310736 Add missing public modifiers in project code 2014-08-12 21:13:46 +04:00
zarechenskiy 34bf3d7f0e Supress warnings in injectors using "all" parameter, not "ALL"
This parameter value supports by IDEA and Eclipse
2014-08-12 13:11:21 +04:00
Alexander Udalov e20caef8c1 Regenerate tests 2014-08-11 14:33:31 +04:00
Pavel V. Talanov 1488584acf Rewrite JavaDescriptorResolver to Kotlin 2014-08-08 19:50:55 +04:00
Alexey Sedunov 311166737f Associate synthetic component function descriptors with corresponding
constructor parameters
2014-08-08 18:59:45 +04:00
Alexey Sedunov 9fee8600cb Pseudocode: Do not generate implicit return instruction inside of
Unit-typed lambdas
 #KT-5549 Fixed
2014-08-05 18:14:40 +04:00
Denis Zharkov e0ced7cbcf Boxing values merge fix. #KT-5588 Fixed
When merging Boxed value and something else just return MIXED_VALUE
2014-08-05 13:54:42 +04:00
Evgeny Gerashchenko f2b1879aae Added test for KT-1735 Can't access "assert" function from stdlib
#KT-1735 fixed
2014-08-04 13:38:36 +04:00
Pavel V. Talanov 8496c535aa Replace ModuleDescriptorImpl implementation
Change the way modules are configured:
Add dependencies on other modules instead of adding additional package fragment providers
Refactor related code
Drop DependencyKind
Hide common new module creation in CliLightClassGenerationSupport
2014-07-31 21:25:49 +04:00
Svetlana Isakova 2ae87cae4a Function literal expression outside the parentheses wrapped into JetFunctionLiteralArgument
Extracted JetFunctionLiteralArgument.moveInsideParenthesesAndReplaceWith util function
2014-07-30 17:14:00 +04:00
Svetlana Isakova 4477a96ca7 Resolve operation (unary, array access) on error element instead of ignoring it
(to record corresponding call for later simplification in control flow)
Generate code for unmapped arguments in control flow
2014-07-30 17:14:00 +04:00