/[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 70 by siliconforks, Thu Nov 22 02:52:38 2007 UTC revision 87 by siliconforks, Mon May 5 20:05:27 2008 UTC
# Line 1  Line 1 
1  /*  /*
2      instrument-js.c - JavaScript instrumentation routines      instrument-js.c - JavaScript instrumentation routines
3      Copyright (C) 2007 siliconforks.com      Copyright (C) 2007, 2008 siliconforks.com
4    
5      This program is free software; you can redistribute it and/or modify      This program is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published by      it under the terms of the GNU General Public License as published by
# Line 385  Line 385 
385      the dot syntax.      the dot syntax.
386      */      */
387      instrument_expression(node->pn_expr, f);      instrument_expression(node->pn_expr, f);
388      /*      assert(ATOM_IS_STRING(node->pn_atom));
389      fputc('.', f);      {
390      print_string_atom(node->pn_atom, f);        JSString * s = ATOM_TO_STRING(node->pn_atom);
391      */        /* XXX - semantics changed in 1.7 */
392      fputc('[', f);        if (! ATOM_KEYWORD(node->pn_atom) && js_IsIdentifier(s)) {
393      print_quoted_string_atom(node->pn_atom, f);          fputc('.', f);
394      fputc(']', f);          print_string_atom(node->pn_atom, f);
395          }
396          else {
397            fputc('[', f);
398            print_quoted_string_atom(node->pn_atom, f);
399            fputc(']', f);
400          }
401        }
402      break;      break;
403    case TOK_LB:    case TOK_LB:
404      instrument_expression(node->pn_left, f);      instrument_expression(node->pn_left, f);

Legend:
Removed from v.70  
changed lines
  Added in v.87

  ViewVC Help
Powered by ViewVC 1.1.24