Permalink
Browse files

Use splice, now that it works

  • Loading branch information...
1 parent dca8441 commit 27d7fe0eeaff1c098ad8e709b67739d54aa357cc @isaacs committed Apr 24, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 tmp/instrument.js
View
@@ -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);
@@ -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() {

0 comments on commit 27d7fe0

Please sign in to comment.