summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog.melt4
-rw-r--r--gcc/Makefile.in31
-rw-r--r--gcc/melt/warmelt-normatch.bysl42
3 files changed, 59 insertions, 18 deletions
diff --git a/gcc/ChangeLog.melt b/gcc/ChangeLog.melt
index 6efc7896ece..913ad560d4f 100644
--- a/gcc/ChangeLog.melt
+++ b/gcc/ChangeLog.melt
@@ -1,3 +1,7 @@
+2008-11-10 Basile Starynkevitch <basile@starynkevitch.net>
+ * Makefile.in: added rules for warmelt2n.modlis...
+ * melt/warmelt-normatch.bysl: added catch alls for anypattern, any value, nil...
+
2008-11-09 Basile Starynkevitch <basile@starynkevitch.net>
[collecting reliably all stuff, e.g. gimple ctype, even when
allocated in a closure]
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 9c6d4a28135..9649464a56c 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -5000,15 +5000,15 @@ MELTBASILYSCCSHOW1= time ./cc1$(exeext) -fbasilys=showmdata \
warm%.so: warm%.c built-melt-cc-script
./built-melt-cc-script $< $@
-warm%-n.so : warm%.c built-melt-cc-script
+warm%-n.so: warm%.c built-melt-cc-script
./built-melt-cc-script -DMELTGCC_NOLINENUMBERING $< $@
-warm%-d.so : warm%.c built-melt-cc-script
+warm%-d.so: warm%.c built-melt-cc-script
./built-melt-cc-script -d $< $@
###
ana%.so: ana%.c built-melt-cc-script
./built-melt-cc-script $< $@
-ana%-n.so : ana%.c built-melt-cc-script
+ana%-n.so: ana%.c built-melt-cc-script
./built-melt-cc-script -DMELTGCC_NOLINENUMBERING $< $@
ana%-d.so : ana%.c built-melt-cc-script
./built-melt-cc-script -d $< $@
@@ -5017,9 +5017,6 @@ ana%-d.so : ana%.c built-melt-cc-script
warmelt-%-0.so: $(srcdir)/warmelt-%-0.c built-melt-cc-script
./built-melt-cc-script $< $@
-warm%-n.so : warm%.c built-melt-cc-script
- ./built-melt-cc-script -DMELTGCC_NOLINENUMBERING $< $@
-
## the warmelt files - order is important!
WARMELT_FILES= \
warmelt-first.bysl \
@@ -5049,6 +5046,7 @@ WARMELT_BASE1ROW:=$(shell echo $(WARMELT_BASE1)|sed 's/ /:/g')
##
WARMELT_BASE2= $(patsubst %, %-2, $(WARMELT_BASE))
WARMELT_BASE2SO= $(patsubst %, %-2.so, $(WARMELT_BASE))
+WARMELT_BASE2NSO= $(patsubst %, %-2-n.so, $(WARMELT_BASE))
WARMELT_BASE2C= $(patsubst %, %-2.c, $(WARMELT_BASE))
WARMELT_BASE2ROW:=$(shell echo $(WARMELT_BASE2)|sed 's/ /:/g')
##
@@ -5168,13 +5166,6 @@ warmelt2.modlis: $(WARMELT_BASE2SO)
for f in $(WARMELT_BASE2); do echo $$f >> $@-tmp; done
$(SHELL) $(srcdir)/../move-if-change $@-tmp $@
-warmelt-%-2.c: $(srcdir)/melt/warmelt-%.bysl warmelt1.modlis $(WARMELT_BASE1SO) cc1$(exeext) $(WARMELT_BASE1NSO)
- @echo generating $@ using $(WARMELT_BASE1SO)
- -rm -f $@
- $(MELTBASILYSCCFILE1) -fbasilys-init="@warmelt1" \
- -fbasilys-arg=$< -frandom-seed=$(shell md5sum $< | cut -b-24) \
- -fbasilys-secondarg=$@
- ls -l $@
warmelt-first-2.c: $(srcdir)/melt/warmelt-first.bysl warmelt1.modlis $(WARMELT_BASE1SO) cc1$(exeext)
-rm -f $@
@echo test showmdata using $(WARMELT_BASE1SO)
@@ -5184,7 +5175,21 @@ warmelt-first-2.c: $(srcdir)/melt/warmelt-first.bysl warmelt1.modlis $(WARMELT_B
-fbasilys-arg=$< \
-fbasilys-secondarg=$@
ls -l $@
+warmelt-%-2.c: $(srcdir)/melt/warmelt-%.bysl warmelt1.modlis $(WARMELT_BASE1SO) cc1$(exeext) $(WARMELT_BASE1NSO)
+ @echo generating $@ using $(WARMELT_BASE1SO)
+ -rm -f $@
+ $(MELTBASILYSCCFILE1) -fbasilys-init="@warmelt1" \
+ -fbasilys-arg=$< -frandom-seed=$(shell md5sum $< | cut -b-24) \
+ -fbasilys-secondarg=$@
+ ls -l $@
+
+warmelt-%-2-n.so: warmelt-%-2.c built-melt-cc-script
+ ./built-melt-cc-script -DMELTGCC_NOLINENUMBERING $< $@
+warmelt2n.modlis: $(WARMELT_BASE2NSO)
+ date +"#$@ generated %c" > $@-tmp
+ for f in $(WARMELT_BASE2); do echo $$f-n >> $@-tmp; done
+ $(SHELL) $(srcdir)/../move-if-change $@-tmp $@
####
warmelt-%-3.c: $(srcdir)/melt/warmelt-%.bysl warmelt2.modlis $(WARMELT_BASE2SO) cc1$(exeext)
diff --git a/gcc/melt/warmelt-normatch.bysl b/gcc/melt/warmelt-normatch.bysl
index c31bd2795f3..ff966f3200f 100644
--- a/gcc/melt/warmelt-normatch.bysl
+++ b/gcc/melt/warmelt-normatch.bysl
@@ -54,17 +54,42 @@
;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;
-;;; catch-all for scanning anyrecv
-(defun scanpat_anyrecv (recv psloc ctyp pcn)
- (debug_msg recv "scanpat_anyrecv recv")
+;;; scanning nil
+(defun scanpat_nil (recv psloc ctyp pcn)
+ (debug_msg recv "scanpat_nil recv")
+ (assert_msg "check nil recv" (null recv))
+ (assert_msg "check pcn" (is_a pcn class_patterncontext))
+)
+(install_method discr_nullrecv scan_pattern scanpat_nil)
+
+;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;
+;;; catch-all for scanning any reciever (by failing)
+(defun scanpat_anypattern (recv psloc ctyp pcn)
+ (debug_msg recv "scanpat_anypattern recv")
+ (assert_msg "check pcn" (is_a pcn class_patterncontext))
+ (let ( (myclass (discrim recv))
+ (myclassname (get_field :named_name myclass)) )
+ (error_strv psloc
+ "unimplemented scan_pattern for any " myclassname)
+ (assert_msg "catchall scan_pattern unimplemented" ())
+))
+(install_method class_srcpattern_any scan_pattern scanpat_anypattern)
+
+;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;
+;;; catch-all for scanning any pattern (by failing)
+(defun scanpat_anypattern (recv psloc ctyp pcn)
+ (debug_msg recv "scanpat_anypattern recv")
+ (assert_msg "check pcn" (is_a recv class_srcpattern_any))
(assert_msg "check pcn" (is_a pcn class_patterncontext))
(let ( (myclass (discrim recv))
(myclassname (get_field :named_name myclass)) )
(error_strv psloc
- "unimplemented scan_pattern for " myclassname)
+ "unimplemented scan_pattern for pattern " myclassname)
(assert_msg "catchall scan_pattern unimplemented" ())
))
-(install_method discr_anyrecv scan_pattern scanpat_anyrecv)
+(install_method class_srcpattern_any scan_pattern scanpat_anypattern)
;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;
@@ -262,9 +287,16 @@
(normalize_tuple sins env ncx sloc)
(debug_msg nins "scanpat_srcpatcomposite nins")
(if bindins (list_append2list bindlist bindins))
+ (debug_msg souts "scanpat_srcpatcomposite souts")
(foreach_in_multiple
(souts)
(pout :long ix)
+ (if (null pout)
+ (progn
+ (debug_msg discr_nullrecv "scanpat_srcpatcomposite null pout discr_nullrecv")
+ (debug_msg discr_anyrecv "scanpat_srcpatcomposite null pout discr_anyrecv")
+ ))
+ (debug_msg pout "scanpat_srcpatcomposite pout")
(scan_pattern pout sloc ctyp pcn)
)
(debug_msg recv "scanpat_srcpatcomposite end recv")