summaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend
Commit message (Collapse)AuthorAgeFilesLines
* compiler: don't export embedded builtins.ian2013-08-232-3/+28
| | | | | | | | | | | | | The panic in test/fixedbugs/bug461.go was caused by the fact that reflect expects unexported fields in a struct to have a valid package path. If a struct field is an embedded built-in type, it is now given the package name of the currently compiling package, so it remains unexported for purposes of reflect. Fixed Issue 25. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201951 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't generate value reference in range clause if receiver is a sink.ian2013-08-171-1/+2
| | | | | | | | | The panic in test/fixedbugs/bug454.go was caused by the generation of an unnecessary var reference when writing a range value into a sink. If the receiving variable is a sink, there's no need to dereference a possible NULL pointer. Fixes Issue 24. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201815 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix "missing return" error for case T1, T2 in type switches.ian2013-08-072-1/+12
| | | | | | | | | Also change the "missing return" text and report it at the end of the function, rather than the start, to match the gc compiler. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201579 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Always put descriptor wrappers in their own section.ian2013-08-021-0/+6
| | | | | | | This lets the linker GC them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201442 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: adjust closure field indexesian2013-07-161-1/+1
| | | | | | | | | This corrects the code that handles composite literals where the key is a variable in an enclosing function. See bug475.go in the testsuite. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200990 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: structs inherit all methods from embedded pointer fields.ian2013-06-271-1/+6
| | | | | | | | | Previously if a struct S contained an embedded field *T, a method with receiver *T would not be promoted to a method with value receiver S. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200493 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: more consistent error message for [...]T(x)ian2013-06-271-1/+1
| | | | | | | | The message should be similar to the one for "var x [...]T", not to the message for []T(x...). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200490 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: disallow fallthrough in last case of switch.ian2013-06-261-0/+3
| | | | | | | | In spec: A "fallthrough" statement may appear as the last statement of all but the last clause of an expression switch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200440 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: reject integer division by zero constant.ian2013-06-261-0/+14
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200436 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: forbid identifiers named "init" in package scope.ian2013-06-261-0/+8
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200426 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix type determination issues.ian2013-06-252-3/+22
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200398 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: generate dummy names for blank-named constants.ian2013-06-243-9/+30
| | | | | | | Otherwise such const declarations are not checked. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200381 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Add support for method values.ian2013-06-247-161/+699
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200379 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: do not skip compilation of blank-named functions.ian2013-06-213-3/+22
| | | | | | | Fixes issue 22. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200316 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Really only make descriptors when needed.ian2013-06-212-21/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200280 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Only make function descriptors if needed.ian2013-06-215-109/+252
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200273 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: reject incorrect unsafe.Offsetof expressions.ian2013-06-192-1/+21
| | | | | | | | | | The x.Field argument to Offsetof may not involve hidden dereferences of embedded pointer fields. Also correct uninitialized implicit_ field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200221 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, runtime: Use function descriptors.ian2013-06-1811-286/+942
| | | | | | | | | | | | | | | | This changes the representation of a Go value of function type from being a pointer to function code (like a C function pointer) to being a pointer to a struct. The first field of the struct points to the function code. The remaining fields, if any, are the addresses of variables referenced in enclosing functions. For each call to a function, the address of the function descriptor is passed as the last argument. This lets us avoid generating trampolines, and removes the use of writable/executable sections of the heap. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200181 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix computation of Offsetof.ian2013-06-143-12/+37
| | | | | | | | The implied offsets must be taken into account when the selector involves anonymous fields. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200098 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: implement Go 1.1 spec of terminating statements.ian2013-06-123-42/+136
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200047 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, libgo: Permit testing package when test imports it circularly.ian2013-02-101-9/+16
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195931 138bc75d-0d04-0410-961f-82ee72b054a4
* PR bootstrap/56198ian2013-02-051-3/+2
| | | | | | | compiler: Always initialize *nested_off in interpret_header. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195747 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't emit multiple methods for identical unnamed structs.ian2013-02-012-0/+26
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195638 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Correct initialization order determination.ian2013-01-293-30/+53
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195526 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Provide location for initialization function.ian2013-01-171-5/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195259 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Error if name defined in both package and file blocks.ian2012-12-212-4/+46
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194685 138bc75d-0d04-0410-961f-82ee72b054a4
* PR bootstrap/54659ian2012-12-217-12/+0
| | | | | | | | | compiler: Don't include <gmp.h>, now included by go-system.h. * go-system.h: Don't include <cstdio>. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194669 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Better error message for invalid shift operations.ian2012-12-141-6/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194501 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Accept trailing comma after varargs parameter.ian2012-12-135-20/+87
| | | | | | | | Also fix handling of interfaces seen only in a function or method declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194492 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Correct test for whether go/defer arg is parenthesized.ian2012-12-062-46/+87
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194240 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Accept trailing comma after expression in type conversion.ian2012-12-051-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194176 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Make sure we produce an error for a call to a non-function.ian2012-12-051-0/+10
| | | | | | | Fixes issue 19. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194174 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Check for negative or inverted arguments to make.ian2012-12-051-18/+43
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194173 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Give error for constant inverted slice range.ian2012-12-041-2/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194124 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Reject invalid nil == nil comparisons.ian2012-12-041-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194119 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix crash in go/defer of some builtin functions.ian2012-12-043-27/+38
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194114 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't permit go/defer argument to be parenthesized.ian2012-12-041-3/+6
| | | | | | | Fixes Go repository issue 4468. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194112 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix field tracking for references in global initializers.ian2012-12-031-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194073 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't encode non-ASCII characters in identifiers.ian2012-12-031-5/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194068 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix nil func panics, constant type conversions.ian2012-12-032-63/+98
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194064 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix bug converting unnamed types with placeholders.ian2012-12-012-57/+98
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194011 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix fieldtrack info for unexported type.ian2012-11-301-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193985 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, runtime: Track fields with tag go:"track".ian2012-11-297-5/+138
| | | | | | | | | | * go-gcc.cc: Include "output.h". (global_variable): Add is_unique_section parameter. (global_variable_set_init): Adjust unique section if necessary. * Make-lang.in (go/go-gcc.o): Add dependency on output.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193945 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Implement //go:nointerface comments.ian2012-11-288-7/+126
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193874 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't use memcmp for equality if struct has trailing padding.ian2012-11-252-25/+35
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193791 138bc75d-0d04-0410-961f-82ee72b054a4
* PR translation/53764ian2012-11-191-1/+1
| | | | | | | | | compiler: Fix typo in error message. Reported by Roland Stigge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193626 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Adjust for vec changes.ian2012-11-182-58/+68
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193596 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: don't remove floating point conversion of typed constantian2012-11-161-0/+40
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193565 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, runtime: Size of int is now 64 bits on x86_64.ian2012-11-061-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193255 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, libgo: Fixes to prepare for 64-bit int.ian2012-11-061-2/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193254 138bc75d-0d04-0410-961f-82ee72b054a4