summaryrefslogtreecommitdiff
path: root/Makefile.micro
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-15 13:21:09 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-11 10:39:59 +0200
commit6f83ef0e5a45c465f83de3304c5818ba44492250 (patch)
tree6b5a754cde4ee86baf633e6415f18b5fd8e721ff /Makefile.micro
parent546efe9fbd6c3c651c39b369e97d0835230a0f9f (diff)
downloadperl-6f83ef0e5a45c465f83de3304c5818ba44492250.tar.gz
Create a lookup table for magic vtables from magic type, PL_magic_data.
Use it to eliminate the large switch statement in Perl_sv_magic(). As the table needs to be keyed on magic type, which is expressed as C character constants, the order depends on the compiler's character set. Frustratingly, EBCDIC variants don't agree on the code points for '~' and ']', which we use here. Instead of having (at least) 4 tables, get the local runtime to sort the table for us. Hence the regen script writes out the (unsorted) mg_raw.h, which generate_uudmap sorts to generate mg_data.h
Diffstat (limited to 'Makefile.micro')
-rw-r--r--Makefile.micro8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile.micro b/Makefile.micro
index b5a7123f9a..45cf26e962 100644
--- a/Makefile.micro
+++ b/Makefile.micro
@@ -36,7 +36,7 @@ H = av.h uconfig.h cop.h cv.h embed.h embedvar.h form.h gv.h handy.h \
HE = $(H) EXTERN.h
clean:
- -rm -f $(O) microperl generate_uudmap$(_X) uudmap.h bitcount.h
+ -rm -f $(O) microperl generate_uudmap$(_X) uudmap.h bitcount.h mg_data.h
distclean: clean
@@ -78,7 +78,7 @@ udoop$(_O): $(HE) doop.c
udump$(_O): $(HE) dump.c regcomp.h regnodes.h
$(CC) $(CCFLAGS) -o $@ $(CFLAGS) dump.c
-uglobals$(_O): $(H) globals.c INTERN.h perlapi.h uudmap.h bitcount.h
+uglobals$(_O): $(H) globals.c INTERN.h perlapi.h uudmap.h bitcount.h mg_data.h
$(CC) $(CCFLAGS) -o $@ $(CFLAGS) globals.c
ugv$(_O): $(HE) gv.c
@@ -177,8 +177,8 @@ uutil$(_O): $(HE) util.c
uperlapi$(_O): $(HE) perlapi.c perlapi.h
$(CC) $(CCFLAGS) -o $@ $(CFLAGS) perlapi.c
-uudmap.h bitcount.h: generate_uudmap$(_X)
- $(RUN) ./generate_uudmap$(_X) uudmap.h bitcount.h
+uudmap.h bitcount.h mg_data.h: generate_uudmap$(_X)
+ $(RUN) ./generate_uudmap$(_X) uudmap.h bitcount.h mg_data.h
generate_uudmap$(_O): generate_uudmap.c
$(CC) $(CCFLAGS) -o $@ $(CFLAGS) generate_uudmap.c