Commit 81a2863d authored by John van Groningen's avatar John van Groningen
Browse files

fix bug in implementation of seq

parent bf839f3a
......@@ -227,6 +227,27 @@ void UnpackArray (int aindex, int *asp_p, Bool removeroot)
*asp_p += SizeOfAStackElem;
}
#if 0 /* defined (_WINDOWS_) */
void trace (char *s)
{
DWORD n_chars;
n_chars = strlen (s);
WriteFile (GetStdHandle (STD_OUTPUT_HANDLE),s,n_chars,&n_chars,NULL);
}
void trace_si (char *e,int i)
{
DWORD n_chars;
char s[128];
sprintf (s,"%s %d\n",e,i);
n_chars = strlen (s);
WriteFile (GetStdHandle (STD_OUTPUT_HANDLE),s,n_chars,&n_chars,NULL);
}
#endif
Coercions CoerceStateKind (StateKind dem_state_kind, StateKind off_state_kind)
{
if (dem_state_kind==Undefined)
......@@ -3276,10 +3297,14 @@ static void FillNormalNode (Node node,int *asp_p,int *bsp_p,NodeId update_node_i
old_asp=*asp_p;
old_bsp=*bsp_p;
BuildArg (node->node_arguments,asp_p,bsp_p,code_gen_node_ids_p);
GenPopA (*asp_p-old_asp);
GenPopA (*bsp_p-old_bsp);
*asp_p=old_asp;
*bsp_p=old_bsp;
if (*asp_p>=old_asp){
GenPopA (*asp_p-old_asp);
*asp_p=old_asp;
}
if (*bsp_p>=old_bsp){
GenPopB (*bsp_p-old_bsp);
*bsp_p=old_bsp;
}
if (update_node_id==NULL){
ArgP arg2_arg;
......
......@@ -981,8 +981,14 @@ static void CodeNormalRootNode (Node root,NodeId rootid,int asp,int bsp,CodeGenN
old_asp=asp;
old_bsp=bsp;
BuildArg (root->node_arguments,&asp,&bsp,code_gen_node_ids_p);
GenPopA (asp-old_asp);
GenPopB (bsp-old_bsp);
if (asp>=old_asp)
GenPopA (asp-old_asp);
else
old_asp=asp;
if (bsp>=old_bsp)
GenPopB (bsp-old_bsp);
else
old_bsp=bsp;
/* asp=old_asp; bsp=old_bsp; */
CodeRootNode (root->node_arguments->arg_next->arg_node,rootid,old_asp,old_bsp,code_gen_node_ids_p,resultstate,NULL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment