My changes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

My changes

Udo Pfrengle
Hi folks,
 
I hope I do not too much nonsense with my changes.
No clue why there appeared a merge from me, that was a mistake - I am new to git and still learning it.
 
I am really excited about the speed and terseness of tcc and would like to help to improve it further.
Have you any recommendations? Are there some weak spots which need some work?
 
... and I unintentionally disclosed my eMail address. Is there a way to remove it from the git log again?
 
Kind regards
Udo
 

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: *** SPAM *** My changes

Christian Jullien-3

Hi Udo,

As matter of style, I see you add extra spaces around if expressions like:

-                if (bt1 == VT_LLONG)

+                if ( bt1 == VT_LLONG )

                     type.t &= t1;

-                if (bt2 == VT_LLONG)

+                if ( bt2 == VT_LLONG )

 

Which is a very uncommon programming style in tcc code

 

~/tinycc $ fgrep 'if ( ' *.c *.h

tccelf.c:        if ( ref->handle )

tccgen.c:            else if ( (s->type.t & VT_BTYPE) == VT_FUNC ) {

tccgen.c:            if ( ad.cleanup_func ) {

tccgen.c:            if ( (vtop->type.t & VT_BTYPE) != VT_STRUCT ) {

tccgen.c:            } else if ( bt1 == VT_BOOL && bt2 == VT_BOOL ) {

tccgen.c:            } else if ( is_float(bt1) && is_integer_btype(bt2) ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && is_float(bt2) ) {

tccgen.c:                if ( bt1 == VT_LLONG )

tccgen.c:                if ( bt2 == VT_LLONG )

tccgen.c:            else if ( bt1 == VT_PTR && is_null_pointer(vtop) ) {

tccgen.c:            } else if ( is_null_pointer(&sv) && bt2 == VT_PTR ) {

tccgen.c:            }  else if ( bt1 == VT_PTR && is_integer_btype(bt2) ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && bt2 == VT_PTR ) {

tccgen.c:            } else if ( bt1==VT_PTR && bt2 == VT_PTR ) {

tccgen.c:                if ( type1.ref != type2.ref ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && is_integer_btype(bt2) ) {

tccpe.c:                        if ( !dllref->handle )

 

C.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=[hidden email]] On Behalf Of Udo Pfrengle
Sent: Monday, February 17, 2020 23:35
To: [hidden email]
Subject: *** SPAM *** [Tinycc-devel] My changes

 

Hi folks,

 

I hope I do not too much nonsense with my changes.

No clue why there appeared a merge from me, that was a mistake - I am new to git and still learning it.

 

I am really excited about the speed and terseness of tcc and would like to help to improve it further.

Have you any recommendations? Are there some weak spots which need some work?

 

... and I unintentionally disclosed my eMail address. Is there a way to remove it from the git log again?

 

Kind regards

Udo

 


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: *** SPAM *** My changes

Vad Rulezz-2

Hi,
I find this style to be easier to visually parse as the spaces do what they are supposed to do - they separate syntactical entities and it's clear then that parentheses are not part of the expression.

But of course it's better to stick to the single style in entire file (at least) or in entire project.

Vad

On 2/18/20 10:14 AM, Christian Jullien wrote:

Hi Udo,

As matter of style, I see you add extra spaces around if expressions like:

                if (bt1 == VT_LLONG)

                if ( bt1 == VT_LLONG )

                     type.t &= t1;

                if (bt2 == VT_LLONG)

                if ( bt2 == VT_LLONG )

 

Which is a very uncommon programming style in tcc code

 

~/tinycc $ fgrep 'if ( ' *.c *.h

tccelf.c:        if ( ref->handle )

tccgen.c:            else if ( (s->type.t & VT_BTYPE) == VT_FUNC ) {

tccgen.c:            if ( ad.cleanup_func ) {

tccgen.c:            if ( (vtop->type.t & VT_BTYPE) != VT_STRUCT ) {

tccgen.c:            } else if ( bt1 == VT_BOOL && bt2 == VT_BOOL ) {

tccgen.c:            } else if ( is_float(bt1) && is_integer_btype(bt2) ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && is_float(bt2) ) {

tccgen.c:                if ( bt1 == VT_LLONG )

tccgen.c:                if ( bt2 == VT_LLONG )

tccgen.c:            else if ( bt1 == VT_PTR && is_null_pointer(vtop) ) {

tccgen.c:            } else if ( is_null_pointer(&sv) && bt2 == VT_PTR ) {

tccgen.c:            }  else if ( bt1 == VT_PTR && is_integer_btype(bt2) ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && bt2 == VT_PTR ) {

tccgen.c:            } else if ( bt1==VT_PTR && bt2 == VT_PTR ) {

tccgen.c:                if ( type1.ref != type2.ref ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && is_integer_btype(bt2) ) {

tccpe.c:                        if ( !dllref->handle )

 

C.

 

From: Tinycc-devel [[hidden email]] On Behalf Of Udo Pfrengle
Sent: Monday, February 17, 2020 23:35
To: [hidden email]
Subject: *** SPAM *** [Tinycc-devel] My changes

 

Hi folks,

 

I hope I do not too much nonsense with my changes.

No clue why there appeared a merge from me, that was a mistake - I am new to git and still learning it.

 

I am really excited about the speed and terseness of tcc and would like to help to improve it further.

Have you any recommendations? Are there some weak spots which need some work?

 

... and I unintentionally disclosed my eMail address. Is there a way to remove it from the git log again?

 

Kind regards

Udo

 


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: My changes

Christian Jullien-3
In reply to this post by Udo Pfrengle

Whatever style is used, IMHO it is important to commit changes respecting the global project style (variable and function names, space or tab, indentation…)

 

Switching from projects also imposes to switch to different programming style.

 

C.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=[hidden email]] On Behalf Of Vad Rulezz
Sent: Tuesday, February 18, 2020 08:45
To: [hidden email]
Subject: Re: [Tinycc-devel] *** SPAM *** My changes

 

Hi,
I find this style to be easier to visually parse as the spaces do what they are supposed to do - they separate syntactical entities and it's clear then that parentheses are not part of the expression.

But of course it's better to stick to the single style in entire file (at least) or in entire project.

Vad

On 2/18/20 10:14 AM, Christian Jullien wrote:

Hi Udo,

As matter of style, I see you add extra spaces around if expressions like:

                if (bt1 == VT_LLONG)

                if ( bt1 == VT_LLONG )

                     type.t &= t1;

                if (bt2 == VT_LLONG)

                if ( bt2 == VT_LLONG )

 

Which is a very uncommon programming style in tcc code

 

~/tinycc $ fgrep 'if ( ' *.c *.h

tccelf.c:        if ( ref->handle )

tccgen.c:            else if ( (s->type.t & VT_BTYPE) == VT_FUNC ) {

tccgen.c:            if ( ad.cleanup_func ) {

tccgen.c:            if ( (vtop->type.t & VT_BTYPE) != VT_STRUCT ) {

tccgen.c:            } else if ( bt1 == VT_BOOL && bt2 == VT_BOOL ) {

tccgen.c:            } else if ( is_float(bt1) && is_integer_btype(bt2) ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && is_float(bt2) ) {

tccgen.c:                if ( bt1 == VT_LLONG )

tccgen.c:                if ( bt2 == VT_LLONG )

tccgen.c:            else if ( bt1 == VT_PTR && is_null_pointer(vtop) ) {

tccgen.c:            } else if ( is_null_pointer(&sv) && bt2 == VT_PTR ) {

tccgen.c:            }  else if ( bt1 == VT_PTR && is_integer_btype(bt2) ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && bt2 == VT_PTR ) {

tccgen.c:            } else if ( bt1==VT_PTR && bt2 == VT_PTR ) {

tccgen.c:                if ( type1.ref != type2.ref ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && is_integer_btype(bt2) ) {

tccpe.c:                        if ( !dllref->handle )

 

C.

 

From: Tinycc-devel [[hidden email]] On Behalf Of Udo Pfrengle
Sent: Monday, February 17, 2020 23:35
To: [hidden email]
Subject: *** SPAM *** [Tinycc-devel] My changes

 

Hi folks,

 

I hope I do not too much nonsense with my changes.

No clue why there appeared a merge from me, that was a mistake - I am new to git and still learning it.

 

I am really excited about the speed and terseness of tcc and would like to help to improve it further.

Have you any recommendations? Are there some weak spots which need some work?

 

... and I unintentionally disclosed my eMail address. Is there a way to remove it from the git log again?

 

Kind regards

Udo

 



_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: My changes

Kooda
In reply to this post by Udo Pfrengle
"Udo Pfrengle" <[hidden email]> wrote:
> No clue why there appeared a merge from me, that was a mistake - I am new to git and still learning it.

This means something has changed on the remote branch while you were making your changes locally, this is perfectly normal. You can learn about rebasing if you don’t like merges, or you can just accept the merge.

Did you force push? It looks like you threw away a commit:

Author: Sizhe Zhao <[hidden email]>
Date:   Tue Feb 11 12:57:12 2020 +0800

    win32/build-tcc.bat: clean .o in win32/lib
   
    commit ef42295fe802c881a42c8983f1638ff302e63a6c intrduced 4 .o files to
    win32/lib. But they (bcheck.o, bt-dll.o, bt-exe.o and bt-log.o) are not
    removed by "win32/build-tcc.bat -clean". This commit should fix it.

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: My changes

oldfaber
Hi,

when modifying mob please remember that for many users it's really better if white space is not unnecessarily modified.
Please do not add or remove whitespace, join/split lines, if it's not needed.

The coding style may not be what you like, but please follow the style you find in the sources.
And before pushing a commit review the diff and remove any whitespace-only change.

Thank you.
Fabio


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel