Commit Graph

109 Commits

Author SHA1 Message Date
Alexey Sedunov 9fee8600cb Pseudocode: Do not generate implicit return instruction inside of
Unit-typed lambdas
 #KT-5549 Fixed
2014-08-05 18:14:40 +04:00
Svetlana Isakova 4477a96ca7 Resolve operation (unary, array access) on error element instead of ignoring it
(to record corresponding call for later simplification in control flow)
Generate code for unmapped arguments in control flow
2014-07-30 17:14:00 +04:00
Alexey Sedunov 2a19016d58 Pseudocode: Add test for parenthesized call in selector 2014-07-28 13:07:34 +04:00
Alexey Sedunov 85bb4f9b8e Pseudocode: Generate read instructions on call expression (instead of
callee)
2014-07-28 13:07:33 +04:00
Alexey Sedunov 9f3ebe5f3b Pseudocode: Generate merge instruction regardless of number of branches 2014-07-28 13:07:32 +04:00
Alexey Sedunov d008cb8c21 Pseudocode: Do not regenerate receiver values 2014-07-28 13:07:30 +04:00
Alexey Sedunov 77bbf8f73b Pseudocode: Generate fake values for Unit/Nothing-typed expressions 2014-07-28 13:07:29 +04:00
Alexey Sedunov 2d3ac9109b Pseudocode: Generate synthetic VALUE_CONSUMER for both property and class delegates 2014-07-28 13:06:46 +04:00
Alexey Sedunov d07deeb5fb Pseudocode: Generate UNSUPPORTED_ELEMENT for misplaced returns 2014-07-28 13:04:02 +04:00
Alexey Sedunov b0bf11c51e Pseudocode: Consume value of true condition in while-loop 2014-07-28 13:04:01 +04:00
Alexey Sedunov e11ffb8542 Pseudocode: Replace UnsupportedElementInstruction with UNSUPPORTED_ELEMENT magic.
Generate UNSUPPORTED_ELEMENT for assignments with unresolved left-han side
2014-07-28 13:04:00 +04:00
Alexey Sedunov c32d112e67 Pseudocode: Generate magics for cast expressions 2014-07-28 13:03:12 +04:00
Alexey Sedunov ffd4af872c Pseudocode: Track merged values. Compute closure of value usages over merge instructions. Exclude merge instructions from usage lists 2014-07-28 13:03:09 +04:00
Alexey Sedunov 4f54d833d3 Pseudocode: Generate instructions for callable reference expressions 2014-07-28 13:03:05 +04:00
Zalim Bashorov c85ec97589 Minor: revert dc68d78 (Minor: revert changes in StackValue and fix tes data. another fixes) 2014-07-25 17:16:40 +04:00
Zalim Bashorov dc68d78d9d Minor: revert changes in StackValue and fix tes data.
(this commit should be reverted after make Unit object)
2014-07-11 20:28:57 +04:00
Alexey Sedunov 487e7f2a91 Pseudocode: Replace {<: Any?} type predicate with * 2014-07-11 19:13:52 +04:00
Alexey Sedunov 4707f4a5e9 Pseudocode: Add debug information to magic instructions 2014-07-11 19:13:49 +04:00
Alexey Sedunov d636d362b7 Pseudocode: Generate proper instructions for when conditions. Eliminate unnecessary magics 2014-07-11 19:13:46 +04:00
Alexey Sedunov 0a8fa404bf Pseudocode: Generate additional returns for implicit return values (lambdas, functions with expression bodies) 2014-07-11 19:13:26 +04:00
Alexey Sedunov 1c75a5f642 Pseudocode: Generate instructions for superclass constructor calls. Consume value of delegate expression in the by-clause 2014-07-11 19:13:21 +04:00
Svetlana Isakova aa26db0538 Updated tests for control flow: call instruction stores call element
instead of callee expression
2014-07-08 14:57:38 +04:00
Alexey Sedunov f226d99d36 Pseudocode: Add valued instructions and unbound values to AbstractPseudoValueTest 2014-06-26 13:06:23 +04:00
Alexey Sedunov 5e2c2b4eca Pseudocode: Implement computation of expected type predicates 2014-06-23 19:32:25 +04:00
Alexey Sedunov 50228fa085 Pseudocode: Generate correct values for postfix increment/decrement 2014-06-23 19:32:22 +04:00
Alexey Sedunov 7c837909d8 Pseudocode: Bind result values to elements retrieved from resolved calls 2014-06-23 19:32:21 +04:00
Svetlana Isakova 2077604d6d Compute pseudo value for parameter correctly:
do not throw away pseudo value for default value
2014-06-23 14:30:16 +04:00
Svetlana Isakova 9d4aad3bbc Extracted 'generateBooleanOperation'
Generate magic instruction for '&&, ||' in condition as well
2014-06-21 12:26:34 +04:00
Svetlana Isakova 88ecc5cc59 Evaluate default value for argument non-deterministically
in pseudocode
2014-06-21 12:26:33 +04:00
Svetlana Isakova 9480907514 Mark some expressions after processing their components
when it's semantically correct

Expressions: calls, 'for' loops, elvis operators
It's significant for reporting 'unreachable code' correctly
2014-06-21 12:26:32 +04:00
Alexey Sedunov c9c94a59d3 Pseudocode: Copy value of JetThisExpression to enclosed JetSimpleNameExpression 2014-06-19 22:04:46 +04:00
Alexey Sedunov 45bd3a520e Pseudocode: Generate pseudo-values for implicit receivers 2014-06-19 22:04:45 +04:00
Alexey Sedunov 168b32920b Pseudocode: Do not bind call value to callee expressions 2014-06-19 22:04:44 +04:00
Alexey Sedunov 587a9558bc Pseudocode: Introduce "merge" instruction 2014-06-19 22:04:39 +04:00
Alexey Sedunov 4a5d2e6728 Add tests for element -> pseudo-value mapping 2014-06-03 18:17:07 +04:00
Alexey Sedunov d2c055e9da Pseudocode: Introduce pseudo-value analysis 2014-06-03 18:17:05 +04:00
Svetlana Isakova e0f37bbef0 Generate parse error on label without name '@' 2014-05-20 15:07:03 +04:00
Tal Man aeb5bae556 Refactoring of CompileTimeConstant, introduce flag to represent a constant being referenced by a variable 2014-04-09 14:47:05 -04:00
Svetlana Isakova a829da185d Resolve invoke on any kind of expressions, not only on simple name expressions 2014-03-20 10:05:24 +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 7d46ff951e Jump after 'for' cycle to loop parameter change.
Not to the cycle body.
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 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 aa713ef1f6 generate pseudocode for property accessor only if the property is local
otherwise check it independently like a function
2014-02-12 12:48:12 +04:00
Svetlana Isakova 5ef320173c generate pseudocode for functions in local classes
#KT-4405 In progress
 #KT-3501 Fixed
2014-02-11 21:07:10 +04:00
Svetlana Isakova c3ff6a2430 fixed exponential building of cf graph
if there was en error in chained qualified expression
2013-12-27 16:02:16 +04:00
Svetlana Isakova 41f2fcbb40 while resolve 'equals' as a fake call do not throw away temporary trace 2013-12-11 19:53:51 +04:00
Svetlana Isakova 4c4e192914 Fixed: control flow graph building for array of functions.
'get' call for array should be get from INDEXED_LVALUE_GET
2013-12-06 15:58:45 +04:00
Andrey Breslav 97319808b6 Detecting tail calls through CFA 2013-12-06 00:28:12 +04:00