Changeset 28 in dev for BasicCompiler64/Compile_Set_Var.cpp
- Timestamp:
- Jan 8, 2007, 6:34:44 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/Compile_Set_Var.cpp
r27 r28 77 77 78 78 79 //TODO: 継承・派生関係にある場合は許容する 80 if(CalcType==DEF_OBJECT&&lpVarIndex==lpCalcIndex){ 81 //双方のオブジェクト型が完全に一致したとき 82 //※コピーを行う 83 84 //mov rsi,RightTermReg 85 op_mov_RR(REG_RSI,RightTermReg); 86 87 //mov rdi,VarReg 88 op_mov_RR(REG_RDI,VarReg); 89 90 int object_size; 91 object_size=GetSizeOfClass((CClass *)lpVarIndex); 92 93 //mov rcx,object_size 94 op_mov_RV(sizeof(_int64),REG_RCX,object_size); 95 96 if(bUseHeap){ 97 //mov rax,rsi 98 op_mov_RR(REG_RAX,REG_RSI); 99 } 100 101 //rep movs byte ptr[rdi],byte ptr[rsi] 102 op_rep_movs(sizeof(BYTE)); 103 104 if(bUseHeap){ 105 //mov rcx,rax 106 op_mov_RR(REG_RCX,REG_RAX); 107 108 //call free 109 extern SUBINFO *pSub_free; 110 op_call(pSub_free); 111 } 112 113 return; 114 } 115 else{ 116 SetError(1,NULL,cp); 117 } 79 if( CalcType == DEF_OBJECT ){ 80 CClass *pVarClass = (CClass *)lpVarIndex; 81 CClass *pCalcClass = (CClass *)lpCalcIndex; 82 83 if( pVarClass->IsEquals( pCalcClass ) //等しい 84 || pVarClass->IsSubClass( pCalcClass ) ){ //派生・継承関係 85 86 //双方のオブジェクト型が一致、または派生・継承関係にあるとき 87 //※コピーを行う 88 89 //mov rsi,RightTermReg 90 op_mov_RR(REG_RSI,RightTermReg); 91 92 //mov rdi,VarReg 93 op_mov_RR(REG_RDI,VarReg); 94 95 int object_size = GetSizeOfClass((CClass *)lpVarIndex); 96 97 //mov rcx,object_size 98 op_mov_RV(sizeof(_int64),REG_RCX,object_size); 99 100 if(bUseHeap){ 101 //mov rax,rsi 102 op_mov_RR(REG_RAX,REG_RSI); 103 } 104 105 //rep movs byte ptr[rdi],byte ptr[rsi] 106 op_rep_movs(sizeof(BYTE)); 107 108 if(bUseHeap){ 109 //mov rcx,rax 110 op_mov_RR(REG_RCX,REG_RAX); 111 112 //call free 113 extern SUBINFO *pSub_free; 114 op_call(pSub_free); 115 } 116 117 return; 118 } 119 } 120 121 SetError(1,NULL,cp); 118 122 } 119 123
Note:
See TracChangeset
for help on using the changeset viewer.