[fpc-pascal] Re: TLinkedList

Marco van de Voort marcov at stack.nl
Wed Feb 15 21:04:09 CET 2012


In our previous episode, Sven Barth said:
> > symtable
> >
> > Mean?
> >
> > (it is at the end of a method)
> 
> You are accessing a symbol that's defined in the static symtable 
> (implementation section of the unit). Does that code compile with 
> Delphi? If so then please report a bug...

I was still isolating at the end of the working day, so that will be later.
tomorrow, I'm maybe not in the office, so that will be friday.

The static symtable bit might be simple constant values. The structure is
more or less


type
      TgenImage<T>=Class(TBaseImage) // tbaseimage is not generic
                     type
                       reft = ^T;
                     private
                       allocptr : reft;
                     public
	               procedure alloc; override; // is virtual abstract in baseimage
                     end;
implementation

const alignvalue =16;  // must be power of two
      alignmask  =alignvalue-1;

procedure tgenimage<t>.alloc;
var localptr : reft;
begin
  localptr:=@allocptr[alignvalue-(ptrint(allocptr) and alignmask)];
end;

(to align an allocation to a certain boundery for SSE use, code from memory,
it is the pattern, not an exact formula to do that)

While isolating, the error seemed to randomly disappear and popup. But that
could also be several "inline" methods, which have now been removed for
isolation purposes.



More information about the fpc-pascal mailing list