return ret;
}
+ case OP_VAR_ENTRY_VALUE:
+ (*pos) += 2;
+ if (noside == EVAL_SKIP)
+ goto nosideret;
+
+ {
+ struct symbol *sym = exp->elts[pc + 1].symbol;
+ struct frame_info *frame;
+
+ if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ return value_zero (SYMBOL_TYPE (sym), not_lval);
+
+ if (SYMBOL_CLASS (sym) != LOC_COMPUTED
+ || SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry == NULL)
+ error (_("Symbol \"%s\" does not have any specific entry value"),
+ SYMBOL_PRINT_NAME (sym));
+
+ frame = get_selected_frame (NULL);
+ return SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry (sym, frame);
+ }
+
case OP_LAST:
(*pos) += 2;
return
func_name = (char *) alloca (name_len + 1);
strcpy (func_name, &exp->elts[string_pc + 1].string);
- /* Prepare list of argument types for overload resolution. */
- arg_types = (struct type **)
- alloca (nargs * (sizeof (struct type *)));
- for (ix = 1; ix <= nargs; ix++)
- arg_types[ix - 1] = value_type (argvec[ix]);
-
- find_overload_match (arg_types, nargs, func_name,
+ find_overload_match (&argvec[1], nargs, func_name,
NON_METHOD, /* not method */
0, /* strict match */
NULL, NULL, /* pass NULL symbol since
evaluation. */
struct value *valp = NULL;
- /* Prepare list of argument types for overload resolution. */
- arg_types = (struct type **)
- alloca (nargs * (sizeof (struct type *)));
- for (ix = 1; ix <= nargs; ix++)
- arg_types[ix - 1] = value_type (argvec[ix]);
-
- (void) find_overload_match (arg_types, nargs, tstr,
+ (void) find_overload_match (&argvec[1], nargs, tstr,
METHOD, /* method */
0, /* strict match */
&arg2, /* the object */
if (op == OP_VAR_VALUE)
function = exp->elts[save_pos1+2].symbol;
- /* Prepare list of argument types for overload resolution. */
- arg_types = (struct type **)
- alloca (nargs * (sizeof (struct type *)));
- for (ix = 1; ix <= nargs; ix++)
- arg_types[ix - 1] = value_type (argvec[ix]);
-
- (void) find_overload_match (arg_types, nargs,
+ (void) find_overload_match (&argvec[1], nargs,
NULL, /* no need for name */
NON_METHOD, /* not method */
0, /* strict match */
{
struct value *v_one, *retval;
- v_one = value_one (value_type (arg2), not_lval);
+ v_one = value_one (value_type (arg2));
binop_promote (exp->language_defn, exp->gdbarch, &arg1, &v_one);
retval = value_binop (arg1, v_one, op);
return retval;
{
struct value *tmp = arg1;
- arg2 = value_one (value_type (arg1), not_lval);
+ arg2 = value_one (value_type (arg1));
binop_promote (exp->language_defn, exp->gdbarch, &tmp, &arg2);
arg2 = value_binop (tmp, arg2, BINOP_ADD);
}
{
struct value *tmp = arg1;
- arg2 = value_one (value_type (arg1), not_lval);
+ arg2 = value_one (value_type (arg1));
binop_promote (exp->language_defn, exp->gdbarch, &tmp, &arg2);
arg2 = value_binop (tmp, arg2, BINOP_SUB);
}
{
struct value *tmp = arg1;
- arg2 = value_one (value_type (arg1), not_lval);
+ arg2 = value_one (value_type (arg1));
binop_promote (exp->language_defn, exp->gdbarch, &tmp, &arg2);
arg2 = value_binop (tmp, arg2, BINOP_ADD);
}
{
struct value *tmp = arg1;
- arg2 = value_one (value_type (arg1), not_lval);
+ arg2 = value_one (value_type (arg1));
binop_promote (exp->language_defn, exp->gdbarch, &tmp, &arg2);
arg2 = value_binop (tmp, arg2, BINOP_SUB);
}
case OP_THIS:
(*pos) += 1;
- return value_of_local (exp->language_defn->la_name_of_this, 1);
+ return value_of_this (exp->language_defn);
case OP_TYPE:
/* The value is not supposed to be used. This is here to make it