Commit Graph

229 Commits

Author SHA1 Message Date
Stepan Koltsov 1d0ef01eea REPL overload resolution ambiguity
Fix overload resolution ambiguity in REPL. Note, resolution for
functions declared in script is very different from regular programs:
in scripts function declared later wins. See
functionOverloadResolutionAnyBeatsString for example.

#KT-2272 Fixed
2012-06-14 14:06:17 +04:00
Stepan Koltsov 87871d0f91 repl: do not print null is last expression type is unit 2012-06-13 22:43:11 +04:00
Stepan Koltsov dfd3aac900 ExceptionUtils.closeQuietly 2012-06-13 20:00:54 +04:00
Stepan Koltsov ca8ae7a4ae do not close output stream in writeToJar 2012-06-13 15:32:37 +04:00
Stepan Koltsov 8dd1465371 pull script up in cli 2012-06-10 03:44:29 +04:00
Stepan Koltsov 7851101c0e do not write main if there's more than one main 2012-06-10 03:44:29 +04:00
Stepan Koltsov 35f1de468f refactor compiler launcher
* method should not modify input
* replace String with File
* add @NotNull and @Nullable annotations
2012-06-10 03:44:29 +04:00
Stepan Koltsov 4687635c8f properly close OutputStream 2012-06-10 03:44:28 +04:00
Stepan Koltsov 3bf648ed56 repl: dump bytecode command 2012-06-09 23:25:40 +04:00
Stepan Koltsov d921304535 repl: quit command 2012-06-09 23:25:40 +04:00
Stepan Koltsov b99f7c5505 repl: help command 2012-06-09 23:25:39 +04:00
Leonid Shalupov 3fe6d5d2dc maven fixes 2012-06-09 19:19:41 +04:00
Stepan Koltsov c4d29146cb trying to fix maven build 2012-06-09 18:55:49 +04:00
Stepan Koltsov 084175722b fix classpath construction in repl 2012-06-09 00:48:58 +04:00
Stepan Koltsov 8c7a879e65 jline for repl 2012-06-09 00:28:17 +04:00
Stepan Koltsov 48b1ab417b invoke repl from command line 2012-06-09 00:28:17 +04:00
Stepan Koltsov bc82284d83 add stdlib to repl classpath 2012-06-09 00:19:34 +04:00
Stepan Koltsov 8d0a008529 trying to fix ReplInterpreterTest on teamcity 2012-06-08 18:17:29 +04:00
Stepan Koltsov 6946abbcea working on REPL: implemented previous lines importing 2012-06-08 04:19:24 +04:00
Stepan Koltsov 8a3d3d21bd better script class name 2012-06-08 04:19:23 +04:00
Svetlana Isakova ec5aed82af KT-2207 Syntax errors are not reported from the compiler
#KT-2207 fixed
2012-06-07 18:28:37 +04:00
Stepan Koltsov bace845b49 working on REPL: test template and basic analyzer hacks 2012-06-06 23:58:21 +04:00
pTalanov a5801198d5 At first add all sources and only then analyze files 2012-06-01 16:27:39 +04:00
pTalanov cbcee10618 K2JSCompiler and K2JSTranslator fixes (mostly codestyle) 2012-06-01 15:19:47 +04:00
James Strachan 4cff5f9759 modified the JS compiler so that it can have definitions and library sources specified or discovered on the classpath; so for example we can then discover the kotlin standard library kotlin that needs to be compiled; plus the JS library definitions (which map to the kotlin-lib.js file) 2012-05-30 15:51:08 +01:00
James Strachan d7573b49a6 allow the JS compiler to take a list of files, verbose flag and a flag to indicate if a main call is required; plus added a test case to ensure we can compile some of the kotlin standard library using the K2JSCompiler directly 2012-05-30 11:31:35 +01:00
James Strachan 4ef8a3ce50 only log files compiled if verbose is enabled 2012-05-29 17:42:42 +01:00
James Strachan 4921aeafc3 refactored the maven plugin to use the vanilla K2JSCompiler directly and avoid using the K2JVMCompiler when generating JS code; also included a default LibrarySourceConfig which detects JS library code on the classpath which works nicer in maven/ant style worlds where dependencies tend to be specified rather than file paths to zip files 2012-05-29 17:28:15 +01:00
Stepan Koltsov 30e44fdc5f script parameters
still a lot of things to do
2012-05-28 20:31:29 +04:00
Svetlana Isakova 0bf65bfe1e get rid of JetPseudocodeTrace
and JetControlFlowDataTraceFactory
2012-05-28 12:09:44 +04:00
Nikolay Krasko e946a0f908 - Out of block modification strategy for Kotlin block expression
- Separate project analysis for IDEA needs: headers + bodies
2012-05-27 17:39:56 +04:00
Evgeny Gerashchenko ea36cf9fb0 Reverted all changes related to renaming jdkHeaders to altHeaders. 2012-05-23 17:05:09 +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 ecc4c484a6 move NameUtils, FqName into name subpackage 2012-05-23 02:52:30 +04:00
Stepan Koltsov 6063c01a1c command line script launcher
% ./bin/kotlin -script hello.ktscript
hello world

% cat hello.ktscript
fun hello(what: String) = println("hello $what")
hello("world")

Note it currently takes 8 seconds to evaluate hello world script.
2012-05-23 02:52:30 +04:00
Stepan Koltsov 5fc73a4cd4 parse kotlin scripts
http://confluence.jetbrains.net/display/~stepan.koltsov/REPL
2012-05-23 02:52:29 +04:00
Svetlana Isakova b63d3905f9 KT-1256 Error highlighting in IDE should be less annoying
#KT-1256 fixed
2012-05-22 18:23:51 +04:00
Stepan Koltsov 8623fba01b cli: store unused arguments 2012-05-22 00:02:56 +04:00
James Strachan cf6622b4fa added workaround to maven compiler bug; we may want to throw an exception though if its really a problem 2012-05-18 19:50:27 +01:00
pTalanov c8fe0080c7 Fix compilation for maven build 2012-05-16 17:43:12 +04:00
pTalanov a9af4960cb Introduce some convenience methods related to EcmaVersion 2012-05-15 22:20:13 +04:00
pTalanov b9b9e46275 Clean up and stylistic changes after merging in https://github.com/JetBrains/kotlin/pull/55 2012-05-15 22:20:11 +04:00
develar e0be72d5b5 http://devnet.jetbrains.net/thread/436214?tstart=0 2012-05-15 22:20:10 +04:00
Evgeny Gerashchenko 15f6e7403e Renamed jdkHeaders to altHeaders in all places where it makes sense. 2012-05-15 15:19:55 +04:00
Evgeny Gerashchenko 4ab2588cbd Made compiler aware of multiple alt-header paths. 2012-05-15 15:19:55 +04:00
pTalanov 869a8ab1ba Refactoring of K2JSTranslator and neighboring classes
Drop GenerationUtils
Introduce MainCallParameters
Generate calls to main function together with the other code in contrast to as text afterwards
Enhance tests a bit
2012-05-05 18:50:02 +04:00
pTalanov 9681a61fd2 Pure cosmetics in K2JSCompiler* 2012-05-05 17:10:58 +04:00
Stepan Koltsov 80aee299ba remove nop code 2012-05-04 23:57:14 +04:00
Stepan Koltsov dd332bc08c -mode idea
#KT-1893 Fixed
2012-05-04 23:57:13 +04:00
Leonid Shalupov 4a0f929fc3 bin scripts to call js compiler 2012-05-04 23:50:41 +04:00