Commit Graph

1215 Commits

Author SHA1 Message Date
Zalim Bashorov 507bfe49aa Minor: "js.noImpl" -> "noImpl" 2014-09-16 19:34:57 +04:00
Zalim Bashorov 38401d04d5 Minor: made noImpl generic to avoid using in wrong context. 2014-09-16 19:32:38 +04:00
Zalim Bashorov 30208d5532 Minor: drop semicolon in package declaration everywhere. 2014-09-16 19:32:37 +04:00
Zalim Bashorov 0f136d5adc Minor in JS lib: dropped semicolon in package declarations. 2014-09-16 19:32:37 +04:00
Zalim Bashorov b0aa3e9988 JS stdlib: fixed visibility in some declarations. 2014-09-16 19:32:37 +04:00
Zalim Bashorov 838c384672 "js" -> "kotlin.js" 2014-09-16 19:32:37 +04:00
Zalim Bashorov 59b83679b3 Minor in JS stdlib: made stdlib warning less -- suppressed some BASE_WITH_NULLABLE_UPPER_BOUND warnings and fix one extra out projection. 2014-09-16 18:07:37 +04:00
Zalim Bashorov 0c0d049de7 Minor in JS backend: drop unnecessary inline annotations. 2014-09-16 18:07:37 +04:00
Zalim Bashorov 0fd1b5152a Minor in JS backend: added comment for InvokeIntrinsic::bothReceivers. 2014-09-16 18:07:36 +04:00
Michael Bogdanov b763aa9995 Added platform static checker with provider implementation 2014-09-16 14:38:15 +04:00
Zalim Bashorov 9b065a89b9 JS backend: fix annotation class compilation. 2014-09-16 14:21:50 +04:00
Alexander Udalov f39c3041d2 Make MISSING_VAL_ON_ANNOTATION_PARAMETER error instead of warning
Annotation with a parameter that is not stored doesn't make any sense
2014-09-15 19:30:52 +04:00
Alexander Udalov d52eff0825 JS: update support of enum's values() and valueOf() 2014-09-09 20:42:37 +04:00
Michael Nedzelsky 36ada06bdb Remove SuppressWarning('NullableProblems') and change @NotNull annotation to @Nullable in DescriptorPredicate.apply method 2014-09-09 16:24:09 +04:00
Michael Nedzelsky cc4f84ffae JS backend: fix KT-5738 JS backend: result of toByte() should be in the range of bytes
#KT-5738 Fixed
2014-09-09 16:24:06 +04:00
Michael Nedzelsky a632e9e21d JS backend: fix KT-4601 JS: compareTo doesn't work on Numbers
#KT-4601 Fixed
2014-09-09 16:24:03 +04:00
Michael Nedzelsky 145050b3d1 JS backend: simplify conversion to int 2014-09-09 16:24:01 +04:00
Michael Nedzelsky 69a25ca92a JS backend: minor: improve call translation for constant receiver 2014-09-09 16:23:58 +04:00
Michael Nedzelsky 377f6fe4da JS backend: fix labels before for and do while loops 2014-09-09 16:23:55 +04:00
Michael Nedzelsky 81c7a1b1da JS backend: return empty expression for unreachable code during translation 2014-09-08 11:30:20 +04:00
Svetlana Isakova 61dc110cc7 Report 'break or continue outside a loop'
for break/continue outside a loop body (e.g. in loop condition)

 #KT-5724 Fixed
2014-09-07 01:03:57 +04:00
Michael Nedzelsky 3578845e87 JS backend: add support for break, return, continue, throw in expressions 2014-09-03 20:48:52 +04:00
Michael Nedzelsky 2296eeef84 JS backend: add leftJetExpression and rightJetExpression fields into BinaryOperationTranslator 2014-09-03 20:48:48 +04:00
Michael Nedzelsky f5963ebfe9 JS backend: test for KT-4225: Compiler to JavaScript produces semantically wrong code
This issue was fixed in build 0.8.541
2014-09-02 22:53:00 +04:00
Michael Nedzelsky 0e41411c75 JS backend: fix TranslationUtils.isCacheNeeded 2014-09-02 22:52:57 +04:00
Michael Nedzelsky 5967b6637f JS backend: fix translation for || and && (create new tmp variable if needed) 2014-09-02 22:52:53 +04:00
Michael Nedzelsky 40e5d6c8f5 JS backend: refactor LoopTranslator, add function translateForExpression 2014-09-02 22:52:50 +04:00
Michael Nedzelsky 478d3baf59 JS backend: add LoopTranslator.kt, move ExpressionVisitor.createWhile and ForTranslator into LoopTranslart, remove foreach package 2014-09-02 22:52:45 +04:00
Michael Nedzelsky 2fd13a0fb4 JS backend: add NotNull annotations 2014-09-02 22:52:42 +04:00
Michael Nedzelsky ab0df532bc JS backend: for with label, fix KT-5257 JS: for with continue with label fails on runtime, and KT-5262 JS: wrong code for for over range when start greater end
#KT-5257 Fixed
 #KT-5262 Fixed
2014-09-02 22:52:39 +04:00
Svetlana Isakova 9d366cb896 Prohibit local objects and enum classes
#KT-5402 Fixed
  #KT-4838 Fixed

