Enquiry on GSoC projects

2011-03-18 Thread Levon Haykazyan
Dear gcc contributors,

My name is Levon Haykazyan, I am a PhD student at Yerevan 
State University (Armenia) studying theoretical computer 
science. I am considering applying to Summer of Code for 
adding some C++0x support in gcc. I would like to ask 
potential mentors

1. which of C++0x language features are relevant as a soc 
project?

2. some guidance for a simple project to familiarize myself 
with internals of gcc and demonstrate my coding skills.

Thank you for your time.

Kind regards,
Levon

-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of Storage!

http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN


A question on coding conventions

2011-03-26 Thread Levon Haykazyan
Hi everybody,

I was trying to configure vim to work better with gcc coding conventions. 
When I set 'tab' symbol to be interpreted as 2 spaces, I noticed that a lot 
of formatting in e.g. gcc/cp/parser.c was gone. A bit of research showed 
that in a lot of places 'tab' was used for 8 spaces. I've looked in gcc and 
gnu coding conventions but didn't find anything about this. So my question 
is whether such usage of 'tab' symbol is recommended by coding conventions 
or 8 spaces should be used instead.

Kind regards,
Levon



-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of Storage!

http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN


Re: [C++-0X] User-defined literals, gsoc

2011-03-29 Thread Levon Haykazyan
Hi Ed,

I am working on a proposal to implement user-defined literals as a Google
Summer of Code project. I was unaware that someone was already working on
it. If you have already done some work, maybe it is better for me to pick
another project. Or maybe you would be interested in mentoring me and we
could combine our efforts.

Kind regards,
Levon

> - Original Message -
> From: Ed Smith-Rowland <3dw...@verizon.net>
> To: gcc@gcc.gnu.org
> Subject: [C++-0X] User-defined literals
> Date: Mon, 28 Mar 2011 20:13:19 -0400
> 
> 
> Greetings,
> 
> I am taking a new shot at user-defined literals.
> Compared to the previous attempt:
>* I have altered libcpp so that it tokenizes user defined 
> literals in one chunk properly.
>* I have started work on new tree nodes and accessors.
>* I have (or am trying to) refine the checks for argument and 
> template parameter.
> 
> I would like to check that template literal operators have the 
> specific non-type parameter pack:
> template
>Foo operator"" sluggo();
> 
> I looked through the internals documentation and didn't see much on 
> this.  Could anyone give me some pointers?
> 
> Also, is there any preference for using VEC vs. TREE_CHAIN for 
> making trees and accessing them?  Is one sort of "modern"?
> 
> Finally I am using compparms to verify that a literal operator 
> argument list conforms to strings like:
> (const char*)
> (const char*, std::size_t)
> (const wchar_t*, std::size_t)
> ...
> I cant get them to work.  I built a set of global trees for the 
> argument types that I want to check.  The char and number tests 
> work.
> I use things like this to build the argument lists (I neglect the 
> return type).
>  userdef_lit_char16_str_type
>   = build_function_type_list (void_type_node, char16_array_type_node,
>   size_type_node, NULL_TREE);
> I'm hoping that this matches
> (const char16_t*, std::size_t)
> but it doesn't.
> 
> Ideas?
> 
> Thanks,
> 
> Ed Smith-Rowland

>


-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of Storage!

http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN


Re: [C++-0X] User-defined literals, gsoc

2011-03-29 Thread Levon Haykazyan

> - Original Message -
> From: Ed Smith-Rowland <3dw...@verizon.net>
> To: gcc@gcc.gnu.org
> Subject: Re: [C++-0X] User-defined literals, gsoc
> Date: Tue, 29 Mar 2011 10:16:52 -0400
> 
> 
> On 03/29/2011 10:05 AM, Levon Haykazyan wrote:
> > Hi Ed,
> >
> > I am working on a proposal to implement user-defined literals as a Google
> > Summer of Code project. I was unaware that someone was already working on
> > it. If you have already done some work, maybe it is better for me to pick
> > another project. Or maybe you would be interested in mentoring me and we
> > could combine our efforts.
> >
> > Kind regards,
> > Levon
> >
> >> - Original Message -
> >> From: Ed Smith-Rowland<3dw...@verizon.net>
> >> To: gcc@gcc.gnu.org
> >> Subject: [C++-0X] User-defined literals
> >> Date: Mon, 28 Mar 2011 20:13:19 -0400
> >>
> >>
> >> Greetings,
> >>
> >> I am taking a new shot at user-defined literals.
> >> Compared to the previous attempt:
> >> * I have altered libcpp so that it tokenizes user defined
> >> literals in one chunk properly.
> >> * I have started work on new tree nodes and accessors.
> >> * I have (or am trying to) refine the checks for argument and
> >> template parameter.
> >>
> >> I would like to check that template literal operators have the
> >> specific non-type parameter pack:
> >> template
> >> Foo operator"" sluggo();
> >>
> >> I looked through the internals documentation and didn't see much on
> >> this.  Could anyone give me some pointers?
> >>
> >> Also, is there any preference for using VEC vs. TREE_CHAIN for
> >> making trees and accessing them?  Is one sort of "modern"?
> >>
> >> Finally I am using compparms to verify that a literal operator
> >> argument list conforms to strings like:
> >> (const char*)
> >> (const char*, std::size_t)
> >> (const wchar_t*, std::size_t)
> >> ...
> >> I cant get them to work.  I built a set of global trees for the
> >> argument types that I want to check.  The char and number tests
> >> work.
> >> I use things like this to build the argument lists (I neglect the
> >> return type).
> >>   userdef_lit_char16_str_type
> >>= build_function_type_list (void_type_node, char16_array_type_node,
> >>size_type_node, NULL_TREE);
> >> I'm hoping that this matches
> >> (const char16_t*, std::size_t)
> >> but it doesn't.
> >>
> >> Ideas?
> >>
> >> Thanks,
> >>
> >> Ed Smith-Rowland
> >
> Levon,
> 
> I would be happy to share what I've got.  Let me clean it up some 
> and I'll post it tomorrow.  Then we'll see if
> a. You want to pick another project
> b. Pick over what I have and start from there
> c. Start over on your own ;-)
> 
> There is a good amount of work left to do I think.  I have to admit 
> I'm a newbie on gcc internals.  You may be in a better position to 
> finish this time-wise.
> 
> I am interested in seeing this get in so we can all play with it 
> before the standard comes out.  There are some who would pull it 
> out of the standard for want of implementation experience.
> 
> Ed

