Changeset 262 in dev for trunk/abdev/BasicCompiler64/Compile_Statement.cpp
- Timestamp:
- Aug 4, 2007, 4:36:34 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/Compile_Statement.cpp
r257 r262 236 236 237 237 int GetLabelAddress(char *LabelName,int LineNum){ 238 extern int MaxLabelNum;239 extern LABEL *pLabelNames;240 int i;241 242 238 if(LabelName){ 243 for(i=0;i<MaxLabelNum;i++){ 244 if(pLabelNames[i].pName){ 245 if(lstrcmp(LabelName,pLabelNames[i].pName)==0) return pLabelNames[i].address; 239 BOOST_FOREACH( const GotoLabel &label, compiler.codeGenerator.gotoLabels ) 240 { 241 if( label.name.size() > 0 ) 242 { 243 if( label.name == LabelName ) 244 { 245 return label.address; 246 } 246 247 } 247 248 } 248 249 } 249 250 else{ 250 for(i=0;i<MaxLabelNum;i++){ 251 if(pLabelNames[i].pName==0){ 252 if(LineNum==pLabelNames[i].line) return pLabelNames[i].address; 251 BOOST_FOREACH( const GotoLabel &label, compiler.codeGenerator.gotoLabels ) 252 { 253 if( label.name.size() == 0 ) 254 { 255 if( label.line == LineNum ) 256 { 257 return label.address; 258 } 253 259 } 254 260 }
Note:
See TracChangeset
for help on using the changeset viewer.