We normally build as one compilation unit with "one.c" but we should still be able to build each source file as a separate compilation unit if desired.
Unified · Split
| @@ -2,6 +2,8 @@ · 1 unmodified line | ||
| 2 | 2 | #include "jslex.h" |
| 3 | 3 | #include "jsvalue.h" |
| 4 | 4 | #include "jsbuiltin.h" |
| 5 | +#include "jscompile.h" | |
| 6 | +#include "utf.h" | |
| 5 | 7 | |
| 6 | 8 | static void reprvalue(js_State *J, js_Buffer **sb); |
| 7 | 9 | |
| @@ -193,9 +195,12 @@ static void reprvalue(js_State *J, js_Buffer **sb) · 185 unmodified lines | ||
| 193 | 195 | if (obj->u.r.flags & JS_REGEXP_M) js_putc(J, sb, 'm'); |
| 194 | 196 | break; |
| 195 | 197 | case JS_CDATE: |
| 196 | − js_puts(J, sb, "(new Date("); | |
| 197 | − fmtnum(J, sb, obj->u.number); | |
| 198 | − js_puts(J, sb, "))"); | |
| 198 | + { | |
| 199 | + char buf[40]; | |
| 200 | + js_puts(J, sb, "(new Date("); | |
| 201 | + js_puts(J, sb, jsV_numbertostring(J, buf, obj->u.number)); | |
| 202 | + js_puts(J, sb, "))"); | |
| 203 | + } | |
| 199 | 204 | break; |
| 200 | 205 | case JS_CERROR: |
| 201 | 206 | js_puts(J, sb, "(new "); |
| @@ -6,6 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | #include "jsbuiltin.h" |
| 7 | 7 | |
| 8 | 8 | #include <assert.h> |
| 9 | +#include <errno.h> | |
| 9 | 10 | |
| 10 | 11 | static void *js_defaultalloc(void *actx, void *ptr, int size) |
| 11 | 12 | { |