summaryrefslogtreecommitdiff
path: root/vms
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 /vms
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 'vms')
-rw-r--r--vms/descrip_mms.template10
1 files changed, 6 insertions, 4 deletions
diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template
index 31faefb7ee..200ab25981 100644
--- a/vms/descrip_mms.template
+++ b/vms/descrip_mms.template
@@ -508,16 +508,16 @@ perlmini.c : perl.c
perlmini$(O) : perlmini.c
$(CC) $(CORECFLAGS) $(MMS$SOURCE)
-bitcount.h : uudmap.h
+bitcount.h mg_data.h : uudmap.h
@ $(NOOP)
uudmap.h : generate_uudmap$(E)
- MCR SYS$DISK:[]generate_uudmap$(E) uudmap.h bitcount.h
+ MCR SYS$DISK:[]generate_uudmap$(E) uudmap.h bitcount.h mg_data.h
generate_uudmap$(E) : generate_uudmap$(O) $(CRTL)
Link $(LINKFLAGS)/NoDebug/Trace/NoMap/NoFull/NoCross/Exe=$(MMS$TARGET) generate_uudmap$(O) $(CRTLOPTS)
-generate_uudmap$(O) : generate_uudmap.c
+generate_uudmap$(O) : generate_uudmap.c mg_raw.h
$(CC) $(CORECFLAGS) $(MMS$SOURCE)
# The following files are built in one go by gen_shrfls.pl:
@@ -1756,7 +1756,7 @@ doop$(O) : doop.c $(h)
$(CC) $(CORECFLAGS) $(MMS$SOURCE)
dump$(O) : dump.c $(h)
$(CC) $(CORECFLAGS) $(MMS$SOURCE)
-globals$(O) : globals.c uudmap.h bitcount.h $(h)
+globals$(O) : globals.c uudmap.h bitcount.h mg_data.h $(h)
$(CC) $(CORECFLAGS) $(MMS$SOURCE)
gv$(O) : gv.c $(h)
$(CC) $(CORECFLAGS) $(MMS$SOURCE)
@@ -1891,6 +1891,7 @@ tidy : cleanlis
- If F$Search("perlmain.c;-1") .nes."" Then Purge/NoConfirm/Log perlmain.c
- If F$Search("uudmap.h;-1") .nes."" Then Purge/NoConfirm/Log uudmap.h
- If F$Search("bitcount.h;-1") .nes."" Then Purge/NoConfirm/Log bitcount.h
+ - If F$Search("mg_data.h;-1") .nes."" Then Purge/NoConfirm/Log mg_data.h
- If F$Search("Perlshr_Gbl*.Mar;-1") .nes."" Then Purge/NoConfirm/Log Perlshr_Gbl*.Mar
- If F$Search("[.ext.Opcode...];-1").nes."" Then Purge/NoConfirm/Log [.ext.Opcode]
- If F$Search("[.vms.ext...]*.C;-1").nes."" Then Purge/NoConfirm/Log [.vms.ext...]*.C
@@ -1924,6 +1925,7 @@ clean : tidy cleantest
- If F$Search("perlmini.c") .nes."" Then Delete/NoConfirm/Log perlmini.c;*
- If F$Search("uudmap.h") .nes."" Then Delete/NoConfirm/Log uudmap.h;*
- If F$Search("bitcount.h") .nes."" Then Delete/NoConfirm/Log bitcount.h;*
+ - If F$Search("mg_data.h") .nes."" Then Delete/NoConfirm/Log md_data.h;*
- If F$Search("Perlshr_Gbl*.Mar") .nes."" Then Delete/NoConfirm/Log Perlshr_Gbl*.Mar;*
- If F$Search("*.TS").nes."" Then Delete/NoConfirm/Log *.TS;*
- If F$Search("[.vms.ext...]*.C").nes."" Then Delete/NoConfirm/Log [.vms.ext...]*.C;*