Lines Matching defs:type

94  * think the expression is of the right type: croak actually does a Siglongjmp.
96 #define CHECKOP(type,o) \
97 ((PL_op_mask && PL_op_mask[type]) \
99 Perl_croak(aTHX_ "'%s' trapped by operation mask", PL_op_desc[type]), \
101 : CALL_FPTR(PL_check[type])(aTHX_ (OP*)o))
284 OPCODE type;
315 type = o->op_type;
316 if (type == OP_NULL)
317 type = (OPCODE)o->op_targ;
321 if (type == OP_NEXTSTATE || type == OP_SETSTATE || type == OP_DBSTATE)
333 case OP_NULL: /* Was holding old type, if any. */
954 S_modkids(pTHX_ OP *o, I32 type)
959 mod(kid, type);
965 Perl_mod(pTHX_ OP *o, I32 type)
989 else if (!type) {
993 else if (type == OP_REFGEN)
1003 if ((type == OP_UNDEF || type == OP_REFGEN) &&
1016 if (type == OP_GREPSTART || type == OP_ENTERSUB || type == OP_REFGEN) {
1031 "args: type/targ %ld:%"UVuf,
1057 "entry via type/targ %ld:%"UVuf,
1070 "entry via type/targ %ld:%"UVuf,
1099 if (type == OP_GREPSTART || type == OP_ENTERSUB || type == OP_REFGEN)
1107 type ? PL_op_desc[type] : "local"));
1137 mod(kid, type);
1142 if (type == OP_REFGEN && o->op_flags & OPf_PARENS) {
1148 if (scalar_mod_type(o, type))
1154 if (type == OP_LEAVESUBLV)
1181 if (type == OP_REFGEN && o->op_flags & OPf_PARENS)
1183 if (scalar_mod_type(o, type))
1185 if (type == OP_LEAVESUBLV)
1190 if (!type)
1210 if (type != OP_SASSIGN)
1219 if (type == OP_LEAVESUBLV)
1226 mod(cBINOPo->op_first->op_sibling, type);
1232 if (type == OP_ENTERSUB &&
1235 if (type == OP_LEAVESUBLV)
1245 mod(cLISTOPo->op_last, type);
1254 mod(cBINOPo->op_first, type);
1260 mod(kid, type);
1264 if (type != OP_LEAVESUBLV)
1272 if (type == OP_REFGEN &&
1276 if (type != OP_LEAVESUBLV)
1279 if (type == OP_AASSIGN || type == OP_SASSIGN)
1281 else if (!type) {
1286 else if (type != OP_GREPSTART && type != OP_ENTERSUB
1287 && type != OP_LEAVESUBLV)
1293 S_scalar_mod_type(pTHX_ OP *o, I32 type)
1295 switch (type) {
1363 Perl_refkids(pTHX_ OP *o, I32 type)
1368 ref(kid, type);
1374 Perl_ref(pTHX_ OP *o, I32 type)
1383 if ((type == OP_EXISTS || type == OP_DEFINED || type == OP_LOCK) &&
1395 ref(kid, type);
1398 if (type == OP_DEFINED)
1403 if (type == OP_RV2SV || type == OP_RV2AV || type == OP_RV2HV) {
1404 o->op_private |= (type == OP_RV2AV ? OPpDEREF_AV
1405 : type == OP_RV2HV ? OPpDEREF_HV
1420 if (type == OP_DEFINED)
1434 ref(cBINOPo->op_first, type);
1439 if (type == OP_RV2SV || type == OP_RV2AV || type == OP_RV2HV) {
1440 o->op_private |= (type == OP_RV2AV ? OPpDEREF_AV
1441 : type == OP_RV2HV ? OPpDEREF_HV
1453 ref(cLISTOPo->op_last, type);
1627 I32 type;
1632 type = o->op_type;
1633 if (type == OP_LIST) {
1636 } else if (type == OP_UNDEF) {
1638 } else if (type == OP_RV2SV || /* "our" declaration */
1639 type == OP_RV2AV ||
1640 type == OP_RV2HV) { /* XXX does this let anything illegal in? */
1649 (type == OP_RV2SV ? GvSV(gv) :
1650 type == OP_RV2AV ? (SV*)GvAV(gv) :
1651 type == OP_RV2HV ? (SV*)GvHV(gv) : (SV*)gv),
1657 else if (type != OP_PADSV &&
1658 type != OP_PADAV &&
1659 type != OP_PADHV &&
1660 type != OP_PUSHMARK)
1667 else if (attrs && type != OP_PUSHMARK) {
1731 Perl_bind_match(pTHX_ I32 type, OP *left, OP *right)
1771 if (type == OP_NOT)
1776 return bind_match(type, left,
1986 I32 type = o->op_type;
1989 if (PL_opargs[type] & OA_RETSCALAR)
1991 if (PL_opargs[type] & OA_TARGET && !o->op_targ)
1992 o->op_targ = pad_alloc(type, SVs_PADTMP);
1996 if ((PL_opargs[type] & OA_OTHERINT) && (PL_hints & HINT_INTEGER)
1997 && !(type == OP_NEGATE && cUNOPo->op_first->op_type == OP_CONST
2000 o->op_ppaddr = PL_ppaddr[type = ++(o->op_type)];
2003 if (!(PL_opargs[type] & OA_FOLDCONST))
2006 switch (type) {
2052 if (type == OP_RV2GV)
2092 Perl_convert(pTHX_ I32 type, I32 flags, OP *o)
2099 if (!(PL_opargs[type] & OA_MARK))
2102 o->op_type = (OPCODE)type;
2103 o->op_ppaddr = PL_ppaddr[type];
2106 o = CHECKOP(type, o);
2107 if (o->op_type != type)
2116 Perl_append_elem(pTHX_ I32 type, OP *first, OP *last)
2124 if (first->op_type != type
2125 || (type == OP_LIST && (first->op_flags & OPf_PARENS)))
2127 return newLISTOP(type, 0, first, last);
2141 Perl_append_list(pTHX_ I32 type, LISTOP *first, LISTOP *last)
2149 if (first->op_type != type)
2150 return prepend_elem(type, (OP*)first, (OP*)last);
2152 if (last->op_type != type)
2153 return append_elem(type, (OP*)first, (OP*)last);
2165 Perl_prepend_elem(pTHX_ I32 type, OP *first, OP *last)
2173 if (last->op_type == type) {
2174 if (type == OP_LIST) { /* already a PUSHMARK there */
2192 return newLISTOP(type, 0, first, last);
2213 Perl_newLISTOP(pTHX_ I32 type, I32 flags, OP *first, OP *last)
2219 listop->op_type = (OPCODE)type;
2220 listop->op_ppaddr = PL_ppaddr[type];
2233 if (type == OP_LIST) {
2243 return CHECKOP(type, listop);
2247 Perl_newOP(pTHX_ I32 type, I32 flags)
2251 o->op_type = (OPCODE)type;
2252 o->op_ppaddr = PL_ppaddr[type];
2257 if (PL_opargs[type] & OA_RETSCALAR)
2259 if (PL_opargs[type] & OA_TARGET)
2260 o->op_targ = pad_alloc(type, SVs_PADTMP);
2261 return CHECKOP(type, o);
2265 Perl_newUNOP(pTHX_ I32 type, I32 flags, OP *first)
2271 if (PL_opargs[type] & OA_MARK)
2275 unop->op_type = (OPCODE)type;
2276 unop->op_ppaddr = PL_ppaddr[type];
2280 unop = (UNOP*) CHECKOP(type, unop);
2288 Perl_newBINOP(pTHX_ I32 type, I32 flags, OP *first, OP *last)
2296 binop->op_type = (OPCODE)type;
2297 binop->op_ppaddr = PL_ppaddr[type];
2309 binop = (BINOP*)CHECKOP(type, binop);
2310 if (binop->op_next || binop->op_type != (OPCODE)type)
2640 Perl_newPMOP(pTHX_ I32 type, I32 flags)
2645 pmop->op_type = (OPCODE)type;
2646 pmop->op_ppaddr = PL_ppaddr[type];
2674 if (type != OP_TRANS && PL_curstash) {
2680 return CHECKOP(type, pmop);
2835 Perl_newSVOP(pTHX_ I32 type, I32 flags, SV *sv)
2839 svop->op_type = (OPCODE)type;
2840 svop->op_ppaddr = PL_ppaddr[type];
2844 if (PL_opargs[type] & OA_RETSCALAR)
2846 if (PL_opargs[type] & OA_TARGET)
2847 svop->op_targ = pad_alloc(type, SVs_PADTMP);
2848 return CHECKOP(type, svop);
2852 Perl_newPADOP(pTHX_ I32 type, I32 flags, SV *sv)
2856 padop->op_type = (OPCODE)type;
2857 padop->op_ppaddr = PL_ppaddr[type];
2858 padop->op_padix = pad_alloc(type, SVs_PADTMP);
2865 if (PL_opargs[type] & OA_RETSCALAR)
2867 if (PL_opargs[type] & OA_TARGET)
2868 padop->op_targ = pad_alloc(type, SVs_PADTMP);
2869 return CHECKOP(type, padop);
2873 Perl_newGVOP(pTHX_ I32 type, I32 flags, GV *gv)
2878 return newPADOP(type, flags, SvREFCNT_inc(gv));
2880 return newSVOP(type, flags, SvREFCNT_inc(gv));
2885 Perl_newPVOP(pTHX_ I32 type, I32 flags, char *pv)
2889 pvop->op_type = (OPCODE)type;
2890 pvop->op_ppaddr = PL_ppaddr[type];
2894 if (PL_opargs[type] & OA_RETSCALAR)
2896 if (PL_opargs[type] & OA_TARGET)
2897 pvop->op_targ = pad_alloc(type, SVs_PADTMP);
2898 return CHECKOP(type, pvop);
3418 Perl_newLOGOP(pTHX_ I32 type, I32 flags, OP *first, OP *other)
3420 return new_logop(type, flags, &first, &other);
3424 S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp)
3431 if (type == OP_XOR) /* Not short circuit, but here by precedence. */
3432 return newBINOP(type, flags, scalar(first), scalar(other));
3437 if (type == OP_AND || type == OP_OR) {
3438 if (type == OP_AND)
3439 type = OP_OR;
3441 type = OP_AND;
3455 if ((type == OP_AND) == (SvTRUE(((SVOP*)first)->op_sv))) {
3511 if (type == OP_ANDASSIGN || type == OP_ORASSIGN)
3516 logop->op_type = (OPCODE)type;
3517 logop->op_ppaddr = PL_ppaddr[type];
3528 CHECKOP(type,logop);
3890 Perl_newLOOPEX(pTHX_ I32 type, OP *label)
3895 if (type != OP_GOTO || label->op_type == OP_CONST) {
3898 o = newOP(type, OPf_SPECIAL);
3900 o = newPVOP(type, 0, savepv(label->op_type == OP_CONST
3911 o = newUNOP(type, OPf_STACKED, label);
4046 OPCODE type = o->op_type;
4051 if (type == OP_NEXTSTATE || type == OP_NULL || type == OP_PUSHMARK)
4053 if (type == OP_DBSTATE)
4056 if (type == OP_LEAVESUB || type == OP_RETURN)
4060 if (type == OP_CONST && cSVOPo->op_sv)
4062 else if ((type == OP_PADSV || type == OP_CONST) && cv) {
4741 Perl_newGVREF(pTHX_ I32 type, OP *o)
4743 if (type == OP_MAPSTART || type == OP_GREPSTART || type == OP_SORT)
4745 return ref(newUNOP(OP_RV2GV, OPf_REF, o), type);
4852 OPCODE type = o->op_type;
4853 o = modkids(ck_fun(o), type);
4911 I32 type = o->op_type;
4916 o = newUNOP(type, OPf_SPECIAL, newGVOP(OP_GV, 0, PL_argvgv));
5142 I32 type = o->op_type;
5152 OP *newop = newGVOP(type, OPf_REF,
5165 if (type == OP_FTTTY)
5166 o = newGVOP(type, OPf_REF, PL_stdingv);
5168 o = newUNOP(type, 0, newDEFSVOP());
5180 int type = o->op_type;
5181 register I32 oa = PL_opargs[type] >> OASHIFT;
5200 if (!kid && PL_opargs[type] & OA_DEFGV)
5210 && kid->op_type == OP_LIST && type != OP_SCALAR)
5212 return too_many_arguments(o,PL_op_desc[type]);
5225 if ((type == OP_PUSH || type == OP_UNSHIFT)
5229 PL_op_desc[type]);
5240 name, (IV)numargs, PL_op_desc[type]);
5247 bad_type(numargs, "array", PL_op_desc[type], kid);
5248 mod(kid, type);
5260 name, (IV)numargs, PL_op_desc[type]);
5267 bad_type(numargs, "hash", PL_op_desc[type], kid);
5268 mod(kid, type);
5381 mod(kid, type);
5404 mod(scalar(kid), type);
5416 else if (PL_opargs[type] & OA_DEFGV) {
5418 return newUNOP(type, 0, newDEFSVOP());
5489 OPCODE type = o->op_type == OP_GREPSTART ? OP_GREPWHILE : OP_MAPWHILE;
5505 if (type == OP_MAPWHILE)
5517 gwop->op_type = type;
5518 gwop->op_ppaddr = PL_ppaddr[type];
5523 gwop->op_targ = pad_alloc(type, SVs_PADTMP);
5558 OPCODE type = o->op_type;
5559 return modkids(ck_fun(o), type);
5603 OPCODE type = o->op_type;
5604 return refkids(ck_fun(o), type);
5866 I32 type = o->op_type;
5886 return newUNOP(type, 0, scalar(argop));
5888 return scalar(modkids(ck_fun(o), type));
6164 /* '*' allows any scalar type, including bareword */
6631 Perl_croak(aTHX_ "No such pseudo-hash field \"%s\" in variable %s of type %s",
6698 "in variable %s of type %s",