summaryrefslogtreecommitdiffstats
path: root/gcc/go/gofrontend/expressions.h
Commit message (Collapse)AuthorAgeFilesLines
* compiler: Use backend interface for conditional expressions.ian2014-01-311-1/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207330 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Use backend interface for unary expressions.ian2014-01-241-0/+14
| | | | | | | * go-gcc.cc (Gcc_backend::unary_expression): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207063 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Use backend interface for binary expressions.ian2014-01-171-4/+7
| | | | | | | | | | * go-gcc.cc (Gcc_backend::conditional_expression): Add btype parameter. (operator_to_tree_code): New static function. (Gcc_backend::binary_expression): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206696 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Use backend interface for interface info and field expressions.ian2014-01-151-13/+26
| | | | | | | | * go-gcc.cc (Gcc_backend::compound_expression): New function. (Gcc_backend::conditional_expression): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206615 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Use backend interface for slice info.ian2014-01-101-0/+21
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206509 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Add flattening passian2014-01-091-0/+18
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206502 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Use backend interface for comparisons.ian2013-11-141-3/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204827 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Support Go 1.2 nil checks.ian2013-11-111-0/+17
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204679 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Implement 3-index slicing.ian2013-10-241-11/+21
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204034 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Use backend interface for function code expressions.ian2013-10-111-2/+2
| | | | | | | | * go-gcc.cc (Gcc_backend::function_code_expression): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203467 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Error for qualified ID as field name in struct literal.ian2013-10-081-2/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203292 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Use backend interface for numeric expressions.ian2013-10-021-11/+4
| | | | | | | | | | * go-gcc.cc: Include "real.h" and "realmpfr.h". (Backend::integer_constant_expression): New function. (Backend::float_constant_expression): New function. (Backend::complex_constant_expression): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203127 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, runtime: Use runtime functions to pass closure value.ian2013-09-031-11/+2
| | | | | | | | | | | | This changes the compiler and runtime to not pass a closure value as the last argument, but to instead pass it via __go_set_closure and retrieve it via __go_get_closure. This eliminates the need for function descriptor wrapper functions. It will make it possible to retrieve the closure value in a reflect.MakeFunc function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202233 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Add support for method values.ian2013-06-241-13/+52
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200379 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Really only make descriptors when needed.ian2013-06-211-3/+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-211-4/+61
| | | | 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-191-1/+1
| | | | | | | | | | 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-181-7/+32
| | | | | | | | | | | | | | | | 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-141-0/+12
| | | | | | | | 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: Correct initialization order determination.ian2013-01-291-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195526 138bc75d-0d04-0410-961f-82ee72b054a4
* PR bootstrap/54659ian2012-12-211-1/+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: Fix crash in go/defer of some builtin functions.ian2012-12-041-9/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194114 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix nil func panics, constant type conversions.ian2012-12-031-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194064 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, runtime: Track fields with tag go:"track".ian2012-11-291-1/+6
| | | | | | | | | | * 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: Comparisons return untyped boolean value.ian2012-08-231-4/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190612 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix taking address of field of local variable.ian2012-06-071-0/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188299 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix order of evaluation of struct composite literals.ian2012-03-301-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185990 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Rewrite handling of untyped numeric constants.ian2012-03-281-78/+221
| | | | | | | | 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: Fix varargs functions that call recover.ian2012-03-011-0/+4
| | | | | | | Also fix a couple of crashes on invalid code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184751 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Better handling of erroneous function signatures.ian2012-01-241-2/+13
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183479 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Change alias handling, change rune alias to int32.ian2012-01-211-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183374 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, runtime: Implement struct and array comparisons.ian2012-01-061-0/+86
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182971 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Prohibit comparisons of funcs, maps, and slices to non-nil.ian2011-12-281-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182703 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler/runtime: Copy channel implementation from master library.ian2011-12-011-8/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181874 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Define and use backend-independent Location class.ian2011-11-291-67/+67
| | | | | | | | | | | | | | | | From Sanjoy Das. * go-location.h: New file. * go-linemap.cc: New file. * go-gcc.cc: Change all uses of source_location to Location. * Make-lang.in (GO_OBJS): Add go/go-linemap.o. (GO_LINEMAP_H): New variable. (GO_LEX_H): Use $(GO_LINEMAP_H). (GO_GOGO_H, GO_TYPES_H, GO_IMPORT_H): Likewise. (go/go-linemap.o): New target. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181813 138bc75d-0d04-0410-961f-82ee72b054a4
* Implement new order of assignment rules.ian2011-10-251-0/+33
| | | | | | | | In "i, x[i] = 1, 2" the assigment to x[i] must use the value of i from before the assignment statement. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180421 138bc75d-0d04-0410-961f-82ee72b054a4
* Emit compiler errors for unused values.ian2011-09-201-5/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179008 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix inheriting hidden methods with arguments of hidden type.ian2011-09-131-2/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178827 138bc75d-0d04-0410-961f-82ee72b054a4
* Lower calls to bound method expressions.ian2011-08-291-4/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178264 138bc75d-0d04-0410-961f-82ee72b054a4
* Change Bound_method_expression to refer to a constant method.ian2011-08-251-8/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178091 138bc75d-0d04-0410-961f-82ee72b054a4
* gccgo: fixes to ast-dump, refactoring of export and ast-dumpian2011-08-241-0/+5
| | | | | | | | | | | | | | | | | | | | | to implement a common interface for writing basic type literals and added flags for optimization. * lang.opt: Add fgo-optimize-. * go-lang.c (go_langhook_handle_option): Handle OPT_fgo_optimize. * go-c.h (go_enable_optimize): Declare. * Make-lang.in (GO_OBJS): Add go/go-optimize.o. (GO_EXPORT_H): Define. (GO_IMPORT_H): Add $(GO_EXPORT_H). (GO_AST_DUMP_H): Define. (go/ast-dump.o, go/statements.o): Use GO_AST_DUMP_H. (go/export.o, go/gogo.o, go/import.o): Use GO_EXPORT_H. (go/types.o): Likewise. (go/expressions.o): Use GO_AST_DUMP_H and GO_EXPORT_H. (go/go-optimize.o): New target. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178046 138bc75d-0d04-0410-961f-82ee72b054a4
* gccgo: Added code to dump the AST tree. The AST dump isian2011-08-031-0/+57
| | | | | | | | | | | | | | activated with -fgo-dump-ast. Initial version, it only dumps (most) constructs that are expected after the lowering transformation. * Make-lang.in (GO_OBJS): Add go/ast-dump.o. (go/ast-dump.o): New target. (go/expressions.o): Depend on go/gofrontend/ast-dump.h. (go/statements.o): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177225 138bc75d-0d04-0410-961f-82ee72b054a4
* Use temporary variables for calls with multiple results.ian2011-08-011-20/+56
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176998 138bc75d-0d04-0410-961f-82ee72b054a4
* Change builtin make to runtime call at lowering time.ian2011-06-141-7/+8
| | | | | | | | | Use kindNoPointers as 6g does. * Make-lang.in (go/expressions.o): Depend on $(GO_RUNTIME_H). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175008 138bc75d-0d04-0410-961f-82ee72b054a4
* Define go_unreachable to replace gcc_unreachable.ian2011-04-231-3/+3
| | | | | | | From Evan Shaw. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172882 138bc75d-0d04-0410-961f-82ee72b054a4
* Define go_assert to replace gcc_assertian2011-04-211-1/+1
| | | | | | | | | This is defined in go-system.h in the backend. * go-system.h (go_assert, go_unreachable): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172846 138bc75d-0d04-0410-961f-82ee72b054a4
* Unify handling of runtime support functions.ian2011-04-131-0/+7
| | | | | | | | | | This introduces the new approach, and rewrites the lowering code which uses runtime functions. The code which calls runtime functions at GENERIC conversion time is not yet rewritten. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172396 138bc75d-0d04-0410-961f-82ee72b054a4
* Change c <- v from an expression to a statement.ian2011-03-241-71/+3
| | | | | | | | Don't do anything special if we don't use the value of <-c. Fix sending an untyped constant in a select statement. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171371 138bc75d-0d04-0410-961f-82ee72b054a4
* Handle predeclared names used as fields in struct composite literals.ian2011-03-071-8/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170754 138bc75d-0d04-0410-961f-82ee72b054a4
* Make sure variable type is determined when var initialized to var.ian2011-03-031-2/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170643 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud