annotate gcc/go/gofrontend/README @ 131:84e7813d76e9

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