Changeset 79 in dev for BasicCompiler32/Compile_Func.cpp
- Timestamp:
- Mar 25, 2007, 5:58:57 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Func.cpp
r78 r79 340 340 pUserProc->Using(); 341 341 } 342 void Opcode_Func_SizeOf(const char *Parameter){ 343 LONG_PTR lpIndex; 344 int type = GetTypeFixed(Parameter,&lpIndex); 345 346 int size; 347 if( type == DEF_OBJECT ){ 348 CClass *pClass = (CClass *)lpIndex; 349 size = pClass->GetSize(); 350 } 351 else{ 352 size=GetTypeSize(type,lpIndex); 353 } 342 void Opcode_Func_SizeOf( const string &typeName ){ 343 Type tempType; 344 if( !Type::StringToType( typeName, tempType ) ){ 345 SetError(3,typeName,cp); 346 return; 347 } 348 349 int typeSize = ( tempType.IsObject() ) ? 350 tempType.GetClass().GetSize() : tempType.GetSize(); 354 351 355 352 //mov eax,size 356 op_mov_RV( REG_EAX, size );353 op_mov_RV( REG_EAX, typeSize ); 357 354 } 358 355 void Opcode_Func_VarPtr( const char *Parameter, Type &resultType, bool isCallOn ){
Note:
See TracChangeset
for help on using the changeset viewer.