Commit Graph

498 Commits

Author SHA1 Message Date
Stepan Koltsov 30e44fdc5f script parameters
still a lot of things to do
2012-05-28 20:31:29 +04:00
Andrey Breslav e4007992c6 Extract interface: TypeParameterDescriptor
A lot of code relied on these descriptors being mutable. In most cases I managed to work around this,
 but there're still are casts to raw List necessary in one or two places
2012-05-28 20:02:36 +04:00
Stepan Koltsov b2cea09fcc move inner classes of CodegenContext into CodegenContexts 2012-05-28 17:35:08 +04:00
Dmitry Jemerov 8b00bb1c52 rethrow ProcessCanceledException 2012-05-25 18:11:26 +02:00
Dmitry Jemerov e78e5f58cd rethrow ProcessCanceledException 2012-05-25 17:26:54 +02:00
Dmitry Jemerov 2f32e9c60d map intersection type to its common supertype 2012-05-24 17:58:00 +02:00
Stepan Koltsov 8800e4587a fix compilation 2012-05-23 03:01:46 +04: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 ac1bf66251 remove obsolete code 2012-05-23 02:52:30 +04:00
Stepan Koltsov ecc4c484a6 move NameUtils, FqName into name subpackage 2012-05-23 02:52:30 +04:00
Stepan Koltsov f4051f45ab generate bytecode for script
It is just prototype

* does not make top level symbols visible as class members yet
* does not take parameters
* Script class name is hardcoded now
2012-05-23 02:52:29 +04:00
Alex Tkachman f15cb22809 patch from Natasha to fix local var table 0 for function literals 2012-05-22 19:10:59 +03:00
Stepan Koltsov fdb2b98b0c more di in jvm backend 2012-05-21 19:20:32 +04:00
Stepan Koltsov 99cc26866e jvm backend: use JvmClassName instead of String 2012-05-21 19:20:23 +04:00
Stepan Koltsov 724f69bced jvm backend: refactoring artifact 2012-05-21 19:18:22 +04:00
Stepan Koltsov 4cf2e7bd3d ClassCodegen is stateless, put it into context 2012-05-19 00:23:59 +04:00
Natalia.Ukhorskaya 162cc7307d KT-1935 Fixed: ACC_SUPER flag must be set for classes 2012-05-11 12:52:26 +04:00
Stepan Koltsov ded824468a replace String with JvmClassName 2012-05-11 01:08:33 +04:00
Stepan Koltsov 9908791094 KT-1829 NoClassDefFoundError when using java inner classes
#KT-1829 Fixed
2012-05-11 01:08:30 +04:00
Alex Tkachman 6d2deaa70c KT-1600: call to non-overriden generic method 2012-05-10 16:45:34 +03:00
Svetlana Isakova 3053ac78e4 MUST_BE_WRAPPED_IN_A_REF was renamed to CAPTURED_IN_CLOSURE (immutable variables are stored there as well) 2012-05-03 19:30:13 +04:00
Svetlana Isakova d4b816ef56 KT-1743 Analyze immutable local variables and parameters which are captured in closure
#KT-1743 fixed
2012-05-03 17:56:45 +04:00
Alex Tkachman d58e988ca5 incorporating Sveta's patch on VariableAsFunctionResolvedCall 2012-05-03 12:56:51 +03:00
Stepan Koltsov 67013cbaf5 fix one more error in error diagnostics 2012-05-01 19:21:44 +04:00
Alex Tkachman f076ff027d KT-729 Need to support arrays as varargs 2012-04-28 10:43:49 +03:00
Alex Tkachman 7b7987ba0d KT-1759 str.plus(str) 2012-04-28 08:09:02 +03:00
Andrey Breslav 5453598b2f Declared vs inherited default values
A value parameter _declares _a default value when the value is explicitly provided in the declaration of the parameter.
A value parameter _has_ a default value when it declares a default value or an overridden function declares it for the same parameter
2012-04-27 20:05:42 +04:00
Andrey Breslav 88a0f70e8f Assertion added 2012-04-27 20:05:42 +04:00
Andrey Breslav 83de1581ca Trust your spell-checker: it's "overridden" 2012-04-27 10:47:28 +04:00
pTalanov 9f92b0b5d7 Refactor cli: all the jvm stuff goes under org.jetbrains.jet.cli.jvm, common stuff under org.jetbrains.jet.cli.common 2012-04-25 20:39:44 +04:00
pTalanov d0d5b147f2 Refactor cli: all the jvm stuff goes under org.jetbrains.jet.cli.jvm, common stuff under org.jetbrains.jet.cli.common 2012-04-25 20:19:15 +04:00
Andrey Breslav d0bd5cf9c6 Properly positioning compilation exceptions in the IDE 2012-04-25 12:25:00 +04:00
Andrey Breslav 3eb6b3d0f5 Formatting 2012-04-25 12:20:27 +04:00
Andrey Breslav 993bf65087 Providing reasonable information about compilation exceptions
Self message, cause message and both position in the file under compilation and the executed file position are reported
2012-04-23 19:17:35 +04:00
Stepan Koltsov 3b0c9244c9 di: @PreDestroy
I need in my private experiments
2012-04-20 21:33:18 +04:00
Stepan Koltsov 994e6fe009 di: store everything in fields
needed to implement @PreDestroy
2012-04-20 21:33:17 +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 0efe0d5d93 better message in CompilationException 2012-04-19 14:32:02 +04:00
Svetlana Isakova 71102627c0 'isClassObject' method moved from CodegenUtil to DescriptorUtils 2012-04-18 19:59:15 +04:00
Nikolay Krasko 531ffaaffa KT-1645 Propose members according to smart casts
#KT-1645 fixed
2012-04-13 15:35:55 +04:00
Stepan Koltsov 71f89ef130 more descriptorToDeclaration utils
* custom versions
* normalization code moved out of norializer
* hide DESCRIPTOR_TO_DECLARATION (make package local)
2012-04-12 00:24:12 +04:00
Stepan Koltsov e37f24ce4f do not use BindingContext.DESCRIPTOR_TO_DECLARATION explictly 2012-04-12 00:24:12 +04:00
Stepan Koltsov a889e29147 else on the next line
as requested by http://confluence.jetbrains.net/display/JET/Code+Conventions+for+Java

(sed is your friend)
2012-04-10 00:03:13 +04:00
Stepan Koltsov abfd03cae3 descriptor name cannot be empty string
* add assertion
* fix tests
* #KT-1748 Fixed
2012-04-09 22:31:56 +04:00
Pavel V. Talanov 7dd0e50bcd Merge with branch "AnalyzerJS" 2012-04-09 17:08:57 +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
Pavel V. Talanov 652be4ed95 Revert misleading whitespace changes. 2012-04-09 15:04:27 +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
Stepan Koltsov 09ddfb714e cleanup in JavaDescriptorResolver 2012-04-08 23:23:59 +04:00
Stepan Koltsov 0f166acf5d assertions in closure annotator 2012-04-08 02:08:27 +04:00