This commit is contained in:
Tor Andersson
2014-02-12 16:26:47 +01:00
parent 91c0e066a1
commit 759d609588
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -284,6 +284,7 @@ static void pexpi(int d, int p, js_Ast *exp)
p = tp;
switch (exp->type) {
case AST_IDENTIFIER: ps(exp->string); break;
case EXP_IDENTIFIER: ps(exp->string); break;
case EXP_NUMBER: printf("%.9g", exp->number); break;
case EXP_STRING: pstr(exp->string); break;
+7 -2
View File
@@ -265,6 +265,11 @@ static js_Object *jsR_tofunction(js_State *J, int idx)
/* Stack manipulation */
int js_gettop(js_State *J)
{
return TOP - BOT;
}
void js_pop(js_State *J, int n)
{
TOP -= n;
@@ -838,9 +843,9 @@ static void jsR_callscript(js_State *J, int n, js_Function *F)
static void jsR_callcfunction(js_State *J, int n, int min, js_CFunction F)
{
int rv;
int rv, i;
while (min++ < n)
for (i = n; i < min; ++i)
js_pushundefined(J);
rv = F(J, n);