gcc/gcc/go/gofrontend
Ian Lance Taylor bb748b89df compiler: don't permit P.M if P is a pointer type
When lowering method expressions of the form "P.M" where
    P is a pointer type (e.g. "type P *T") make sure we examine
    the method set of P and not T during method lookup.
    
    Fixes golang/go#15722.
    
    Reviewed-on: https://go-review.googlesource.com/24843

From-SVN: r239675
2016-08-22 21:30:49 +00:00
..
LICENSE
MERGE compiler: don't permit P.M if P is a pointer type 2016-08-22 21:30:49 +00:00
PATENTS
README
ast-dump.cc
ast-dump.h
backend.h
escape.cc compiler: annotate or fix fall through cases in switch statements 2016-08-10 18:56:35 +00:00
escape.h escape: Add basic debugging. 2016-08-02 21:43:48 +00:00
export.cc escape: Add escape notes to export data. 2016-07-12 20:29:15 +00:00
export.h escape: Add escape notes to export data. 2016-07-12 20:29:15 +00:00
expressions.cc compiler: don't permit P.M if P is a pointer type 2016-08-22 21:30:49 +00:00
expressions.h compiler: Mark concurrent calls. 2016-04-28 19:43:20 +00:00
go-dump.cc
go-dump.h
go-linemap.h
go-optimize.cc
go-optimize.h
go.cc compiler: implement go:linkname compiler directive 2016-08-09 23:08:32 +00:00
gogo.cc compiler: implement go:noinline and go:nosplit directives 2016-08-10 00:46:35 +00:00
gogo.h compiler: implement go:linkname compiler directive 2016-08-09 23:08:32 +00:00
import-archive.cc
import.cc escape: Add escape notes to export data. 2016-07-12 20:29:15 +00:00
import.h escape: Add escape notes to export data. 2016-07-12 20:29:15 +00:00
lex.cc compiler: implement go:noinline and go:nosplit directives 2016-08-10 00:46:35 +00:00
lex.h compiler: implement go:linkname compiler directive 2016-08-09 23:08:32 +00:00
operator.h
parse.cc compiler: rewrite compiler directive support 2016-08-09 14:05:17 +00:00
parse.h compiler: rewrite compiler directive support 2016-08-09 14:05:17 +00:00
runtime.cc compiler: Expose runtime code through Func_expression. 2016-04-23 04:58:00 +00:00
runtime.def
runtime.h compiler: Expose runtime code through Func_expression. 2016-04-23 04:58:00 +00:00
statements.cc escape: Add basic debugging. 2016-08-02 21:43:48 +00:00
statements.h escape: Implement assign phase. 2016-06-14 04:29:43 +00:00
string-dump.h
types.cc escape: Implement assign phase. 2016-06-14 04:29:43 +00:00
types.h escape: Add escape graph nodes. 2016-05-06 21:24:19 +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.