Alexander Udalov
bb92655ecd
Prohibit creation of JetLightClass on built-ins
...
If we allow JetLightClass to be created on built-in types, a normal codegen
would be launched, with a mapping from Kotlin to Java types enabled, every time
IDE requests built-in classes. Codegen would then try to make something
meaningless, e.g. create a class for a primitive type (since our jet.Boolean is
mapped to primitive boolean). This would result in different exceptions when
navigating to built-in library from IDE.
Add a helpful error message to ClassFileFactory if we ever again produce
classes for primitive types.
2012-09-11 17:08:33 +04:00
Alex Tkachman
b45f19c0e2
GenerationState refactored to be (almost) immutable and methodless (modulo little protection from reuse)
...
GenerationStrategy introduced to handle separately cases of regular compilation and building of JetLightClasses (this was only real overridable behavior of GenerationState in old code)
state subpackage introduced
2012-08-30 09:33:10 +03:00
Alex Tkachman
8840a9bdd8
some static methods moved from JetTypeMapper to CodegenUtil & CodegenBinding
2012-08-29 14:30:44 +03:00
Nikolay Krasko
22794cbf64
Fix for EA-38626 - can't find class delegate for JetLightClass constructed for kotlin enum entry.
2012-08-28 19:32:46 +04:00
Andrey Breslav
08bb390820
Project is available in codegen
2012-08-24 12:18:18 +04:00
Nikolay Krasko
57d4a28a94
Remove duplicates and speeding-up PluginJetFilesProvider.allInScope
2012-08-23 15:53:41 +04:00
Nikolay Krasko
84a6c63d07
Remove some unused methods from QualifiedNamesUtil
2012-08-14 19:31:21 +04:00
Nikolay Krasko
b5357d8738
Compile against 122.29 idea eap
2012-08-14 13:19:08 +04:00
Evgeny Gerashchenko
67304c64ff
Removed unused myProject field from IntrinsicMethods. Removed from injector parameters, etc.
2012-08-09 15:13:42 +04:00
Nikolay Krasko
8d6b16eb23
Equals for JetLightClass
2012-08-08 15:23:40 +04:00
Andrey Breslav
5f3643804c
Import directives migrated from ASM 3.3 to 4.0 with renamed packages
2012-07-25 12:07:19 +04:00
Evgeny Gerashchenko
6e7d08b478
Introduced BuiltinsScopeExtensionMode enum. Using it instead of CompilerSpecialMode to create JavaBridgeConfiguration.
2012-07-07 23:07:18 +04:00
Evgeny Gerashchenko
5a88d28154
Got rid of dependency on compiler dependencies in injector for TDA for JVM.
2012-07-07 20:33:22 +04:00
Nikolay Krasko
f8371c1aa5
Check all files have same package
2012-06-20 16:23:37 +04:00
Nikolay Krasko
7b4fda4345
Don't create namespace class for file if codegen won't do so
2012-06-18 16:08:05 +04:00
Alex Tkachman
7d938dd98f
one more step to multi-file compilation
2012-06-06 12:17:25 +03:00
Nikolay Krasko
601007c20f
Stop using isJsProject method
2012-06-05 20:41:43 +04:00
Dmitry Jemerov
ff7be5b7c3
don't increment out-of-code-block modification count for changes that are not in Kotlin files
2012-05-25 15:42:45 +02:00
Dmitry Jemerov
fb5fd47591
remove try/finally which leads to masking of exceptions occurring during generation of stub class [r=max]
2012-05-24 17:34:47 +02:00
Stepan Koltsov
33a59ff5fe
Name class
...
In the most places in frontend identifier is stored in Name class, was in String.
Name has two advantages over String:
* validation: you cannot accidentally create identifier with dot, for example
* readability: if you see String, you don't now whether it is
identifier, fq name, jvm class name or something else
Name's disadvantage is (small) performance overhead. We have no value types in JVM.
2012-05-23 02:52:32 +04:00
Stepan Koltsov
ecc4c484a6
move NameUtils, FqName into name subpackage
2012-05-23 02:52:30 +04:00
Dmitry Jemerov
88c4778055
rename Kotlin methods used in Java code
2012-05-22 19:09:39 +02:00
Dmitry Jemerov
09cf7ac2aa
find usages and rename work for Kotlin classes called from Java code (KT-1641)
...
#KT-1641 fixed
2012-05-22 19:09:38 +02:00
Evgeny Gerashchenko
93b8a5ed5e
Fixed KT-2019 Unit test runner: navigation by double click from a test to source code does not work
...
#KT-2019 fixed
2012-05-18 20:55:56 +04:00
Stepan Koltsov
216cbf7d9a
assert error/NonExistentClass is only generated when mode = SIGNATURES
...
move classBuilderMode to injector and GenerationState from ClassBuilder
2012-04-19 18:56:05 +04:00
Stepan Koltsov
b47d37094e
properly report exception if analyze failed
...
#KT-1831 Fixed
2012-04-19 16:41:34 +04:00
Stepan Koltsov
bc00216df9
replace JavaPsiFacade with own
2012-04-12 20:45:00 +04:00
Nikolay Krasko
26b47c0180
KT-1755 Duplicates in completion
...
#KT-1755 fixed
2012-04-11 17:54:45 +04:00
Pavel V. Talanov
a030576052
Merge from brahch analyzeJS.
...
Conflicts:
compiler/backend/src/org/jetbrains/jet/codegen/GenerationState.java
compiler/cli/src/org/jetbrains/jet/compiler/CompileSession.java
compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/AnalyzerFacadeForJVM.java
compiler/tests/org/jetbrains/jet/codegen/GenerationUtils.java
compiler/tests/org/jetbrains/jet/resolve/ExpectedResolveData.java
compiler/tests/org/jetbrains/jet/types/JetDefaultModalityModifiersTest.java
idea/src/org/jetbrains/jet/plugin/libraries/JetSourceNavigationHelper.java
idea/src/org/jetbrains/jet/plugin/parameterInfo/JetFunctionParameterInfoHandler.java
idea/src/org/jetbrains/jet/plugin/project/WholeProjectAnalyzerFacade.java
idea/src/org/jetbrains/jet/plugin/quickfix/ChangeVariableMutabilityFix.java
idea/src/org/jetbrains/jet/plugin/quickfix/ImportInsertHelper.java
idea/src/org/jetbrains/jet/plugin/quickfix/QuickFixUtil.java
idea/src/org/jetbrains/jet/plugin/refactoring/JetNameSuggester.java
idea/src/org/jetbrains/jet/plugin/refactoring/JetRefactoringUtil.java
idea/src/org/jetbrains/jet/plugin/refactoring/introduceVariable/JetIntroduceVariableHandler.java
2012-04-09 17:06:56 +04:00
Stepan Koltsov
10dd366216
CompilerDependencies
...
Holds reference to runtime.jar and jdk-headers.jar. Paths to these
jars are no longer hardcoded.
Many tests now compile runtime before execution. Because of this:
* Single test invocation is significantly slower now for some tests
* This can be fixed by making tests independent from runtime (this
must be done anyway)
Some tests still depend on runtime.jar built by "ant dist", this
is to be fixed.
2012-04-09 03:04:50 +04:00
Pavel V. Talanov
766b4dc975
Move AnalyzerExhaust from frontend.java to frontend.
2012-04-04 16:11:40 +04:00
Maxim Shafirov
060be0a8f8
Refactor dependencies, so jet-as-java might be used in cli.
2012-03-29 21:18:35 +04:00
Stepan Koltsov
e6fda5b3d3
minor codegen refactoring
...
* cleanup after yesterday
* remove BindingContext stack in GenerationState
* use more power and strength of di
TODO: also initialize GenerationState by DI
2012-03-29 19:47:50 +04:00
Stepan Koltsov
1e330fe0a0
jvm.backend: get JetStandardLibrary from analyzer
...
This is a big step towards removal of JetStandardLibrary.getInstance()
2012-03-29 01:03:44 +04:00
Nikolay Krasko
0cd839f044
EA-34998 Check qualified name from external before creating instance of FqName
2012-03-22 17:46:18 +04:00
Stepan Koltsov
9557507beb
replace "0" suffix in variable names
2012-03-19 17:37:44 +04:00
Andrey Breslav
5af3770563
Assetion for EA-34591 - NPE: AbstractLightClass.isValid
2012-03-16 18:42:53 +04:00
Maxim Shafirov
ea8a416051
#KT-978 Fixed
2012-03-16 15:28:45 +04:00
Stepan Koltsov
82d77560a2
FqName class
...
for type safety, to easier distinguish between:
* short names
* qualified names
* jvm names (slash-separated)
* special names like <root>
* null values that mean "undefined" and "root ns" in different contexts
2012-03-13 21:51:38 +04:00
Andrey Breslav
97ec5b4344
Make JetLightClass analyze the whole project (with no caching, for now). This change is related to the following issues:
...
KT-1474 Execption when running kotlin project
KT-1501 Run script doesn't work in IDEA
In seems that to fix the problem completely, we need to avoid importing Java's default package into every file, but the problems reported in these requests are gone now.
#KT-1501 Fixed
#KT-1474 Fixed
2012-03-09 17:48:11 +04:00
Andrey Breslav
1078c95bf2
Platform-dependent AnalyzerFacades renamed to reflect platform-dependencies
2012-03-02 18:27:29 +04:00
Stepan Koltsov
67acb4c1e2
toString in error message
2012-02-29 17:03:48 +04:00
Stepan Koltsov
4ea99fc6ca
KotlinCompiler -stubs option
...
* do not fail on errors
* do not analyze function bodies
* generate "throw new RuntimeException()" in bytecode
2012-02-28 15:52:59 +04:00
Alex Tkachman
9ba1dbf98a
refactoring in progress
2012-02-27 22:59:34 +02:00
Nikolay Krasko
21b3be0ef0
Fix NPE because of nullable local name
2012-02-22 19:29:17 +04:00
Maxim Shafirov
a03922d467
Copyrights set to Apache, reflecting it's now open source
2012-02-14 19:25:06 +04:00
Nikolay Krasko
d3c37f65e4
KT-1051 Java interoperability completion - invalidating java packages strategy
2012-02-07 13:29:21 +04:00
Nikolay Krasko
ce6850ae4d
KT-1051 Java interoperability completion - fix java subpackages
2012-02-06 20:25:02 +04:00
Nikolay Krasko
e6197f0160
KT-801 Implement Naviagate -> Class... for kotlin
2012-02-06 16:36:36 +04:00
Nikolay Krasko
afd8f380c9
Insert import on applying top level function completion
2012-02-06 15:47:34 +04:00