Commit Graph

2515 Commits

Author SHA1 Message Date
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
Alexey Andreev 7240a8df6c JS/Inliner: fix build 2016-06-07 12:18:23 +03:00
Alexey Andreev b1fcad6dcc JS/Inlining: in RedundantStatementElimination remove unnecessary side effect check for binary expressions 2016-06-07 11:54:48 +03:00
Alexey Andreev f0e64f8e38 JS/Inlining: rename IneffectiveStatementElimination to RedundantStatementElimination 2016-06-07 11:54:45 +03:00
Alexey Andreev 07d5a4506c JS/Inlining: minor improvements and clarifications after code review. Test whether expression without side effect does not prevent to relocate another expressions 2016-06-07 11:54:41 +03:00
Alexey Andreev 6b99d4e1c5 JS/Inlining: change sideEffects metadata to take three values: producing side effect, dependding on side effect and purity 2016-06-07 11:54:41 +03:00
Alexey Andreev 774efa4e70 JS/Inlining: improve test for removal of binary expresions without side effect, add tests for removal of a reference to a function parameter 2016-06-07 11:54:34 +03:00
Alexey Andreev b395d40e97 JS/Inlining: refactor TemporaryVariableElimination 2016-06-07 11:54:31 +03:00
Alexey Andreev 0c0fc81e5f JS/Inlining: refactor IneffectiveStatementElimination 2016-06-07 11:54:28 +03:00
Alexey Andreev d829bf4914 JS/Inlining: clarify why it's necessary to remove expression statements like a[b] 2016-06-07 11:54:23 +03:00
Alexey Andreev 57ac23a606 JS/Inlining: in temporary variable elimination don't treat FQN without side effects as trivial, i.e. disable moving these vars freely across function body 2016-06-07 11:54:20 +03:00
Alexey Andreev 878e95e040 JS/Inlining: minor simplifications after code review 2016-06-07 11:54:19 +03:00
Alexey Andreev a26c09ae81 JS/Inlining: refactor TemporaryAssignmentElimination, add more tests 2016-06-07 11:54:12 +03:00