pike.git / lib / modules / Tools.pmod / Standalone.pmod / precompile.pike

version» Context lines:

pike.git/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike:453:    return PikeType("int(8bit)");       case "short":    if (signed)    return PikeType("int(-32768..32767)");    else    return PikeType("int(16bit)");       case "int":    case "long": -  case "size_t": -  case "ptrdiff_t": +     case "INT32":    if (signed) return PikeType("int");    return PikeType("int(0..)");    -  +  case "size_t": +  return PikeType("int(0..)"); +  +  case "ptrdiff_t": +  return PikeType("int"); +     case "double":    case "float":    return PikeType("float");       default:    error("Unknown C type.\n");    }    }   }   
pike.git/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike:849:    if (!low) {    switch(high) {    case 0x0000: return "tStr0";    case 0x007f: return "tStr7";    case 0x00ff: return "tStr8";    case 0xffff: return "tStr16";    }    } else if ((low == -0x80000000) && (high == 0x7fffffff)) {    return "tStr";    } +  // NOTE! This piece of code KNOWS that the serialized +  // value of PIKE_T_INT is 8!    return sprintf("tNStr(%s)",    stringify(sprintf("\010%4c%4c", low, high)));    }    case "program": return "tPrg(tObj)";    case "any": return "tAny";    case "mixed": return "tMix";    case "int":    // Clamp the integer range to 32 bit signed.    int low = limit(-0x80000000, (int)(string)(args[0]->t), 0x7fffffff);    int high = limit(-0x80000000, (int)(string)(args[1]->t), 0x7fffffff);
pike.git/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike:1264:    return UNDEFINED;    }   }      /*    * This class is used to represent one function argument    */   class Argument   {    /* internal */ -  string _name; -  PikeType _type; -  string _c_type; -  string _basetype; +  string _name; // Name of argument. +  PikeType _type; // Declared Pike type. +  int _line; // Line number in CMOD. +  string _file; // Filename of CMOD. +     int _is_c_type; -  int _line; -  string _file; -  string _typename; -  string _realtype; +     -  +  // The following are cached values. +  string _c_type; // _type->c_storage_type(). +  string _basetype; // _type->basetype(). +  string _typename; // Pretty-printed Pike type (used in error messages). +  string _realtype; // _type->realtype(). +     int is_c_type() { return _is_c_type; }    int may_be_void_or_zero (int may_be_void, int may_be_zero)    { return type()->may_be_void_or_zero (may_be_void, may_be_zero); }    int may_be_void() { return type()->may_be_void(); }    int line() { return _line; }    string name() { return _name; }    PikeType type() { return _type; }       string basetype()    {
pike.git/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike:2583:    argnum, check_argbase), arg->line()),    });    got_void_or_zero_check = 1;    }    }    }       check_arg: {    if(arg->is_c_type() && arg->basetype() == "string")    { +  // FIXME: Probably dead code!    /* Special case for 'char *' */    /* This will have to be amended when we want to support    * wide strings    */    ret+=({    PC.Token(sprintf("if(TYPEOF(Pike_sp[%d%s]) != PIKE_T_STRING ||\n"    " Pike_sp[%d%s].u.string->shift_size)",    argnum,check_argbase,    argnum,check_argbase), arg->line())    });