Commit Graph

14550 Commits

Author SHA1 Message Date
Zalim Bashorov d99e3294d8 JS backend: minor refactoring in TranslationContext -- dropped extra constructors. 2014-03-11 20:05:39 +04:00
Zalim Bashorov cdf42ef797 JS backend: dropped hack from UsageTracker. 2014-03-11 20:05:38 +04:00
Zalim Bashorov 3455f6adcd JS backend: minor -- dropped some no longer necessary code. 2014-03-11 20:05:37 +04:00
Zalim Bashorov a3cd1bbfda JS backend : change the capturing variables and rewrite some classes.
#KT-4236 Fixed
 #KT-4600 Fixed
 #KT-4237 Fixed
 #KT-4207 Fixed
 #KT-4218 Fixed
2014-03-11 20:05:23 +04:00
Zalim Bashorov 434a6ed6e2 JS backend: minor -- fix typo in fromFakeClasses.kt 2014-03-11 20:04:05 +04:00
Zalim Bashorov 43d9c383ff JS backend: don't use objects as definition place. 2014-03-11 20:04:05 +04:00
Zalim Bashorov 4c40f3971b Minor: added TypeScript to codeStyleSettings.xml 2014-03-11 20:04:04 +04:00
Zalim Bashorov fff38954dc JS backend: dropped unnecessary utility methods getExpectedThisDescriptor and getExpectedReceiverDescriptor.
#KT-4236 In Progress
#KT-4600 In Progress
#KT-4237 In Progress
#KT-4263 In Progress
#KT-4207 In Progress
#KT-4218 In Progress
2014-03-11 20:04:04 +04:00
Zalim Bashorov e1484d76a7 JS backend: minor refactoring in AliasingContext. 2014-03-11 20:04:03 +04:00
Zalim Bashorov 48a28ed406 JS backend: don't aliasing captured variable foo as foo.v.
Moved isVarCapturedInClosure from CodegenBinding to BindingContextUtils.
2014-03-11 20:04:03 +04:00
Zalim Bashorov d55548a1c8 Minor change in JS backend: improve exception message. 2014-03-11 20:04:03 +04:00
Zalim Bashorov fb7165c7fa JS backend: added regression tests for closure bugs.
#KT-4236 In Progress
#KT-4600 In Progress
#KT-4237 In Progress
#KT-4207 In Progress
#KT-4218 In Progress
#KT-4263 Obsolete
2014-03-11 20:04:03 +04:00
Zalim Bashorov a48dc25c46 JS backend: added more tests for closures. 2014-03-11 20:04:02 +04:00
Zalim Bashorov ec71a90394 JS backend : added test for local extension function. 2014-03-11 20:04:02 +04:00
Zalim Bashorov 14ed970dc3 JS backend: added the support extension functions as expression. 2014-03-11 20:04:02 +04:00
Zalim Bashorov 396afb05cb JS backend: minor refactorings
- dropped useless constructor and factory method from ClassTranslator.
  - moved method which translate an object expression inside a class code to ClassTranslator.
  - LiteralFunctionTranslator#getSuggestedName -> TranslationUtils#getSuggestedName
2014-03-11 20:04:01 +04:00
Zalim Bashorov 5f847bc7e7 JS backend: fixes after rename testFiles -> testData 2014-03-11 20:04:01 +04:00
Zalim Bashorov 442215e829 JS backend: testFiles -> testData 2014-03-11 20:04:00 +04:00
Zalim Bashorov bcd579acdd Minor change: reformat js libs. 2014-03-11 20:04:00 +04:00
Zalim Bashorov 38d1142c39 Minor change: reformat code in testData files. 2014-03-11 20:03:59 +04:00
Zalim Bashorov 7374d3ab76 Minor changes: drop the copyright comment from testData files. 2014-03-11 20:03:58 +04:00
Zalim Bashorov f5b1b4252d JS backend: use constants for default test package(foo) and default test function(box). 2014-03-11 20:03:58 +04:00
Zalim Bashorov 33360c2528 Dropped some TODOs
#KT-2564 Obsolete. Looks like, it's fixed in dcddd04.
2014-03-11 20:03:58 +04:00
Zalim Bashorov ffa2a84170 Stdlib: remove a workaround which related to KT-2028 2014-03-11 20:03:57 +04:00
Natalia Ukhorskaya 36387c533f Fix kotlin-android plugin for android-gradle:0.9+
#KT-4667 Fixed
2014-03-11 17:21:37 +04:00
asedunov 5975c40e5d Merge pull request #368 from Stebalien/add-operator-intentions
Add operator intentions
#KT-4558 Fixed
2014-03-11 12:17:27 +01:00
Steven Allen 84a8911822 Add replacement intentions for operator functions
Add intentions for replacing attribute calls that correspond to
overloadable operators with their respective operators.