>

Ed,

I gave this another thought. I think it is better for you to continue your
project and for me to pick something else, because at this point it is
entirely unclear whether my proposal will be accepted or not (and it will
remain so about another month).

Kind regards,
Levon


-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of Storage!

http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN


Oberon-2 front-end as a GSoC project

2011-04-03 Thread Levon Haykazyan
Hi all,

I want to propose to implement Oberon-2 front-end to gcc on GSoC. I know
that Oberon-2 is not the most popular language today, but probably there
would be some interest in it.

I would like to ask some feedback on this idea. Is there an interest in the
community in a new front-end? Is the project appropriate for GSoC (i.e. not
too ambitious)? Would somebody be interested in mentoring this work?

Kind regards,
Levon

-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of Storage!

http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN


Re: Oberon-2 front-end as a GSoC project

2011-04-03 Thread Levon Haykazyan

> - Original Message -
> From: "Joseph S. Myers" 
> To: Levon Haykazyan 
> Cc: gcc@gcc.gnu.org
> Subject: Re: Oberon-2 front-end as a GSoC project
> Date: Sun, 3 Apr 2011 11:14:05 + (UTC)
> 
> 
> On Sun, 3 Apr 2011, Levon Haykazyan wrote:
> 
> > Is there an interest in the community in a new front-end?
> 
> In general I encourage the addition of front ends for real languages (ones
> used for real programming, as opposed to ones used solely for being
> arcane, as examples, etc.) as long as someone is willing to maintain them
> in the GCC tree (update them as needed for changes to the rest of GCC,
> etc.) in accordance with GCC's coding standards.  This applies both to
> existing out-of-tree front ends such as Pascal and D, and to new front
> ends.
> 
> For a new front end I would encourage implementing it in the way chosen
> for Ada, Fortran and to a lesser extent Go, where most of the front end
> uses its own datastructures to represent the program and the part
> converting to GCC's language-independent representation is self-contained
> rather than spread around the front end.
> 
> --
> Joseph S. Myers
> jos...@codesourcery.com

>

Hi Joseph,

Thank you for the replay and for the implementation suggestions. Would you
classify Oberon-2 as a real programming language? On one hand it was 
certainly designed with minimalism in mind (the language definition is 
only 20 pages), on the other hand it was designed and has been used for
real programming (though mostly by a relatively narrow community).

I am definitely willing to maintain the front-end, though at this point
you have nothing but my word to take for it.

Kind regards,
Levon


-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of Storage!

http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN


Re: Oberon-2 front-end as a GSoC project

2011-04-06 Thread Levon Haykazyan

> - Original Message -
> From: "Levon Haykazyan" 
> To: gcc@gcc.gnu.org
> Subject: Oberon-2 front-end as a GSoC project
> Date: Sun, 3 Apr 2011 15:01:08 +0500
> 
> 
> Hi all,
> 
> I want to propose to implement Oberon-2 front-end to gcc on GSoC. I know
> that Oberon-2 is not the most popular language today, but probably there
> would be some interest in it.
> 
> I would like to ask some feedback on this idea. Is there an interest in the
> community in a new front-end? Is the project appropriate for GSoC (i.e. not
> too ambitious)? Would somebody be interested in mentoring this work?
> 
> Kind regards,
> Levon
> 
> --
> You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 
> 2GB of Storage!
> 
> http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN

>

Hi again,

Since I didn't get much feedback, I concluded that this idea does not
interest anybody. So I will not pursue this any further.

Kind regards,
Levon


-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of Storage!

http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN


Re: Oberon-2 front-end as a GSoC project

2011-04-06 Thread Levon Haykazyan

