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

Diff of /trunk/instrument-js.c

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

revision 349 by siliconforks, Fri Oct 24 16:17:19 2008 UTC revision 350 by siliconforks, Fri Oct 24 16:17:39 2008 UTC
# Line 880  Line 880 
880      Stream_write_string(f, "switch (");      Stream_write_string(f, "switch (");
881      instrument_expression(node->pn_left, f);      instrument_expression(node->pn_left, f);
882      Stream_write_string(f, ") {\n");      Stream_write_string(f, ") {\n");
883      for (struct JSParseNode * p = node->pn_right->pn_head; p != NULL; p = p->pn_next) {      {
884        Stream_printf(f, "%*s", indent, "");        JSParseNode * list = node->pn_right;
885        switch (p->pn_type) {        if (list->pn_type == TOK_LEXICALSCOPE) {
886        case TOK_CASE:          list = list->pn_expr;
887          Stream_write_string(f, "case ");        }
888          instrument_expression(p->pn_left, f);        for (struct JSParseNode * p = list->pn_head; p != NULL; p = p->pn_next) {
889          Stream_write_string(f, ":\n");          Stream_printf(f, "%*s", indent, "");
890          break;          switch (p->pn_type) {
891        case TOK_DEFAULT:          case TOK_CASE:
892          Stream_write_string(f, "default:\n");            Stream_write_string(f, "case ");
893          break;            instrument_expression(p->pn_left, f);
894        default:            Stream_write_string(f, ":\n");
895          abort();            break;
896          break;          case TOK_DEFAULT:
897              Stream_write_string(f, "default:\n");
898              break;
899            default:
900              abort();
901              break;
902            }
903            instrument_statement(p->pn_right, f, indent + 2, false);
904        }        }
       instrument_statement(p->pn_right, f, indent + 2, false);  
905      }      }
906      Stream_printf(f, "%*s", indent, "");      Stream_printf(f, "%*s", indent, "");
907      Stream_write_string(f, "}\n");      Stream_write_string(f, "}\n");

Legend:
Removed from v.349  
changed lines
  Added in v.350

  ViewVC Help
Powered by ViewVC 1.1.24