Alexander Udalov
a533f8597d
Fix debug names for some slices
...
Also move RUNTIME_ASSERTION_INFO and LOAD_FROM_JAVA_SIGNATURE_ERRORS to a
single class for simplicity
2016-07-05 18:18:26 +03:00
Alexey Andreev
33248e7721
KT-3008: minor code style fixes
2016-06-27 15:33:31 +03:00
Alexey Andreev
97605a97da
KT-3008: multiple minor fixes after code review
2016-06-27 15:33:28 +03:00
Alexey Andreev
64cd0b70d7
KT-3008 Minor refactoring and clean up
2016-06-27 15:33:27 +03:00
Alexey Andreev
b090b79d92
KT-3008 Add UI that allows to change module kind in IDEA Kotlin configurator
2016-06-27 15:33:26 +03:00
Alexey Andreev
848d7f92fa
KT-3008 Implement AMD, CommonJS and UMD wrappers. Compile stdlib and builtins modules into separate JS files and wrap them in UMD.
2016-06-27 15:33:24 +03:00
Alexey Andreev
95b78e18df
KT-3008 Change the way how modules are referenced in JS
2016-06-27 15:33:23 +03:00
Ilya Chernikov
8dac72f465
Add support for script classfiles caching
2016-06-25 22:24:34 +03:00
Ilya Chernikov
64bb47ed37
Switch to File instead of String for classpaths in script dependencies
2016-06-25 22:24:30 +03:00
Ilya Chernikov
082290f8e3
Refactor script dependencies management
2016-06-25 22:24:23 +03:00
Ilya Chernikov
402e8c1e3e
Add dependency from annotation extraction mechanisms to the prototype, with tests
2016-06-25 22:24:14 +03:00
Ilya Gorbunov
7c5c4610e8
Rename -jdk compiler option to -jdk-home (jdkHome), add jdk path validation.
2016-06-23 22:47:45 +03:00
Ilya Gorbunov
644df89dc9
CLI: Allow to specify JDK for classpath building with '-jdk' compiler argument.
...
Maven: support jdk parameter linked to kotlin.compiler.jdk property.
Gradle: support jdk compiler option.
2016-06-23 22:46:07 +03:00
Pavel V. Talanov
5d31d6d98d
REPL: call 'toString()' for returned values explicitly and correctly report exceptions
...
#KT-12389 Fixed
2016-06-23 16:12:03 +03:00
Pavel V. Talanov
8ac40d7401
Refactor Repl: use sealed class to represent line result
2016-06-23 16:12:01 +03:00
Pavel V. Talanov
17832e10e7
Refactor ReplInterpreter and ReplFromTerminal classes
...
Drop some of the exception reporting code
2016-06-23 16:11:50 +03:00
Pavel V. Talanov
246409d033
J2K ReplFromTerminal: rename file
2016-06-23 15:58:07 +03:00
Pavel V. Talanov
35c56431b3
J2K ReplFromTerminal, convert code
2016-06-23 15:58:05 +03:00
Dmitry Jemerov
75b860ab95
handle IOException from File.getCanonicalFile() (EA-83981 - NA: KotlinToJVMBytecodeCompiler.reportRuntimeConflicts)
...
(cherry picked from commit 765bd44)
2016-06-21 12:07:50 +02:00
Alexander Udalov
da332d1a27
Validate "-jvm-target" value in CLI, improve message
2016-06-16 16:51:18 +03:00
Mikhael Bogdanov
3a8591a729
Support 'jvm-target' in CLI
2016-06-15 13:43:29 +03:00
Denis Zharkov
077fc528d1
Minor. Change CompilationException parameter to @Nullable
...
A lot of call sites actally pass null as an element,
so it's better to fail with original stack-trace instead of NPE
caused by nullability check
2016-06-08 18:53:16 +03:00
Ilya Chernikov
7153ea61d8
Restore logic of StandardScriptDefinition handling, fixes codegen tests
2016-06-07 21:13:06 +02:00
Ilya Chernikov
e8c13882b4
Make script detection API generic, fix tests
2016-06-07 21:13:05 +02:00
Ilya Chernikov
656fcc9775
Refactor and fixes after review
...
improving script constructor search algorithm - now default params should be supported
remove prefix Customized- from scripts ModuleInfo-related classes
refactoring ideaModuleInfos after review
refactoring ResolveSessionProvider construction for readability
refactoring KotlinScriptConfigurationManager after review
fixing KotlinScriptDefinitionProvider after review
2016-06-07 21:13:04 +02:00
Ilya Chernikov
478ae96e50
Implement a compiler config key to add preconfigured extra imports for scripts
2016-06-07 21:13:01 +02:00
Ilya Chernikov
956bcf6d7a
Fix permgen problems with script launching by avoiding reflection as much as possible
2016-06-07 21:13:00 +02:00
Ilya Chernikov
b9ea9513b1
Rewrite handing and caching of script configurations
...
The refactoring could enable lazy update of the index on script loading, but seems that makeRootsChange
call doesn't work as expected, therefore initial project scan is performed in the KotlinScriptConfigurationManager
anyway
2016-06-07 21:12:59 +02:00
Ilya Chernikov
3e6616de42
Read script config if appropriate flag is specified, fix classpath handling
2016-06-07 21:12:58 +02:00
Ilya Chernikov
3e17724e58
Implement class finder for customized scripts resolving - not yet completely functional
2016-06-07 21:12:54 +02:00
Ilya Chernikov
b63ed0f4aa
Make script launcher aware of custom scripts, minor correction is core env
2016-06-07 21:12:53 +02:00
Ilya Chernikov
06a586bb82
Add reading script configuration files on compilation
2016-06-07 21:12:51 +02:00
Ilya Chernikov
310e8014a8
Refactor KotlinScriptDefinitionProvider access to scriptDefinitions
2016-06-07 21:12:48 +02:00
Ilya Chernikov
770ef16ef7
Replace script recognition from by PsiFile to by virtual file, fix custom script name generation
2016-06-07 21:11:28 +02:00
Ilya Chernikov
d225385d19
Add name and classpath to KotlinScriptDefinition
2016-06-07 21:11:26 +02:00
Ilya Chernikov
670627ac4e
Add helpers, compilation function and tests for passing classes as a parameters to a script
2016-06-07 21:11:23 +02:00
Alexander Udalov
e3164119c1
Inline PrintingMessageCollector#PLAIN_TEXT_TO_SYSTEM_ERR
...
Otherwise 'hasErrors' flags was not cleared between subsequent runs of tests
which were using this message collector
2016-06-07 21:12:24 +03:00
Alexey Tsvetkov
fd60ec4171
Set idea.io.use.nio2=true every build on windows
...
Otherwise (setting property once in static block) gradle daemon might clear system properties
#KT-11770 fixed
2016-06-07 14:42:30 +03:00
Alexander Udalov
68c5e8e190
Minor, add comments on declarations used in Eclipse plugin
2016-05-27 19:40:50 +03:00
Alexander Udalov
a95568eedf
Minor, make Services#get return type nullable
2016-05-27 19:40:50 +03:00
Pavel V. Talanov
76971eca70
Refactor LanguageFeatureSettings: Add LanguageVersion and LanguageFeature entities
2016-05-26 22:16:47 +03:00
Alexander Udalov
bc5202a4d7
Validate "-language-version" argument value, add tests
2016-05-26 22:15:39 +03:00
Alexander Udalov
e1ba4480d7
Support "-language-version" CLI option for compatibility with older releases
...
Introduce LanguageFeatureSettings, instance of which should be injected by the
container and be accessible everywhere during the compilation (front-end and
back-end).
Parameters of LanguageFeatureSettings are unused in this commit, will be used
later
2016-05-26 22:15:39 +03:00
Alexander Udalov
159d88102f
Use MODULE_NAME configuration key in JS instead of MODULE_ID
2016-05-26 11:47:30 +03:00
Alexander Udalov
05f8836f46
Move some configuration keys to JVM or to CommonConfigurationKeys
...
Move CONTENT_ROOTS and SCRIPT_DEFINITIONS_KEY to JVMConfigurationKeys because
they are only used on JVM, rename the latter to SCRIPT_DEFINITIONS.
Move MODULE_NAME to CommonConfigurationKeys to be combined with MODULE_ID in
JSConfigurationKeys in the future
2016-05-26 11:47:30 +03:00
Alexander Udalov
d04624cfe9
Minor, refactor KotlinToJVMBytecodeCompiler#compileModules
2016-05-26 11:47:30 +03:00
Alexander Udalov
cad4b6973c
Introduce and use JSConfigurationKeys similar to JVMConfigurationKeys
...
Use type-safe keys in CompilerConfiguration instead of multiple parameters,
duplicated in the base class (JsConfig), derived class (LibrarySourcesConfig)
and its builder (LibrarySourcesConfig.Builder)
2016-05-26 11:47:30 +03:00
Alexander Udalov
b65980f3b7
Drop JsConfig#inlineEnabled flag
...
Use CommonConfigurationKeys#DISABLE_INLINE flag (moved from
JVMConfigurationKeys) in CompilerConfiguration instead, similarly to the JVM
compiler
2016-05-26 11:47:30 +03:00
Alexander Udalov
6889bdbef8
Add CompilerConfiguration to JsConfig
...
Will be used to store common compiler options (such as source version, inline
disabled, etc) as well as JS-specific options, to unify the logic of compiler
option initialization between JS and JVM compilers
2016-05-26 11:47:30 +03:00
Alexander Udalov
116e4a5ced
Rename Config -> JsConfig
2016-05-26 11:47:30 +03:00