pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:2555:   }      /* Decode bytecode string @[string_no].    * Returns resulting offset in p->program.    */   static INT32 decode_portable_bytecode(struct decode_data *data, INT32 string_no)   {    struct program *p = Pike_compiler->new_program;    struct pike_string *bytecode;    struct pike_string *current_file=NULL; -  INT32 current_line=0; +  INT_TYPE current_line = 0;    int e;    ONERROR err;       debug_malloc_touch(p);    if ((string_no < 0) || (string_no >= p->num_strings)) {    decode_error(data, NULL,    "Bad bytecode string number: %d (expected 0 - %d).\n",    string_no, p->num_strings-1);    }   
pike.git/src/encode.c:2595:    if (STR(bytecode)[e] == F_FILENAME) { \    INT32 strno = STR(bytecode)[e+1]; \    if (SIGNED_CHAR(strno < 0) || \    (strno >= p->num_strings)) { \    decode_error(data, NULL, "Bad filename directive number:" \    " %d (expected 0 - %d).\n", \    strno, p->num_strings); \    } \    current_file = p->strings[strno]; \    } else if (STR(bytecode)[e] == F_LINE) { \ -  current_line = STR(bytecode)[e+1]; \ +  current_line = \ +  ((unsigned INT32)STR(bytecode)[e+1]) | \ +  ((INT_TYPE)STR(bytecode)[e+2])<<32; \    } else if (!current_file) { \    decode_error(data, NULL, "Missing filename directive in " \    "byte code.\n"); \    } else if (!current_line) { \    decode_error(data, NULL, "Missing line directive in " \    "byte code.\n"); \    } else      #define EMIT_BYTECODE(STR, X) do { \    for (e = 0; e < bytecode->len; e += 3) { \
pike.git/src/encode.c:3859:    ONERROR err2;    int byteorder;    int bytecode_method;    int entry_type;    INT16 id_flags;    INT16 p_flags;    ptrdiff_t old_pragmas;    struct compilation *c;    struct pike_string *save_current_file;    struct object *placeholder = NULL; -  unsigned INT32 save_current_line; +  INT_TYPE save_current_line;   #define FOO(NUMTYPE,Y,ARGTYPE,NAME) \    NUMTYPE PIKE_CONCAT(local_num_, NAME) = 0;   #include "program_areas.h"      #ifdef ENCODE_DEBUG    data->depth += 2;   #endif       /* Decode byte-order. */    decode_number(byteorder, data);
pike.git/src/encode.c:4359:    decode_number(opt_flags, data);       /* FIXME:    * Verify validity of func_flags, func.offset & opt_flags    */       /* Expected identifier offset */    decode_number(no, data);       EDB(5, { -  INT32 line; +  INT_TYPE line;    struct pike_string *file =    get_line(func.offset + p->program, p, &line);    fprintf(stderr,    "%*sdefine_function(\"%s\", X, 0x%04x, 0x%04x,\n"    "%*s 0x%04x, 0x%04x)\n" -  "%*s @ %s:%d\n", +  "%*s @ %s:%ld\n",    data->depth, "",    Pike_sp[-2].u.string->str, id_flags, func_flags,    data->depth, "",    func.offset, opt_flags,    data->depth, "", -  file->str, line); +  file->str, (long)line);    });       /* Alters    *    * identifiers, identifier_references    */    n = define_function(Pike_sp[-2].u.string,    Pike_sp[-1].u.type,    id_flags, func_flags,    &func, opt_flags);