gcc/gcc/go/gofrontend
Ian Lance Taylor 36c1cf710d compiler: initialize gogo fields
A couple of the data members in the Gogo class were not
    being initialized properly. This was causing "uninitialized value"
    errors during Valgrind memcheck runs. This patch insures that
    all of the fields receive an initial value.
    
    Reviewed-on: https://go-review.googlesource.com/38470

From-SVN: r246407
2017-03-22 21:02:53 +00:00
..
LICENSE
MERGE mksigtab.sh: skip signals defined as other signals 2017-02-28 22:30:57 +00:00
PATENTS
README
ast-dump.cc compiler: better abstraction layer for diagnostics. 2016-09-23 19:36:45 +00:00
ast-dump.h
backend.h compiler: add containing Bfunction to conditional_expression 2017-01-11 18:15:16 +00:00
escape.cc libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
escape.h
export.cc compiler: implement type aliases 2017-01-14 01:50:31 +00:00
export.h
expressions.cc compiler: let initializers hold addresses of fields 2017-01-27 15:08:23 +00:00
expressions.h compiler: let initializers hold addresses of fields 2017-01-27 15:08:23 +00:00
go-diagnostics.cc compiler: better abstraction layer for diagnostics. 2016-09-23 19:36:45 +00:00
go-diagnostics.h compiler: better abstraction layer for diagnostics. 2016-09-23 19:36:45 +00:00
go-dump.cc
go-dump.h
go-encode-id.cc compiler: relocate ID encoding utilities to gofrontend 2016-11-22 22:28:05 +00:00
go-encode-id.h compiler: relocate ID encoding utilities to gofrontend 2016-11-22 22:28:05 +00:00
go-linemap.h compiler: move Backend/Linemap creation out of front end. 2016-10-11 00:11:43 +00:00
go-optimize.cc
go-optimize.h
go-sha1.h
go.cc compiler: initialize gogo fields 2017-03-22 21:02:53 +00:00
gogo.cc compiler: initialize gogo fields 2017-03-22 21:02:53 +00:00
gogo.h compiler, runtime: drop size arguments to hash/equal functions 2017-01-10 03:59:20 +00:00
import-archive.cc compiler: better abstraction layer for diagnostics. 2016-09-23 19:36:45 +00:00
import.cc compiler: implement type aliases 2017-01-14 01:50:31 +00:00
import.h
lex.cc Correct gcc/go/gofrontend/lex.cc and libgo/aclocal.m4 to the versions in the gofrontend repo... 2016-11-18 04:15:46 +00:00
lex.h
operator.h compiler: pass lvalue/rvalue context to back end for var exprs 2016-12-06 22:31:25 +00:00
parse.cc compiler: implement type aliases 2017-01-14 01:50:31 +00:00
parse.h compiler: better abstraction layer for diagnostics. 2016-09-23 19:36:45 +00:00
runtime.cc compiler: mark generated struct/array types as incomparable 2017-01-11 17:41:49 +00:00
runtime.def libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
runtime.h compiler, runtime: replace hashmap code with Go 1.7 hashmap 2016-09-21 20:58:51 +00:00
statements.cc libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
statements.h libgo: update to Go 1.8 release candidate 1 2017-01-14 00:05:42 +00:00
string-dump.h
types.cc re PR go/80128 (go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:2002) 2017-03-22 13:59:01 +00:00
types.h re PR go/80128 (go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:2002) 2017-03-22 13:59:01 +00:00
unsafe.cc

README

See ../README.

The frontend is written in C++.

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
code.

Finally it converts gogo to gcc's GENERIC.  A goal is to move the gcc
support code into a gcc-interface subdirectory.  The gcc code will be
put under the GPL.  The rest of the frontend will not include any gcc
header files.

Issues to be faced in this transition:

* Representation of source locations.
  + Currently the frontend uses gcc's source_location codes, using the
    interface in libcpp/line-map.h.

* Handling of error messages.
  + Currently the frontend uses gcc's error_at and warning_at
    functions.
  + 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
support for garbage collection is ineffective and needs a complete
rethinking.  The frontend pays little attention to its memory usage
and rarely frees any memory.  The code could use a general cleanup
which we have not had time to do.

Contributing
=============

To contribute patches to the files in this directory, please see
http://golang.org/doc/gccgo_contribute.html .

The master copy of these files is hosted at
http://code.google.com/p/gofrontend .  Changes to these files require
signing a Google contributor license agreement.  If you are the
copyright holder, you will need to agree to the individual contributor
license agreement at
http://code.google.com/legal/individual-cla-v1.0.html.  This agreement
can be completed online.

If your organization is the copyright holder, the organization will
need to agree to the corporate contributor license agreement at
http://code.google.com/legal/corporate-cla-v1.0.html.

If the copyright holder for your code has already completed the
agreement in connection with another Google open source project, it
does not need to be completed again.