Richard Guenther
009db07487
tree.c (build_common_tree_nodes): Also initialize size_type_node.
...
2011-06-07 Richard Guenther <rguenther@suse.de>
* tree.c (build_common_tree_nodes): Also initialize size_type_node.
Call set_sizetype from here.
c-family/
* c-common.c (c_common_nodes_and_builtins): Do not set
size_type_node or call set_sizetype.
go/
* go-lang.c (go_langhook_init): Do not set
size_type_node or call set_sizetype.
fortran/
* f95-lang.c (gfc_init_decl_processing): Do not set
size_type_node or call set_sizetype.
java/
* decl.c (java_init_decl_processing): Properly initialize
size_type_node.
lto/
* lto-lang.c (lto_init): Do not set
size_type_node or call set_sizetype.
ada/
* gcc-interface/misc.c (gnat_init): Do not set
size_type_node or call set_sizetype.
From-SVN: r174743
2011-06-07 13:01:27 +00:00
H.J. Lu
e8f79869d7
Revert accidental checkin.
...
From-SVN: r174662
2011-06-05 13:57:58 -07:00
Jerry DeLisle
67f8f44952
2011-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
...
Merge trunk into branch, part one.
[[Split portion of a mixed commit.]]
From-SVN: r174658.2
2011-06-05 17:42:55 +00:00
Ian Lance Taylor
76aa42d266
Change export code to use the backend interface.
...
* 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-27 22:46:11 +00:00
Joseph Myers
1ed1641d71
Makefile.in (GCC_OBJS): Remove opts-common.o and options.o.
...
* Makefile.in (GCC_OBJS): Remove opts-common.o and options.o.
(OBJS): Remove options.o, opts-common.o and prefix.o.
(OBJS-libcommon-target): New.
(ALL_HOST_BACKEND_OBJS): Include $(OBJS-libcommon-target).
(BACKEND): Include libcommon-target.a.
(MOSTLYCLEANFILES): Include libcommon-target.a.
(libcommon-target.a): New.
(xgcc$(exeext), cpp$(exeext)): Use libcommon-target.a instead of
prefix.o.
ada:
* gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
$(EXTRA_GNAT1_OBJS).
(GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
(EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
(gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
* gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
libcommon-target.a instead of prefix.o.
cp:
* Make-lang.in (GXX_OBJS): Remove prefix.o.
(g++$(exeext)): Use libcommon-target.a.
(CXX_C_OBJS): Remove prefix.o.
fortran:
* Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
(gfortran$(exeext)): Use libcommon-target.a.
go:
* Make-lang.in (GCCGO_OBJS): Remove prefix.o.
(gccgo$(exeext)): Use libcommon-target.a.
java:
* Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
of prefix.o.
From-SVN: r174109
2011-05-24 12:49:46 +01:00
Joseph Myers
2691e6d733
Makefile.in (LIBDEPS): Add libcommon.a.
...
* Makefile.in (LIBDEPS): Add libcommon.a.
(LIBS): Likewise.
(GCC_OBJS): Remove diagnostic.o, pretty-print.o and input.o.
(OBJS-common): Remove diagnostic.o, input.o, intl.o,
pretty-print.o and version.o.
(OBJS-libcommon): New.
(ALL_HOST_BACKEND_OBJS): Add $(OBJS-libcommon).
(BACKEND): Add libcommon.a.
(MOSTLYCLEANFILES): Likewise.
(libcommon.a): New.
(xgcc$(exeext)): Don't explicitly use version.o and intl.o.
(cpp$(exeext)): Likewise.
(COLLECT2_OBJS): Remove intl.o, version.o, diagnostic.o,
pretty-print.o and input.o.
(lto-wrapper$(exeext)): Don't explicitly use intl.o.
(lto-wrapper.o): Depend on $(DIAGNOSTIC_H).
(errors.o): Remove.
(mips-tfile): Don't explicitly use version.o.
(mips-tdump): Likewise.
(gcov.o): Depend on $(DIAGNOSTIC_H).
(gcov-dump.o): Depend on intl.h and $(DIAGNOSTIC_H).
(GCOV_OBJS): Remove intl.o, version.o and errors.o.
(GCOV_DUMP_OBJS): Remove version.o and errors.o.
* gcov-dump.c: Include intl.h and diagnostic.h.
(main): Initialize diagnostics.
* gcov.c: Include diagnostic.h.
(fnotice): Remove.
(main): Initialize diagnostics.
* lto-wrapper.c: Include diagnostic.h.
(main): Initialize diagnostics.
ada:
* gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove
version.o.
* gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
libcommon.a instead of version.o.
cp:
* Make-lang.in (GXX_OBJS): Remove intl.o and version.o.
fortran:
* Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
go:
* Make-lang.in (GCCGO_OBJS): Remove intl.o and version.o.
java:
* Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
version.o.
(JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
(JVGENMAIN_OBJS): Remove errors.o and intl.o.
(java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
* jcf-dump.c: Include diagnostic.h.
(main): Initialize diagnostics.
* jvgenmain.c: Include diagnostic.h.
(main): Initialize diagnostics.
From-SVN: r173958
2011-05-20 16:19:05 +01:00
Ian Lance Taylor
9ff56c9570
Update to current version of Go library.
...
From-SVN: r173931
2011-05-20 00:18:15 +00:00
Ian Lance Taylor
26793fb5fd
Fix bug with multiple results returning structs with invalid sizes.
...
* 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-13 22:34:56 +00:00
Ian Lance Taylor
acf9814605
Fix bug with taking address of a variable when address does not escape.
...
* go-gcc.cc (Gcc_backend::local_variable): Add is_address_taken
parameter.
(Gcc_backend::parameter_variable): Likewise.
From-SVN: r173712
2011-05-12 18:35:05 +00:00
Ian Lance Taylor
8da1c70b57
Permit new of a function type.
...
From-SVN: r173672
2011-05-11 19:56:39 +00:00
Ian Lance Taylor
2d8f63a164
Don't crash ranging over call to builtin function.
...
From-SVN: r173671
2011-05-11 19:39:21 +00:00
Eric Botcazou
c99c002630
langhooks.h (lang_hooks_for_types): Change global_bindings_p's return type to bool and adjust comment.
...
2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
* langhooks.h (lang_hooks_for_types): Change global_bindings_p's return
type to bool and adjust comment.
* fold-const.c (fold_range_test): Adjust call to global_bindings_p.
(fold_mathfn_compare): Remove calls to global_bindings_p.
(fold_inf_compare): Likewise.
* stor-layout.c (variable_size): Adjust call to global_bindings_p.
* c-tree.h (global_bindings_p): Adjust prototype.
* c-decl.c (global_bindings_p): Return bool and simplify.
ada/
* gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
* gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
cp/
* name-lookup.h (global_bindings_p): Adjust prototype.
* name-lookup.c (global_bindings_p): Return bool.
fortran/
* f95-lang.c (global_bindings_p): Return bool and simplify.
go/
* go-lang.c (global_bindings_p): Return bool and simplify.
java/
* java-tree.h (global_bindings_p): Adjust prototype.
* decl.c (global_bindings_p): Return bool.
lto/
* lto-lang.c (global_bindings_p): Return bool.
From-SVN: r173535
2011-05-07 19:58:29 +00:00
Ian Lance Taylor
5b735706d7
Use backend types for all type conversions.
...
From-SVN: r173520
2011-05-07 00:12:32 +00:00
Ian Lance Taylor
4e7e7a49b7
More uses of backend interface for types.
...
From-SVN: r173507
2011-05-06 20:06:29 +00:00
Ian Lance Taylor
1f94e0c6f7
Use backend interface for string types.
...
From-SVN: r173502
2011-05-06 18:30:11 +00:00
Ian Lance Taylor
da9e0b98ac
Use backend interface for interface types.
...
From-SVN: r173469
2011-05-06 06:34:27 +00:00
Nathan Froyd
3d528853ba
generalize build_case_label to the rest of the compiler
...
generalize build_case_label to the rest of the compiler
gcc/ada/
* gcc-interface/trans.c (Case_Statement_to_gnu): Call
build_case_label.
gcc/
* except.c (sjlj_emit_dispatch_table): Call build_case_label.
* gimplify.c (gimplify_switch_expr): Likewise.
* omp-low.c (expand_omp_sections): Likewise.
* tree-eh.c (lower_try_finally_switch): Likewise.
(lower_eh_dispatch): Likewise.
* tree.h (build_case_label): Declare.
* tree.c (build_case_label): Define.
gcc/c-family/
* c-common.c (c_add_case_label): Omit the loc argument to
build_case_label.
* c-common.h (build_case_label): Remove.
* c-semantics.c (build_case_label): Remove.
gcc/cp/
* decl.c (finish_case_label): Omit the loc argument to
build_case_label.
gcc/fortran/
* trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
* trans-io.c (add_case): Likewise.
* trans-stmt.c (gfc_trans_integer_select): Likewise.
(gfc_trans_character_select): Likewise.
gcc/go/
* go-gcc.cc (Gcc_backend::switch_statement): Call build_case_label.
gcc/java/
* expr.c (expand_java_switch): Call build_case_label.
(expand_java_add_case): Likewise.
From-SVN: r173467
2011-05-06 03:47:57 +00:00
Ian Lance Taylor
817b15caf0
Use backend interface for slice types.
...
From-SVN: r173415
2011-05-05 05:22:12 +00:00
Ian Lance Taylor
7fc2f86b5f
Use backend interface for named types and array types.
...
* 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-05-04 15:42:18 +00:00
Ian Lance Taylor
6d69c02ecb
Use backend interface for struct types.
...
* go-gcc.cc (Gcc_backend::struct_type): Implement.
From-SVN: r173004
2011-04-27 00:49:54 +00:00
Ian Lance Taylor
482829acf2
Use backend interface for function types.
...
Drop type_tree() functions for Float_type and Complex_type.
Don't define builtin functions until gogo is created.
* go-gcc.cc (Gcc_backend::error_type): Implement.
(Gcc_backend::string_type): Remove.
(Gcc_backend::function_type): Change signature and implement.
(Gcc_backend::struct_type): Change signature.
(Gcc_backend::slice_type, Gcc_backend::map_type): Remove.
(Gcc_backend::channel_type, Gcc_backend::interface_type): Remove.
(Gcc_backend::pointer_type): Check for error.
* Make-lang.in (go/types.o): Depend on go/gofrontend/backend.h.
From-SVN: r172932
2011-04-25 17:21:28 +00:00
Evan Shaw
0aa5e7f22a
Use backend interface for basic types
...
* go-gcc.c (class Gcc_tree): Make get_tree const.
(Gcc_backend::void_type): Implement.
(Gcc_backend::bool_type): Implement.
(Gcc_backend::integer_type): Implement.
(Gcc_backend::float_type): Implement.
(Gcc_backend::complex_type): New function.
(Gcc_backend::pointer_type): New function.
(Gcc_backend::make_type): New function.
(type_to_tree): New function.
From-SVN: r172931
2011-04-25 16:39:24 +00:00
Ian Lance Taylor
8c0d18659b
Define go_unreachable to replace gcc_unreachable.
...
From Evan Shaw.
From-SVN: r172882
2011-04-23 00:04:44 +00:00
Ian Lance Taylor
26409c5246
Define go_assert to replace gcc_assert
...
This is defined in go-system.h in the backend.
* go-system.h (go_assert, go_unreachable): Define.
From-SVN: r172846
2011-04-21 22:54:23 +00:00
Ian Lance Taylor
470f5b53a2
Use mpfr_prec_round, not real_convert, to constraint floats.
...
From-SVN: r172811
2011-04-21 05:55:22 +00:00
Ian Lance Taylor
8f88846854
statement.cc no longer includes gcc headers.
...
* go-system.h: Include "intl.h".
* Make-lang.in (GO_SYSTEM_H): Add intl.h.
(go/statements.o): Remove dependencies on intl.h $(TREE_H)
$(GIMPLE_H) convert.h tree-iterator.h $(TREE_FLOW_H) $(REAL_H).
From-SVN: r172743
2011-04-19 23:26:19 +00:00
Ian Lance Taylor
0c6caf5ab0
Change general statement method to always use backend interface.
...
From-SVN: r172740
2011-04-19 22:30:46 +00:00
Ian Lance Taylor
9131ad6747
Use backend interface for temporary variables.
...
* go-gcc.cc (Gcc_backend::temporary_variable): New function.
From-SVN: r172737
2011-04-19 21:52:41 +00:00
Ian Lance Taylor
5ad7db5fa3
Use backend interface for blocks.
...
* go-gcc.cc (class Bblock): Define.
(Gcc_backend::if_statement): Change then_block and else_block to
Bblock*.
(Gcc_backend::block): New function.
(Gcc_backend::block_add_statements): New function.
(Gcc_backend::block_statement): New function.
(tree_to_block, block_to_tree): New functions.
From-SVN: r172731
2011-04-19 18:20:05 +00:00
Ian Lance Taylor
e09ce6c5bc
Use backend interface for variables.
...
* go-gcc.cc: Include "go-c.h".
(class Bvariable): Define.
(Gcc_backend::init_statement): New function.
(Gcc_backend::global_variable): New function.
(Gcc_backend::global_variable_set_init): New function.
(Gcc_backend::local_variable): New function.
(Gcc_backend::parameter_variable): New function.
(tree_to_type, var_to_tree): New functions.
* Make-lang.in (go/go-gcc.o): Depend on $(GO_C_H).
* (go/gogo-tree.o): Depend on go/gofrontend/backend.h.
From-SVN: r172693
2011-04-19 04:23:00 +00:00
Ian Lance Taylor
00b44a6e1e
Add compound_list to backend interface.
...
* go-gcc.cc (Gcc_backend::compound_statement): New function.
(Gcc_backend::assignment_statement): Use error_statement.
(Gcc_backend::return_statement): Likewise.
(Gcc_backend::if_statement): Likewise.
(Gcc_backend::switch_statement): Likewise.
(Gcc_backend::statement_list): Likewise.
From-SVN: r172521
2011-04-15 21:18:58 +00:00
Ian Lance Taylor
a6de01a6dd
Use backend interface for send statement.
...
From-SVN: r172519
2011-04-15 20:53:04 +00:00
Ian Lance Taylor
f54d331e46
Use the backend interface for select statements.
...
From-SVN: r172468
2011-04-15 04:10:08 +00:00
Ian Lance Taylor
8dc421e035
Use backend interface for go and defer statements.
...
Change defer stack from tree to Expression.
From-SVN: r172402
2011-04-13 23:21:21 +00:00
Ian Lance Taylor
b39c10b813
Unify handling of runtime support functions.
...
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.
From-SVN: r172396
2011-04-13 21:00:59 +00:00
Nathan Froyd
81f653d624
ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN.
...
gcc/ada/
* gcc-interface/ada-tree.h (union lang_tree_node): Check for
TS_COMMON before calling TREE_CHAIN.
* gcc-interface/misc.c (gnat_init_ts): New function.
(LANG_HOOKS_INIT_TS): Define.
gcc/
* c-decl.c (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
* print-tree.c (print_node): Likewise.
* tree-inline.c (copy_tree_r): Likewise.
* c-lang.c (LANG_HOOKS_INIT_TS): Define.
* lto-streamer-in.c (lto_input_tree_pointers): Check for TS_TYPED
instead of TS_COMMON.
* lto-streamer-out.c (lto_output_tree_pointers): Likewise.
* tree.c (initialize_tree_contains_struct): Handle TS_TYPED.
(copy_node_stat): Zero TREE_CHAIN only if necessary.
(MARK_TS_BASE, MARK_TS_TYPED, MARK_TS_COMMON): Move these...
(MARK_TS_DECL_COMMON, MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL):
...and these...
(MARK_TS_DECL_WITH_VIS, MARK_TS_DECL_NON_COMMON): ...and these...
* tree.h: ...here.
(TREE_CHAIN): Check for a TS_COMMON structure.
(TREE_TYPE): Check for a TS_TYPED structure.
gcc/c-family/
* c-common.h (c_common_init_ts): Declare.
* c-common.c (c_common_init_ts): Define.
gcc/cp/
* cp-lang.c (cp_init_ts): Call cp_common_init_ts. Move
tree_contains_struct initialization to...
* cp-objcp-common.c (cp_common_init_ts): ...here. Use MARK_*
macros.
* cp-objcp-common.h (cp_common_init_ts): Declare.
* cp-tree.h (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
gcc/fortran/
* f95-lang.c (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
gcc/go/
* go-lang.c (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
gcc/java/
* java-tree.h (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
gcc/lto/
* lto-tree.h (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
* lto.c (lto_fixup_common): Likewise.
gcc/objc/
* objc-lang.c (objc_init_ts): Move code for this function...
* objc-act.c (objc_common_init_ts): ...here. Define.
* objc-act.h (objc_common_init_ts): Declare.
gcc/objcp/
* objcp-lang.c (objcxx_init_ts): Call objc_common_init_ts and
cp_common_init_ts.
From-SVN: r172359
2011-04-13 03:09:53 +00:00
Ian Lance Taylor
d94faf0d7d
Call cgraph_get_node rather than cgraph_node.
...
This is for a recent change to the gcc middle-end.
From-SVN: r172335
2011-04-12 18:51:12 +00:00
Ian Lance Taylor
8d0b03a22d
Use backend interface for constant switch statements.
...
* go-gcc.cc (if_statement): Use build3_loc.
(Gcc_backend::switch_statement): New function.
(Gcc_backend::statement_list): New function.
From-SVN: r172066
2011-04-06 23:07:13 +00:00
Ian Lance Taylor
db0adf8230
Use backend interface for if statements.
...
Rename some temporary conversion functions to shorter names.
* go-gcc.cc (Gcc_backend::if_statement): New function.
(tree_to_stat): New function.
(expr_to_tree): Renamed from expression_to_tree.
(stat_to_tree): Renamed from statement_to_tree.
From-SVN: r172052
2011-04-06 15:46:53 +00:00
Ian Lance Taylor
cfebcf30ea
Use backend interface for expression statements.
...
* go-gcc.cc (Gcc_backend::expression_statement): New function.
From-SVN: r172051
2011-04-06 15:30:20 +00:00
Ian Lance Taylor
d56e667993
Use backend interface for labels and goto statements.
...
* go-gcc.c (class Blabel): Define.
(Gcc_backend::make_expression): New function.
(get_identifier_from_string): New function.
(Gcc_backend::label): New function.
(Gcc_backend::label_definition_statement): New function.
(Gcc_backend::goto_statement): New function.
(Gcc_backend::label_address): New function.
(expression_to_tree): New function.
* Make-lang.in (go/expressions.o): Depend on
go/gofrontend/backend.h.
(go/gogo.o): Likewise.
From-SVN: r171968
2011-04-05 05:57:39 +00:00
Ian Lance Taylor
9403944776
Use backend interface for return statements.
...
* go-gcc.cc: #include "tree-iterator.h", "gimple.h", and "gogo.h".
(class Bfunction): Define.
(Gcc_backend::assignment_statement): Rename from assignment.
Check for errors.
(Gcc_backend::return_statement): New function.
(tree_to_function): New function.
* Make-lang.in (go/go-gcc.o): Depend on tree-iterator.h,
$(GIMPLE_H), and $(GO_GOGO_H).
From-SVN: r171959
2011-04-04 23:19:09 +00:00
Ian Lance Taylor
a9ac13f7bf
Start using backend interface separate from gofrontend.
...
* go-gcc.cc: New file.
* Make-lang.in (GO_OBJS): Add go/go-gcc.o.
(go/go-gcc.o): New target.
(go/go.o): Depend on go/gofrontend/backend.h.
(go/statements.o): Likewise.
From-SVN: r171917
2011-04-03 22:44:18 +00:00
Ian Lance Taylor
9ebd2806f6
Taking a slice of an array requires moving the array to the heap.
...
From-SVN: r171792
2011-03-31 16:47:17 +00:00
Ian Lance Taylor
df740f400a
Fix select setting a map expression.
...
Also fix select parsing when declaring a variable with no
statements.
From-SVN: r171690
2011-03-29 18:54:27 +00:00
Ian Lance Taylor
e867454908
Permit copying hidden fields when passing method receiver.
...
From-SVN: r171641
2011-03-28 23:54:33 +00:00
Ian Lance Taylor
b9da60aea6
Better error message for invalid variable name in switch statement.
...
From-SVN: r171639
2011-03-28 23:13:04 +00:00
Ian Lance Taylor
0753192b5b
Better error message for missing condition in if statement.
...
From-SVN: r171638
2011-03-28 22:58:49 +00:00
Ian Lance Taylor
117614a257
Better error message for old syntax of send expression as value.
...
From-SVN: r171637
2011-03-28 22:49:09 +00:00
Ian Lance Taylor
f9fc495911
Better error messages for missing channel element type.
...
From-SVN: r171634
2011-03-28 21:50:53 +00:00
Ian Lance Taylor
e45f44f3cf
Do not permit method expressions with pointers to interface types.
...
From-SVN: r171633
2011-03-28 21:35:46 +00:00
Ian Lance Taylor
8060754453
Support method expressions for interface types.
...
From-SVN: r171631
2011-03-28 21:22:08 +00:00
Ian Lance Taylor
0b3e0e9ef1
Don't bother to check for duplicate interface/named methods.
...
A named interface type can't have named methods anyhow.
From-SVN: r171630
2011-03-28 21:20:10 +00:00
Ian Lance Taylor
12e0ac3601
Fix useless assertion in ^ code.
...
From-SVN: r171619
2011-03-28 18:08:50 +00:00
Ian Lance Taylor
4e90195a62
Error for return with no values when result parameters are not named.
...
From-SVN: r171576
2011-03-27 17:52:34 +00:00
Ian Lance Taylor
15ea09a082
Improve error about indirecting an unsafe.Pointer type.
...
From-SVN: r171574
2011-03-27 16:40:24 +00:00
Ian Lance Taylor
08b4fa8a7b
Don't look up methods for pointer to interface.
...
From-SVN: r171562
2011-03-26 19:04:54 +00:00
Ian Lance Taylor
f7b8b261e7
Don't permit embedded field to be pointer to interface.
...
From-SVN: r171558
2011-03-26 18:31:36 +00:00
Ian Lance Taylor
530f4f437a
Check for invalid uses of ... in builtin function calls.
...
From-SVN: r171544
2011-03-26 06:06:36 +00:00
Ian Lance Taylor
2fbb4d751b
Better error when setting const to nil.
...
From-SVN: r171541
2011-03-26 05:45:31 +00:00
Ian Lance Taylor
e2e5c70f5c
Correctly parse select case <-c <- v.
...
From-SVN: r171540
2011-03-26 05:32:46 +00:00
Ian Lance Taylor
02ed921acb
Clean up handling of undefined types.
...
From-SVN: r171528
2011-03-25 20:42:20 +00:00
Ian Lance Taylor
7657ab90b4
Avoid overflow error after negative shift count error.
...
From-SVN: r171523
2011-03-25 19:23:10 +00:00
Ian Lance Taylor
fb4347e44d
Give an error if a label is defined but not used.
...
From-SVN: r171518
2011-03-25 17:34:44 +00:00
Ian Lance Taylor
fe052134f6
Remove closed function. Fix tuple receive in select.
...
From-SVN: r171440
2011-03-25 05:14:57 +00:00
Ian Lance Taylor
3137991dfc
Tuple receives indicate whether channel is closed.
...
From-SVN: r171380
2011-03-24 06:01:27 +00:00
Ian Lance Taylor
fd68e6ba72
Condition in if statement is not optional.
...
From-SVN: r171377
2011-03-24 00:40:21 +00:00
Ian Lance Taylor
27a19c5847
Change c <- v from an expression to a statement.
...
Don't do anything special if we don't use the value of <-c.
Fix sending an untyped constant in a select statement.
From-SVN: r171371
2011-03-24 00:01:44 +00:00
Ian Lance Taylor
5133f00ef8
Update to current version of Go library (revision 94d654be2064).
...
From-SVN: r171076
2011-03-16 23:05:44 +00:00
Ian Lance Taylor
c7e529d3bc
Support multiple init functions in a single file.
...
From-SVN: r170756
2011-03-07 21:38:46 +00:00
Ian Lance Taylor
b4ed59860a
Fix second import of package using _.
...
From-SVN: r170755
2011-03-07 21:29:46 +00:00
Ian Lance Taylor
6481a43b01
Handle predeclared names used as fields in struct composite literals.
...
From-SVN: r170754
2011-03-07 21:22:35 +00:00
Ian Lance Taylor
f7a10f0d78
Don't crash if erroneous type was not converted.
...
From-SVN: r170646
2011-03-03 06:50:32 +00:00
Ian Lance Taylor
e2e280a3e5
Don't crash on large composite literal array index.
...
From-SVN: r170645
2011-03-03 06:40:50 +00:00
Ian Lance Taylor
5a34af783a
Don't crash calling make with NaN or Infinity.
...
From-SVN: r170644
2011-03-03 06:18:55 +00:00
Ian Lance Taylor
eba4ad892b
Make sure variable type is determined when var initialized to var.
...
From-SVN: r170643
2011-03-03 04:28:25 +00:00
Ian Lance Taylor
ba6413bd18
Don't crash getting type descriptor of abstract types.
...
From-SVN: r170642
2011-03-03 04:25:47 +00:00
Ian Lance Taylor
d5a7f1a768
Don't look for methods on named pointer types.
...
From-SVN: r170640
2011-03-03 03:31:17 +00:00
Ian Lance Taylor
20532210cd
Determine call types even if first call result is not used.
...
From-SVN: r170637
2011-03-03 02:08:28 +00:00
Ian Lance Taylor
4bb9014024
Don't crash declaring a function named "_".
...
From-SVN: r170636
2011-03-03 01:48:28 +00:00
Ian Lance Taylor
86620d2d5f
Don't crash on erroneous void initializer in temporary statement.
...
From-SVN: r170635
2011-03-03 01:39:25 +00:00
Ian Lance Taylor
deed202085
Fix type of discarded send expression.
...
From-SVN: r170634
2011-03-03 01:17:34 +00:00
Ian Lance Taylor
b5ba6ad2d6
Don't crash on erroneous named result.
...
From-SVN: r170633
2011-03-03 00:54:42 +00:00
Ian Lance Taylor
8ca93ccfd2
Don't crash if a constant has a declared but undefined type.
...
From-SVN: r170632
2011-03-03 00:42:10 +00:00
Ian Lance Taylor
91349ecb12
Rewrite conversion of named types to backend representation.
...
From-SVN: r170627
2011-03-03 00:15:16 +00:00
Ian Lance Taylor
6dfef9cca7
Move ChangeLog entry to correct ChangeLog file.
...
From-SVN: r170577
2011-02-28 23:01:18 +00:00
Ian Lance Taylor
01bd5703f5
Don't delete old arguments when lowering varargs.
...
From-SVN: r170474
2011-02-24 15:42:55 +00:00
Ian Lance Taylor
0cba839e42
Traverse erroneous send/receive statements.
...
From-SVN: r170473
2011-02-24 15:18:35 +00:00
Ian Lance Taylor
bf6526a053
Don't crash when using receive on erroneous channel.
...
From-SVN: r170468
2011-02-24 13:58:51 +00:00
Ian Lance Taylor
e7f160c41d
Set type of array length expressions.
...
From-SVN: r170460
2011-02-24 05:08:26 +00:00
Ian Lance Taylor
cd34c84360
Avoid infinite loop in field_reference.
...
From-SVN: r170457
2011-02-24 04:30:34 +00:00
Ian Lance Taylor
acabc10c98
Don't crash on type switch of untyped value.
...
From-SVN: r170456
2011-02-24 04:02:33 +00:00
Ian Lance Taylor
6540ddba79
Don't crash on type switch of nil.
...
From-SVN: r170455
2011-02-24 03:53:10 +00:00
Ian Lance Taylor
d6007535e6
Handle an array of pointers to itself.
...
From-SVN: r170454
2011-02-24 03:37:57 +00:00
Ian Lance Taylor
76ace672dc
Don't crash if a map index is used outside of a function.
...
From-SVN: r170453
2011-02-24 03:01:22 +00:00
Ian Lance Taylor
63cc9deb7c
Don't crash on bad receiver when building recover thunks.
...
From-SVN: r170452
2011-02-24 02:51:00 +00:00
Ian Lance Taylor
1b4d46a696
Don't crash if a result variable redefines a parameter.
...
From-SVN: r170451
2011-02-24 02:43:21 +00:00
Ian Lance Taylor
ff72e86dfd
Don't crash looking for methods of pointer to error type.
...
From-SVN: r170431
2011-02-23 05:53:37 +00:00
Ian Lance Taylor
f315816c37
Don't crash on Sizeof of bad type.
...
From-SVN: r170430
2011-02-23 05:10:05 +00:00
Ian Lance Taylor
6d61c69874
Don't crash on erroneous type descriptor in interface conversion.
...
From-SVN: r170429
2011-02-23 05:02:40 +00:00