I am please to announce the launch of a new initiative to promote Free
Pascal and Lazarus. The hub of this initiative is http://www.getlazarus.org
The get Lazarus initiative aims to an reintroduce Lazarus to the software
development world. To aide in this endeavor we've created our own special
Threading SDL 2.03 is not particularly difficult if you observe the rules
that a texture/renderer must reside in the same thread that created the
window and (it appears) there is only one event (which as you mentioned
makes sense) , and in my case the event handler is in a thread.
SDL 2.03 has
int c ;
int test( int p){
int i;
i = p;
return (i+2+c+2+c+2+c);
}
int main(){
c = test(128);
}
Hmmyes, from C perspective, there's nothing can modify c before it's
used the first time (unless you inject the startup code). Therefore, the
compiler is safe to assume that
On 03 Feb 2015, at 15:58, leledumbo wrote:
int c ;
int test( int p){
int i;
i = p;
return (i+2+c+2+c+2+c);
}
int main(){
c = test(128);
}
Hmmyes, from C perspective, there's nothing can modify c before
it's
used the first time (unless you inject the startup code). Therefore,
the
On 03/02/15 11:01, je...@j-software.dk wrote:
Constant propagation won't work on global variables in fpc because they
currently are always considered volatile.
The propagation is into the inlined body of the function, not the value
of the global variable 'c' after it has been assigned.
Jonas
mind sharing the C code?
int c ;
int test( int p){
int i;
i = p;
return (i+2+c+2+c+2+c);
}
int main(){
c = test(128);
}
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
On Tue, Feb 3, 2015 at 6:17 AM, Torsten Bonde Christiansen t...@epidata.info
wrote:
Hi,
What does it take for a class to access a field using FieldAddress(...)?
I have tried with both typeinfo on/off ({M+}), placing the field in
private/protected/public/published
sections but to no avail.
On 2015-02-03 12:30, silvioprog wrote:
On Tue, Feb 3, 2015 at 6:17 AM, Torsten Bonde Christiansen
t...@epidata.info mailto:t...@epidata.info wrote:
Hi,
What does it take for a class to access a field using
FieldAddress(...)?
I have tried with both typeinfo on/off ({M+}),
Am 03.02.2015 12:13 schrieb Jonas Maebe jonas.ma...@elis.ugent.be:
On 03/02/15 11:33, misu kun wrote:
i mean even if you initilize c with a const value.
That is irrelevant.
i enabled {$optimization constprop} but nothing changed !
I misread the original assembler code you posted, due to
Am 03.02.2015 um 12:25 schrieb misu kun:
mind sharing the C code?
int c ;
int test( int p){
int i;
i = p;
return (i+2+c+2+c+2+c);
}
int main(){
c = test(128);
}
I do not see why it is worth trying to optimize such code. No well-written real
world program
contains code like
On 02/02/15 13:56, misu kun wrote:
in this program test function has a known return value , and should be
calculated in compile time , but fpc make it in real time !!!
Constant propagation is a new feature in the upcoming FPC release:
while the same program in c compiled with old version of gcc generate this
asm
which is optimal
mind sharing the C code?
--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/why-fpc-do-not-use-a-known-return-function-value-tp5720901p5720909.html
Sent from the
On 03/02/15 11:33, misu kun wrote:
i mean even if you initilize c with a const value.
That is irrelevant.
i enabled {$optimization constprop} but nothing changed !
I misread the original assembler code you posted, due to how you phrased
the subject of your mail. The inline function is
thanks ,
even if you remove c and call test() inside writeln for example,
still the same thing .
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
i mean even if you initilize c with a const value.
i enabled {$optimization constprop} but nothing changed !
2015-02-03 11:19 UTC+01:00, misu kun misu@gmail.com:
thanks ,
even if you remove c and call test() inside writeln for example,
still the same thing .
Constant propagation won't work on global variables in fpc because they
currently are always considered volatile.
-- Oprindelig besked--Fra: Jonas MaebeDato: tir., 3. feb. 2015
10:24Til: FPC-Pascal users discussions;Emne:Re: [fpc-pascal] why fpc do not use
a known return
misu kun wrote:
Hi
in this program test function has a known return value , and should be
calculated in compile time , but fpc make it in real time !!!
-
program test;
var c : int32;
function test( p: int32): int32; inline;
var i : int32;
begin
i := p;
test :=
On 02/02/2015 03:54 PM, Brian wrote:
When the event handler (only one handler) is put in a thread , the event can
be detected from different windows , those created in the thread and those
created in the main thread (program) , by using SDL_GetWindowID() to get the
identify of a window
Hi,
What does it take for a class to access a field using FieldAddress(...)?
I have tried with both typeinfo on/off ({M+}), placing the field in
private/protected/public/published
sections but to no avail.
My simple code is:
TMyObject = class
private
FRef: TMyObject;
procedure
19 matches
Mail list logo