Commit Graph

484 Commits

Author SHA1 Message Date
Evgeny Gerashchenko 846ee2c8ac Introduced protobuf generating script.
It generates two variants: lite (for runtime usage) and debug (for
tests).
2014-02-13 20:46:28 +04:00
Svetlana Isakova 9832676701 generate constraint system tests
more tests added
2014-02-12 12:48:13 +04:00
Pavel V. Talanov 4a3ccc4eac JDR: do not create package fragment for class statics if class cannot be resolved
This keeps behaviour consistent in rare cases when JavaClass can be found but not resolved
As of now this can happen in IDE if we take PsiClass from index but file structure is wrong so we can't resolve the class
Add test which documents this case
2014-02-11 17:17:34 +04:00
Pavel V. Talanov 2fe2a50b14 Refactor JDR: use JavaResolverCache in LazyJavaPackageFragmentProvider directly
Remove LazyJavaClassResolverWithCache
This actually can affect behaviour because JavaResolverCache has slightly different logic (uses CLASS key in BindingContext as opposed to FQNAME_TO_CLASS_DESCRIPTOR)
2014-02-11 17:17:01 +04:00
Pavel V. Talanov 18d088cb71 Refactor JDR: create LazyJavaPackageFragmentProvider in injector 2014-02-11 17:17:00 +04:00
Pradyoth Kukkapalli 8b6bd8a184 New Intention Action: Replace an infix function call with a dot qualified method call. 2014-02-09 09:05:19 -08:00
Tuomas Tynkkynen 85c46019d3 Add test suite for smart expression selector
Add test suite for smart expression selector (the small expression list
popup in e.g. Extract Variable.)

The test file format is similar to that in JetNameSuggesterTest: a .kt
file with the usual <caret> marker specifying the place where the smart
selector will be run. Then, the last comment in the file should contain
the expected outcome.
2014-02-09 17:22:24 +04:00
Andrey Breslav 9f918d48b5 JavaDescriptorResolver always uses lazy mode 2014-02-05 18:12:01 +04:00
Pavel V. Talanov 61153c87e0 Insert imports on copy/paste
Introduce KotlinCopyPasteReferenceProcessor
2014-02-04 20:19:52 +04:00
Pavel V. Talanov 4638806d11 Shorten references: Do not lookup packages when searching for conflicting declarations
Minor: use JetTreeVisitor
2014-02-04 17:09:37 +04:00
Andrey Breslav e60bd514fa StorageManager&ExceptionTracker delivered where needed
- GlobalContext introduced to group the two
- Caches track exceptions
2014-02-04 15:24:27 +04:00
Andrey Breslav 364182e3f0 Unneeded public parameters made private 2014-02-04 15:23:15 +04:00
Nikolay Krasko f526129ca4 Refactoring: use injector for creating lazy resolve session 2014-02-04 12:31:38 +04:00
Alexander Udalov 7edc4b0ff7 Add GenerateBuiltInsTest
Tests that generated sources of built-ins (Functions, Ranges, etc.) are
up-to-date
2014-01-31 16:46:17 +04:00
Alexander Udalov 71d956a568 Refactor built-ins source generators 2014-01-31 16:46:17 +04:00
Alexander Udalov 1f15e57918 Change built-ins generators package from 'runtime' to 'builtins' 2014-01-31 16:46:17 +04:00
Alexander Udalov 1c9d614137 Add copyright and auto-generation notice to built-in sources 2014-01-31 16:46:17 +04:00
Andrey Breslav 7a6657d2e8 Resolve sessions use exception tracking from StorageManager 2014-01-30 21:03:53 +04:00
Andrey Breslav 6a29c38e5b Components across the project use StorageManager 2014-01-29 15:38:44 +04:00
Natalia Ukhorskaya 4dbcb256d3 Add JetDiagnosticTest with stdlib 2014-01-28 18:21:46 +04:00
Alexander Udalov 61ad9fba4a Remove duplicated sources of built-ins
BuiltInsSerializer now serializes built-ins found in two source roots:
core/builtins/native and core/builtins/src

Add return types to some declarations in core/builtins/src, because now that
BuiltInsSerializer processes them, it launches lazy resolution which can't
always deduce the return type
2014-01-27 18:33:48 +04:00
Alexander Udalov 3b4c341046 Generate Kotlin sources of progression iterators 2014-01-27 18:33:48 +04:00
Alexander Udalov dc66561ca5 Create module 'builtins', move 'runtime' -> 'runtime.jvm'
'builtins' will be used for platform-independent core built-in definitions,
'runtime.jvm' for things that should be present at runtime in order for Kotlin
code to execute correctly on JVM