This commit includes call replacements for:
 * Binary Infix Operators: plus, minus, times, rangeTo, mod, div
 * Unary Prefix Operators: plus, minus, not
 * Array Index Operator: get
 * In Operator: contains
2014-03-10 11:15:11 -04:00
Steven Allen 08a8d17e97 Add KotlinSignature annotation to RESOLVED_CALL
A ResolvedCall's CallableDescriptor cannot be null.
2014-03-10 10:46:29 -04:00
Steven Allen 7e1e697a5b Avoid throwing unchecked exceptions
Make `ResolvedCall.getValueArgumentsByIndex` return null instead of
throwing an InvalidStateException when resolving invalid arguments.
Invalid arguments are a user error (the user specified the invalid
arguments in their code), not a program error.
2014-03-10 10:46:29 -04:00
Steven Allen 162ed64706 Add ability to test for expected intention text
If a testData file contains `// INTENTION_TEXT: ...`, the tested
intention's description must match `...`.
2014-03-10 10:46:28 -04:00
Steven Allen 8b88dff205 Add ability to test for expected errors in intentions
If an intention test contains `// SHOULD_FAIL_WITH: my_string`, the test
is expected to throw `IntentionTestException("my_string")`. This is
useful for testing whether or not a function that should be called, is
called (a pop-up dialog is displayed, etc.).
2014-03-10 10:46:28 -04:00
Mikhael Bogdanov 7fb9de2654 Fix for "NoSuchFieldError: this$0$inlined" 2014-03-09 11:21:00 +04:00
Svetlana Isakova 4771986b32 KT-4656 Wrong capturing a function literal variable.
#KT-4656 Fixed
 Reference for calleeExpression is recorded only in 'doResolveCallOrGetCachedResults'.
2014-03-08 20:55:45 +04:00
Svetlana Isakova 92a4bb8c18 Reverted: More memory for the Ant build. 2014-03-08 12:31:19 +04:00
Nikolay Krasko bbe9be5150 Fix 'No type in binding context for: <some class> from light class generation' exception
#KT-4668 Fixed
2014-03-08 02:55:29 +04:00
Svetlana Isakova 2964bb77b3 extracted method 'canBeReducedToBooleanConstant' 2014-03-07 21:15:12 +04:00
Svetlana Isakova ec4df2ac0b Formatting. 2014-03-07 21:08:19 +04:00
Svetlana Isakova 8045594abd minor: moved methods 2014-03-07 21:08:19 +04:00
Svetlana Isakova 5d77ae075c rename: in -> incoming, out -> outgoing 2014-03-07 21:08:19 +04:00
Svetlana Isakova 0a4abd2ebd refactoring: inlined createEdges function 2014-03-07 21:08:19 +04:00
Svetlana Isakova d2bdb3cb6d removed InstructionDataMergeStrategy, InstructionDataAnalyzeStrategy
interfaces from PseudocodeTraverse
(use only in Java as type aliases to simplify function type parameters)
2014-03-07 21:08:19 +04:00
Svetlana Isakova dab9f6997a rollback: moved 'collectData' to PseudocodeTraverser 2014-03-07 21:08:18 +04:00
Svetlana Isakova b7f7063bf4 improved postProcess
collect (and cache) reachable instructions for local declarations
after processing all parent instructions
2014-03-07 21:08:18 +04:00
Svetlana Isakova fbbfb95861 added 'mergeDataWithLocalDeclarations' option
for collecting variable data for pseudocode

  removed using data from outer context
  for local declarations for 'variable initializers' analysis
2014-03-07 21:08:18 +04:00
Svetlana Isakova eed3dec539 rewrote PseudocodeTraverser to kotlin 2014-03-07 21:08:18 +04:00
Svetlana Isakova 18eaf483d3 added test for pseudocode memory overhead 2014-03-07 21:08:18 +04:00
Svetlana Isakova a050ebe9d1 rename to kt file 2014-03-07 21:08:17 +04:00
Svetlana Isakova de4a5bbb5b refactoring: extracted local function updateEdgeDataForInstruction 2014-03-07 21:08:17 +04:00
Svetlana Isakova 7d46ff951e Jump after 'for' cycle to loop parameter change.
Not to the cycle body.
2014-03-07 21:08:17 +04:00
Svetlana Isakova e34385bbcf added tests to DataFlowTest
to be able to compare difference in the next commit
2014-03-07 21:08:17 +04:00