Commit Graph

530 Commits

Author SHA1 Message Date
Stepan Koltsov 9376313fd0 extract method 2012-06-05 00:59:47 +04:00
Stepan Koltsov 9f4e466898 adjust ExpressionCodegen.resolveToCallable parameter type 2012-06-05 00:59:46 +04:00
Nikolay Krasko 3c4fdc0534 Fix "Type can be weakened" warning 2012-06-04 20:30:37 +04:00
Natalia.Ukhorskaya a1a3dfac41 Change invokespecial to invokevirtual for bridge methods 2012-06-04 17:42:27 +04:00
Dmitry Jemerov 58666f3eb7 unwrap parentheses around range expressions in pattern matching conditions (KT-1742) (thanks to Sergey Mashkov for the suggested fix) 2012-06-02 23:17:42 +02:00
Dmitry Jemerov e1cecd10b2 allow putting an Invert operation on stack as a void type (KT-1634) 2012-06-02 23:05:09 +02:00
Dmitry Jemerov 58c7c7aea1 don't generate direct increment and similar bytecodes for variables which are captured in closure (KT-1980) 2012-06-02 22:41:37 +02:00
Dmitry Jemerov ba9c3d73e7 when calling extension function, correctly put receiver on top of stack if it was generated before the extension function object (KT-1918) 2012-06-02 19:50:14 +02:00
Dmitry Jemerov 46bc7cf12f less confusing formatting 2012-06-02 19:10:41 +02:00
Dmitry Jemerov 12498e30eb support putting the result of a dummy comparison to stack (KT-1899) 2012-06-02 18:19:27 +02:00
Dmitry Jemerov f909745d1b use correct nullability information when generating equality checks in pattern matching (KT-2148) 2012-06-02 17:59:19 +02:00
Stepan Koltsov d46379acf2 better JetTypeMapper.getFQName 2012-06-02 03:35:09 +04:00
Stepan Koltsov 99621537b5 fix tests 2012-06-02 03:35:09 +04:00
Stepan Koltsov e42b5017ac codegen: ClosureAnnotator: restore assertion 2012-06-02 03:08:55 +04:00
Stepan Koltsov d6e8c57d11 codegen: ClosureAnnotator: remove todo 2012-06-02 03:08:54 +04:00
Stepan Koltsov adac7a364c remove comments added my mistake 2012-06-02 02:55:42 +04:00
Stepan Koltsov 4a01a55480 do not store jvm class name in descriptor name 2012-06-02 02:55:42 +04:00
Stepan Koltsov fc6c57e17a assert special name is not used to build FQ name 2012-06-02 02:18:29 +04:00
Stepan Koltsov 139e376f7c fix KT-2167 (enum generation)
#KT-2167 fixed
2012-06-02 02:18:29 +04:00
Stepan Koltsov a5eaa3abe3 safer CodegenContext: require contextType to be not null 2012-06-02 02:18:29 +04:00
Stepan Koltsov 98c80bfc73 do not store descriptors or JetTypes in CallableMethod 2012-06-01 19:18:56 +04:00
Stepan Koltsov ebd04ad046 pass all CallableMethod data in constructor 2012-06-01 19:18:56 +04:00
Stepan Koltsov 3512415f3f replace String with JvmClassName 2012-06-01 19:18:56 +04:00
Andrey Breslav c9583c21cf Merge pull request #62 from NataliaUkhorskaya/master
KT-2124 & KT-2044: Android-related fixes
2012-06-01 07:31:01 -07:00
Stepan Koltsov 59bdeda408 replace String with JvmClassName for readability 2012-06-01 18:04:46 +04:00
Stepan Koltsov 563d5cfd03 better assertion in ExpressionCodegen 2012-06-01 18:04:46 +04:00
Stepan Koltsov b984895e78 ScriptCodegen: extract gen constructor 2012-06-01 18:04:45 +04:00
Natalia.Ukhorskaya 0490c0b5f5 KT-2124 Fixed : Problem with reusement of local variables in bytecode for shared var 2012-06-01 15:01:15 +04:00
Natalia.Ukhorskaya bacc76944d KT-2044 : "this" added in local variables table in bytecode for local functions also 2012-06-01 13:56:11 +04:00
Stepan Koltsov 95414078b9 MemberCodegen
(move duplicate code into it)
2012-05-31 19:31:40 +04:00
Dmitry Jemerov b03966e8d0 coerce condition value to Type.BOOLEAN (KT-2147) 2012-05-31 13:59:42 +02:00
Andrey Breslav 37bc10689e Fix instanceof checks after introducing the TypeParameterDescriptor interface 2012-05-30 21:01:33 +04:00
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