- Timestamp:
- Aug 3, 2007, 11:53:50 PM (17 years ago)
- Location:
- trunk/abdev
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
r260 r261 403 403 404 404 //ラベル管理オブジェクトを初期化 405 extern Labels labels; 406 labels.clear(); 405 compiler.codeGenerator.gotoLabels.clear(); 407 406 408 407 //Gotoラベルスケジュール -
trunk/abdev/BasicCompiler32/Compile_Statement.cpp
r260 r261 279 279 280 280 int GetLabelAddress(char *LabelName,int LineNum){ 281 extern Labels labels;282 283 281 if(LabelName){ 284 BOOST_FOREACH( const Label &label, labels )282 BOOST_FOREACH( const GotoLabel &label, compiler.codeGenerator.gotoLabels ) 285 283 { 286 284 if( label.name.size() > 0 ) … … 294 292 } 295 293 else{ 296 BOOST_FOREACH( const Label &label, labels )294 BOOST_FOREACH( const GotoLabel &label, compiler.codeGenerator.gotoLabels ) 297 295 { 298 296 if( label.name.size() == 0 ) -
trunk/abdev/BasicCompiler32/MakePeHdr.cpp
r260 r261 418 418 419 419 //ラベル管理オブジェクトを初期化 420 extern Labels labels; 421 labels.clear(); 420 compiler.codeGenerator.gotoLabels.clear(); 422 421 423 422 //Gotoラベルスケジュール -
trunk/abdev/BasicCompiler32/Opcode.h
r260 r261 19 19 #define breakpoint compiler.codeGenerator.PutOld( (char)0xCC ); 20 20 21 22 //ラベルアドレス23 class Label24 {25 public:26 std::string name;27 int line;28 DWORD address;29 30 Label( const std::string &name, long nativeCodePos )31 : name( name )32 , line( -1 )33 , address( nativeCodePos )34 {35 }36 Label( int line, long nativeCodePos )37 : name( "" )38 , line( line )39 , address( nativeCodePos )40 {41 }42 };43 typedef std::vector<Label> Labels;44 21 45 22 //プロシージャの種類 -
trunk/abdev/BasicCompiler_Common/Compile.cpp
r260 r261 19 19 20 20 #include <Exception.h> 21 22 //ラベルアドレス23 Labels labels;24 21 25 22 //グローバル変数初期バッファ … … 122 119 //Goto先ラベル 123 120 extern int obp; 124 labels.push_back(Label( Command + 1, obp ) );121 compiler.codeGenerator.gotoLabels.push_back( GotoLabel( Command + 1, obp ) ); 125 122 126 123 //書き込みスケジュール … … 534 531 //Goto先ラベル 535 532 extern int obp; 536 labels.push_back(Label( (long)i3, obp ) );533 compiler.codeGenerator.gotoLabels.push_back( GotoLabel( (long)i3, obp ) ); 537 534 538 535 //書き込みスケジュール -
trunk/abdev/BasicCompiler_Common/include/CodeGenerator.h
r258 r261 81 81 typedef std::vector<const GotoLabelSchedule *> GotoLabelSchedules; 82 82 83 //ラベルアドレス 84 class GotoLabel 85 { 86 public: 87 std::string name; 88 int line; 89 DWORD address; 90 91 GotoLabel( const std::string &name, long nativeCodePos ) 92 : name( name ) 93 , line( -1 ) 94 , address( nativeCodePos ) 95 { 96 } 97 GotoLabel( int line, long nativeCodePos ) 98 : name( "" ) 99 , line( line ) 100 , address( nativeCodePos ) 101 { 102 } 103 }; 104 typedef std::vector<GotoLabel> GotoLabels; 105 83 106 class LexicalScope 84 107 { … … 190 213 191 214 // Gotoスケジュールの管理 215 GotoLabels gotoLabels; 192 216 GotoLabelSchedules gotoLabelSchedules; 193 217
Note:
See TracChangeset
for help on using the changeset viewer.