Changeset 79 in dev for BasicCompiler64/Compile_Func.cpp
- Timestamp:
- Mar 25, 2007, 5:58:57 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/Compile_Func.cpp
r78 r79 185 185 pUserProc->Using(); 186 186 } 187 void Opcode_Func_SizeOf( const char *Parameter ){ 188 LONG_PTR lpIndex; 189 int type = GetTypeFixed(Parameter,&lpIndex); 190 191 int size; 192 if( type == DEF_OBJECT ){ 193 CClass *pClass = (CClass *)lpIndex; 194 size = pClass->GetSize(); 195 } 196 else{ 197 size=GetTypeSize(type,lpIndex); 198 } 187 void Opcode_Func_SizeOf( const string &typeName ){ 188 Type tempType; 189 if( !Type::StringToType( typeName, tempType ) ){ 190 SetError(3,typeName,cp); 191 return; 192 } 193 194 int typeSize = ( tempType.IsObject() ) ? 195 tempType.GetClass().GetSize() : tempType.GetSize(); 199 196 200 197 //mov rax,size 201 op_mov_RV(sizeof(_int64),REG_RAX, size);198 op_mov_RV(sizeof(_int64),REG_RAX,typeSize); 202 199 } 203 200 void Opcode_Func_VarPtr( const char *Parameter, Type &resultType, bool isCallOn ){
Note:
See TracChangeset
for help on using the changeset viewer.