OSDN Git Service

71d907088d0fcea57a0cef7d0394dff1bb3f046a
[pf3gnuchains/gcc-fork.git] / gcc / go / gofrontend / README
1 See ../README.
2
3 The frontend is written in C++.
4
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.
8
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.
13
14 Issues to be faced in this transition:
15
16 * Representation of source locations.
17   + Currently the frontend uses gcc's source_location codes, using the
18     interface in libcpp/line-map.h.
19
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.
26
27 * Use of gcc_assert and gcc_unreachable.
28
29 This compiler works, but the code is a work in progress.  Notably, the
30 support for garbage collection is ineffective and needs a complete
31 rethinking.  The frontend pays little attention to its memory usage
32 and rarely frees any memory.  The code could use a general cleanup
33 which we have not had time to do.
34
35 Contributing
36 =============
37
38 To contribute patches to the files in this directory, please see
39 http://golang.org/doc/gccgo_contribute.html .
40
41 The master copy of these files is hosted at
42 http://code.google.com/p/gofrontend .  Changes to these files require
43 signing a Google copyright license agreement.  If you are the
44 copyright holder, you will need to agree to the individual contributor
45 license agreement at
46 http://code.google.com/legal/individual-cla-v1.0.html.  This agreement
47 can be completed online.
48
49 If your organization is the copyright holder, the organization will
50 need to agree to the corporate contributor license agreement at
51 http://code.google.com/legal/corporate-cla-v1.0.html.
52
53 If the copyright holder for your code has already completed the
54 agreement in connection with another Google open source project, it
55 does not need to be completed again.