[fpc-devel] Newbie question: how does the compiler know the class type of an object ( the Is operator)

2014-08-21 Thread Dennis Poon

I am just curious, what is the instance size of an Tobject?

in many notifyevents, we would test whether an object is actually of a 
certain class by

if Sender is TComponent then
  ...
end;

How does the is operator work?  Is the memory space occupied by that 
object reference contain a pointer to a class table?
If that is true, the minimal instance size of an Tobject is 
sizeof(pointer)?


Sorry if my question is dumb.

Dennis
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Newbie question: how does the compiler know the class type of an object ( the Is operator)

2014-08-21 Thread Howard Page-Clark

On 21/08/2014 11:16, Dennis Poon wrote:

I am just curious, what is the instance size of an Tobject?


program Project1;

uses classes;
begin
  WriteLn('InstanceSize of TObject=',TObject.InstanceSize);
  ReadLn;
end.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] x86_64-linux-as not found

2014-08-21 Thread Leonardo M . Ramé
Hi, I'm using XUbuntu 14.04 and it seems that x86_64-linux-as is not installed, 
do you know which package contains that file?.

Here's the output when I try to compile from sources:

make[5]: se ingresa al directorio «/home/leonardo/Desarrollo/fpc/rtl/linux»
/bin/mkdir -p /home/leonardo/Desarrollo/fpc/rtl/units/x86_64-linux
x86_64-linux-as --64 -o 
/home/leonardo/Desarrollo/fpc/rtl/units/x86_64-linux/prt0.o x86_64/prt0.as
make[5]: x86_64-linux-as: No se encontró el programa
make[5]: *** [prt0.o] Error 127
make[5]: se sale del directorio «/home/leonardo/Desarrollo/fpc/rtl/linux»
make[4]: *** [linux_all] Error 2
make[4]: se sale del directorio «/home/leonardo/Desarrollo/fpc/rtl»
make[3]: *** [rtl] Error 2
make[3]: se sale del directorio «/home/leonardo/Desarrollo/fpc/compiler»
make[2]: *** [cycle] Error 2
make[2]: se sale del directorio «/home/leonardo/Desarrollo/fpc/compiler»
make[1]: *** [compiler_cycle] Error 2
make[1]: se sale del directorio «/home/leonardo/Desarrollo/fpc»
make: *** [build-stamp.x86_64-linux] Error 2

Leonardo M. Ramé
http://leonardorame.blogspot.com 
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel