[MLton-commit] r6866
Wesley Terpstra
wesley at mlton.org
Wed Sep 17 21:19:51 PDT 2008
Eliminate duplicate gcState symbol from the bytecode library. Initialize globals to place them in BSS section even if -fno-common is removed.
----------------------------------------------------------------------
U mlton/trunk/runtime/bytecode/interpret.c
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/bytecode/interpret.c
===================================================================
--- mlton/trunk/runtime/bytecode/interpret.c 2008-09-18 04:09:02 UTC (rev 6865)
+++ mlton/trunk/runtime/bytecode/interpret.c 2008-09-18 04:19:42 UTC (rev 6866)
@@ -63,17 +63,17 @@
typedef Word8 Scale;
typedef Int16 StackOffset; // StackOffset must be signed.
-struct GC_state gcState;
+PRIVATE extern struct GC_state gcState;
//----------------------------------------------------------------------
// Imports
//----------------------------------------------------------------------
#define regs(ty) \
- int ty##RegI; \
- extern ty global##ty[]; \
+ int ty##RegI = 0; \
+ PRIVATE extern ty global##ty[]; \
static ty ty##VReg[1000]; \
- ty ty##Reg[1000]
+ ty ty##Reg[1000] = { 0 }
regs(CPointer);
regs(Objptr);
More information about the MLton-commit
mailing list