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: |