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
Svetlana Isakova
35c6a656c9
Store only data for variables declared in current lexical scope.
...
Remove data for other variables (when leaving a scope).
2014-03-07 21:08:17 +04:00
Svetlana Isakova
9dd23d9289
refactoring: PseudocodeVariableDataCollector
...
added a reference to pseudocode
2014-03-07 21:08:17 +04:00
Svetlana Isakova
006f3ccbe9
Added/updated tests for LexicalScope.
2014-03-07 21:08:16 +04:00
Svetlana Isakova
2cfcd1783b
Added LexicalScope.
...
Each instruction has a reference to a lexical scope it was generated in.
The lexical scope is: block, for loop, catch clause, a declaration of: function, function literal, class/object, etc.
2014-03-07 21:08:16 +04:00
Svetlana Isakova
6857694d1a
added 'getParent' to Pseudocode
...
fixed DataFlowInfoTest:
variable data shouldn't be built for locals as independent declarations
2014-03-07 21:08:16 +04:00
Svetlana Isakova
88f2c32724
added DataFlowInfoTest
2014-03-07 21:08:16 +04:00
Svetlana Isakova
ab9e470ea9
check edges directions only in ControlFlowTest
2014-03-07 21:08:16 +04:00
Svetlana Isakova
547ee304b6
returned AbstractControlFlowTest
...
as a subclass of AbstractPseudocodeTest
moved code to it
2014-03-07 21:08:16 +04:00
Svetlana Isakova
9cb8d17be7
rename AbstractControlFlowTest -> AbstractPseudocodeTest
...
to make later ControlFlowTest a subclass and preserve a history of the file
2014-03-07 21:08:15 +04:00
Svetlana Isakova
8efd31ffe0
refactoring: added 'getInstructionData' parameter
...
to 'dumInstructions'
to be able to dump any instruction data later
2014-03-07 21:08:15 +04:00
Svetlana Isakova
04947fa6a9
refactoring: extracted 'checkPseudocode'
2014-03-07 21:08:15 +04:00
Svetlana Isakova
5de4c5965c
removed unused methods
2014-03-07 21:08:15 +04:00
Svetlana Isakova
b9c7e1e328
refactoring: extracted methods
...
computeInstructionColumnWidth,
computeNextInstructionsColumnWidth
2014-03-07 21:08:15 +04:00
Svetlana Isakova
010937525b
extracted CFGraphToDotFilePrinter
2014-03-07 21:08:15 +04:00
Svetlana Isakova
1fc4573a8c
removed duplication of pseudocode in tests
...
for local functions
2014-03-07 21:08:15 +04:00
Svetlana Isakova
ec47821567
restructured control flow tests
2014-03-07 21:08:14 +04:00
Svetlana Isakova
fe349da4d5
rename constants
...
LAST_READ -> READ
LAST_WRITTEN -> WRITTEN_AFTER_READ
2014-03-07 21:08:14 +04:00
Svetlana Isakova
58db8d1331
formatting
2014-03-07 21:08:14 +04:00
Svetlana Isakova
69e4346961
minor: added @NotNull annotation
2014-03-07 21:08:14 +04:00
Svetlana Isakova
11c953c220
rewrote PseudocodeVariableDataCollector to kotlin
2014-03-07 21:08:14 +04:00
Svetlana Isakova
1f37a2120e
rename to kt file
2014-03-07 21:08:14 +04:00
Svetlana Isakova
4a4e237539
made PseudocodeVariableDataCollector know about variables
...
(not about abstract data)
2014-03-07 21:08:13 +04:00
Svetlana Isakova
b79df51dab
extracted PseudocodeVariableDataCollector
2014-03-07 21:08:13 +04:00