/[jscoverage]/trunk/instrument-js.cpp
ViewVC logotype

Diff of /trunk/instrument-js.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 343 by siliconforks, Fri Oct 24 16:15:25 2008 UTC revision 345 by siliconforks, Fri Oct 24 16:16:00 2008 UTC
# Line 257  Line 257 
257    
258  static void instrument_expression(JSParseNode * node, Stream * f);  static void instrument_expression(JSParseNode * node, Stream * f);
259  static void instrument_statement(JSParseNode * node, Stream * f, int indent, bool is_jscoverage_if);  static void instrument_statement(JSParseNode * node, Stream * f, int indent, bool is_jscoverage_if);
260    static void output_statement(JSParseNode * node, Stream * f, int indent, bool is_jscoverage_if);
261    
262  enum FunctionType {  enum FunctionType {
263    FUNCTION_NORMAL,    FUNCTION_NORMAL,
# Line 307  Line 308 
308    Stream_write_string(f, ") {\n");    Stream_write_string(f, ") {\n");
309    
310    /* function body */    /* function body */
311    instrument_statement(node->pn_body, f, indent + 2, false);    if (function->flags & JSFUN_EXPR_CLOSURE) {
312        /* expression closure */
313        output_statement(node->pn_body, f, indent + 2, false);
314      }
315      else {
316        instrument_statement(node->pn_body, f, indent + 2, false);
317      }
318    
319    Stream_write_string(f, "}\n");    Stream_write_string(f, "}\n");
320  }  }

Legend:
Removed from v.343  
changed lines
  Added in v.345

  ViewVC Help
Powered by ViewVC 1.1.24