/[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 284 by siliconforks, Sat Oct 11 22:40:31 2008 UTC revision 293 by siliconforks, Sun Oct 12 16:41:57 2008 UTC
# Line 540  Line 540 
540        /* check whether this is a getter or setter */        /* check whether this is a getter or setter */
541        switch (p->pn_op) {        switch (p->pn_op) {
542        case JSOP_GETTER:        case JSOP_GETTER:
         Stream_write_string(f, "get ");  
         instrument_expression(p->pn_left, f);  
         instrument_function(p->pn_right, f, 0, FUNCTION_GETTER_OR_SETTER);  
         break;  
543        case JSOP_SETTER:        case JSOP_SETTER:
544          Stream_write_string(f, "set ");          if (p->pn_op == JSOP_GETTER) {
545              Stream_write_string(f, "get ");
546            }
547            else {
548              Stream_write_string(f, "set ");
549            }
550          instrument_expression(p->pn_left, f);          instrument_expression(p->pn_left, f);
551            if (p->pn_right->pn_type != TOK_FUNCTION) {
552              fatal("parse error: expected function");
553            }
554          instrument_function(p->pn_right, f, 0, FUNCTION_GETTER_OR_SETTER);          instrument_function(p->pn_right, f, 0, FUNCTION_GETTER_OR_SETTER);
555          break;          break;
556        default:        default:

Legend:
Removed from v.284  
changed lines
  Added in v.293

  ViewVC Help
Powered by ViewVC 1.1.24