[fpc-devel]Message *bounced*

O/T-Track+ 2.66b "O/T-Track+=202.66b" at f854.n292.z2.fidonet.org
Wed Sep 6 07:58:37 CEST 2000


************************************************************************
***  WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING  ***
************************************************************************
*
*      The e-mail-message appended below is list- or mailserver-related
*
*   That type of mail will by definition not be processed on this system
*         and in general is not accepted in the fidonet.org-domain.
*
*      To avoid these bouncings the listkeeper is kindly requested to
*   remove any subscription coming from a z2.fidonet.org-style address.
*
*    If you have reason to believe your message was removed without due
*     reason then kindly inform 'postmaster at f854.n292.z2.fidonet.org'.
*
************************************************************************

    From:  Pavel V. Ozerski @2:292/862
    To:    fpc-develop @2:5020/1305.201
    Subj.: [fpc-devel]Why is it so complex and heavy?
    Dated: 05 Sep 00  15:19:10
    [processed here:  06 Sep 00 09:58:37]

@TOPT 201
@INTL 2:5020/1305 2:292/862
@MSGID: insect.mail.iephb.ru 3e4f0c47
@REPLYADDR: fpc-devel at lists.freepascal.org
@REPLYTO: 2:292/862 at fidonet UUCP
@PID: dMail [Demos Mail for Windows NT v1.4b1]
@CHRS: LATIN-1 2
@RFC-Received: from vekoll.saturnus.vein.hu (root at vekoll.saturnus.vein.hu
[193.6.40.1]) 	by infomag.iguana.be (8.9.3/8.9.3) with ESMTP id UAA16370 	for
<fpc-develop at p201.f1305.n5020.z2.fidonet.org>; Tue, 5 Sep 2000 20:46:58 +0200
@RFC-Received: from vekoll.saturnus.vein.hu (daemon at localhost [127.0.0.1]) 	by
vekoll.saturnus.vein.hu (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id PAA30410;
	Tue, 5 Sep 2000 15:18:17 +0200
@RFC-Received: from dns.iephb.ru (iepb.pu.ru [195.70.201.1]) 	by
vekoll.saturnus.vein.hu (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id PAA30396
	for <fpc-devel at lists.freepascal.org>; Tue, 5 Sep 2000 15:18:05 +0200
@RFC-X-Authentication-Warning: vekoll.saturnus.vein.hu: Host iepb.pu.ru
[195.70.201.1] claimed to be dns.iephb.ru
@RFC-Received: from insect.UUCP (uucp at localhost) 	by dns.iephb.ru
(8.9.3/8.9.3/krok-cf-2.0) with UUCP id RAA21773 	for
fpc-devel at lists.freepascal.org; Tue, 5 Sep 2000 17:17:29 +0400 (MSD)
@RFC-Received: by insect.mail.iephb.ru (dMail for Windows NT v1.4b1, 05Dec96); 
         Tue,  5 Sep 2000 17:19:10 +0400
@RFC-References: <200006190707.KAA29114 at zerg.codec.ro>
@RFC-Organization: Sechenov Institute of Evolutionary Physiology and    
Biochemistry, Russian Academy of Science
@RFC-Message-Id: <ABEBFjvebJ at insect.mail.iephb.ru>
@RFC-Sender: fpc-devel-admin at lists.freepascal.org
@RFC-Errors-To: fpc-devel-admin at lists.freepascal.org
@RFC-X-Mailman-Version: 1.0rc2
@RFC-List-Id: FPC developers' list <fpc-devel.lists.freepascal.org>
@RFC-X-BeenThere: fpc-devel at lists.freepascal.org
To: fpc-devel at lists.freepascal.org
From: pavel at insect.mail.iephb.ru (Pavel V. Ozerski)
Reply-To: fpc-devel at lists.freepascal.org

Hello,

I have an idea. I looked into objpas.pp source code and found that some system
functions existing for Delphi compatibility
are written simply but not very smartly.

Example:

Procedure AssignFile(Var f:File;const Name:string);

begin
  System.Assign (F,Name);
end;

If I write a program which uses this function, this program will call
AssignFile at first stage, then AssignFile will call Assign.
While these processes some useless operations will be executed: two callings
and returns instead one and also additional stack
operations. This circumstance must slow program running and bloat their code.
Therefore I suggest to make some tricks.
1) Change assign and close procedures in file.inc a little like in followed
example:

Procedure Assign(var f:File;const Name:string);
 [public,alias:'assign_file_string']; // My change is only this additional
line!
{
  Assign Name to file f so it can be used with the file routines
}
Begin
  FillChar(f,SizeOf(FileRec),0);
  FileRec(f).Handle:=UnusedHandle;
  FileRec(f).mode:=fmClosed;
  Move(Name[1],FileRec(f).Name,Length(Name));
End;

2) Accordingly, all AssignFile and CloseFile procedures in objpas.pp can be
changed like followed example:

     Procedure AssignFile(Var f:File;const Name:string);external name
'assign_file_string';

At result directly Assign and Close instead Assignfile and Closefile will be
linked.

I did not tested this idea but hope that it does not contain errors or
problems.

Pavel



_______________________________________________
fpc-devel maillist  -  fpc-devel at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
@Via ifmail 2:292/862 at fidonet, Tue Sep 5 2000 at 20:47 (2.14-tx8.10)

@Via D'Bridge 1.58 2:292/854  09/06 09:54





More information about the fpc-devel mailing list