This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Remove cleanups from Rust parser
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Sat, 05 Aug 2017 14:06:59 -0400
- Subject: [binutils-gdb] Remove cleanups from Rust parser
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 3232fabd2d0094d74bd942a1f2c5c284b0cd9260 ***
Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 3232fabd2d0094d74bd942a1f2c5c284b0cd9260
Remove cleanups from Rust parser
This removes the few remaining cleanups in the Rust language code.
The main difficulty here was that the earlier code allocated VEC heads
on an obstack. The new code instead introduces an object that
allocates and maintains the storage for whatever vectors are needed
during the parse.
Regression tested on the buildbot.
ChangeLog
2017-08-05 Tom Tromey <tom@tromey.com>
* rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
(rust_op_vector, rust_set_vector): New typedefs.
(current_parser): New global.
(work_obstack): Change to pointer type. Update all users.
(rust_ast, pstate): Remove globals.
(struct rust_parser): New.
(%union) <params, field_inits>: Change type.
(start, tuple_expr, unit_expr, struct_expr_list, literal)
(field_expr, expr_list, maybe_expr_list, type_list): Update.
(ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
(convert_params_to_types, convert_params_to_expression): Change
type of "params".
(ast_string): Change type of "fields".
(rust_parse): Make a rust_parser. Remove cleanups.
(rust_lex_tests): Make and install an auto_obstack.