Branch: Tag:

2001-02-20

2001-02-20 15:59:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Made push_type_int{,_backwards}() static.
Introduced push_int_type() and push_object_type{,_backwards}().

Rev: src/builtin_functions.c:1.344
Rev: src/encode.c:1.82
Rev: src/language.yacc:1.225
Rev: src/operators.c:1.125
Rev: src/pike_types.c:1.148
Rev: src/pike_types.h:1.49
Rev: src/svalue.c:1.94

25:   #include "version.h"   #include "bignum.h"    - RCSID("$Id: encode.c,v 1.81 2001/02/01 15:54:08 grubba Exp $"); + RCSID("$Id: encode.c,v 1.82 2001/02/20 15:59:49 grubba Exp $");      /* #define ENCODE_DEBUG */   
1011:      one_more_type:    tmp = GETC(); -  push_type(tmp); +     switch(tmp)    {    default:
1020:    break;       case T_ASSIGN: +  push_type(tmp);    push_type(GETC());    goto one_more_type;       case T_FUNCTION: -  +  push_type(tmp);    while(GETC()!=T_MANY)    {    data->ptr--;
1034:    case T_MAPPING:    case T_OR:    case T_AND: +  push_type(tmp);    low_decode_type(data);       case T_ARRAY:
1044:    case T_INT:    {    int i; +  push_type(tmp);    /* FIXME: I assume the type is saved in network byte order. Is it?    * /grubba 1999-03-07    */
1071:    case T_ZERO:    case T_VOID:    case PIKE_T_UNKNOWN: +  push_type(tmp);    break;       case T_OBJECT:    {    INT32 x; -  +  int flag = GETC();    -  push_type(GETC()); +     decode_value2(data); -  type_stack_mark(); +     switch(Pike_sp[-1].type)    {    case T_INT: -  push_type_int(0); +  push_object_type_backwards(flag, 0);    break;       case T_PROGRAM: -  push_type_int(Pike_sp[-1].u.program->id); +  push_object_type_backwards(flag, Pike_sp[-1].u.program->id);    break;       case T_FUNCTION:
1100:    if (!prog) {    Pike_error("Failed to decode object type.\n");    } -  push_type_int(prog->id); +  push_object_type_backwards(flag, prog->id);    }    break;   
1110:    get_name_of_type(Pike_sp[-1].type));    }    pop_stack(); -  type_stack_reverse(); +     }    }