ref: 64cd586798850be558f5417492631b3b1ac3b653
parent: 45c62b0fcc778c6e3f5e5ec684dcbd8437a4a9be
author: Tor Andersson <tor.andersson@artifex.com>
date: Tue Oct 28 08:35:24 EDT 2014
Add static to some functions that should have it.
--- a/jsi.h
+++ b/jsi.h
@@ -84,6 +84,7 @@
void js_dup2(js_State *J);
void js_rot2(js_State *J);
void js_rot3(js_State *J);
+void js_rot4(js_State *J);
void js_rot2pop1(js_State *J);
void js_rot3pop2(js_State *J);
void js_dup1rot3(js_State *J);
@@ -90,6 +91,8 @@
void js_dup1rot4(js_State *J);
void js_RegExp_prototype_exec(js_State *J, js_Regexp *re, const char *text);
+
+void js_trap(js_State *J, int pc); /* dump stack and environment to stdout */
/* Exception handling */
--- a/jsnumber.c
+++ b/jsnumber.c
@@ -32,7 +32,7 @@
}
/* Customized ToString() on a number */
-void numtostr(js_State *J, const char *fmt, int w, double n)
+static void numtostr(js_State *J, const char *fmt, int w, double n)
{
char buf[32], *e;
if (isnan(n)) js_pushliteral(J, "NaN");
--- a/jsrun.c
+++ b/jsrun.c
@@ -188,7 +188,7 @@
return v->type == JS_TOBJECT && v->u.object->type == JS_CREGEXP;
}
-int js_isiterator(js_State *J, int idx)
+static int js_isiterator(js_State *J, int idx)
{
const js_Value *v = stackidx(J, idx);
return v->type == JS_TOBJECT && v->u.object->type == JS_CITERATOR;
@@ -1044,7 +1044,7 @@
/* Main interpreter loop */
-void jsR_dumpstack(js_State *J)
+static void jsR_dumpstack(js_State *J)
{
int i;
printf("stack {\n");
@@ -1057,7 +1057,7 @@
printf("}\n");
}
-void jsR_dumpenvironment(js_State *J, js_Environment *E, int d)
+static void jsR_dumpenvironment(js_State *J, js_Environment *E, int d)
{
printf("scope %d ", d);
js_dumpobject(J, E->variables);