summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-02-20 22:39:56 +0000
committerNicholas Clark <nick@ccl4.org>2008-02-20 22:39:56 +0000
commit9784f5f42a6fe727d098291f8a63216b4e07c6bb (patch)
tree4d9a0d981380ce6584c70b42ab9b003ba4933403
parent1518d620d80f21c46a5f3757b2ebf28b92c1d602 (diff)
downloadperl-9784f5f42a6fe727d098291f8a63216b4e07c6bb.tar.gz
Eliminate ck_lengthconst.
p4raw-id: //depot/perl@33338
-rw-r--r--embed.fnc1
-rw-r--r--embed.h2
-rw-r--r--op.c9
-rw-r--r--opcode.h2
-rwxr-xr-xopcode.pl2
-rw-r--r--pod/perltodo.pod8
-rw-r--r--pp.sym1
-rw-r--r--pp_proto.h1
-rw-r--r--proto.h6
9 files changed, 2 insertions, 30 deletions
diff --git a/embed.fnc b/embed.fnc
index 8edfea5b8a..186dceecf4 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 3d28f6edda..df45cb704c 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 d9bf34644e..9c4ce51214 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 65545a4ec0..d59b96207e 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 b59af50cc7..098f83cb0f 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 bbf2f05c8d..caa1a833e5 100644
--- a/pod/perltodo.pod
+++ b/pod/perltodo.pod
@@ -386,14 +386,6 @@ macro used can be changed.
=back
-=head2
-
-C<Perl_ck_lengthconst> 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 c3159c5989..74060e3677 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 6a4352172a..847e4f15ea 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 62fbfd94ea..26ce7569d7 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);