changeset 893:1408a5f1676f

fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 06 Apr 2014 15:12:10 +0900
parents 3542a0e38a54
children 989bdd85e8af
files Changes mc-parse.c
diffstat 2 files changed, 20 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Changes	Sun Apr 06 14:43:50 2014 +0900
+++ b/Changes	Sun Apr 06 15:12:10 2014 +0900
@@ -10035,3 +10035,11 @@
 
 inmode と parse_mode の両方をdebugするのが辛い。parse_mode=0 は、もはや使わないのだが。
 
+Sun Apr  6 15:11:13 JST 2014
+
+local_struct_static がだめだめ。non parse_mode での構造体への直接代入が変。
+
+zfill の最適化が足りない。
+
+
+
--- a/mc-parse.c	Sun Apr 06 14:43:50 2014 +0900
+++ b/mc-parse.c	Sun Apr 06 15:12:10 2014 +0900
@@ -1668,7 +1668,7 @@
 local_struct_static(int v)
 {
     NMTBL *nptr0,*n = ncaddr(v);
-    int sz = size(type),offset=0;
+    int offset=0;
     int smode = mode;
     int v0;
     // uninitialized part should be 0.
@@ -1689,16 +1689,17 @@
     v0 = list3n(GVAR,0,nptr0);
     decl_data_field(type,v0,offset);
     // do struct assignment before flushed assignment expression
-    init_vars = list2(
-        list4(STASS,
-            inmode?(
-                offset?(
-                    lp64?list3(LADD,list3n(IVAR,n->dsp,0),llist2(LCONST,offset)):
-                        list3(ADD,list3n(IVAR,n->dsp,0),list2(CONST,offset))):
-                    list3n(IVAR,n->dsp,0)):
-                list3n(LVAR,n->dsp+offset,0),
-            list3(RSTRUCT,v0,sz),sz),
-        init_vars);
+    // int sz = size(n->ty);
+    //init_vars = list2(
+    //    list4(STASS,
+    //        inmode?(
+    //            offset?(
+    //                lp64?list3(LADD,list3n(IVAR,n->dsp,0),llist2(LCONST,offset)):
+    //                    list3(ADD,list3n(IVAR,n->dsp,0),list2(CONST,offset))):
+    //                list3n(IVAR,n->dsp,0)):
+    //            list3n(LVAR,n->dsp+offset,0),
+    //        list3(RSTRUCT,v0,sz),sz),
+    //    init_vars);
     mode=STADECL;
     gen_delayed_decl_data(v,0);
     mode = smode;