Resolve type of object inside local object as special, not supertype('Any').
Changed visibility of constructor of anonymous object to 'internal' to be able to resolve the following:
fun box(): String {
    var foo = object {
        val bar = object {
            val baz = "ok"
        }
    }
    return foo.bar.baz
}
The containing declaration of property initializers is constructor, so 'baz' was invisible inside private constructor.
2014-09-01 12:32:52 +04:00
Svetlana Isakova 6f4c152f53 Record reference to class object directly
not to containing class descriptor
2014-09-01 12:32:50 +04:00
Svetlana Isakova 7f33ad90a6 Report 'nested class accessed via instance reference' error 2014-09-01 12:32:50 +04:00
Alexander Udalov 619ffead17 Fix test data file name 2014-08-29 15:09:14 +04:00
Alexander Udalov ec12d1d71d Fix deprecation warnings on junit.framework.Assert
Use org.junit.Assert instead everywhere. Also fix some other minor warnings
2014-08-29 12:34:07 +04:00
Pavel V. Talanov 7a1d5d63dc Rename: AnalyzerFacadeForJvm(Js) -> TopDownAnalyzerFacadeForJvm(Js) 2014-08-22 23:16:55 +04:00
Pavel V. Talanov db5303c019 Implement modules in IDE
IDE:
Rewrite AnalyzerFacade and implementations for JS and JVM to support creating separate analyzers for each module
Introduce ModuleInfo which is an intermediate entity between configuration (tests or idea modules) and ModuleDescriptor
Implement IdeaModuleInfos which represent IDEA modules, sdks and libraries
Add (somewhat thin) test checking their behaviour
Implement getModuleInfo() - utility to obtain IdeaModuleInfo for PsiElement
Drop Project.getLazyResolveSession() - not possible to obtain resolve session for the whole project any more
Adjust JavaResolveExtension accordingly
KotlinSignature Intention/Marker - make sure that analyzed element is cls element (he's not in resolve scope otherwise)

LightClasses:
Create separate package light classes for each module
Java code can only reference light class from the first module among it's dependencies
Duplicate jvm signature is only reported on package declarations inside one module

Injectors:
Receive GlobalSearchScope as paramer for VirtualFileFinder and JavaClassFinder
which allows to narrow analyzer scope

JDR:
Introduce ModuleClassResolver resolves java classes in correct java descriptor resolver (corresponding ModuleDescriptor)
Add test checking that java classes belong to correct module

Debugger:
Provide context to analyze files created by debugger in

Converter:
Postprocessor now needs a context to analyze resulting code in

JetPsiFactory:
Add verification that files created by psi factory are not analyzed without context (that is almost never a good idea)

Other:
Use new API in various tests, utilities, run configuration producers and builtin serializers
Various "TODO: (module refactoring)" which mark the unfinished parts
2014-08-22 22:58:54 +04:00
Michael Nedzelsky d3bf58d761 JS backend: extract inline calls during translation 2014-08-22 02:17:16 +04:00
Michael Nedzelsky 76757b14e2 JS backend: new tests for use break, continue and return in &&, ||, ?: 2014-08-22 02:17:11 +04:00
Michael Nedzelsky d969e58b88 JS backend: support for while/do while with complex conditions 2014-08-22 02:17:08 +04:00
Michael Nedzelsky 53f0e6dcd2 JS backend: remove dangerous package, correct translation for call, assignments, binary operations, support try...catch as expression
#KT-5576 Fixed
 #KT-5594 Fixed
 #KT-3166 Fixed
 #KT-5545 Fixed
 #KT-5594 Fixed
 #KT-5258 Fixed

JS backend: fix KT-4879: extra side effect when use when in default arguments

 #KT-4879 Fixed

JS backend: improve and fix WhenTranslator, fix order of evaluation for condtitions, fix KT-5263 (JS: extra tmp when initialize val in when by expression with if)

 #KT-5263 Fixed
2014-08-22 02:17:00 +04:00
Michael Nedzelsky 629d9a275b JS backend: fix dangling else issue in generated code for JsToStringGenerationVisitor
JS backend: fix KT-5253: when with if inside

 #KT-5253 Fixed
2014-08-22 02:16:56 +04:00
Michael Nedzelsky bfa8fea5b8 JS backend: move patternMatching tests to expression/when 2014-08-22 02:16:53 +04:00
Alexander Udalov 850fc25ee0 CLI: drop "-tags" argument
It was only used for the compiler inside the IDE, and there we already invoke a
special method which outputs HTML only
2014-08-13 11:10:41 +04:00
Alexander Udalov 4a7dc25406 CLI: add an extra MessageRenderer parameter to compiler exec
Is supposed to be used instead of the "-tags" CLI argument
2014-08-13 11:10:41 +04:00
Alexander Udalov cf431ffab0 CLI: change argument naming convention
As in all other Unix/POSIX tools and JVM language compilers, multiple words
comprising the argument name should be lowercase, separated by dashes
2014-08-13 11:10:40 +04:00
zarechenskiy 34bf3d7f0e Supress warnings in injectors using "all" parameter, not "ALL"
This parameter value supports by IDEA and Eclipse
2014-08-12 13:11:21 +04:00
Michael Nedzelsky 12db8f1551 JS backend: support for explicit delegation
#KT-4479 Fixed
2014-08-09 10:24:02 +04:00
Michael Nedzelsky 82af542747 JS backend: convert PropertyTranslator to Kotlin 2014-08-09 10:23:59 +04:00
Michael Nedzelsky b20e413883 JS backend: add NotNull annotations 2014-08-09 10:23:55 +04:00