diff mc-codegen.c @ 455:563a5d29ec5e

inline continue...
author kono
date Tue, 30 Nov 2004 16:46:55 +0900
parents 214272c8f2da
children b8f95294eb77
line wrap: on
line diff
--- a/mc-codegen.c	Tue Nov 30 02:30:20 2004 +0900
+++ b/mc-codegen.c	Tue Nov 30 16:46:55 2004 +0900
@@ -148,7 +148,7 @@
   int e2,e3,t,d,t1;
   NMTBL *n;
 
-  if (mode==INLINE) {
+  if (inmode) {
 	return (parse = list3(ST_COMP,parse,e1));
   }
   if (!control) return VOID;
@@ -269,6 +269,8 @@
     case CODE:
 	jump(e2,caddr(e1));
 	return VOID;
+    case INLINE:
+	return g_expr0(pexpr(e1));
     case INDIRECT:
 	return g_expr0(e2);
     case RINDIRECT:  
@@ -3119,6 +3121,7 @@
 extern void
 checkret(void)
 {
+    if (inmode) error(-1);
     if (cslabel==0) {
 	if (!control) error(-1); // no execute code in switch
 	checkjmp(0);
@@ -4200,7 +4203,7 @@
 
 static void
 st_decl(int e1){
-    NMTBL *n = (NMTBL *)caddr(e1);
+    // NMTBL *n = (NMTBL *)caddr(e1);
     // int stmode = cadddr(e1);
 }
  
@@ -4366,7 +4369,7 @@
  
 static void
 st_comp(int e1){
-    g_expr_u(e1);
+    g_expr_u(caddr(e1));
 }
 
  
@@ -4559,7 +4562,7 @@
 
 static void
 st_comment(int e1){
-    gen_comment((char *)car(e1));
+    gen_comment((char *)caddr(e1));
 }
 
 /* end */