Bug 701355: Fix separate compilation issues that have crept in.

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.
This commit is contained in:
Tor Andersson
2020-01-10 11:08:37 +01:00
parent d248b0ce18
commit 8ee595bee7
2 changed files with 9 additions and 3 deletions

View File

@@ -2,6 +2,8 @@
#include "jslex.h"
#include "jsvalue.h"
#include "jsbuiltin.h"
#include "jscompile.h"
#include "utf.h"
static void reprvalue(js_State *J, js_Buffer **sb);
@@ -193,9 +195,12 @@ static void reprvalue(js_State *J, js_Buffer **sb)
if (obj->u.r.flags & JS_REGEXP_M) js_putc(J, sb, 'm');
break;
case JS_CDATE:
js_puts(J, sb, "(new Date(");
fmtnum(J, sb, obj->u.number);
js_puts(J, sb, "))");
{
char buf[40];
js_puts(J, sb, "(new Date(");
js_puts(J, sb, jsV_numbertostring(J, buf, obj->u.number));
js_puts(J, sb, "))");
}
break;
case JS_CERROR:
js_puts(J, sb, "(new ");

View File

@@ -6,6 +6,7 @@
#include "jsbuiltin.h"
#include <assert.h>
#include <errno.h>
static void *js_defaultalloc(void *actx, void *ptr, int size)
{