Commit 2afcc6c3 by Ian Lance Taylor

README: update text to describe current status

    
    Reviewed-on: https://go-review.googlesource.com/c/161338

From-SVN: r268584
parent b49fa5e0
347628daf153baf3034b61b2abb4ec39e2ab37c8 74ffeddbe6fef446129af65581b3a9094715bc22
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
See ../README. See ../README.
The frontend is written in C++. The frontend is written in C++. It can only be used in conjunction
with a full compiler backend. Currently the backend interface has
been implemented with GCC (known as gccgo) and with LLVM (known as
GoLLVM).
The frontend lexes and parses the input into an IR specific to this The frontend lexes and parses the input into an IR specific to this
frontend known as gogo. It then runs a series of passes over the frontend known as gogo. It then runs a series of passes over the
code. code.
Finally it converts gogo to gcc's GENERIC. A goal is to move the gcc Finally it converts gogo to the backend IR. This is done via the
support code into a gcc-interface subdirectory. The gcc code will be interface described in backend.h. The backend must implement that
put under the GPL. The rest of the frontend will not include any gcc interface. When used with GCC, the interface is implemented in
header files. gcc/go/go-gcc.cc.
Issues to be faced in this transition: Source locations are represented using the interface described in
go-linemap.h. The backend is expected to provide a header file
go-location.h that defines a Location type.
* Representation of source locations. The frontend does not start by itself. It expects something to call
+ Currently the frontend uses gcc's location_t codes, using the go_create_gogo passing in a Backend and a Linemap, as well as other
interface in libcpp/line-map.h. options. Then it expects something to call go_parse_input_files
passing in the input files. Finally, a call to go_write_globals will
cause all global definitions to be written out via the Backend
interface.
* Handling of error messages. The backend is expected to provide the functions defined at the
+ Currently the frontend uses gcc's error_at and warning_at bottom of go-diagnostics.h: go_be_error_at, etc. These will be used
functions. for error messages.
+ Currently the frontend uses gcc's diagnostic formatter, using
features such as %<%> for appropriate quoting.
+ Localization may be an issue.
This compiler works, but the code is a work in progress. Notably, the This compiler works, but the code is a work in progress. The frontend
support for garbage collection is ineffective and needs a complete pays little attention to its memory usage and rarely frees any memory.
rethinking. The frontend pays little attention to its memory usage The code could use a general cleanup which we have not had time to do.
and rarely frees any memory. The code could use a general cleanup
which we have not had time to do.
Contributing Contributing
============= =============
To contribute patches to the files in this directory, please see To contribute patches to the files in this directory, please see
http://golang.org/doc/gccgo_contribute.html . https://golang.org/doc/gccgo_contribute.html .
The master copy of these files is hosted at The master copy of these files is hosted at
http://code.google.com/p/gofrontend . Changes to these files require https://go.googlesource.com/gofrontend . There is a mirror at
https://github.com/golang/gofrontend . Changes to these files require
signing a Google contributor license agreement. If you are the signing a Google contributor license agreement. If you are the
copyright holder, you will need to agree to the individual contributor copyright holder, you will need to agree to the individual contributor
license agreement at https://cla.developers.google.com/about/google-individual . This
http://code.google.com/legal/individual-cla-v1.0.html. This agreement agreement can be completed online.
can be completed online.
If your organization is the copyright holder, the organization will If your organization is the copyright holder, the organization will
need to agree to the corporate contributor license agreement at need to agree to the corporate contributor license agreement at
http://code.google.com/legal/corporate-cla-v1.0.html. https://cla.developers.google.com/about/google-corporate .
If the copyright holder for your code has already completed the If the copyright holder for your code has already completed the
agreement in connection with another Google open source project, it agreement in connection with another Google open source project, it
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment