Changeset 28 in dev for BasicCompiler32/Compile_Set_Var.cpp
- Timestamp:
- Jan 8, 2007, 6:34:44 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Set_Var.cpp
r3 r28 34 34 } 35 35 36 if(CalcType==DEF_OBJECT&&lpVarIndex==lpCalcIndex){ 37 //双方のオブジェクト型が完全に一致したとき 38 //※コピーを行う 39 40 int object_size; 41 object_size=GetSizeOfClass((CClass *)lpVarIndex); 42 43 //mov ecx,object_size 44 op_mov_RV(REG_ECX,object_size); 45 46 //pop esi 47 op_pop(REG_ESI); 48 49 //pop edi 50 op_pop(REG_EDI); 51 52 if(bUseHeap){ 53 //mov eax,esi 54 op_mov_RR(REG_EAX,REG_ESI); 55 } 56 57 //rep movs byte ptr[edi],byte ptr[esi] 58 op_rep_movs(sizeof(BYTE)); 59 60 if(bUseHeap){ 61 //push eax 62 op_push(REG_EAX); 63 64 //call free 65 extern SUBINFO *pSub_free; 66 op_call(pSub_free); 67 } 68 69 return; 70 } 71 else{ 72 SetError(1,NULL,cp); 73 } 36 37 if( CalcType == DEF_OBJECT ){ 38 CClass *pVarClass = (CClass *)lpVarIndex; 39 CClass *pCalcClass = (CClass *)lpCalcIndex; 40 41 42 if( pVarClass->IsEquals( pCalcClass ) //等しい 43 || pVarClass->IsSubClass( pCalcClass ) ){ //派生・継承関係 44 45 //双方のオブジェクト型が一致、または派生・継承関係にあるとき 46 //※コピーを行う 47 48 int object_size; 49 object_size=GetSizeOfClass((CClass *)lpVarIndex); 50 51 //mov ecx,object_size 52 op_mov_RV(REG_ECX,object_size); 53 54 //pop esi 55 op_pop(REG_ESI); 56 57 //pop edi 58 op_pop(REG_EDI); 59 60 if(bUseHeap){ 61 //mov eax,esi 62 op_mov_RR(REG_EAX,REG_ESI); 63 } 64 65 //rep movs byte ptr[edi],byte ptr[esi] 66 op_rep_movs(sizeof(BYTE)); 67 68 if(bUseHeap){ 69 //push eax 70 op_push(REG_EAX); 71 72 //call free 73 extern SUBINFO *pSub_free; 74 op_call(pSub_free); 75 } 76 77 return; 78 } 79 } 80 81 SetError(1,NULL,cp); 74 82 } 75 83
Note:
See TracChangeset
for help on using the changeset viewer.