Changeset 241 in dev for trunk/abdev/BasicCompiler_Common/include
- Timestamp:
- Jul 27, 2007, 12:06:11 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/CodeGenerator.h
r240 r241 52 52 53 53 private: 54 55 // 部分スケジュールの管理 54 56 typedef std::vector<PertialSchedule *> PertialSchedules; 55 57 PertialSchedules pertialSchedules; 56 58 59 // Continue用のコード位置情報の管理 60 std::vector<long> continueCodePositions; 61 std::vector<long> _continueCodePositions_ObpOld; 62 57 63 public: 58 64 … … 78 84 } 79 85 86 long GetContinueCodePos() const 87 { 88 if( continueCodePositions.size() == 0 ) 89 { 90 return -1; 91 } 92 return continueCodePositions[continueCodePositions.size()-1]; 93 } 94 void ClearContinueArea() 95 { 96 continueCodePositions.clear(); 97 _continueCodePositions_ObpOld.clear(); 98 } 99 void ContinueAreaBegin() 100 { 101 continueCodePositions.push_back( pNativeCode->GetSize() ); 102 103 extern int obp; 104 _continueCodePositions_ObpOld.push_back( obp ); 105 } 106 void ContinueAreaEnd() 107 { 108 continueCodePositions.pop_back(); 109 _continueCodePositions_ObpOld.pop_back(); 110 } 111 long GetContinueCodePosOld() const 112 { 113 if( _continueCodePositions_ObpOld.size() == 0 ) 114 { 115 return -1; 116 } 117 return _continueCodePositions_ObpOld[_continueCodePositions_ObpOld.size()-1]; 118 } 119 80 120 void CheckUnresolveSchedule(); 81 121 … … 88 128 89 129 private: 90 PertialSchedule *__jmp_op_format( char opcode, long offset, int op_size, bool isPertialSchedule = false );130 PertialSchedule *__jmp_op_format( char opcode, long offset, int op_size, bool isPertialSchedule = false, bool isSelfOpcodeOffset = false ); 91 131 public: 92 132 PertialSchedule *op_jle( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); … … 100 140 PertialSchedule *op_jne( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 101 141 PertialSchedule *op_je( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 102 PertialSchedule *op_jmp( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 142 PertialSchedule *op_jmp( long offset, int op_size = sizeof(char), bool isPertialSchedule = false, bool isSelfOpcodeOffset = false ); 143 void op_jmp_continue(); 103 144 104 145 -
trunk/abdev/BasicCompiler_Common/include/NativeCode.h
r237 r241 141 141 // 未完成 142 142 extern char *OpBuffer; 143 extern int obp;144 143 OpBuffer[_obpOld] = c; 144 } 145 void Overwrite( int codePos, long newLongValue ) 146 { 147 *(long *)(this->codeBuffer+codePos) = newLongValue; 148 } 149 void OverwriteOld( int _obpOld, long newLongValue ) 150 { 151 // 未完成 152 extern char *OpBuffer; 153 *(long *)(OpBuffer+_obpOld) = newLongValue; 145 154 } 146 155
Note:
See TracChangeset
for help on using the changeset viewer.