pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:773:    case T_INT: push_constant_text("int"); break;    case T_MAPPING: push_constant_text("mapping"); break;    case T_MULTISET: push_constant_text("multiset"); break;    case T_OBJECT: push_constant_text("object"); break;    case T_PROGRAM: push_constant_text("program"); break;    case T_STRING: push_constant_text("string"); break;    case T_TYPE: push_constant_text("type"); break;    case T_ZERO: push_constant_text("zero"); break;    case T_VOID: push_constant_text("void"); break;    /* The following are internal and shouldn't be applicable in normal use. */ -  case T_SVALUE_PTR: push_constant_text("svalue_ptr"); break; -  case T_OBJ_INDEX: push_constant_text("obj_index"); break; -  case T_MAPPING_DATA: push_constant_text("mapping_data"); break; -  case T_PIKE_FRAME: push_constant_text("pike_frame"); break; -  case T_MULTISET_DATA: push_constant_text("multiset_data"); break; -  default: push_constant_text("unknown"); break; +  case T_SVALUE_PTR: push_text("svalue_ptr"); break; +  case T_OBJ_INDEX: push_text("obj_index"); break; +  case T_MAPPING_DATA: push_text("mapping_data"); break; +  case T_PIKE_FRAME: push_text("pike_frame"); break; +  case T_MULTISET_DATA: push_text("multiset_data"); break; +  default: push_text("unknown"); break;    }   }         /*! @decl string int2char(int x)    *! @appears String.int2char    *!    *! Same as sprintf("%c",x);    *!    *! @seealso
pike.git/src/builtin.cmod:1734:   {    INT_TYPE line;    struct pike_string *tmp = low_get_program_line(p, &line);       pop_n_elems(args);       if (tmp) {    push_string(tmp);    if(line >= 1)    { -  push_constant_text(":"); +  push_text(":");    push_int(line);    f_add(3);    }    }    else    push_int(0);   }      /*! @decl int(8..8)|int(16..16)|int(32..32) width(string s)    *! @belongs String
pike.git/src/builtin.cmod:2823:    *! Usually @expr{32@} or @expr{64@}.    *! @member int(0..1) "auto_bignum"    *! Present if integers larger than the native size are automatically    *! converted into bignums.    *! @endmapping    */   PIKEFUN mapping(string:int|string) get_runtime_info()    optflags OPT_TRY_OPTIMIZE;   {    pop_n_elems(args); -  push_constant_text("bytecode_method"); -  push_constant_text(PIKE_BYTECODE_METHOD_NAME); -  push_constant_text("abi"); +  push_text("bytecode_method"); +  push_text(PIKE_BYTECODE_METHOD_NAME); +  push_text("abi");    push_int(sizeof(void *) * 8); -  push_constant_text("native_byteorder"); +  push_text("native_byteorder");    push_int(PIKE_BYTEORDER); -  push_constant_text("int_size"); +  push_text("int_size");    push_int(sizeof(INT_TYPE) * 8); -  push_constant_text("float_size"); +  push_text("float_size");    push_int(sizeof(FLOAT_TYPE) * 8); -  push_constant_text("auto_bignum"); +  push_text("auto_bignum");    push_int(1);    f_aggregate_mapping(6*2);   }      /*! @endmodule    */      void low_backtrace(struct Pike_interpreter_struct *i)   {    struct svalue *stack_top = i->stack_pointer;
pike.git/src/builtin.cmod:4481:    }    object_low_set_index(THIS->o, THIS->f, Pike_sp-1);    pop_n_elems(args);    push_int(0);    }    PIKEFUN string _sprintf(int c, mapping|void opts)    flags ID_PROTECTED;    {    struct program *prog;    if (!THIS->o) { -  push_constant_text("Setter()"); +  push_text("Setter()");    } else if ((prog = THIS->o->prog)) { -  push_constant_text("%O->`%s="); +  push_text("%O->`%s=");    ref_push_object(THIS->o);    ref_push_string(ID_FROM_INT(prog, THIS->f)->name);    f_sprintf(3);    } else { -  push_constant_text("Setter(destructed object)"); +  push_text("Setter(destructed object)");    }    stack_pop_n_elems_keep_top(args);    }   }      /*! @endclass    */      PMOD_EXPORT struct object *get_setter(struct object *o, int f)   {
pike.git/src/builtin.cmod:4584:    flags ID_PROTECTED;    {    RETURN 1;    }       PIKEFUN string _sprintf(int fmt, mixed ... extras)    flags ID_PROTECTED;    {    pop_n_elems(args);    if (fmt == 'O') { -  push_constant_text("Val.null"); +  push_text("Val.null");    } else {    push_undefined();    }    }       PIKEFUN int __hash()    flags ID_PROTECTED;    {    pop_n_elems(args);    push_int(17);
pike.git/src/builtin.cmod:5354:    *!    *! Describe the list.    *!    *! @seealso    *! @[sprintf()], @[lfun::_sprintf()]    */    PIKEFUN string _sprintf(int c, mapping(string:mixed)|void attr)    flags ID_PROTECTED;    {    if (!THIS->num_elems) { -  push_constant_text("ADT.List(/* empty */)"); +  push_text("ADT.List(/* empty */)");    } else if (c == 'O') {    struct pike_list_node *node = THIS->head;    if (THIS->num_elems == 1) { -  push_constant_text("ADT.List(/* 1 element */\n"); +  push_text("ADT.List(/* 1 element */\n");    } else { -  push_constant_text("ADT.List(/* %d elements */\n"); +  push_text("ADT.List(/* %d elements */\n");    push_int(THIS->num_elems);    f_sprintf(2);    }    while (node->next) {    if (node->next->next) { -  push_constant_text(" %O,\n"); +  push_text(" %O,\n");    } else { -  push_constant_text(" %O\n"); +  push_text(" %O\n");    }    push_svalue(&node->val);    f_sprintf(2);    node = node->next;    } -  push_constant_text(")"); +  push_text(")");    f_add(THIS->num_elems + 2);    } else {    if (THIS->num_elems == 1) { -  push_constant_text("ADT.List(/* 1 element */)"); +  push_text("ADT.List(/* 1 element */)");    } else { -  push_constant_text("ADT.List(/* %d elements */)"); +  push_text("ADT.List(/* %d elements */)");    push_int(THIS->num_elems);    f_sprintf(2);    }    }    stack_pop_n_elems_keep_top(args);    }       /*! @decl mixed head()    *!    *! Get the element at the head of the list.
pike.git/src/builtin.cmod:6085:    */      /*! @endmodule    */      static struct object *val_module;      static void get_val_module()   {    assert (!val_module); -  push_constant_text ("Val"); +  push_text ("Val");    APPLY_MASTER ("resolv", 1);    if (TYPEOF(Pike_sp[-1]) != T_OBJECT)    Pike_error ("\"Val\" didn't resolve to a module object.\n");    val_module = (--Pike_sp)->u.object;   }      /* Always do the lookup in the Val module dynamically to allow the    * values to be replaced. */   #define GET_VAL(NAME) \    PMOD_EXPORT struct object *PIKE_CONCAT (get_val_, NAME) (void) \