Changeset 667 in dev
- Timestamp:
- Jun 26, 2008, 11:10:05 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev/compiler_x64
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/compiler_x64/Compile_Func.cpp
r584 r667 12 12 if( lstrcmpi( FuncName, "AddressOf" ) == 0 ) return FUNC_ADDRESSOF; 13 13 if( lstrcmpi( FuncName, "SizeOf" ) == 0 ) return FUNC_SIZEOF; 14 if( lstrcmpi( FuncName, "__ClassSizeOf" ) == 0 ) return FUNC_CLASS_SIZEOF; 14 15 if( lstrcmpi( FuncName, "VarPtr" ) == 0 ) return FUNC_VARPTR; 15 16 if( lstrcmpi( FuncName, "ObjPtr" ) == 0 ) return FUNC_OBJPTR; … … 383 384 } 384 385 386 int typeSize = tempType.GetSize(); 387 388 //mov rax,size 389 compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RAX,typeSize); 390 } 391 void Opcode_Func_ClassSizeOf( const std::string &typeName ) 392 { 393 Type tempType; 394 if( !compiler.StringToType( typeName, tempType ) ){ 395 compiler.errorMessenger.Output(3,typeName,cp); 396 return; 397 } 398 385 399 int typeSize = ( tempType.IsObject() ) ? 386 400 tempType.GetClass().GetSize() : tempType.GetSize(); … … 573 587 resultType.SetBasicType( DEF_LONG ); 574 588 break; 589 case FUNC_CLASS_SIZEOF: 590 if( isCallOn ) Opcode_Func_ClassSizeOf(Parameter); 591 resultType.SetBasicType( DEF_LONG ); 592 break; 575 593 case FUNC_VARPTR: 576 594 Opcode_Func_VarPtr( Parameter, resultType, isCallOn ); -
trunk/ab5.0/abdev/compiler_x64/FunctionValue.h
r432 r667 24 24 #define FUNC_SYSTEM_GET_DEFAULT_CONSTRUCTOR 0x0629 25 25 #define FUNC_SYSTEM_GET_DESTRUCTOR 0x062A 26 #define FUNC_CLASS_SIZEOF 0x062B 26 27 27 28 //ポインタ
Note:
See TracChangeset
for help on using the changeset viewer.