Commit Graph

156 Commits

Author SHA1 Message Date
Sean Callanan
00d6c54241 Updated the playground transform:
- Fixed a bug where it did not instrument a "for-in" loop.
    
  - Made sure nested function declarations' bodies are
    instrumented.
   
  - Added instrumentation for return statements.
  
<rdar://problem/16516131>


Swift SVN r15960
2014-04-04 22:24:53 +00:00
Sean Callanan
1aa676fe92 Updated the playground transform:
- Don't be so sensitive about how many of the
   required functions there are; and

 - Don't include the "header" parameter to
   playground_log any more; it's not needed.


Swift SVN r15755
2014-04-01 22:39:46 +00:00
Sean Callanan
69111164a3 Updated the playground transform to handle
loop constructs and mutations of variables.

We also try to ignore expressions that return
empty tuples, because this causes type-checking
failures.


Swift SVN r15568
2014-03-28 01:39:16 +00:00
Sean Callanan
4bb2d109b5 Updated the playground transform to handle
variable declarations, do a better job with
assignments, and handle bare expressions.  Also
adjusted to the new playground logger API.


Swift SVN r15313
2014-03-21 02:01:37 +00:00
Sean Callanan
8eb64b73c8 Modified the playground transform to
- use the most recent prototype for the logger
   function (playground_log), and

 - send the output of the logger function to
   DVTSendPlaygroundLogDataToHost.


Swift SVN r14892
2014-03-10 23:45:08 +00:00
Sean Callanan
3b95376949 Added a new AST transformation pass called the
"Playground Transform."  This is an
instrumentation pass that adds calls to a
function called playground_log at locations of
interest.  Roughly speaking, these locations are

- Initialization of variables
- Modification of variables
- Expressions returning values
- Application of mutating methods on objects

The playground transform currently only finds
modifications of variables, but the intent is to
make all of these cases work.

It is enabled by a frontend option, and can
also be invoked by calling

swift::performPlaygroundTransform(SF)

which is the way LLDB, its main client, will
use it.

The frontend option is intended for testing,
and indeed I will add tests for this
transformation in the coming week as I bring
more functionality online.


Swift SVN r14801
2014-03-07 22:59:19 +00:00