Commit Graph

484 Commits

Author SHA1 Message Date
Svetlana Isakova 4d62fbad2b changed resolution order: first priority is 'local extensions; members; nonlocal extensions', than by implicit receivers (before was vice versa) 2012-04-17 14:05:45 +04:00
Andrey Breslav 4eb594024a Removed the exec(String...) method in KotlinCompiler
It's important to be aware of what stream the messages will be written to, so such a default implementation is harmful
2012-04-13 19:59:28 +04:00
Andrey Breslav 882412ea06 Proper handling of compiler messages
We used to have a triple (errorStream, messageRenderer, verbose) to represent the error reporting strategy.
 Now we have a single MessageCollector abstraction for this.
 As the MessageCollector abstraction was extracted, the need to CompilerMessageLocation and CompilerMessageSeverity arose, too.
2012-04-13 19:38:23 +04:00
Andrey Breslav 71bac57411 Got rid of CompileSession class: this class shouldn't have had any objects, now it is transformed into KotlinToJVMBytecodeCompiler 2012-04-13 19:38:22 +04:00
Stepan Koltsov 829f73cc5f some classes from runtime.jar are not meant to be loaded by JDR
* assert runtime implementations from JetStandard* are not loaded
  by JavaDescriptorResolver
* fix wrong @JetMethod in jet.Iterator
* fix jet.Iterator ns was created
* fix incorrect number of functions and tuples in JetStandardClasses
* added TODO about inconsisten Tuple class
2012-04-11 20:00:01 +04:00
Andrey Breslav b5008ebd57 Separate environments for module script compilation and project compilation 2012-04-11 16:13:11 +04:00
Andrey Breslav f34e492022 JetCoreEnvironment encapsulates a project (in the IDEA sense), so the classpath and sources lie in its area of responsibility 2012-04-11 16:13:11 +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 9711d18dca Revert "BytecodeCompilerTest" temporarily
This reverts commit 18170a0b29.
2012-04-09 18:54:28 +04:00
Stepan Koltsov 18170a0b29 BytecodeCompilerTest 2012-04-09 18:22:23 +04:00
Stepan Koltsov a41edaa224 better tmp dir name in TestCaseWithTmpdirIndependentFromIdea 2012-04-09 18:22:22 +04:00
Stepan Koltsov bcbcb48ef8 remove unused parameters 2012-04-09 18:22:22 +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 aae7ba734d useless environment field in CompileEnvironmentTest 2012-04-09 02:09:12 +04:00
Stepan Koltsov ea6b54ee45 ForTestCompileBuiltins and ForTestCompileJdkHeaders
(will be used later)
2012-04-09 00:07:53 +04:00
Stepan Koltsov 956bf0107e missed field name 2012-04-09 00:07:53 +04:00
Stepan Koltsov 4125a508ec create forTestCompile package 2012-04-09 00:07:52 +04:00
Stepan Koltsov d74c217936 rename stdlib to runtime 2012-04-08 23:31:29 +04:00
Nikolay Krasko 4ec080f71f KT-1666 Invoking "Go to Declaration" for String type offers two variants - Temp boring fix
#KT-1666 fixed
2012-04-08 20:38:11 +04:00
Stepan Koltsov f16895ba65 new compiler mode: stdlib
include jdk-headers, do not include runtime
2012-04-08 02:08:27 +04:00
Stepan Koltsov b38e171812 MapTypeMode and properly map builtins
used in JetTypeMapper in JetTypeMapper

* MapTypeMode contains no information not needed by JetTypeMapper
* MapTypeMode has separate VALUE and IMPL values that are needed to compile builtins
2012-04-07 06:32:18 +04:00
Stepan Koltsov d8e86b12aa CompileStdlibTest 2012-04-07 06:32:18 +04:00
Evgeny Gerashchenko 83bd57184d Added test cases for classes, its members, function and tuple types to DescriptorRendererTest. 2012-04-06 20:04:57 +04:00
Pavel V. Talanov 2150789502 AnalyzerFacadeForJS implements interface AnalyzerFacade.
Delete analyzer*WithCache methods from AnalyzerFacadeForJVM.
Introduce JsModuleDetector.
Move AnalyzerFacadeWithCache to idea module. Make it static, make it acquire facade through AnalyzerFacadeProvider.
2012-04-06 17:39:24 +04:00
Evgeny Gerashchenko 2c3ff4357e Added simple DescriptorRendererTest checking for global functions and properties. 2012-04-06 17:24:30 +04:00
Evgeny Gerashchenko 9794c0f730 Extracted getting test metadata from comment lines from LibrariesWithSourcesTest to JetTestUtils. 2012-04-06 17:22:24 +04:00
Nikolay Krasko 4d19fd05b1 KT-1702 Renaming file causes "Operation not supported" and invalid imports
(Rename problem was caused because of invalid reference to file from package. Fix contains:
 - Change structure of references in package expression - last part is also a reference now
 - Resolve packages to expression but not to files)

  #KT-1702 fixed
2012-04-06 14:46:23 +04:00
Pavel V. Talanov 1ad12b29fa Extract AnalyzerFacade interface. Extract AnalyzerFacadeWithCache decorator for AnalyzerFacade. 2012-04-04 17:20:27 +04:00
Pavel V. Talanov 766b4dc975 Move AnalyzerExhaust from frontend.java to frontend. 2012-04-04 16:11:40 +04:00
Alex Tkachman ffbce7fe1e KT-1589: Array<T>(size) renamed to arrayOfNulls 2012-04-02 14:30:37 +03:00
Alex Tkachman a4ebbaa1a0 KT-1441 proper identityEquals 2012-04-02 13:32:31 +03:00
Alex Tkachman 9d752561eb almost full support for annotations 2012-04-01 21:50:01 +03:00
Alex Tkachman 0cb26b0566 more annotations 2012-03-31 16:14:32 +03:00
Svetlana Isakova 4f30e12177 fixes after merge 2012-03-30 13:38:36 +04:00
Svetlana Isakova 5419b0a3dc Tests fixed after visibility changing 2012-03-30 13:38:36 +04:00
Stepan Koltsov 2c4094f4d4 proper environment when compiling special things
* do not include anything when compiling builtins
* do not include kotlin-runtime and jdk-headers when compiling jdk-headers
2012-03-30 03:54:58 +04:00
Stepan Koltsov ec367a0bf0 merge copy-paste after excessive inline in e6fda5 2012-03-29 23:39:01 +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
Andrey Breslav ed04839901 renaming/code moving to meet the code style 2012-03-29 19:22:55 +04:00
Andrey Breslav 0ae59df0b1 A little renaming to make code more clear 2012-03-29 16:17:43 +04:00
Stepan Koltsov 5bef29870d more di in jvm.codegen 2012-03-29 01:37:02 +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
Stepan Koltsov ca30e7b67b rename class 2012-03-28 23:56:34 +04:00
Stepan Koltsov 231a4d9940 injector for JVM codegen 2012-03-28 23:39:03 +04:00
Svetlana Isakova f7cfb36f62 # KT-1579 Fixed Can't import nested class/trait 2012-03-27 16:20:59 +04:00
Stepan Koltsov 69c9d3ffad PsiClassFinder 2012-03-27 00:27:27 +04:00