aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
AgeCommit message (Collapse)AuthorFilesLines
2013-11-06go-lang.c (go_langhook_post_options): If -fisolate-erroneous-paths was ↵Ian Lance Taylor2-0/+12
turned on by an optimization option, turn it off. * go-lang.c (go_langhook_post_options): If -fisolate-erroneous-paths was turned on by an optimization option, turn it off. From-SVN: r204459
2013-10-24compiler: Implement 3-index slicing.Ian Lance Taylor5-44/+171
From-SVN: r204034
2013-10-23compiler: use builtin runtime calls for integer to string and string to ↵Ian Lance Taylor1-26/+11
array conversions. From-SVN: r203996
2013-10-17compiler: Rework handling of imported anonymous builtin types again.Ian Lance Taylor2-37/+50
From-SVN: r203795
2013-10-17compiler: Don't warn for unknown type when importing anonymous field.Ian Lance Taylor1-4/+18
From-SVN: r203772
2013-10-14runtime: Don't clobber saved context when catching signal.Chris Manghane7-30/+66
* go-gcc.cc (Gcc_backend::address_expression): New function. From-SVN: r203579
2013-10-13compiler: Fix handling of imported struct with embedded builtin type.Ian Lance Taylor2-0/+18
From-SVN: r203496
2013-10-11compiler: Fix handling of hidden methods for unnamed types.Ian Lance Taylor4-6/+23
If an interface has hidden methods, we must make the interface table comdat if it is for an unnamed type. When we create a stub method for an unnamed type, don't make it publically visible. From-SVN: r203468
2013-10-11compiler: Use backend interface for function code expressions.Chris Manghane8-110/+135
* go-gcc.cc (Gcc_backend::function_code_expression): New function. From-SVN: r203467
2013-10-11compiler: Error if receiver and parameter have same name.Ian Lance Taylor1-0/+2
From-SVN: r203455
2013-10-11compiler: Better error message of unsafe.Offsetof(method value).Ian Lance Taylor1-1/+13
From-SVN: r203454
2013-10-11compiler: accept integral float constants as string indices.Ian Lance Taylor1-2/+11
From-SVN: r203452
2013-10-11compiler: Improve handling of invalid ASCII characters in identifiers.Ian Lance Taylor1-1/+22
From-SVN: r203450
2013-10-11compiler: Use backend interface for function declarations.Chris Manghane9-309/+368
* go-gcc.cc (Backend::error_function): New function. (Backend::function): New function. (Backend::make_function): New function. (function_to_tree): New function. From-SVN: r203403
2013-10-11compiler: Avoid extra error for anonymous embedded type.Ian Lance Taylor1-6/+1
From-SVN: r203402
2013-10-10compiler: Fix test for constant argument too large for make.Ian Lance Taylor1-2/+17
From-SVN: r203338
2013-10-10compiler: Don't inherit logical operator operand type from context.Ian Lance Taylor1-0/+9
From-SVN: r203337
2013-10-10compiler: A type conversion of a constant is not always a constant.Ian Lance Taylor1-2/+22
From-SVN: r203332
2013-10-09compiler, runtime: Fix complex division of NaN / 0.Ian Lance Taylor3-0/+50
From-SVN: r203331
2013-10-08compiler: Error for qualified ID as field name in struct literal.Ian Lance Taylor3-9/+50
From-SVN: r203292
2013-10-04compiler: Use backend interface for temporary reference expressions.Chris Manghane4-8/+34
* go-gcc.cc (Backend::convert_expression): New function. From-SVN: r203209
2013-10-02compiler: Use backend interface for numeric expressions.Chris Manghane6-123/+187
* 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. From-SVN: r203127
2013-09-30compiler: Use backend interface for variable expressions.Chris Manghane4-8/+61
* go-gcc.cc (Backend::error_expression): New function. (Backend::var_expression): New function. (Backend::indirect_expression): New function. From-SVN: r203038
2013-09-28compiler: Avoid knockon errors for invalid uses of _.Ian Lance Taylor5-6/+47
From-SVN: r203006
2013-09-25Make-lang.in (gospec.o): Remove.Tom Tromey2-91/+26
* Make-lang.in (gospec.o): Remove. (CFLAGS-go/gospec.o): New variable. (GCCGO_OBJS): Update to use go/gospec.o. (go_OBJS): Define. (GO_SYSTEM_H, GO_C_H, GO_LINEMAP_H, GO_LEX_H, GO_PARSE_H) (GO_GOGO_H, GO_TYPES_H, GO_STATEMENTS_H, GO_EXPRESSIONS_H) (GO_EXPORT_H, GO_IMPORT_H, GO_RUNTIME_H, GO_AST_DUMP_H) (go/go-backend.o, go/go-lang.o, go/go-gcc.o, go/go-linemap.o) (go/ast-dump.o, go/dataflow.o, go/export.o, go/expressions.o) (go/go.o, go/go-dump.o, go/go-optimize.o, go/gogo-tree.o) (go/gogo.o, go/import.o, go/import-archive.o, go/lex.o) (go/parse.o, go/runtime.o, go/statements.o, go/types.o) (go/unsafe.o): Remove. (CFLAGS-go/go-gcc.o, CFLAGS-go/go-linemap.o): New variables. (go/%.o: go/gofrontend/%.cc): Use COMPILE and POSTCOMPILE. From-SVN: r202905
2013-09-25Makefile.in (DRIVER_DEFINES): Use $(and), not shell code, to add ↵Tom Tromey2-2/+5
-DENABLE_SHARED_LIBGCC. * Makefile.in (DRIVER_DEFINES): Use $(and), not shell code, to add -DENABLE_SHARED_LIBGCC. (gcc.o): Don't use subshell. gcc/c * Make-lang.in (c/gccspec.o): Don't use subshell. gcc/cp * Make-lang.in (g++spec.o): Don't use subshell. gcc/fortran * Make-lang.in (gfortranspec.o): Don't use subshell. gcc/go * Make-lang.in (gospec.o): Don't use subshell. gcc/java * Make-lang.in (jvspec.o): Don't use subshell. From-SVN: r202897
2013-09-25compiler: don't permit nil assignment to blank identifier.Ian Lance Taylor2-5/+14
Fixes https://code.google.com/p/go/issues/detail?id=6005. From-SVN: r202881
2013-09-19compiler: Fix inconsistent check for structs using memcmp for ==.Ian Lance Taylor2-5/+1
Test is bug479. From-SVN: r202751
2013-09-18compiler: Fix name of unexported method of embedded imported type.Ian Lance Taylor1-1/+25
Test case is fixedbugs/bug478.go in master testsuite. From-SVN: r202726
2013-09-18compiler: Correctly handle identical unnamed structs with methods.Ian Lance Taylor2-11/+33
From-SVN: r202723
2013-09-18compiler: Fix type of result of shortcut calculation.Ian Lance Taylor1-1/+1
From-SVN: r202717
2013-09-04compiler: expand arguments with multiple results for built-in functions.Ian Lance Taylor1-21/+15
Fixed https://code.google.com/p/go/issues/detail?id=5796. Official fixedbug will be added with change to gc. From-SVN: r202239
2013-09-03compiler, runtime: Use runtime functions to pass closure value.Ian Lance Taylor9-316/+201
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. From-SVN: r202233
2013-08-29go-gcc.cc (Gcc_backend::immutable_struct): Set TREE_PUBLIC if the struct is ↵Ian Lance Taylor2-10/+12
not hidden. * go-gcc.cc (Gcc_backend::immutable_struct): Set TREE_PUBLIC if the struct is not hidden. (Gcc_backend::immutable_struct_set_init): Don't set TREE_PUBLIC. From-SVN: r202065
2013-08-23compiler: don't export embedded builtins.Ian Lance Taylor2-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. From-SVN: r201951
2013-08-17compiler: Don't generate value reference in range clause if receiver is a sink.Ian Lance Taylor1-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. From-SVN: r201815
2013-08-07compiler: Fix "missing return" error for case T1, T2 in type switches.Ian Lance Taylor2-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. From-SVN: r201579
2013-08-06go-gcc.cc (Gcc_backend::immutable_struct_set_init): Use ↵Ian Lance Taylor2-1/+8
compute_reloc_for_constant. * go-gcc.cc (Gcc_backend::immutable_struct_set_init): Use compute_reloc_for_constant. From-SVN: r201535
2013-08-02go-gcc.cc (immutable_struct_set_init): Always call resolve_unique_section.Ian Lance Taylor2-4/+10
* go-gcc.cc (immutable_struct_set_init): Always call resolve_unique_section. From-SVN: r201446
2013-08-02compiler: Always put descriptor wrappers in their own section.Ian Lance Taylor1-0/+6
This lets the linker GC them. From-SVN: r201442
2013-07-24go-gcc.cc (Gcc_backend::non_zero_size_type): If a struct has a fields...Ian Lance Taylor2-14/+41
* go-gcc.cc (Gcc_backend::non_zero_size_type): If a struct has a fields, recreate those fields with the first one with a non-zero size. From-SVN: r201222
2013-07-23go-backend.c: Don't #include "rtl.h".Ian Lance Taylor3-8/+7
* go-backend.c: Don't #include "rtl.h". (go_imported_unsafe): Don't call init_varasm_once. * Make-lang.in (go/go-backend.o): Don't depend on $(RTL_H). From-SVN: r201176
2013-07-23go-lang.c: Don't #include "except.h".Ian Lance Taylor3-2/+6
* go-lang.c: Don't #include "except.h". * Make-lang.in (go/go-lang.o): Don't depend on $(EXCEPT_H). From-SVN: r201171
2013-07-16compiler: adjust closure field indexesIan Lance Taylor1-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. From-SVN: r200990
2013-06-27compiler: structs inherit all methods from embedded pointer fields.Ian Lance Taylor1-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. From-SVN: r200493
2013-06-27compiler: more consistent error message for [...]T(x)Ian Lance Taylor1-1/+1
The message should be similar to the one for "var x [...]T", not to the message for []T(x...). From-SVN: r200490
2013-06-26compiler: disallow fallthrough in last case of switch.Ian Lance Taylor1-0/+3
In spec: A "fallthrough" statement may appear as the last statement of all but the last clause of an expression switch. From-SVN: r200440
2013-06-26compiler: reject integer division by zero constant.Ian Lance Taylor1-0/+14
From-SVN: r200436
2013-06-26compiler: forbid identifiers named "init" in package scope.Ian Lance Taylor1-0/+8
From-SVN: r200426
2013-06-25compiler: Fix type determination issues.Ian Lance Taylor2-3/+22
From-SVN: r200398