Skip to content

Commit

Permalink
Use splice, now that it works
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jun 3, 2011
1 parent dca8441 commit 27d7fe0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tmp/instrument.js
Expand Up @@ -40,7 +40,7 @@ function instrument(code) {
// without the `analyzing' hack, w.walk(this) would re-enter here leading
// to infinite recursion
analyzing.push(this);
ret = [ "block",
ret = [ "splice",
[ [ "stat", trace(this) ],
w.walk(this) ]];
analyzing.pop(this);
Expand Down Expand Up @@ -93,7 +93,10 @@ function instrument(code) {

////// test code follows.

var code = instrument(test.toString());
var pre = test.toString();
var code = instrument(pre);
console.log(pre)
console.log('/////////// instrumented:')
console.log(code);

function test() {
Expand Down

0 comments on commit 27d7fe0

Please sign in to comment.