comparison gen/toobj.cpp @ 113:27b9f749d9fe trunk

[svn r117] Initial working implementation of interfaces. Groundwork for all the different types of class/interface casts laid out.
author lindquist
date Sat, 24 Nov 2007 06:33:00 +0100
parents 5b5194b25f33
children 5ba6d286c941
comparison
equal deleted inserted replaced
112:368547b1cbe6 113:27b9f749d9fe
387 void ClassDeclaration::offsetToIndex(Type* t, unsigned os, std::vector<unsigned>& result) 387 void ClassDeclaration::offsetToIndex(Type* t, unsigned os, std::vector<unsigned>& result)
388 { 388 {
389 unsigned idx = 0; 389 unsigned idx = 0;
390 unsigned r = LLVM_ClassOffsetToIndex(this, os, idx); 390 unsigned r = LLVM_ClassOffsetToIndex(this, os, idx);
391 assert(r != (unsigned)-1 && "Offset not found in any aggregate field"); 391 assert(r != (unsigned)-1 && "Offset not found in any aggregate field");
392 result.push_back(r+1); // vtable is 0 392 r++; // vtable is 0
393 r += vtblInterfaces->dim;
394 result.push_back(r);
393 } 395 }
394 396
395 /* ================================================================== */ 397 /* ================================================================== */
396 398
397 void ClassDeclaration::toObjFile() 399 void ClassDeclaration::toObjFile()