From: Nicholas Clark Date: Wed, 20 Feb 2008 22:39:56 +0000 (+0000) Subject: Eliminate ck_lengthconst. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9784f5f42a6fe727d098291f8a63216b4e07c6bb;p=p5sagit%2Fp5-mst-13.2.git Eliminate ck_lengthconst. p4raw-id: //depot/perl@33338 --- diff --git a/embed.fnc b/embed.fnc index 8edfea5..186dcee 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1209,7 +1209,6 @@ pR |OP* |ck_glob |NN OP *o pR |OP* |ck_grep |NN OP *o pR |OP* |ck_index |NN OP *o pR |OP* |ck_join |NN OP *o -pR |OP* |ck_lengthconst |NN OP *o pR |OP* |ck_lfun |NN OP *o pR |OP* |ck_listiob |NN OP *o pR |OP* |ck_match |NN OP *o diff --git a/embed.h b/embed.h index 3d28f6e..df45cb7 100644 --- a/embed.h +++ b/embed.h @@ -1176,7 +1176,6 @@ #define ck_grep Perl_ck_grep #define ck_index Perl_ck_index #define ck_join Perl_ck_join -#define ck_lengthconst Perl_ck_lengthconst #define ck_lfun Perl_ck_lfun #define ck_listiob Perl_ck_listiob #define ck_match Perl_ck_match @@ -3474,7 +3473,6 @@ #define ck_grep(a) Perl_ck_grep(aTHX_ a) #define ck_index(a) Perl_ck_index(aTHX_ a) #define ck_join(a) Perl_ck_join(aTHX_ a) -#define ck_lengthconst(a) Perl_ck_lengthconst(aTHX_ a) #define ck_lfun(a) Perl_ck_lfun(aTHX_ a) #define ck_listiob(a) Perl_ck_listiob(aTHX_ a) #define ck_match(a) Perl_ck_match(aTHX_ a) diff --git a/op.c b/op.c index d9bf346..9c4ce51 100644 --- a/op.c +++ b/op.c @@ -7124,15 +7124,6 @@ Perl_ck_index(pTHX_ OP *o) } OP * -Perl_ck_lengthconst(pTHX_ OP *o) -{ - PERL_ARGS_ASSERT_CK_LENGTHCONST; - - /* XXX length optimization goes here */ - return ck_fun(o); -} - -OP * Perl_ck_lfun(pTHX_ OP *o) { const OPCODE type = o->op_type; diff --git a/opcode.h b/opcode.h index 65545a4..d59b962 100644 --- a/opcode.h +++ b/opcode.h @@ -1282,7 +1282,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */ MEMBER_TO_FPTR(Perl_ck_fun), /* hex */ MEMBER_TO_FPTR(Perl_ck_fun), /* oct */ MEMBER_TO_FPTR(Perl_ck_fun), /* abs */ - MEMBER_TO_FPTR(Perl_ck_lengthconst), /* length */ + MEMBER_TO_FPTR(Perl_ck_fun), /* length */ MEMBER_TO_FPTR(Perl_ck_substr), /* substr */ MEMBER_TO_FPTR(Perl_ck_fun), /* vec */ MEMBER_TO_FPTR(Perl_ck_index), /* index */ diff --git a/opcode.pl b/opcode.pl index b59af50..098f83c 100755 --- a/opcode.pl +++ b/opcode.pl @@ -760,7 +760,7 @@ abs abs ck_fun fsTu% S? # String stuff. -length length ck_lengthconst ifsTu% S? +length length ck_fun ifsTu% S? substr substr ck_substr st@ S S S? S? vec vec ck_fun ist@ S S S diff --git a/pod/perltodo.pod b/pod/perltodo.pod index bbf2f05..caa1a83 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -386,14 +386,6 @@ macro used can be changed. =back -=head2 - -C does nothing, but has the comment - - /* XXX length optimization goes here */ - -It predates 5.003. Investigate what it's about, and then implement it. - =head2 Modernize the order of directories in @INC The way @INC is laid out by default, one cannot upgrade core (dual-life) diff --git a/pp.sym b/pp.sym index c3159c5..74060e3 100644 --- a/pp.sym +++ b/pp.sym @@ -24,7 +24,6 @@ Perl_ck_glob Perl_ck_grep Perl_ck_index Perl_ck_join -Perl_ck_lengthconst Perl_ck_lfun Perl_ck_listiob Perl_ck_match diff --git a/pp_proto.h b/pp_proto.h index 6a43521..847e4f1 100644 --- a/pp_proto.h +++ b/pp_proto.h @@ -23,7 +23,6 @@ PERL_CKDEF(Perl_ck_glob) PERL_CKDEF(Perl_ck_grep) PERL_CKDEF(Perl_ck_index) PERL_CKDEF(Perl_ck_join) -PERL_CKDEF(Perl_ck_lengthconst) PERL_CKDEF(Perl_ck_lfun) PERL_CKDEF(Perl_ck_listiob) PERL_CKDEF(Perl_ck_match) diff --git a/proto.h b/proto.h index 62fbfd9..26ce756 100644 --- a/proto.h +++ b/proto.h @@ -4401,12 +4401,6 @@ PERL_CALLCONV OP* Perl_ck_join(pTHX_ OP *o) #define PERL_ARGS_ASSERT_CK_JOIN \ assert(o) -PERL_CALLCONV OP* Perl_ck_lengthconst(pTHX_ OP *o) - __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_CK_LENGTHCONST \ - assert(o) - PERL_CALLCONV OP* Perl_ck_lfun(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1);