]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.cc] cmd/gc, cmd/ld, runtime: minor tweaks for c2go
authorRuss Cox <rsc@golang.org>
Fri, 13 Feb 2015 19:42:31 +0000 (14:42 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 17 Feb 2015 23:28:32 +0000 (23:28 +0000)
Change-Id: I3be69a4ebf300ad24b55b5f43fd7ad1f001c762e
Reviewed-on: https://go-review.googlesource.com/4838
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/gc/popt.h
src/cmd/gc/walk.c
src/cmd/ld/dwarf.c
src/runtime/stack.h

index 0a30e81f5513087d20df70f906e5d879b5367183..4e89dbd67804be186dafff389d9e1a8e17cf9177 100644 (file)
@@ -118,7 +118,8 @@ EXTERN      Bits    ovar;
 EXTERN int     change;
 EXTERN int32   maxnr;
 
-EXTERN struct
+typedef struct OptStats OptStats;
+struct OptStats
 {
        int32   ncvtreg;
        int32   nspill;
@@ -126,7 +127,9 @@ EXTERN      struct
        int32   ndelmov;
        int32   nvar;
        int32   naddr;
-} ostats;
+};
+
+EXTERN OptStats ostats;
 
 /*
  * reg.c
index 0e69f88b66268c033aec6bd7c0d13213e7432f32..50dae8ca681ce2b78599a9d3f6d645e6111cbb29 100644 (file)
@@ -634,7 +634,7 @@ walkexpr(Node **np, NodeList **init)
 
                        // Append captured variables to argument list.
                        n->list = concat(n->list, n->left->enter);
-                       n->left->enter = NULL;
+                       n->left->enter = nil;
                        // Replace OCLOSURE with ONAME/PFUNC.
                        n->left = n->left->closure->nname;
                        // Update type of OCALLFUNC node.
index 53f0194b31de888b607ec48321628b6068e59acd..bd94d11d9ce08874c469524c7144905b3554ec24 100644 (file)
@@ -104,7 +104,7 @@ uleb128enc(uvlong v, char* dst)
                len++;
        } while (c & 0x80);
        return len;
-};
+}
 
 static int
 sleb128enc(vlong v, char *dst)
index 88c7e02f40f764f3f7041ed36032c366a3a81871..b64123e80f479a6f59a6ca0bbed09aa2334144a9 100644 (file)
@@ -22,6 +22,10 @@ enum {
 #define STACKSYSTEM 0
 #endif
 
+       /*c2go
+       STACKSYSTEM = 0,
+       */
+
        StackSystem = STACKSYSTEM,
 
        StackBig = 4096,