From: Nicholas Clark Date: Sat, 7 Apr 2007 08:32:46 +0000 (+0000) Subject: Re-ordering OP_STUB in the switch statement in Perl_peep saves a goto. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f46f2f82fb42f1125919a085c515f0a65a9b1b31;p=p5sagit%2Fp5-mst-13.2.git Re-ordering OP_STUB in the switch statement in Perl_peep saves a goto. p4raw-id: //depot/perl@30861 --- diff --git a/op.c b/op.c index 9d9494b..1ea157e 100644 --- a/op.c +++ b/op.c @@ -7894,12 +7894,6 @@ Perl_peep(pTHX_ register OP *o) ignore_optimization: o->op_opt = 1; break; - case OP_STUB: - if ((o->op_flags & OPf_WANT) != OPf_WANT_LIST) { - o->op_opt = 1; - break; /* Scalar stub must produce undef. List stub is noop */ - } - goto nothin; case OP_NULL: if (o->op_targ == OP_NEXTSTATE || o->op_targ == OP_DBSTATE @@ -7917,10 +7911,15 @@ Perl_peep(pTHX_ register OP *o) continue; } break; + case OP_STUB: + if ((o->op_flags & OPf_WANT) != OPf_WANT_LIST) { + o->op_opt = 1; + break; /* Scalar stub must produce undef. List stub is noop */ + } + /* FALL THROUGH */ case OP_SCALAR: case OP_LINESEQ: case OP_SCOPE: - nothin: if (oldop && o->op_next) { oldop->op_next = o->op_next; continue;