ProgressionUtil goes to 'builtins' right now because progression iterators
depend on it, but should be rewritten to Kotlin later
2014-01-27 18:33:47 +04:00
Alexander Udalov ca565b9c19 Move toString() from primitive ranges to Range
The same can't be done with progressions, because its toString() checks if an
increment is greater than zero, but Progression.increment is of type Number,
which is not Comparable<Int>
2014-01-27 18:33:47 +04:00
Alexander Udalov d66c5b2fbe Fix floating point number hash code in ranges
Don't make 0.0 and -0.0 have the same hash code: they are different in Java (in
the sense that "Double.valueOf(0.0).equals(Double.valueOf(-0.0))" is false),
and they are considered different already in DoubleRange.equals, which calls
Double.compare, which differentiates them
2014-01-27 18:33:46 +04:00
Alexander Udalov d427fcc187 Generate Kotlin sources of progressions
The check in DoubleProgression "if (increment == 0.0 || increment == -0.0)"
(and similar in FloatProgression) was simplified to "if (increment == 0.0)"
because 0.0 == -0.0 on JVM
2014-01-27 18:33:46 +04:00
Alexander Udalov 87a6ca5910 Generate Kotlin sources of ranges 2014-01-27 18:33:46 +04:00
Alexander Udalov f9f1065294 Rewrite built-in primitive iterators to Kotlin 2014-01-27 18:33:45 +04:00
Alexander Udalov bbdc132ccd Generate FunctionN and FunctionImplN classes in Kotlin 2014-01-27 18:33:45 +04:00
Zalim Bashorov f5499a93ed Added the checking of extra generation of tests in TestGenerator.
Dropped tests that have been registered more than once.
2014-01-27 15:34:54 +04:00
Valentin Kipyatkov 020ea99220 Intention "Convert to expression body" 2014-01-23 18:50:26 +04:00
Alexander Udalov db9d0e381b Rework BuiltInsSerializer
BuiltInsSerializer will be distributed with Kotlin compiler from now on. This
will allow to serialize binary data of built-ins on 'ant dist', as opposed to
storing all *.kotlin_class files in the repository: ant dist will just invoke
this serializer from bootstrap-compiler.jar
2014-01-22 19:11:43 +04:00
Evgeny Gerashchenko 8e442bc509 Moved test data. 2014-01-21 18:32:58 +04:00
Evgeny Gerashchenko a75490803a Test for completion of kotlin sources in java. Reused same test data. 2014-01-21 18:32:55 +04:00
Evgeny Gerashchenko e4b9c7fd40 Test for completion of kotlin binaries in java. 2014-01-21 18:32:54 +04:00
Andrey Breslav 77c340d872 Always use Project SDK 2014-01-20 20:08:28 +04:00
Pavel V. Talanov 745252c23e Formatter tests: Separate test model for tests with inverted settings 2014-01-20 19:54:27 +04:00
Andrey Breslav 8f56283771 Same storage manager used by lazy resolve session in AnalyzerFacadeForJVM and the rest of the components 2014-01-20 16:17:53 +04:00
Andrey Breslav 1af71c4dbe Using common storage manager for all lazy services 2014-01-20 16:17:53 +04:00
Evgeny Gerashchenko ae4c68830d Importing root scope without members. 2014-01-16 22:11:55 +04:00
Nikolay Krasko 0d141d959a Add tests for EA-52767 and KT-4366: "java.lang.IllegalArgumentException: Could not find a classifier for "... 2014-01-15 22:01:03 +04:00
Alexey Sedunov 786e59bbfa Implement "Override hierarchy" view 2014-01-15 16:49:39 +04:00
Alexey Sedunov e2118b7ae8 Tests for additional lazy resolve (local classes/objects in class initializers) 2014-01-15 16:49:29 +04:00
Andrey Breslav 372ab7954b Got rid of getExactlyOnePackageFragment() 2014-01-15 16:16:16 +04:00
Andrey Breslav 45bd70daec JavaPackageFragmentProvider is only accessible through JavaDescriptorResolver
We need this to guarantee that only one provider is used: either lazy or eager.
2014-01-15 16:16:16 +04:00
Andrey Breslav 924ff03c1c JavaDescriptorResolver exposed for tests 2014-01-15 16:14:43 +04:00
Evgeny Gerashchenko 1f74f02344 NamespaceFactoryImpl is abolished, since it is almost trivial. 2014-01-14 18:06:47 +04:00
Evgeny Gerashchenko 5319c6e24c LazyResolveNamespaceComparingTest → LazyResolveRecursiveComparingTest 2014-01-14 18:06:47 +04:00
Andrey Breslav 8f8b85101e All IDE code uses VirtualFileFinder instead of KotlinClassFinder + proper service discovery 2014-01-09 20:41:43 +04:00
Andrey Breslav 6c1f579c6d VirtualFileFinder and KotlinClassFinder effectively merged (through inheritance)
This is needed to implement caching of KotlinJvmBinaryClass instance inside CliVirtualFileFinder that relies on reading class headers for filtering
2014-01-09 20:41:43 +04:00