/[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 389 by siliconforks, Thu Oct 30 17:53:07 2008 UTC revision 392 by siliconforks, Thu Oct 30 17:54:24 2008 UTC
# Line 715  Line 715 
715            Stream_write_string(f, "set ");            Stream_write_string(f, "set ");
716          }          }
717          output_expression(p->pn_left, f, false);          output_expression(p->pn_left, f, false);
718            Stream_write_char(f, ' ');
719          if (p->pn_right->pn_type != TOK_FUNCTION) {          if (p->pn_right->pn_type != TOK_FUNCTION) {
720            fatal_source(file_id, p->pn_pos.begin.lineno, "expected function");            fatal_source(file_id, p->pn_pos.begin.lineno, "expected function");
721          }          }
# Line 764  Line 765 
765      To keep the output simple, special-case zero.      To keep the output simple, special-case zero.
766      */      */
767      if (node->pn_dval == 0.0) {      if (node->pn_dval == 0.0) {
768        Stream_write_string(f, "0");        if (signbit(node->pn_dval)) {
769            Stream_write_string(f, "-0");
770          }
771          else {
772            Stream_write_string(f, "0");
773          }
774      }      }
775      else if (node->pn_dval == INFINITY) {      else if (node->pn_dval == INFINITY) {
776        Stream_write_string(f, "Number.POSITIVE_INFINITY");        Stream_write_string(f, "Number.POSITIVE_INFINITY");
# Line 772  Line 778 
778      else if (node->pn_dval == -INFINITY) {      else if (node->pn_dval == -INFINITY) {
779        Stream_write_string(f, "Number.NEGATIVE_INFINITY");        Stream_write_string(f, "Number.NEGATIVE_INFINITY");
780      }      }
781      else if (node->pn_dval == NAN) {      else if (isnan(node->pn_dval)) {
782        Stream_write_string(f, "Number.NaN");        Stream_write_string(f, "Number.NaN");
783      }      }
784      else {      else {

Legend:
Removed from v.389  
changed lines
  Added in v.392

  ViewVC Help
Powered by ViewVC 1.1.24