diff: mercury_engine.c stack layout bug fix

Fergus Henderson fjh at cs.mu.oz.au
Sat Dec 6 04:53:23 AEDT 1997


runtime/mercury_engine.c:
	Fix a bug in Tyson's recent changes to add support for
	stack layouts: in the code for grades not using gcc nonlocal
	gotos, there were still a couple of calls to the old
	make_label() macro without a stack layout argument.

Index: mercury_engine.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_engine.c,v
retrieving revision 1.3
diff -u -u -r1.3 mercury_engine.c
--- mercury_engine.c	1997/12/03 07:26:13	1.3
+++ mercury_engine.c	1997/12/05 17:49:32
@@ -29,8 +29,9 @@
 static	void	call_engine_inner(Code *entry_point);
 
 #ifndef USE_GCC_NONLOCAL_GOTOS
-static	Code	*engine_done(void);
-static	Code	*engine_init_registers(void);
+  static Code	*engine_done(void);
+  static Code	*engine_init_registers(void);
+  MR_MAKE_STACK_LAYOUT_ENTRY(engine_done);
 #endif
 
 bool	debugflag[MAXFLAG];
@@ -62,11 +63,10 @@
 	init_memory();
 
 #ifndef USE_GCC_NONLOCAL_GOTOS
-	make_label("engine_done", LABEL(engine_done));
+	make_label("engine_done", LABEL(engine_done), engine_done);
 #endif
 
 	init_process_context();
-
 }
 
 /*---------------------------------------------------------------------------*/
@@ -177,7 +177,7 @@
 
 	if (!initialized)
 	{
-		make_label("engine_done", LABEL(engine_done));
+		make_label("engine_done", LABEL(engine_done), engine_done);
 		initialized = TRUE;
 	}
 }

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list