*** empty log message ***

This commit is contained in:
hyung-hwan 2006-03-27 14:15:53 +00:00
parent f93a7f4345
commit a972ac6e08
2 changed files with 8 additions and 55 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $Id: run.c,v 1.22 2006-03-27 14:14:00 bacon Exp $ * $Id: run.c,v 1.23 2006-03-27 14:15:53 bacon Exp $
*/ */
#include <xp/awk/awk.h> #include <xp/awk/awk.h>
@ -605,24 +605,7 @@ static xp_awk_val_t* __eval_binary (xp_awk_t* awk, xp_awk_nde_exp_t* nde)
xp_long_t r = xp_long_t r =
((xp_awk_val_int_t*)left)->val + ((xp_awk_val_int_t*)left)->val +
((xp_awk_val_int_t*)right)->val; ((xp_awk_val_int_t*)right)->val;
// TODO: consider the code segement commented out below for optimization....
/*
if (!xp_awk_isbuiltinval(left) && left->ref <= 1)
{
((xp_awk_val_int_t*)left)->val = r;
res = left;
}
else if (!xp_awk_isbuiltinval(right) && right->ref <= 1)
{
((xp_awk_val_int_t*)right)->val = r;
res = right;
}
else
{
*/
res = xp_awk_makeintval (awk, r); res = xp_awk_makeintval (awk, r);
//}
} }
} }
else if (nde->opcode == XP_AWK_BINOP_MINUS) else if (nde->opcode == XP_AWK_BINOP_MINUS)
@ -633,43 +616,12 @@ static xp_awk_val_t* __eval_binary (xp_awk_t* awk, xp_awk_nde_exp_t* nde)
xp_long_t r = xp_long_t r =
((xp_awk_val_int_t*)left)->val - ((xp_awk_val_int_t*)left)->val -
((xp_awk_val_int_t*)right)->val; ((xp_awk_val_int_t*)right)->val;
/*
if (!xp_awk_isbuiltinval(left) && left->ref <= 1)
{
((xp_awk_val_int_t*)left)->val = r;
res = left;
}
else if (!xp_awk_isbuiltinval(right) && right->ref <= 1)
{
((xp_awk_val_int_t*)right)->val = r;
res = right;
}
else
{
*/
res = xp_awk_makeintval (awk, r); res = xp_awk_makeintval (awk, r);
//}
} }
} }
/*
if (res == left)
{
xp_awk_refdownval_nofree (left);
xp_awk_refdownval (right);
}
else if (res == right)
{
xp_awk_refdownval (left);
xp_awk_refdownval_nofree (right);
}
else
{
*/
xp_awk_refdownval (awk, left); xp_awk_refdownval (awk, left);
xp_awk_refdownval (awk, right); xp_awk_refdownval (awk, right);
//}
return res; return res;
} }

View File

@ -1,5 +1,5 @@
/* /*
* $Id: val.c,v 1.11 2006-03-27 11:43:17 bacon Exp $ * $Id: val.c,v 1.12 2006-03-27 14:14:00 bacon Exp $
*/ */
#include <xp/awk/awk.h> #include <xp/awk/awk.h>
@ -146,7 +146,8 @@ void xp_awk_refdownval (xp_awk_t* awk, xp_awk_val_t* val)
if (xp_awk_isbuiltinval(val)) return; if (xp_awk_isbuiltinval(val)) return;
/* /*
xp_printf (XP_TEXT("ref down [count=>%d]\n"), val->ref); xp_printf (XP_TEXT("%p, %p, %p\n"), xp_awk_val_nil, &__awk_nil, val);
xp_printf (XP_TEXT("ref down [count=>%d]\n"), (int)val->ref);
xp_awk_printval (val); xp_awk_printval (val);
xp_printf (XP_TEXT("\n")); xp_printf (XP_TEXT("\n"));
*/ */