Commit Graph

2527 Commits

Author SHA1 Message Date
Michael Bogdanov 1d5924d236 'superConstructorCall' test folder moved under 'innerNested' 2016-07-21 19:10:42 +03:00
Michael Bogdanov 55382ba848 Removed obsolete code in 'lookupConstructorExpressionsInClosureIfPresent' method 2016-07-21 19:10:42 +03:00
Michael Bogdanov 5dca4dbc67 Fix for KT-11833: Error generating constructors of class null with kind IMPLEMENTATION on anonymous object inheriting from nested class of super class
#KT-11833 Fixed
2016-07-21 19:10:42 +03:00
Stanislav Erokhin 6556cde329 Introduce new type checker. 2016-07-21 16:07:16 +03:00
Alexey Andreev df05b20bc6 JS: in tests add verifier that checks whether no expression statements with only null expression exist 2016-07-18 19:26:50 +03:00
Alexey Andreev a27f5c8fee JS: add TranslationContext.cacheExpressionIfNeeded and use it where possible 2016-07-18 19:26:50 +03:00
Alexey Andreev b5f9287bfa JS: add tests for support of 'for' statement in TemporaryAssignmentElimination 2016-07-18 19:26:49 +03:00
Alexey Andreev f8b96a1c62 JS: add tests to prove that KT-8003, KT-8318 and KT-12157 are no longer reproducible 2016-07-18 19:26:49 +03:00
Alexey Andreev 9cb6b22d62 JS: minor code style and formatting fixes 2016-07-18 19:26:48 +03:00
Alexey Andreev 9fcad45edb JS: refactor generation of temporary variables 2016-07-18 19:26:48 +03:00
Alexey Andreev 9edb9fabe5 JS: get rid of JsEmptyExpression, use JsLiteral.NULL instead, rely on optimizer to remove redundant code 2016-07-18 19:26:47 +03:00
Alexey Andreev fe5a7aaf46 JS: during translation of expression mark assignment to temporary variables as synthetic statement.
This helps optimizer to find and eliminate temporary variables.
2016-07-18 19:26:47 +03:00
Alexey Andreev e2b836db09 JS: refactor TemporaryVariableElimination 2016-07-14 18:00:34 +03:00
Alexey Andreev 88eef7337e KT-12928: decompose invocation like "a.foo(b)" to "$t = a; $s = $t.foo.bind($t); $s(b)" instead of "$t = a.foo; $t(b)", since in the latter case foo won't receive proper this. Add optimization that replaces "foo.bar.bind(baz)(args)" with "baz.bar(args)" 2016-07-04 14:52:12 +03:00
Dmitry Petrov 07cb3e09b9 KT-11892: explicitly qualified 'super' with a supertype that is overridden
by a different explicitly declared supertype is an error (as in Java)
(see http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.12.3)
2016-07-04 13:53:49 +03:00
Zalim Bashorov 48617caacc JS: generate a function with the required name for callable references instead try to change the name later. The previous solution doesn't work properly on some JS VMs (e.g. in FireFox)
#KT-12929 Fixed
2016-07-01 21:13:15 +03:00
Alexander Udalov 77bb691d4e Rename SymbolUsageValidator -> ClassifierUsageChecker
Also validateTypeUsage -> check
2016-06-29 22:03:34 +03:00
Alexander Udalov 6ba32ed624 Refactor CallChecker and subclasses
Encapsulate everything that is needed in checkers into CallCheckerContext. Pass
an instance of this context instead of BasicCallResolutionContext to checkers.

Also pass an instance of the element to report errors on: this is useful
because before this, every checker had its own way of determining where should
the error be reported on. Some of them, for example, were not doing anything if
Call#calleeExpression returned null, which is wrong, see operatorCall.kt

 #KT-12875 Open
