Eliminate source_location in favor of location_t
[official-gcc.git] / gcc / go / gofrontend / README
blobb139194b0eb08799f4801f66b21e4d2f512be1ed
1 See ../README.
3 The frontend is written in C++.
5 The frontend lexes and parses the input into an IR specific to this
6 frontend known as gogo.  It then runs a series of passes over the
7 code.
9 Finally it converts gogo to gcc's GENERIC.  A goal is to move the gcc
10 support code into a gcc-interface subdirectory.  The gcc code will be
11 put under the GPL.  The rest of the frontend will not include any gcc
12 header files.
14 Issues to be faced in this transition:
16 * Representation of source locations.
17   + Currently the frontend uses gcc's location_t codes, using the
18     interface in libcpp/line-map.h.
20 * Handling of error messages.
21   + Currently the frontend uses gcc's error_at and warning_at
22     functions.
23   + Currently the frontend uses gcc's diagnostic formatter, using
24     features such as %<%> for appropriate quoting.
25   + Localization may be an issue.
27 This compiler works, but the code is a work in progress.  Notably, the
28 support for garbage collection is ineffective and needs a complete
29 rethinking.  The frontend pays little attention to its memory usage
30 and rarely frees any memory.  The code could use a general cleanup
31 which we have not had time to do.
33 Contributing
34 =============
36 To contribute patches to the files in this directory, please see
37 http://golang.org/doc/gccgo_contribute.html .
39 The master copy of these files is hosted at
40 http://code.google.com/p/gofrontend .  Changes to these files require
41 signing a Google contributor license agreement.  If you are the
42 copyright holder, you will need to agree to the individual contributor
43 license agreement at
44 http://code.google.com/legal/individual-cla-v1.0.html.  This agreement
45 can be completed online.
47 If your organization is the copyright holder, the organization will
48 need to agree to the corporate contributor license agreement at
49 http://code.google.com/legal/corporate-cla-v1.0.html.
51 If the copyright holder for your code has already completed the
52 agreement in connection with another Google open source project, it
53 does not need to be completed again.