Commit Graph

52 Commits

Author SHA1 Message Date
Stepan Koltsov a95cc798a2 remove JetStandardLibrary dependency from jvm backend 2012-06-17 03:53:12 +04:00
Stepan Koltsov 9290f55bad JavaDescriptorResolver is not needed for body resolver
* create InjectorForBodyResolve
* split ScriptDescriptor into ScriptDeclarationResolve and ScriptBodyResolver
2012-06-13 19:27:17 +04:00
Andrey Breslav d6f279926c Lazy resolve: Support for imports and Java interop 2012-06-09 15:53:29 +04:00
Stepan Koltsov a8ccc46253 properly generate bean name for class "Impl" 2012-06-08 18:02:38 +04:00
Stepan Koltsov 6946abbcea working on REPL: implemented previous lines importing 2012-06-08 04:19:24 +04:00
Stepan Koltsov 2ae632aa9a chop Impl suffix when generating field name 2012-06-08 03:38:28 +04:00
Stepan Koltsov f27147f752 script: make top level declarations class members 2012-06-05 22:59:07 +04:00
Andrey Breslav 3bf7c37c77 Annotations on classes and class objects supported 2012-06-05 15:24:58 +04:00
Stepan Koltsov 95414078b9 MemberCodegen
(move duplicate code into it)
2012-05-31 19:31:40 +04:00
Andrey Breslav 896b2fa773 A little bit more details in the message 2012-05-31 19:29:06 +04:00
Andrey Breslav 6f28638e80 Remove useless ObservableBindingTrace from DI 2012-05-31 19:29:06 +04:00
Andrey Breslav 7d550980c6 Lazy resolve: Generate fake overrides for functions 2012-05-31 14:29:25 +04:00
Andrey Breslav 00cf06e4f3 DI: Don't call getters on non-public fields 2012-05-31 11:55:00 +04:00
Andrey Breslav 5504015025 Preliminary version of lazy resolve
The implementation is incomplete and thus not used anywhere other than the test
2012-05-30 21:09:22 +04:00
Stepan Koltsov 30e44fdc5f script parameters
still a lot of things to do
2012-05-28 20:31:29 +04:00
Stepan Koltsov a1714d99cf DependencyClassByFqNameResolver 2012-05-28 17:34:44 +04:00
Svetlana Isakova 0bf65bfe1e get rid of JetPseudocodeTrace
and JetControlFlowDataTraceFactory
2012-05-28 12:09:44 +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 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 4cf2e7bd3d ClassCodegen is stateless, put it into context 2012-05-19 00:23:59 +04:00
Stepan Koltsov 3b0c9244c9 di: @PreDestroy
I need in my private experiments
2012-04-20 21:33:18 +04:00
Stepan Koltsov 994e6fe009 di: store everything in fields
needed to implement @PreDestroy
2012-04-20 21:33:17 +04:00
Stepan Koltsov 216cbf7d9a assert error/NonExistentClass is only generated when mode = SIGNATURES
move classBuilderMode to injector and GenerationState from ClassBuilder
2012-04-19 18:56:05 +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 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 b5fe2c41e6 prohibit classes with more then one constructor 2012-04-09 01:44:50 +04:00
Stepan Koltsov ae9155f1af DiType.toString() 2012-04-08 05:39:40 +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 829173d5ec di: shortcut to initialize constant enum fields 2012-04-07 06:32:18 +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 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
Stepan Koltsov 54cb05f295 di: do not use tmpfile on windows 2012-03-29 17:45:02 +04:00
Stepan Koltsov 5bef29870d more di in jvm.codegen 2012-03-29 01:37:02 +04:00
Stepan Koltsov 231a4d9940 injector for JVM codegen 2012-03-28 23:39:03 +04:00
Stepan Koltsov 182f6d9897 di: objects of generic types 2012-03-28 23:38:59 +04:00
Stepan Koltsov cad93cfabd support @PostConstruct in our magnificent injector 2012-03-27 19:04:08 +04:00
Stepan Koltsov 69c9d3ffad PsiClassFinder 2012-03-27 00:27:27 +04:00
Stepan Koltsov bc17c7b4f3 injector to analyze js 2012-03-26 17:42:04 +04:00
Stepan Koltsov 4da926f311 add NamespaceFactory dependency to JavaNamespaceDescriptor
(JavaNamespaceDescriptor will be killed soon, NamespaceFactory will be used to create nss)
2012-03-22 03:47:19 +04:00
Stepan Koltsov 97549f54b3 prohibit field of certain types 2012-03-22 03:47:14 +04:00
Stepan Koltsov 3c41df8419 move BindingTrace to Injector from TopDownAnalysisContext
It is necessary to make NamespaceFactoryImpl independent from TopDownAnalysisContext
2012-03-22 03:47:10 +04:00
Stepan Koltsov 162525f794 use dependency injector for JavaDescriptorResolver
JavaDescriptorResolver now lives in the same context as TopDownAnalyzer
2012-03-22 03:47:05 +04:00
Stepan Koltsov bb7b8007c2 di: better diag for abstract classes 2012-03-22 03:46:59 +04:00
Stepan Koltsov ba3d833e81 do not remove InjectorFor* if generation fails 2012-03-21 00:40:29 +04:00
Stepan Koltsov 245a4f079c better message when dependency is interface 2012-03-15 00:14:18 +04:00
Stepan Koltsov fecc98af8c more DI in top down analysis 2012-03-14 21:47:29 +04:00
Stepan Koltsov 7a6f18c14a di: required parameters
* required parameters have @NotNull annotation generated
* parameters are required by default
2012-03-14 21:47:25 +04:00
Stepan Koltsov 5af4661c18 better root ns
* ModuleDescrpiptor now lives in context
* ns parent is module descriptor iff ns is root ns
* minor test enhancements
2012-03-14 19:43:22 +04:00
Andrey Breslav ca81d97b54 Year fixed in the copyright 2012-03-13 20:47:51 +04:00
Andrey Breslav ee2976d380 Unnecessary beans removed 2012-03-13 20:30:42 +04:00