summaryrefslogtreecommitdiffstats
path: root/gcc/go/gofrontend/expressions.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* 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: 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-041-13/+17
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194114 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: Fix nil func panics, constant type conversions.ian2012-12-031-61/+96
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194064 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-291-0/+96
| | | | | | | | | | * 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: Adjust for vec changes.ian2012-11-181-34/+39
| | | | 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: More steps toward separating int and intgo.ian2012-11-011-39/+48
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193059 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: No error if shift operand inherits interface type.ian2012-09-221-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191634 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix determining types for builtin complex function.ian2012-09-221-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191630 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix unnamed struct type converted to interface type.ian2012-09-221-4/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191627 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: len(<-c) is not a constant.ian2012-09-211-48/+47
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191616 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix struct hash and equality with _ fields.ian2012-09-201-0/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191511 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove unnecessary VEC function overloads.dnovillo2012-09-111-19/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several VEC member functions that accept an element 'T' used to have two overloads: one taking 'T', the second taking 'T *'. This used to be needed because of the interface dichotomy between vectors of objects and vectors of pointers. In the past, vectors of pointers would use pass-by-value semantics, but vectors of objects would use pass-by-reference semantics. This is no longer necessary, but the distinction had remained. The main side-effect of this change is some code reduction in code that manipulates vectors of objects. For instance, - struct iterator_use *iuse; - - iuse = VEC_safe_push (iterator_use, heap, iterator_uses, NULL); - iuse->iterator = iterator; - iuse->ptr = ptr; + struct iterator_use iuse = {iterator, ptr}; + VEC_safe_push (iterator_use, heap, iterator_uses, iuse); Compile time performance was not affected. Tested on x86_64 and ppc64. Also built all-gcc on all targets using VEC routines: arm, bfin, c6x, epiphany, ia64, mips, sh, spu, and vms. 2012-09-10 Diego Novillo <dnovillo@google.com> * vec.h (vec_t::quick_push): Remove overload that accepts 'T *'. Update all users. (vec_t::safe_push): Likewise. (vec_t::quick_insert): Likewise. (vec_t::lower_bound): Likewise. (vec_t::safe_insert): Likewise. (vec_t::replace): Change second argument to 'T &'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191165 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Comparisons return untyped boolean value.ian2012-08-231-12/+27
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190612 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Remove old handling of unsafe.Pointer in type assertions.ian2012-08-231-33/+2
| | | | | | | Fixes issue 17. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190608 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Adjust for GCC always being built with C++.ian2012-08-151-9/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190405 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Avoid unnecessary interface conversions.ian2012-06-141-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188545 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't crash for invalid constant types for && or ||.ian2012-05-301-15/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188033 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't create a closure if not needed.ian2012-05-251-23/+11
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187897 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix taking address of constant outside of function.ian2012-05-151-9/+40
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187565 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Sort array constructors by index.ian2012-05-151-10/+48
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187560 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't try to take the address of a constant.ian2012-05-151-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187553 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix ICE in handling of rune constants.ian2012-05-071-1/+4
| | | | | | | | | | | | This patch corrects an ICE in handling on constant expressions such as const r = ^'a' Part of issue 9. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187264 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: reject NOT operator on integer types.ian2012-05-071-3/+6
| | | | | | | | | | The Go specification only accepts the NOT operator on boolean types. Fixes issue 10. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187262 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix some crashes on invalid code.ian2012-04-281-1/+1
| | | | | | | Fixes issue 7. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186929 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Use less memory for array/slice literals.ian2012-04-281-97/+177
| | | | | | | Fixes issue 8 in gofrontend issues list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186926 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Error for invalid use of ... in call.ian2012-04-241-2/+22
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186739 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Correct handling of negative zero floating constant.ian2012-04-231-1/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186722 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, runtime: Add explicit checks for zero and overflow division.ian2012-04-201-27/+109
| | | | | | | | | * lang.opt: Add -fgo-check-divide-zero and -fgo-check-divide-overflow. * gccgo.texi (Invoking gccgo): Document new options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186637 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix infinite recursion in string constant evaluation.ian2012-04-161-2/+16
| | | | | | | | | | | | | Fixes compilation of incorrect code: const f, g = g, f func S() []byte { return []byte(f) } The problem was already handled for numerical constants. Part of issue 3186 (go). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186511 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix order of evaluation of struct composite literals.ian2012-03-301-7/+42
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185990 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, libgo: unsafe.{Sizeof,Alignof,Offsetof} return uintptr.ian2012-03-291-5/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185946 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix null-dereference on invalid len() arg.ian2012-03-281-2/+2
| | | | | | | | | | | | This patch fixes an ICE caused by syntax errors in arguments to unary built-in functions like len(). Updates issue 7. From Rémy Oudompheng. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185935 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: avoid an ICE on bound interface methods used as values.ian2012-03-281-1/+2
| | | | | | | Updates issue 7. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185933 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix crashes.ian2012-03-281-0/+2
| | | | | | | | | | | | | The compiler would crash on: if true || x, y := 1, 2 {} and var s string s = append(s, "hello") Reported in issue 3186. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185928 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Rewrite handling of untyped numeric constants.ian2012-03-281-1877/+1366
| | | | | | | | Fixes various bugs when, e.g., using float or complex constants in integer contexts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185925 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Be more careful to follow GENERIC type rules.ian2012-03-091-6/+9
| | | | | | | | * go-gcc.cc (Gcc_backend::assignment_statement): Convert the rhs to the lhs type if necessary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185128 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't crash on array assignment.ian2012-03-081-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185092 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix handling of indirection of circular types.ian2012-03-011-18/+22
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184686 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Avoid some compiler crashes on invalid code.ian2012-03-011-1/+1
| | | | | | | | | * go-gcc.cc (class Gcc_tree): Add set_tree method. (set_placeholder_pointer_type): When setting to a pointer to error, set to error_mark_node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184684 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix unary ^ applied to typed signed integer constant.ian2012-03-011-3/+22
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184681 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Avoid various crashes on error conditions.ian2012-02-291-12/+32
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184675 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Add parameter names to export information.ian2012-02-171-1/+1
| | | | | | | * Make-lang.in (go/import.o): Add dependency on $(GO_LEX_H). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184353 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't lower binary expressions with mismatched types.ian2012-02-171-0/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184352 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud