• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..28-Jul-2021-

LICENSEH A D28-Jul-20211.4 KiB2824

MERGEH A D28-Jul-2021155 53

PATENTSH A D28-Jul-20211.3 KiB2320

READMEH A D28-Jul-20212.3 KiB5744

ast-dump.ccH A D28-Jul-202123.8 KiB968755

ast-dump.hH A D28-Jul-20212.6 KiB12362

backend.hH A D28-Jul-202132 KiB787278

embed.ccH A D28-Jul-202120.4 KiB948755

escape.ccH A D28-Jul-2021104.1 KiB3,4792,690

escape.hH A D28-Jul-202112.9 KiB507285

export.ccH A D28-Jul-202141.7 KiB1,4801,033

export.hH A D28-Jul-202110.8 KiB418243

expressions.ccH A D28-Jul-2021562.8 KiB19,91115,735

expressions.hH A D28-Jul-2021116.2 KiB4,6072,821

go-diagnostics.ccH A D28-Jul-20214.6 KiB200154

go-diagnostics.hH A D28-Jul-20213 KiB7733

go-dump.ccH A D28-Jul-2021961 5432

go-dump.hH A D28-Jul-2021997 3917

go-encode-id.ccH A D28-Jul-20217.4 KiB358293

go-encode-id.hH A D28-Jul-20211,016 3312

go-linemap.hH A D28-Jul-20215 KiB16583

go-optimize.ccH A D28-Jul-20211.1 KiB5432

go-optimize.hH A D28-Jul-20211.1 KiB3917

go-sha1.hH A D28-Jul-20211 KiB3413

go.ccH A D28-Jul-20215.4 KiB209123

gogo.ccH A D28-Jul-2021273.2 KiB9,6977,258

gogo.hH A D28-Jul-2021107.9 KiB3,9342,193

import-archive.ccH A D28-Jul-202123.4 KiB927694

import.ccH A D28-Jul-202146 KiB1,7551,323

import.hH A D28-Jul-202118.7 KiB777445

lex.ccH A D28-Jul-202171.9 KiB3,0732,675

lex.hH A D28-Jul-202114.1 KiB587384

names.ccH A D28-Jul-202137.7 KiB1,279775

operator.hH A D28-Jul-20211.5 KiB6754

parse.ccH A D28-Jul-2021165.3 KiB5,9734,772

parse.hH A D28-Jul-202110.4 KiB325238

runtime.ccH A D28-Jul-202111.5 KiB472336

runtime.defH A D28-Jul-202122.2 KiB592452

runtime.hH A D28-Jul-20211.1 KiB5227

statements.ccH A D28-Jul-2021210.2 KiB7,3795,446

statements.hH A D28-Jul-202154.3 KiB2,2451,376

string-dump.hH A D28-Jul-2021724 2611

types.ccH A D28-Jul-2021345.2 KiB12,7899,664

types.hH A D28-Jul-202197.6 KiB3,8252,228

unsafe.ccH A D28-Jul-20212.8 KiB9569

wb.ccH A D28-Jul-202133.8 KiB1,101779

README

1See ../README.
2
3The frontend is written in C++.  It can only be used in conjunction
4with a full compiler backend.  Currently the backend interface has
5been implemented with GCC (known as gccgo) and with LLVM (known as
6GoLLVM).
7
8The frontend lexes and parses the input into an IR specific to this
9frontend known as gogo.  It then runs a series of passes over the
10code.
11
12Finally it converts gogo to the backend IR.  This is done via the
13interface described in backend.h.  The backend must implement that
14interface.  When used with GCC, the interface is implemented in
15gcc/go/go-gcc.cc.
16
17Source locations are represented using the interface described in
18go-linemap.h.  The backend is expected to provide a header file
19go-location.h that defines a Location type.
20
21The frontend does not start by itself.  It expects something to call
22go_create_gogo passing in a Backend and a Linemap, as well as other
23options.  Then it expects something to call go_parse_input_files
24passing in the input files.  Finally, a call to go_write_globals will
25cause all global definitions to be written out via the Backend
26interface.
27
28The backend is expected to provide the functions defined at the
29bottom of go-diagnostics.h: go_be_error_at, etc.  These will be used
30for error messages.
31
32This compiler works, but the code is a work in progress.  The frontend
33pays little attention to its memory usage and rarely frees any memory.
34The code could use a general cleanup which we have not had time to do.
35
36Contributing
37=============
38
39To contribute patches to the files in this directory, please see
40https://golang.org/doc/gccgo_contribute.html .
41
42The master copy of these files is hosted at
43https://go.googlesource.com/gofrontend .  There is a mirror at
44https://github.com/golang/gofrontend .  Changes to these files require
45signing a Google contributor license agreement.  If you are the
46copyright holder, you will need to agree to the individual contributor
47https://cla.developers.google.com/about/google-individual .  This
48agreement can be completed online.
49
50If your organization is the copyright holder, the organization will
51need to agree to the corporate contributor license agreement at
52https://cla.developers.google.com/about/google-corporate .
53
54If the copyright holder for your code has already completed the
55agreement in connection with another Google open source project, it
56does not need to be completed again.
57