Changeset 308 in dev for trunk/abdev/BasicCompiler64/Compile_Func.cpp
- Timestamp:
- Aug 29, 2007, 9:05:22 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/Compile_Func.cpp
r266 r308 108 108 109 109 char ObjectName[VN_SIZE]; 110 int RefType;111 SplitObjectName(name,ObjectName, &RefType);110 ReferenceKind referenceKind; 111 SplitObjectName(name,ObjectName, referenceKind ); 112 112 113 113 if(ObjectName[0]){ … … 120 120 121 121 //参照タイプが整合しているかをチェック 122 if(type.GetBasicType()!=RefType) SetError(104,ObjectName,cp); 122 if( !( type.IsObject() && referenceKind == RefDot 123 || type.IsObjectPtr() && referenceKind == RefPointer ) ) 124 { 125 SetError(104,ObjectName,cp); 126 } 123 127 124 128 if(type.IsObjectPtr()){ … … 166 170 void Opcode_Func_SizeOf( const string &typeName ){ 167 171 Type tempType; 168 if( ! Compiler::StringToType( typeName, tempType ) ){172 if( !compiler.StringToType( typeName, tempType ) ){ 169 173 SetError(3,typeName,cp); 170 174 return; … … 268 272 else{ 269 273 //mov rax,ptr[rax] 270 compiler.codeGenerator.op_mov_RM( GetTypeSize(type,-1),REG_RAX,REG_RAX,0,MOD_BASE);274 compiler.codeGenerator.op_mov_RM(Type(type).GetSize(),REG_RAX,REG_RAX,0,MOD_BASE); 271 275 } 272 276 }
Note:
See TracChangeset
for help on using the changeset viewer.