Rename OP_F90_RANGE to OP_RANGE.

This renames OP_F90_RANGE to OP_RANGE, and similarly renames the
f90_range_type enum.

2016-05-17  Tom Tromey  <tom@tromey.com>

	* std-operator.def (OP_RANGE): Rename from OP_F90_RANGE.
	* rust-lang.c: Don't include f-lang.h.
	(rust_range, rust_compute_range, rust_subscript)
	(rust_evaluate_subexp): Update.
	* rust-exp.y: Don't include f-lang.h.
	(ast_range, convert_ast_to_expression): Update.
	* parse.c (operator_length_standard): Update.
	* f-lang.h (enum f90_range_type): Move to expression.h.
	* f-exp.y: Use OP_RANGE.
	* expression.h (enum range_type): New enum; renamed from
	f90_range_type.
	* expprint.c: Don't include f-lang.h.
	(print_subexp_standard, dump_subexp_body_standard): Use OP_RANGE.
	* eval.c (value_f90_subarray, evaluate_subexp_standard): Update.
This commit is contained in:
Tom Tromey
2016-04-27 10:28:56 -06:00
parent 0bdfa368bc
commit 01739a3b6a
10 changed files with 65 additions and 50 deletions

View File

@ -25,7 +25,6 @@
#include "c-lang.h"
#include "charset.h"
#include "cp-support.h"
#include "f-lang.h"
#include "gdbarch.h"
#include "infcall.h"
#include "objfiles.h"
@ -1172,12 +1171,12 @@ rust_evaluate_funcall (struct expression *exp, int *pos, enum noside noside)
return result;
}
/* A helper for rust_evaluate_subexp that handles OP_F90_RANGE. */
/* A helper for rust_evaluate_subexp that handles OP_RANGE. */
static struct value *
rust_range (struct expression *exp, int *pos, enum noside noside)
{
enum f90_range_type kind;
enum range_type kind;
struct value *low = NULL, *high = NULL;
struct value *addrval, *result;
CORE_ADDR addr;
@ -1186,7 +1185,7 @@ rust_range (struct expression *exp, int *pos, enum noside noside)
struct type *temp_type;
const char *name;
kind = (enum f90_range_type) longest_to_int (exp->elts[*pos + 1].longconst);
kind = (enum range_type) longest_to_int (exp->elts[*pos + 1].longconst);
*pos += 3;
if (kind == HIGH_BOUND_DEFAULT || kind == NONE_BOUND_DEFAULT)
@ -1274,7 +1273,7 @@ rust_range (struct expression *exp, int *pos, enum noside noside)
static void
rust_compute_range (struct type *type, struct value *range,
LONGEST *low, LONGEST *high,
enum f90_range_type *kind)
enum range_type *kind)
{
int i;
@ -1311,7 +1310,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
struct type *rhstype;
LONGEST low, high, high_bound;
/* Initialized to appease the compiler. */
enum f90_range_type kind = BOTH_BOUND_DEFAULT;
enum range_type kind = BOTH_BOUND_DEFAULT;
int want_slice = 0;
++*pos;
@ -1699,7 +1698,7 @@ which has only anonymous fields"),
}
break;
case OP_F90_RANGE:
case OP_RANGE:
result = rust_range (exp, pos, noside);
break;