2016-06-29 19:20:00 +03:00
Alexander Udalov 601dc96a34 Minor, rename protobuf field according to style guide 2016-06-27 20:18:57 +03:00
Alexander Udalov 4c8e8b099a Update protobuf from 2.5.0 to 2.6.1 2016-06-27 20:14:00 +03:00
Alexey Andreev 33248e7721 KT-3008: minor code style fixes 2016-06-27 15:33:31 +03:00
Alexey Andreev da53b9a9a4 KT-3008: fix support of KProperty/KMutableProperty 2016-06-27 15:33:30 +03:00
Alexey Andreev 202400cb97 KT-3008: remove unused code that handles anonymous modules, since there's no way to declare them via configuration 2016-06-27 15:33:30 +03:00
Alexey Andreev 055be070e9 KT-3008: when inlining functions from external modules, replace calls to functions in the external module via new mechanism instead of Kotlin.modules 2016-06-27 15:33:29 +03:00
Alexey Andreev 97605a97da KT-3008: multiple minor fixes after code review 2016-06-27 15:33:28 +03:00
Alexey Andreev 713a7efcdf KT-3008 Add support of module kind to Ant task. Repair Ant JS tests 2016-06-27 15:33:28 +03:00
Alexey Andreev 64cd0b70d7 KT-3008 Minor refactoring and clean up 2016-06-27 15:33:27 +03:00
Alexey Andreev b090b79d92 KT-3008 Add UI that allows to change module kind in IDEA Kotlin configurator 2016-06-27 15:33:26 +03:00
Alexey Andreev b6b604d78f KT-3008 Fix UMD and plain module wrappers when module id is not a valid JS identifier 2016-06-27 15:33:25 +03:00
Alexey Andreev e38b83880f KT-3008 Add tests for module wrappers 2016-06-27 15:33:25 +03:00
Alexey Andreev 0cfacfa44a KT-3008 Merge JS runtime modules in one kotlin.js 2016-06-27 15:33:25 +03:00
Alexey Andreev b556b6efca KT-3008 Fix JS backend tests 2016-06-27 15:33:24 +03:00
Alexey Andreev 848d7f92fa KT-3008 Implement AMD, CommonJS and UMD wrappers. Compile stdlib and builtins modules into separate JS files and wrap them in UMD. 2016-06-27 15:33:24 +03:00
Alexey Andreev 95b78e18df KT-3008 Change the way how modules are referenced in JS 2016-06-27 15:33:23 +03:00
Alexey Andreev 2909533522 KT-3008 Add module kind. Include module kind and module dependencies in metadata 2016-06-27 15:33:23 +03:00
Alexander Udalov cf630e01db Minor, refactor "is KProperty" checks in ReflectionTypes 2016-06-22 21:35:57 +03:00
Mikhail Glukhikh 8d2389d15c Code cleanup: "can be constructor property" applied
(cherry picked from commit 6967711)
2016-06-21 22:23:01 +03:00
Alexey Andreev 2e6a48576d KT-12417: add support of RTTI against K(Mutable)Property* types 2016-06-21 15:42:50 +03:00
Ilya Gorbunov c5a208f3eb Rearrange stdlib unit tests across packages.
Rearrange JS stdlib unit tests.
2016-06-18 16:50:32 +03:00
Ilya Gorbunov d266f546f4 Remove obsolete and not relevant to stdlib tests 2016-06-18 16:50:32 +03:00
Mikhael Bogdanov bb59638039 Support bridges in interfaces. Fix for KT-12416: Missed bridges in js backend
#KT-12416 Fixed
2016-06-15 13:43:28 +03:00
Alexander Udalov 7e38b93d80 Use protobuf with renamed packages, pack to IDEA plugin
Update GenerateProtoBuf.kt to also regexp-replace com.google.protobuf with
org.jetbrains.kotlin.protobuf in generated Java sources

 #KT-12581 Fixed
2016-06-14 14:17:22 +03:00
Stanislav Erokhin 03241419bd Minor. removed several tests with error calls. 2016-06-10 21:28:04 +03:00
Denis Zharkov 1b82e43d76 Add LanguageFeatureSettings parameter to single method in checkers interfaces
This parameter will be used further for target-dependent checks

Also introduce SimpleDeclarationChecker/SimpleCallChecker sub-interfaces (more weak ones)
Implementing them instead of base checkers is more convenient in most cases
2016-06-09 17:57:15 +03:00
Stanislav Erokhin 1d9ca06b96 Remake KotlinTypes. 2016-06-09 12:57:59 +03:00
Stanislav Erokhin 203c4cd94d Remake Raw type representation.
(cherry picked from commit b21cede)
2016-06-09 12:57:53 +03:00
Stanislav Erokhin 669558c4ba Refactoring. Move flexible type factory to deserialization module. 2016-06-09 12:57:48 +03:00
Stanislav Erokhin 957bae18be Refactoring. Move flexible type creation to KotlinTypeFactory. 2016-06-09 12:57:44 +03:00
Denis Zharkov 20d1d12f3b Revert "'yield' reserved as a keyword"
This reverts commit 434082cadb.
2016-06-08 18:53:16 +03:00
Alexey Andreev 0e1dde022a KT-6942: in JS backed for value equalitity patterns in when generate structural equality check (i.e. Any.equals) instead of referential check (===).
(cherry picked from commit 97228e5)
2016-06-07 12:59:16 +03:00