aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend
AgeCommit message (Collapse)AuthorFilesLines
2011-10-11Convert standard builtin functions from being arrays to using a functional ↵Michael Meissner1-5/+3
interface From-SVN: r179820
2011-10-04Fix global var initialized to function call with calls as arguments.Ian Lance Taylor1-0/+5
From-SVN: r179529
2011-09-26Fix location of error about unused import "unsafe".Ian Lance Taylor1-0/+1
From-SVN: r179211
2011-09-23Better parsing of erroneous expression on left of :=.Ian Lance Taylor1-1/+26
Better parsing of erroneous non-type in type switch. From-SVN: r179133
2011-09-21Better handling of unexpected EOF in parser.Ian Lance Taylor1-0/+7
From-SVN: r179060
2011-09-21Better error message for shift context types.Ian Lance Taylor1-10/+59
Fix shift of floating point constant to generate constant. From-SVN: r179057
2011-09-21Support nil maps.Ian Lance Taylor2-7/+9
From-SVN: r179054
2011-09-21Fix typo in error message.Ian Lance Taylor1-1/+1
From-SVN: r179025
2011-09-20Improve error for undefined name in imported package.Ian Lance Taylor2-5/+17
Avoid emitting some followon errors. From-SVN: r179020
2011-09-20Implement goto restrictions.Ian Lance Taylor4-41/+251
From-SVN: r179018
2011-09-20Check for duplicate parameter/result names.Ian Lance Taylor3-3/+45
From-SVN: r179010
2011-09-20Emit compiler errors for unused values.Ian Lance Taylor7-34/+92
From-SVN: r179008
2011-09-19Fix handling of mutually recursive named types.Ian Lance Taylor2-23/+25
From-SVN: r178989
2011-09-17Improve errors for invalid use of [...]type.Ian Lance Taylor2-3/+16
From-SVN: r178921
2011-09-16Fix defer when not calling recover in function with named results.Ian Lance Taylor4-21/+30
From-SVN: r178905
2011-09-14Fix handling of structs with embedded global types.Ian Lance Taylor3-66/+112
From-SVN: r178870
2011-09-14Fix defer/recover at high optimization levels.Ian Lance Taylor1-2/+5
From-SVN: r178859
2011-09-13Always dereference nil receiver passed to value method.Ian Lance Taylor1-21/+3
From-SVN: r178835
2011-09-13Fix inheriting hidden methods with arguments of hidden type.Ian Lance Taylor4-7/+23
From-SVN: r178827
2011-09-13Fix inherited hidden methods that return hidden types.Ian Lance Taylor3-13/+94
From-SVN: r178818
2011-09-10Fix using package name as composite literal struct key.Ian Lance Taylor2-3/+36
From-SVN: r178747
2011-08-29Lower calls to bound method expressions.Ian Lance Taylor3-220/+197
From-SVN: r178264
2011-08-29Don't lower blocks twice.Ian Lance Taylor1-0/+6
From-SVN: r178263
2011-08-25Change Bound_method_expression to refer to a constant method.Ian Lance Taylor5-98/+121
From-SVN: r178091
2011-08-24gccgo...Roberto Lublinerman9-200/+409
gccgo: fixes to ast-dump, refactoring of export and ast-dump 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. From-SVN: r178046
2011-08-15LINEMAP_POSITION_FOR_COLUMN had the exact same effect as ↵Gabriel Charette1-6/+2
linemap_position_for_column... LINEMAP_POSITION_FOR_COLUMN had the exact same effect as linemap_position_for_column, removed it and updated users to use linemap_position_for_column instead libcpp/ChangeLog * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove. Update all users to use linemap_position_for_column instead. gcc/go/ChangeLog * gofrontend/lex.cc (Lex::location): Update to use linemap_position_for_column instead. (Lex::earlier_location): Likewise. From-SVN: r177768
2011-08-04re PR go/49889 (Calling a function whose name is obscured by a local ↵Ian Lance Taylor1-0/+2
variable does not produce an error) PR go/49889 gccgo : Fixed bug 49889. Now the compiler emits a proper error when a function called in a tuple assignment statement can not be typed as a function. From-SVN: r177310
2011-08-03gccgo: Added code to dump the AST tree.Roberto Lublinerman8-3/+1846
gccgo: Added code to dump the AST tree. The AST dump is 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. From-SVN: r177225
2011-08-01Use temporary variables for calls with multiple results.Ian Lance Taylor6-283/+611
From-SVN: r176998
2011-06-21gogo-tree.cc (Gogo::define_builtin_function_trees): Change ↵Andrew MacLeod1-4/+4
BUILT_IN_ADD_AND_FETCH to BUILT_IN_SYNC_ADD_AND_FETCH. * gogo-tree.cc (Gogo::define_builtin_function_trees): Change BUILT_IN_ADD_AND_FETCH to BUILT_IN_SYNC_ADD_AND_FETCH. From-SVN: r175278
2011-06-14Change builtin make to runtime call at lowering time.Ian Lance Taylor6-597/+251
Use kindNoPointers as 6g does. * Make-lang.in (go/expressions.o): Depend on $(GO_RUNTIME_H). From-SVN: r175008
2011-06-11Use backend interface for map descriptors.Ian Lance Taylor6-155/+145
From-SVN: r174943
2011-06-11Use backend interface for type descriptors.Ian Lance Taylor7-252/+261
* go-gcc.cc: Include "toplev.h". (Gcc_backend::immutable_struct): New function. (Gcc_backend::immutable_struct_set_init): New function. (Gcc_backend::immutable_struct_reference): New function. * Make-lang.in (go/go-gcc.o): Depend on toplev.h. From-SVN: r174941
2011-06-09Use backend interface for zero initialization.Ian Lance Taylor6-390/+49
* go-gcc.cc (Gcc_backend::zero_expression): New function. From-SVN: r174863
2011-06-08Correct type size comparison.Ian Lance Taylor1-2/+7
From-SVN: r174814
2011-06-05Revert accidental checkin.H.J. Lu33-129968/+0
From-SVN: r174662
2011-06-052011-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>Jerry DeLisle33-0/+129968
Merge trunk into branch, part one. [[Split portion of a mixed commit.]] From-SVN: r174658.2
2011-05-27Change export code to use the backend interface.Ian Lance Taylor2-29/+3
* go-backend.c: Include "output.h". (go_write_export_data): New function. * go-c.h (go_write_export_data): Declare. * Make-lang.in (go/go-backend.o): Depend on output.h. (go/export.o): Depend on $(GO_C_H). Do not depend on $(MACHMODE_H), output.h, or $(TARGET_H). From-SVN: r174366
2011-05-20Update to current version of Go library.Ian Lance Taylor2-17/+46
From-SVN: r173931
2011-05-13Fix bug with multiple results returning structs with invalid sizes.Ian Lance Taylor4-5/+64
* go-gcc.cc (Gcc_backend::function_type): When building a struct for multiple results, check that all fields types have a size. (Gcc_backend::placeholder_pointer_type): Permit name to be empty. From-SVN: r173742
2011-05-12Fix bug with taking address of a variable when address does not escape.Ian Lance Taylor4-22/+75
* go-gcc.cc (Gcc_backend::local_variable): Add is_address_taken parameter. (Gcc_backend::parameter_variable): Likewise. From-SVN: r173712
2011-05-11Permit new of a function type.Ian Lance Taylor1-12/+0
From-SVN: r173672
2011-05-11Don't crash ranging over call to builtin function.Ian Lance Taylor2-6/+7
From-SVN: r173671
2011-05-07Use backend types for all type conversions.Ian Lance Taylor6-286/+286
From-SVN: r173520
2011-05-06More uses of backend interface for types.Ian Lance Taylor2-96/+63
From-SVN: r173507
2011-05-06Use backend interface for string types.Ian Lance Taylor1-8/+21
From-SVN: r173502
2011-05-06Use backend interface for interface types.Ian Lance Taylor2-114/+91
From-SVN: r173469
2011-05-05Use backend interface for slice types.Ian Lance Taylor4-110/+54
From-SVN: r173415
2011-05-04Use backend interface for named types and array types.Ian Lance Taylor3-183/+242
* go-gcc.cc (Gcc_backend::struct_type): Call fill_in_struct. (Gcc_backend::fill_in_struct): New function. (Gcc_backend::array_type): Implement. (Gcc_backend::fill_in_array): New function. (Gcc_backend::placeholder_pointer_type): New function. (Gcc_backend::set_placeholder_pointer_type): New function. (Gcc_backend::set_placeholder_function_type): New function. (Gcc_backend::placeholder_struct_type): New function. (Gcc_backend::set_placeholder_struct_type): New function. (Gcc_backend::placeholder_array_type): New function. (Gcc_backend::set_placeholder_array_type): New function. (Gcc_backend::named_type): New function. (Gcc_backend::circular_pointer_type): New function. (Gcc_backend::is_circular_pointer_type): New function. From-SVN: r173380
2011-04-27Use backend interface for struct types.Ian Lance Taylor1-7/+19
* go-gcc.cc (Gcc_backend::struct_type): Implement. From-SVN: r173004