comparison dmd/StringExp.d @ 176:fa9a71a9f5a8

Moved all the mutable globals to Global
author korDen
date Sun, 10 Oct 2010 05:22:45 +0400
parents 94b6033c07f3
children 1475fd394c9e
comparison
equal deleted inserted replaced
175:94b6033c07f3 176:fa9a71a9f5a8
15 import dmd.OutBuffer; 15 import dmd.OutBuffer;
16 import dmd.Loc; 16 import dmd.Loc;
17 import dmd.Scope; 17 import dmd.Scope;
18 import dmd.IRState; 18 import dmd.IRState;
19 import dmd.StringExp; 19 import dmd.StringExp;
20 import dmd.Global;
20 import dmd.HdrGenState; 21 import dmd.HdrGenState;
21 import dmd.Utf; 22 import dmd.Utf;
22 import dmd.Util; 23 import dmd.Util;
23 import dmd.WANT; 24 import dmd.WANT;
24 import dmd.backend.dt_t; 25 import dmd.backend.dt_t;
786 printf(" len = %d\n", len); 787 printf(" len = %d\n", len);
787 printf(" sz = %d\n", sz); 788 printf(" sz = %d\n", sz);
788 } 789 }
789 for (size_t i = 0; i < STSIZE; i++) 790 for (size_t i = 0; i < STSIZE; i++)
790 { 791 {
791 st = &stringTab[(stidx + i) % STSIZE]; 792 st = &global.stringTab[(global.stidx + i) % STSIZE];
792 //if (!st.m) continue; 793 //if (!st.m) continue;
793 //printf(" st.m = %s\n", st.m.toChars()); 794 //printf(" st.m = %s\n", st.m.toChars());
794 //printf(" st.len = %d\n", st.len); 795 //printf(" st.len = %d\n", st.len);
795 //printf(" st.sz = %d\n", st.sz); 796 //printf(" st.sz = %d\n", st.sz);
796 if (st.m is irs.m && 797 if (st.m is irs.m &&
803 si = st.si; // use cached value 804 si = st.si; // use cached value
804 goto L1; 805 goto L1;
805 } 806 }
806 } 807 }
807 808
808 stidx = (stidx + 1) % STSIZE; 809 global.stidx = (global.stidx + 1) % STSIZE;
809 st = &stringTab[stidx]; 810 st = &global.stringTab[global.stidx];
810 811
811 dt = null; 812 dt = null;
812 toDt(&dt); 813 toDt(&dt);
813 814
814 si = symbol_generate(SC.SCstatic, type_fake(TYM.TYdarray)); 815 si = symbol_generate(SC.SCstatic, type_fake(TYM.TYdarray));