Branch: Tag:

2020-01-02

2020-01-02 13:38:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Added push_unlimited_array_type().

This is in preparation for adding support for
length-limited array types.

1248:       if($2)    { -  push_type(T_ARRAY); +  push_unlimited_array_type(T_ARRAY);    Pike_compiler->varargs=1;    }   
1522:    | TOK_FUNCTION_ID opt_function_type {}    | TOK_OBJECT_ID opt_program_type {}    | TOK_PROGRAM_ID opt_program_type { push_type(T_PROGRAM); } -  | TOK_ARRAY_ID opt_array_type { push_type(T_ARRAY); } +  | TOK_ARRAY_ID opt_array_type { push_unlimited_array_type(T_ARRAY); }    | TOK_MULTISET_ID opt_array_type { push_type(T_MULTISET); }    | TOK_ATTRIBUTE_ID '(' string_constant ',' full_type ')'    {
1698:      opt_string_width: opt_int_range    { -  push_type(T_STRING); +  push_unlimited_array_type(T_STRING);    }    ;   
3972:    * will be variable #0.    */    push_type(T_MIXED); -  push_type(T_ARRAY); +  push_unlimited_array_type(T_ARRAY);    add_local_name(args_string, compiler_pop_type(), 0);    }    statements end_block