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
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
14 Issues to be faced in this transition:
16 * Representation of source locations.
17 + Currently the frontend uses gcc's source_location 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
23 + Currently the frontend uses gcc's diagnostic formatter, using
24 features such as %<%> for appropriate quoting.
25 + Localization may be an issue.
27 * Use of gcc_assert and gcc_unreachable.
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.
38 To contribute patches to the files in this directory, please see
39 http://golang.org/doc/gccgo_contribute.html .
41 Changes to these files require a copyright assignment to Google. This
42 is required to permit the changes to be copied to the gcc repository,
43 as Google has a copyright assignment with the Free Software
46 If you are the copyright holder, you will need to agree to the
47 individual contributor license agreement at
48 http://code.google.com/legal/individual-cla-v1.0.html. This agreement
49 can be completed online.
51 If your organization is the copyright holder, the organization will
52 need to agree to the corporate contributor license agreement at
53 http://code.google.com/legal/corporate-cla-v1.0.html.
55 If the copyright holder for your code has already completed the
56 agreement in connection with another Google open source project, it
57 does not need to be completed again.