Commit Graph

1105 Commits

Author SHA1 Message Date
Andrey Breslav 0b33877144 Simplified SHEBANG comment detection
* %line & %column removed (zzCurrentPos used instead)
* jflex cmd arguments reverted
2012-05-29 11:41:54 +04:00
Andrey Breslav 85cffd9e90 Unused methods removed 2012-05-29 11:11:08 +04:00
Stepan Koltsov 25f71bcd3a skip shebang in the first line
Something like this works now:

===
% PATH="./bin:$PATH" ./sum.ktscript 31 21
31 + 21 = 52

% cat sum.ktscript
#!/usr/bin/env kotlin -script

val a = Integer.parseInt(args[0])
val b = Integer.parseInt(args[1])
println("$a + $b = ${a + b}")
===
2012-05-28 22:59:03 +04:00
Stepan Koltsov 30e44fdc5f script parameters
still a lot of things to do
2012-05-28 20:31:29 +04:00
Stepan Koltsov 6244404344 JetTypeName utility 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
Svetlana Isakova 2165d5b765 fix for 'JetControlFlowTest.testLocalDeclarations' test 2012-05-28 18:37:13 +04:00
Stepan Koltsov c2c45669f0 Validate parameters in fillInSubstitutionContext 2012-05-28 17:34:44 +04:00
Stepan Koltsov a1714d99cf DependencyClassByFqNameResolver 2012-05-28 17:34:44 +04:00
Svetlana Isakova 84d60b8baa check deeply inner local declarations added 2012-05-28 15:21:40 +04:00
Svetlana Isakova b4f765bd76 no different objects for VariableInitState 2012-05-28 14:57:22 +04:00
Svetlana Isakova de67cae571 no need in possible local initializers
for each variable for each instruction
rename
2012-05-28 13:48:49 +04:00
Svetlana Isakova 468052c3a5 renames 2012-05-28 13:00:47 +04:00
Svetlana Isakova dfbd9922d9 fixes after merge
get rid of JetControlFlowDataTraceFactory
2012-05-28 12:32:45 +04:00
Svetlana Isakova a79ea0c86b changes in 'PseudocodeTraverser' interface 2012-05-28 12:09:45 +04:00
Svetlana Isakova 8acfa20a02 lazy computing of pseudocode variables data
no need in special 'data' classes
2012-05-28 12:09:45 +04:00
Svetlana Isakova cdcedbe6ed all traverse pseudocode methods made static 2012-05-28 12:09:45 +04:00
Svetlana Isakova ac41cab340 added PseudocodeUtil responsible for creation 2012-05-28 12:09:45 +04:00
Svetlana Isakova 5c7206ef49 'Pseudocode' interface improvements 2012-05-28 12:09:45 +04:00
Svetlana Isakova 0bf65bfe1e get rid of JetPseudocodeTrace
and JetControlFlowDataTraceFactory
2012-05-28 12:09:44 +04:00
Svetlana Isakova 09a91f2f92 IPseudocode was a temporary name
to deceive idea's git and commit it
2012-05-28 12:06:13 +04:00
Svetlana Isakova f4920b7d09 added 'Pseudocode' interface
'Pseudocode' class was renamed to 'PseudocodeImpl'
2012-05-28 12:06:13 +04:00
Svetlana Isakova edb529f68f added edge 'error' -> 'sink'
added 'getLocalDeclarations' method to pseudocode
2012-05-28 12:06:12 +04:00
Svetlana Isakova 5c7b787e68 reversed traverse in depth 2012-05-28 12:06:12 +04:00
Svetlana Isakova fb08e13da9 added PseudocodeData
to store information about variables for each instruction: initialization and use statuses
2012-05-28 12:06:12 +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
Andrey Breslav 3702bdea70 getTypeConstructor() pushed back down 2012-05-25 23:02:51 +04:00
Andrey Breslav 0182b87732 hasConstructors() removed, a few members pulled up 2012-05-25 22:59:39 +04:00
Andrey Breslav af3f9250ef SafeName method added 2012-05-25 22:58:38 +04:00
Andrey Breslav 73dab58bc7 Type projection is not a declaration 2012-05-25 20:40:05 +04:00
Andrey Breslav 7ce4d427f0 Sort out root namespace names 2012-05-25 18:58:23 +04:00
Andrey Breslav ab82049287 MutableDeclarationDescriptor removed 2012-05-25 17:09:48 +04:00
Andrey Breslav 3c0c08c665 Base class for class descriptors extracted.
Will be used for lazy resolve
2012-05-25 16:58:46 +04:00
Andrey Breslav 4d0a07f772 Missing annotation added 2012-05-25 16:58:46 +04:00
Stepan Koltsov c38f19dbd9 unconditional assertion, helpful message 2012-05-25 15:07:54 +04:00
Svetlana Isakova f03ce0795e KT-2096 Abstract property with no type specified causes compiler to crash
#KT-2096 fixed
2012-05-25 14:04:32 +04:00
Dmitry Jemerov 4bf6a46afb it helps to write what you read 2012-05-24 16:20:35 +02:00
Dmitry Jemerov 39fe59d40a inheritor navigation works from Java to Kotlin 2012-05-24 16:20:35 +02:00
Dmitry Jemerov 783dbdd605 index occurrences of superclass names for Kotlin classes 2012-05-24 16:20:34 +02:00
Svetlana Isakova 3fe9a8beca removed TypeUtils.FORBIDDEN constant 2012-05-24 12:34:04 +04:00
Svetlana Isakova 0fd882741b function invocation with only type parameters prohibited 2012-05-23 22:04:22 +04:00
Svetlana Isakova b22a7dbf99 KT-2014 Better diagnostic when using property syntax to call a method
#KT-2014 fixed
2012-05-23 21:53:17 +04:00
Alexander.Podkhalyuzin b9267dc7cf Fixed KT-2071: Cannot Introduce Variable from function literal. 2012-05-23 15:58:55 +04:00
Andrey Breslav 59b533ccd3 Method name fixed 2012-05-23 14:33:34 +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 3c64fbb2a0 LabelName stores label name
TODO: uncomment assertions in LabelName constructor
2012-05-23 02:52:31 +04:00
Stepan Koltsov 65a6b7f726 mute Idea inspection false positives 2012-05-23 02:52:31 +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
Stepan Koltsov d6bf8876a3 analyze kotlin scripts 2012-05-23 02:52:29 +04:00