tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] *** SPAM *** My changes


From: Vad Rulezz
Subject: Re: [Tinycc-devel] *** SPAM *** My changes
Date: Tue, 18 Feb 2020 10:44:50 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

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 [mailto:tinycc-devel-bounces+eligis=address@hidden] On Behalf Of Udo Pfrengle
Sent: Monday, February 17, 2020 23:35
To: address@hidden
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
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]