develooper Front page | perl.perl5.porters | Postings from February 2008

#33267 has latent bug (was) [patch] optimize OP_IS_(FILETEST|SOCKET) macros

From:
Jim Cromie
Date:
February 23, 2008 20:03
Subject:
#33267 has latent bug (was) [patch] optimize OP_IS_(FILETEST|SOCKET) macros
Message ID:
cfe85dfa0802232003q2e31dcbcu39749147c58c2bc9@mail.gmail.com
>  > Thanks, applied (change 33267)
>  >
>  > Nicholas Clark
>  >

The bug is in unoptimized branch of macro generator,
it has stale, hardcoded var.  Bug would manifest iff
the ops in a macro being generated were no longer sequential.

This version:
fixes comment from last version.
generates OP_IS_FILETEST_ACCESS macro
via new call to gen_op_is_macro() and new 'F-+' arg-flag
drops macro from op.h.
Saves 16 bytes.


2nd patch converts OP_IS_NUMCOMPARE
to be auto-gen'd, via new /S</ arg-flag.
Macro is used 2x in op.c, saving another 16 bytes.


hmph. 32 bytes. hmpf



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About