> - Original Message -
> From: Ian Lance Taylor 
> To: "Levon Haykazyan" 
> Cc: gcc@gcc.gnu.org
> Subject: Re: Oberon-2 front-end as a GSoC project
> Date: Wed, 06 Apr 2011 06:25:34 -0700
> 
> 
> "Levon Haykazyan"  writes:
> 
> > Since I didn't get much feedback, I concluded that this idea does not
> > interest anybody. So I will not pursue this any further.
> 
> To be honest, you are asking the wrong set of people.  Today, gcc does
> not support Oberon-2.  So the people who develop gcc today are not very
> interested in it.  In general we support new language frontends, but at
> the same time we are satisfied with the frontends that we have.
> 
> If you want to find out whether this idea interests anybody, you would
> need to find the people who would use an Oberon-2 frontend.  Those
> people are not gcc developers.  They are gcc users.  I don't know
> whether there are any such people.  But it's not surprising that you
> won't find them here.  I don't know where you would find them; I don't
> know enough about Oberon-2.
> 
> Ian

>

Hi Ian,

Thank you for your answer. I though I should ask GSoC related questions
here. Anyhow, I am interested, and for me that's enough to implement it.
But I decided to write the entire compiler from scratch. I couldn't
resist writing a compiler in the same language :)

Kind regards,
Levon


-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of Storage!

http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN


Re: Oberon-2 front-end as a GSoC project

2011-04-06 Thread Levon Haykazyan

> - Original Message -
> From: Basile Starynkevitch 
> To: "Levon Haykazyan" 
> Cc: "Ian Lance Taylor" , gcc@gcc.gnu.org
> Subject: Re: Oberon-2 front-end as a GSoC project
> Date: Wed, 6 Apr 2011 18:57:00 +0200
> 
> 
> On Wed, 6 Apr 2011 20:49:32 +0500
> "Levon Haykazyan"  wrote:
> > Thank you for your answer. I though I should ask GSoC related questions
> > here. Anyhow, I am interested, and for me that's enough to implement it.
> > But I decided to write the entire compiler from scratch. I couldn't
> > resist writing a compiler in the same language :)
> 
> You probably could write the front-end part of your compiler in Oberon,
> and generate Gimple representation (perhaps even in textual form, since
> some people are working on a Gimple "front-end"). You then win all the
> optimization & code generation abilities of GCC.
> 
> Good luck!
> 
> Regards
> 
> --
> Basile STARYNKEVITCH http://starynkevitch.net/Basile/
> email: basilestarynkevitchnet mobile: +33 6 8501 2359
> 8, rue de la Faiencerie, 92340 Bourg La Reine, France
> *** opinions {are only mine, sont seulement les miennes} ***

>

Hi Basile,

That is actually a very good suggestion, thank you. I'll think about
implementing a GIMPLE back-end.

Kind regards,
Levon


-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of Storage!

http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN


Re: Oberon-2 front-end as a GSoC project

2011-04-07 Thread Levon Haykazyan

> - Original Message -
> From: Basile Starynkevitch 
> To: "Levon Haykazyan" 
> Cc: gcc@gcc.gnu.org
> Subject: Re: Oberon-2 front-end as a GSoC project
> Date: Wed, 6 Apr 2011 21:19:05 +0200
> 
> 
> On Wed, 06 Apr 2011 19:07:26 +
> "Levon Haykazyan"  wrote:
> [citing me Basile]
> > > > You probably could write the front-end part of your compiler in Oberon,
> > > and generate Gimple representation (perhaps even in textual form, since
> > > some people are working on a Gimple "front-end"). You then win all the
> > > optimization & code generation abilities of GCC.
> [...]
> > That is actually a very good suggestion, thank you. I'll think about
> > implementing a GIMPLE back-end.
> 
> To be clear, I am suggesting you to use the existing GCC back-end, and
> to generate, from inside your Oberon front-end, the GIMPLE code. So
> your Oberon compiler is (grossly) made of your Oberon front-end
> generating Gimple (either in textual form, or by calling the relevant
> GCC API to build GIMPLE representation in memory, calling GCC C
> functions related to GIMPLE from your Oberon front-end) and of the
> existing gcc/libbackend.a of GCC.  Of course, the evil is in the
> details.
> 
> What you will code cannot be said "a Gimple back-end" since this
> already exists (as gcc/libbackend.a) in GCC.
> 
> Regards.
> --
> Basile STARYNKEVITCH http://starynkevitch.net/Basile/
> email: basilestarynkevitchnet mobile: +33 6 8501 2359
> 8, rue de la Faiencerie, 92340 Bourg La Reine, France
> *** opinions {are only mine, sont seulement les miennes} ***

>

Hi Basile,

What I meant was a GIMPLE back-end for my compiler. I decided I want a
simple native code generator, after all this is a learning experience for
me. If the project grows serious I'll consider using gcc or LLVM 
back-ends.

Thanks again everyone for suggestions.

Kind regards,
Levon


-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 2GB of Storage!

http://connections.rock.com/user/displayUserRegisterPage.kickAction?as=116748&STATUS=MAIN