1 // OBSOLETE /* Chill language support routines for GDB, the GNU debugger.
2 // OBSOLETE Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002
3 // OBSOLETE Free Software Foundation, Inc.
5 // OBSOLETE This file is part of GDB.
7 // OBSOLETE This program is free software; you can redistribute it and/or modify
8 // OBSOLETE it under the terms of the GNU General Public License as published by
9 // OBSOLETE the Free Software Foundation; either version 2 of the License, or
10 // OBSOLETE (at your option) any later version.
12 // OBSOLETE This program is distributed in the hope that it will be useful,
13 // OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // OBSOLETE GNU General Public License for more details.
17 // OBSOLETE You should have received a copy of the GNU General Public License
18 // OBSOLETE along with this program; if not, write to the Free Software
19 // OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
20 // OBSOLETE Boston, MA 02111-1307, USA. */
22 // OBSOLETE #include "defs.h"
23 // OBSOLETE #include "symtab.h"
24 // OBSOLETE #include "gdbtypes.h"
25 // OBSOLETE #include "value.h"
26 // OBSOLETE #include "expression.h"
27 // OBSOLETE #include "parser-defs.h"
28 // OBSOLETE #include "language.h"
29 // OBSOLETE #include "ch-lang.h"
30 // OBSOLETE #include "valprint.h"
32 // OBSOLETE extern void _initialize_chill_language (void);
34 // OBSOLETE static struct value *evaluate_subexp_chill (struct type *, struct expression *,
35 // OBSOLETE int *, enum noside);
37 // OBSOLETE static struct value *value_chill_max_min (enum exp_opcode, struct value *);
39 // OBSOLETE static struct value *value_chill_card (struct value *);
41 // OBSOLETE static struct value *value_chill_length (struct value *);
43 // OBSOLETE static struct type *chill_create_fundamental_type (struct objfile *, int);
45 // OBSOLETE static void chill_printstr (struct ui_file * stream, char *string,
46 // OBSOLETE unsigned int length, int width,
47 // OBSOLETE int force_ellipses);
49 // OBSOLETE static void chill_printchar (int, struct ui_file *);
51 // OBSOLETE /* For now, Chill uses a simple mangling algorithm whereby you simply
52 // OBSOLETE discard everything after the occurance of two successive CPLUS_MARKER
53 // OBSOLETE characters to derive the demangled form. */
56 // OBSOLETE chill_demangle (const char *mangled)
58 // OBSOLETE const char *joiner = NULL;
59 // OBSOLETE char *demangled;
60 // OBSOLETE const char *cp = mangled;
62 // OBSOLETE while (*cp)
64 // OBSOLETE if (is_cplus_marker (*cp))
66 // OBSOLETE joiner = cp;
71 // OBSOLETE if (joiner != NULL && *(joiner + 1) == *joiner)
73 // OBSOLETE demangled = savestring (mangled, joiner - mangled);
77 // OBSOLETE demangled = NULL;
79 // OBSOLETE return (demangled);
82 // OBSOLETE static void
83 // OBSOLETE chill_printchar (register int c, struct ui_file *stream)
85 // OBSOLETE c &= 0xFF; /* Avoid sign bit follies */
87 // OBSOLETE if (PRINT_LITERAL_FORM (c))
89 // OBSOLETE if (c == '\'' || c == '^')
90 // OBSOLETE fprintf_filtered (stream, "'%c%c'", c, c);
92 // OBSOLETE fprintf_filtered (stream, "'%c'", c);
96 // OBSOLETE fprintf_filtered (stream, "'^(%u)'", (unsigned int) c);
100 // OBSOLETE /* Print the character string STRING, printing at most LENGTH characters.
101 // OBSOLETE Printing stops early if the number hits print_max; repeat counts
102 // OBSOLETE are printed as appropriate. Print ellipses at the end if we
103 // OBSOLETE had to stop before printing LENGTH characters, or if FORCE_ELLIPSES.
104 // OBSOLETE Note that gdb maintains the length of strings without counting the
105 // OBSOLETE terminating null byte, while chill strings are typically written with
106 // OBSOLETE an explicit null byte. So we always assume an implied null byte
107 // OBSOLETE until gdb is able to maintain non-null terminated strings as well
108 // OBSOLETE as null terminated strings (FIXME).
111 // OBSOLETE static void
112 // OBSOLETE chill_printstr (struct ui_file *stream, char *string, unsigned int length,
113 // OBSOLETE int width, int force_ellipses)
115 // OBSOLETE register unsigned int i;
116 // OBSOLETE unsigned int things_printed = 0;
117 // OBSOLETE int in_literal_form = 0;
118 // OBSOLETE int in_control_form = 0;
119 // OBSOLETE int need_slashslash = 0;
120 // OBSOLETE unsigned int c;
122 // OBSOLETE if (length == 0)
124 // OBSOLETE fputs_filtered ("\"\"", stream);
128 // OBSOLETE for (i = 0; i < length && things_printed < print_max; ++i)
130 // OBSOLETE /* Position of the character we are examining
131 // OBSOLETE to see whether it is repeated. */
132 // OBSOLETE unsigned int rep1;
133 // OBSOLETE /* Number of repetitions we have detected so far. */
134 // OBSOLETE unsigned int reps;
138 // OBSOLETE if (need_slashslash)
140 // OBSOLETE fputs_filtered ("//", stream);
141 // OBSOLETE need_slashslash = 0;
144 // OBSOLETE rep1 = i + 1;
145 // OBSOLETE reps = 1;
146 // OBSOLETE while (rep1 < length && string[rep1] == string[i])
152 // OBSOLETE c = string[i];
153 // OBSOLETE if (reps > repeat_count_threshold)
155 // OBSOLETE if (in_control_form || in_literal_form)
157 // OBSOLETE if (in_control_form)
158 // OBSOLETE fputs_filtered (")", stream);
159 // OBSOLETE fputs_filtered ("\"//", stream);
160 // OBSOLETE in_control_form = in_literal_form = 0;
162 // OBSOLETE chill_printchar (c, stream);
163 // OBSOLETE fprintf_filtered (stream, "<repeats %u times>", reps);
164 // OBSOLETE i = rep1 - 1;
165 // OBSOLETE things_printed += repeat_count_threshold;
166 // OBSOLETE need_slashslash = 1;
170 // OBSOLETE if (!in_literal_form && !in_control_form)
171 // OBSOLETE fputs_filtered ("\"", stream);
172 // OBSOLETE if (PRINT_LITERAL_FORM (c))
174 // OBSOLETE if (!in_literal_form)
176 // OBSOLETE if (in_control_form)
178 // OBSOLETE fputs_filtered (")", stream);
179 // OBSOLETE in_control_form = 0;
181 // OBSOLETE in_literal_form = 1;
183 // OBSOLETE fprintf_filtered (stream, "%c", c);
184 // OBSOLETE if (c == '"' || c == '^')
185 // OBSOLETE /* duplicate this one as must be done at input */
186 // OBSOLETE fprintf_filtered (stream, "%c", c);
190 // OBSOLETE if (!in_control_form)
192 // OBSOLETE if (in_literal_form)
194 // OBSOLETE in_literal_form = 0;
196 // OBSOLETE fputs_filtered ("^(", stream);
197 // OBSOLETE in_control_form = 1;
200 // OBSOLETE fprintf_filtered (stream, ",");
201 // OBSOLETE c = c & 0xff;
202 // OBSOLETE fprintf_filtered (stream, "%u", (unsigned int) c);
204 // OBSOLETE ++things_printed;
208 // OBSOLETE /* Terminate the quotes if necessary. */
209 // OBSOLETE if (in_control_form)
211 // OBSOLETE fputs_filtered (")", stream);
213 // OBSOLETE if (in_literal_form || in_control_form)
215 // OBSOLETE fputs_filtered ("\"", stream);
217 // OBSOLETE if (force_ellipses || (i < length))
219 // OBSOLETE fputs_filtered ("...", stream);
223 // OBSOLETE static struct type *
224 // OBSOLETE chill_create_fundamental_type (struct objfile *objfile, int typeid)
226 // OBSOLETE register struct type *type = NULL;
228 // OBSOLETE switch (typeid)
231 // OBSOLETE /* FIXME: For now, if we are asked to produce a type not in this
232 // OBSOLETE language, create the equivalent of a C integer type with the
233 // OBSOLETE name "<?type?>". When all the dust settles from the type
234 // OBSOLETE reconstruction work, this should probably become an error. */
235 // OBSOLETE type = init_type (TYPE_CODE_INT, 2, 0, "<?type?>", objfile);
236 // OBSOLETE warning ("internal error: no chill fundamental type %d", typeid);
238 // OBSOLETE case FT_VOID:
239 // OBSOLETE /* FIXME: Currently the GNU Chill compiler emits some DWARF entries for
240 // OBSOLETE typedefs, unrelated to anything directly in the code being compiled,
241 // OBSOLETE that have some FT_VOID types. Just fake it for now. */
242 // OBSOLETE type = init_type (TYPE_CODE_VOID, 0, 0, "<?VOID?>", objfile);
244 // OBSOLETE case FT_BOOLEAN:
245 // OBSOLETE type = init_type (TYPE_CODE_BOOL, 1, TYPE_FLAG_UNSIGNED, "BOOL", objfile);
247 // OBSOLETE case FT_CHAR:
248 // OBSOLETE type = init_type (TYPE_CODE_CHAR, 1, TYPE_FLAG_UNSIGNED, "CHAR", objfile);
250 // OBSOLETE case FT_SIGNED_CHAR:
251 // OBSOLETE type = init_type (TYPE_CODE_INT, 1, 0, "BYTE", objfile);
253 // OBSOLETE case FT_UNSIGNED_CHAR:
254 // OBSOLETE type = init_type (TYPE_CODE_INT, 1, TYPE_FLAG_UNSIGNED, "UBYTE", objfile);
256 // OBSOLETE case FT_SHORT: /* Chill ints are 2 bytes */
257 // OBSOLETE type = init_type (TYPE_CODE_INT, 2, 0, "INT", objfile);
259 // OBSOLETE case FT_UNSIGNED_SHORT: /* Chill ints are 2 bytes */
260 // OBSOLETE type = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED, "UINT", objfile);
262 // OBSOLETE case FT_INTEGER: /* FIXME? */
263 // OBSOLETE case FT_SIGNED_INTEGER: /* FIXME? */
264 // OBSOLETE case FT_LONG: /* Chill longs are 4 bytes */
265 // OBSOLETE case FT_SIGNED_LONG: /* Chill longs are 4 bytes */
266 // OBSOLETE type = init_type (TYPE_CODE_INT, 4, 0, "LONG", objfile);
268 // OBSOLETE case FT_UNSIGNED_INTEGER: /* FIXME? */
269 // OBSOLETE case FT_UNSIGNED_LONG: /* Chill longs are 4 bytes */
270 // OBSOLETE type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED, "ULONG", objfile);
272 // OBSOLETE case FT_FLOAT:
273 // OBSOLETE type = init_type (TYPE_CODE_FLT, 4, 0, "REAL", objfile);
275 // OBSOLETE case FT_DBL_PREC_FLOAT:
276 // OBSOLETE type = init_type (TYPE_CODE_FLT, 8, 0, "LONG_REAL", objfile);
279 // OBSOLETE return (type);
283 // OBSOLETE /* Table of operators and their precedences for printing expressions. */
285 // OBSOLETE static const struct op_print chill_op_print_tab[] =
287 // OBSOLETE {"AND", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
288 // OBSOLETE {"OR", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
289 // OBSOLETE {"NOT", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
290 // OBSOLETE {"MOD", BINOP_MOD, PREC_MUL, 0},
291 // OBSOLETE {"REM", BINOP_REM, PREC_MUL, 0},
292 // OBSOLETE {"SIZE", UNOP_SIZEOF, PREC_BUILTIN_FUNCTION, 0},
293 // OBSOLETE {"LOWER", UNOP_LOWER, PREC_BUILTIN_FUNCTION, 0},
294 // OBSOLETE {"UPPER", UNOP_UPPER, PREC_BUILTIN_FUNCTION, 0},
295 // OBSOLETE {"CARD", UNOP_CARD, PREC_BUILTIN_FUNCTION, 0},
296 // OBSOLETE {"MAX", UNOP_CHMAX, PREC_BUILTIN_FUNCTION, 0},
297 // OBSOLETE {"MIN", UNOP_CHMIN, PREC_BUILTIN_FUNCTION, 0},
298 // OBSOLETE {":=", BINOP_ASSIGN, PREC_ASSIGN, 1},
299 // OBSOLETE {"=", BINOP_EQUAL, PREC_EQUAL, 0},
300 // OBSOLETE {"/=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
301 // OBSOLETE {"<=", BINOP_LEQ, PREC_ORDER, 0},
302 // OBSOLETE {">=", BINOP_GEQ, PREC_ORDER, 0},
303 // OBSOLETE {">", BINOP_GTR, PREC_ORDER, 0},
304 // OBSOLETE {"<", BINOP_LESS, PREC_ORDER, 0},
305 // OBSOLETE {"+", BINOP_ADD, PREC_ADD, 0},
306 // OBSOLETE {"-", BINOP_SUB, PREC_ADD, 0},
307 // OBSOLETE {"*", BINOP_MUL, PREC_MUL, 0},
308 // OBSOLETE {"/", BINOP_DIV, PREC_MUL, 0},
309 // OBSOLETE {"//", BINOP_CONCAT, PREC_PREFIX, 0}, /* FIXME: precedence? */
310 // OBSOLETE {"-", UNOP_NEG, PREC_PREFIX, 0},
311 // OBSOLETE {"->", UNOP_IND, PREC_SUFFIX, 1},
312 // OBSOLETE {"->", UNOP_ADDR, PREC_PREFIX, 0},
313 // OBSOLETE {":", BINOP_RANGE, PREC_ASSIGN, 0},
314 // OBSOLETE {NULL, 0, 0, 0}
317 // OBSOLETE /* The built-in types of Chill. */
319 // OBSOLETE struct type *builtin_type_chill_bool;
320 // OBSOLETE struct type *builtin_type_chill_char;
321 // OBSOLETE struct type *builtin_type_chill_long;
322 // OBSOLETE struct type *builtin_type_chill_ulong;
323 // OBSOLETE struct type *builtin_type_chill_real;
325 // OBSOLETE struct type **const (chill_builtin_types[]) =
327 // OBSOLETE &builtin_type_chill_bool,
328 // OBSOLETE &builtin_type_chill_char,
329 // OBSOLETE &builtin_type_chill_long,
330 // OBSOLETE &builtin_type_chill_ulong,
331 // OBSOLETE &builtin_type_chill_real,
335 // OBSOLETE /* Calculate LOWER or UPPER of TYPE.
336 // OBSOLETE Returns the result as an integer.
337 // OBSOLETE *RESULT_TYPE is the appropriate type for the result. */
340 // OBSOLETE type_lower_upper (enum exp_opcode op, /* Either UNOP_LOWER or UNOP_UPPER */
341 // OBSOLETE struct type *type, struct type **result_type)
343 // OBSOLETE LONGEST low, high;
344 // OBSOLETE *result_type = type;
345 // OBSOLETE CHECK_TYPEDEF (type);
346 // OBSOLETE switch (TYPE_CODE (type))
348 // OBSOLETE case TYPE_CODE_STRUCT:
349 // OBSOLETE *result_type = builtin_type_int;
350 // OBSOLETE if (chill_varying_type (type))
351 // OBSOLETE return type_lower_upper (op, TYPE_FIELD_TYPE (type, 1), result_type);
353 // OBSOLETE case TYPE_CODE_ARRAY:
354 // OBSOLETE case TYPE_CODE_BITSTRING:
355 // OBSOLETE case TYPE_CODE_STRING:
356 // OBSOLETE type = TYPE_FIELD_TYPE (type, 0); /* Get index type */
358 // OBSOLETE /* ... fall through ... */
359 // OBSOLETE case TYPE_CODE_RANGE:
360 // OBSOLETE *result_type = TYPE_TARGET_TYPE (type);
361 // OBSOLETE return op == UNOP_LOWER ? TYPE_LOW_BOUND (type) : TYPE_HIGH_BOUND (type);
363 // OBSOLETE case TYPE_CODE_ENUM:
364 // OBSOLETE case TYPE_CODE_BOOL:
365 // OBSOLETE case TYPE_CODE_INT:
366 // OBSOLETE case TYPE_CODE_CHAR:
367 // OBSOLETE if (get_discrete_bounds (type, &low, &high) >= 0)
369 // OBSOLETE *result_type = type;
370 // OBSOLETE return op == UNOP_LOWER ? low : high;
373 // OBSOLETE case TYPE_CODE_UNDEF:
374 // OBSOLETE case TYPE_CODE_PTR:
375 // OBSOLETE case TYPE_CODE_UNION:
376 // OBSOLETE case TYPE_CODE_FUNC:
377 // OBSOLETE case TYPE_CODE_FLT:
378 // OBSOLETE case TYPE_CODE_VOID:
379 // OBSOLETE case TYPE_CODE_SET:
380 // OBSOLETE case TYPE_CODE_ERROR:
381 // OBSOLETE case TYPE_CODE_MEMBER:
382 // OBSOLETE case TYPE_CODE_METHOD:
383 // OBSOLETE case TYPE_CODE_REF:
384 // OBSOLETE case TYPE_CODE_COMPLEX:
388 // OBSOLETE error ("unknown mode for LOWER/UPPER builtin");
391 // OBSOLETE static struct value *
392 // OBSOLETE value_chill_length (struct value *val)
394 // OBSOLETE LONGEST tmp;
395 // OBSOLETE struct type *type = VALUE_TYPE (val);
396 // OBSOLETE struct type *ttype;
397 // OBSOLETE CHECK_TYPEDEF (type);
398 // OBSOLETE switch (TYPE_CODE (type))
400 // OBSOLETE case TYPE_CODE_ARRAY:
401 // OBSOLETE case TYPE_CODE_BITSTRING:
402 // OBSOLETE case TYPE_CODE_STRING:
403 // OBSOLETE tmp = type_lower_upper (UNOP_UPPER, type, &ttype)
404 // OBSOLETE - type_lower_upper (UNOP_LOWER, type, &ttype) + 1;
406 // OBSOLETE case TYPE_CODE_STRUCT:
407 // OBSOLETE if (chill_varying_type (type))
409 // OBSOLETE tmp = unpack_long (TYPE_FIELD_TYPE (type, 0), VALUE_CONTENTS (val));
412 // OBSOLETE /* ... else fall through ... */
414 // OBSOLETE error ("bad argument to LENGTH builtin");
416 // OBSOLETE return value_from_longest (builtin_type_int, tmp);
419 // OBSOLETE static struct value *
420 // OBSOLETE value_chill_card (struct value *val)
422 // OBSOLETE LONGEST tmp = 0;
423 // OBSOLETE struct type *type = VALUE_TYPE (val);
424 // OBSOLETE CHECK_TYPEDEF (type);
426 // OBSOLETE if (TYPE_CODE (type) == TYPE_CODE_SET)
428 // OBSOLETE struct type *range_type = TYPE_INDEX_TYPE (type);
429 // OBSOLETE LONGEST lower_bound, upper_bound;
432 // OBSOLETE get_discrete_bounds (range_type, &lower_bound, &upper_bound);
433 // OBSOLETE for (i = lower_bound; i <= upper_bound; i++)
434 // OBSOLETE if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
438 // OBSOLETE error ("bad argument to CARD builtin");
440 // OBSOLETE return value_from_longest (builtin_type_int, tmp);
443 // OBSOLETE static struct value *
444 // OBSOLETE value_chill_max_min (enum exp_opcode op, struct value *val)
446 // OBSOLETE LONGEST tmp = 0;
447 // OBSOLETE struct type *type = VALUE_TYPE (val);
448 // OBSOLETE struct type *elttype;
449 // OBSOLETE CHECK_TYPEDEF (type);
451 // OBSOLETE if (TYPE_CODE (type) == TYPE_CODE_SET)
453 // OBSOLETE LONGEST lower_bound, upper_bound;
454 // OBSOLETE int i, empty = 1;
456 // OBSOLETE elttype = TYPE_INDEX_TYPE (type);
457 // OBSOLETE CHECK_TYPEDEF (elttype);
458 // OBSOLETE get_discrete_bounds (elttype, &lower_bound, &upper_bound);
460 // OBSOLETE if (op == UNOP_CHMAX)
462 // OBSOLETE for (i = upper_bound; i >= lower_bound; i--)
464 // OBSOLETE if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
467 // OBSOLETE empty = 0;
474 // OBSOLETE for (i = lower_bound; i <= upper_bound; i++)
476 // OBSOLETE if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
479 // OBSOLETE empty = 0;
484 // OBSOLETE if (empty)
485 // OBSOLETE error ("%s for empty powerset", op == UNOP_CHMAX ? "MAX" : "MIN");
488 // OBSOLETE error ("bad argument to %s builtin", op == UNOP_CHMAX ? "MAX" : "MIN");
490 // OBSOLETE return value_from_longest (TYPE_CODE (elttype) == TYPE_CODE_RANGE
491 // OBSOLETE ? TYPE_TARGET_TYPE (elttype)
492 // OBSOLETE : elttype,
496 // OBSOLETE static struct value *
497 // OBSOLETE evaluate_subexp_chill (struct type *expect_type,
498 // OBSOLETE register struct expression *exp, register int *pos,
499 // OBSOLETE enum noside noside)
501 // OBSOLETE int pc = *pos;
502 // OBSOLETE struct type *type;
503 // OBSOLETE int tem, nargs;
504 // OBSOLETE struct value *arg1;
505 // OBSOLETE struct value **argvec;
506 // OBSOLETE enum exp_opcode op = exp->elts[*pos].opcode;
507 // OBSOLETE switch (op)
509 // OBSOLETE case MULTI_SUBSCRIPT:
510 // OBSOLETE if (noside == EVAL_SKIP)
512 // OBSOLETE (*pos) += 3;
513 // OBSOLETE nargs = longest_to_int (exp->elts[pc + 1].longconst);
514 // OBSOLETE arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
515 // OBSOLETE type = check_typedef (VALUE_TYPE (arg1));
517 // OBSOLETE if (nargs == 1 && TYPE_CODE (type) == TYPE_CODE_INT)
519 // OBSOLETE /* Looks like string repetition. */
520 // OBSOLETE struct value *string = evaluate_subexp_with_coercion (exp, pos,
522 // OBSOLETE return value_concat (arg1, string);
525 // OBSOLETE switch (TYPE_CODE (type))
527 // OBSOLETE case TYPE_CODE_PTR:
528 // OBSOLETE type = check_typedef (TYPE_TARGET_TYPE (type));
529 // OBSOLETE if (!type || TYPE_CODE (type) != TYPE_CODE_FUNC)
530 // OBSOLETE error ("reference value used as function");
531 // OBSOLETE /* ... fall through ... */
532 // OBSOLETE case TYPE_CODE_FUNC:
533 // OBSOLETE /* It's a function call. */
534 // OBSOLETE if (noside == EVAL_AVOID_SIDE_EFFECTS)
537 // OBSOLETE /* Allocate arg vector, including space for the function to be
538 // OBSOLETE called in argvec[0] and a terminating NULL */
539 // OBSOLETE argvec = (struct value **) alloca (sizeof (struct value *)
540 // OBSOLETE * (nargs + 2));
541 // OBSOLETE argvec[0] = arg1;
543 // OBSOLETE for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
545 // OBSOLETE argvec[tem]
546 // OBSOLETE = evaluate_subexp_chill (TYPE_FIELD_TYPE (type, tem - 1),
547 // OBSOLETE exp, pos, noside);
549 // OBSOLETE for (; tem <= nargs; tem++)
550 // OBSOLETE argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
551 // OBSOLETE argvec[tem] = 0; /* signal end of arglist */
553 // OBSOLETE return call_function_by_hand (argvec[0], nargs, argvec + 1);
558 // OBSOLETE while (nargs-- > 0)
560 // OBSOLETE struct value *index = evaluate_subexp_with_coercion (exp, pos,
562 // OBSOLETE arg1 = value_subscript (arg1, index);
564 // OBSOLETE return (arg1);
566 // OBSOLETE case UNOP_LOWER:
567 // OBSOLETE case UNOP_UPPER:
568 // OBSOLETE (*pos)++;
569 // OBSOLETE if (noside == EVAL_SKIP)
571 // OBSOLETE (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, EVAL_SKIP);
572 // OBSOLETE goto nosideret;
574 // OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos,
575 // OBSOLETE EVAL_AVOID_SIDE_EFFECTS);
576 // OBSOLETE tem = type_lower_upper (op, VALUE_TYPE (arg1), &type);
577 // OBSOLETE return value_from_longest (type, tem);
579 // OBSOLETE case UNOP_LENGTH:
580 // OBSOLETE (*pos)++;
581 // OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
582 // OBSOLETE return value_chill_length (arg1);
584 // OBSOLETE case UNOP_CARD:
585 // OBSOLETE (*pos)++;
586 // OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
587 // OBSOLETE return value_chill_card (arg1);
589 // OBSOLETE case UNOP_CHMAX:
590 // OBSOLETE case UNOP_CHMIN:
591 // OBSOLETE (*pos)++;
592 // OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
593 // OBSOLETE return value_chill_max_min (op, arg1);
595 // OBSOLETE case BINOP_COMMA:
596 // OBSOLETE error ("',' operator used in invalid context");
602 // OBSOLETE return evaluate_subexp_standard (expect_type, exp, pos, noside);
603 // OBSOLETE nosideret:
604 // OBSOLETE return value_from_longest (builtin_type_long, (LONGEST) 1);
607 // OBSOLETE const struct language_defn chill_language_defn =
610 // OBSOLETE language_chill,
611 // OBSOLETE chill_builtin_types,
612 // OBSOLETE range_check_on,
613 // OBSOLETE type_check_on,
614 // OBSOLETE case_sensitive_on,
615 // OBSOLETE chill_parse, /* parser */
616 // OBSOLETE chill_error, /* parser error function */
617 // OBSOLETE evaluate_subexp_chill,
618 // OBSOLETE chill_printchar, /* print a character constant */
619 // OBSOLETE chill_printstr, /* function to print a string constant */
620 // OBSOLETE NULL, /* Function to print a single char */
621 // OBSOLETE chill_create_fundamental_type, /* Create fundamental type in this language */
622 // OBSOLETE chill_print_type, /* Print a type using appropriate syntax */
623 // OBSOLETE chill_val_print, /* Print a value using appropriate syntax */
624 // OBSOLETE chill_value_print, /* Print a top-levl value */
625 // OBSOLETE {"", "B'", "", ""}, /* Binary format info */
626 // OBSOLETE {"O'%lo", "O'", "o", ""}, /* Octal format info */
627 // OBSOLETE {"D'%ld", "D'", "d", ""}, /* Decimal format info */
628 // OBSOLETE {"H'%lx", "H'", "x", ""}, /* Hex format info */
629 // OBSOLETE chill_op_print_tab, /* expression operators for printing */
630 // OBSOLETE 0, /* arrays are first-class (not c-style) */
631 // OBSOLETE 0, /* String lower bound */
632 // OBSOLETE &builtin_type_chill_char, /* Type of string elements */
633 // OBSOLETE LANG_MAGIC
636 // OBSOLETE /* Initialization for Chill */
639 // OBSOLETE _initialize_chill_language (void)
641 // OBSOLETE builtin_type_chill_bool =
642 // OBSOLETE init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
643 // OBSOLETE TYPE_FLAG_UNSIGNED,
644 // OBSOLETE "BOOL", (struct objfile *) NULL);
645 // OBSOLETE builtin_type_chill_char =
646 // OBSOLETE init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
647 // OBSOLETE TYPE_FLAG_UNSIGNED,
648 // OBSOLETE "CHAR", (struct objfile *) NULL);
649 // OBSOLETE builtin_type_chill_long =
650 // OBSOLETE init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
652 // OBSOLETE "LONG", (struct objfile *) NULL);
653 // OBSOLETE builtin_type_chill_ulong =
654 // OBSOLETE init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
655 // OBSOLETE TYPE_FLAG_UNSIGNED,
656 // OBSOLETE "ULONG", (struct objfile *) NULL);
657 // OBSOLETE builtin_type_chill_real =
658 // OBSOLETE init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
660 // OBSOLETE "LONG_REAL", (struct objfile *) NULL);
662 // OBSOLETE add_language (&chill_language_defn);
This page took 0.043921 seconds and 4 git commands to generate.