blob: 23f07ef2cadbdcba10ba848c4b2bf1108d40a6d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
; -*- lisp -*-
;; file tvariadic-1.melt
#| run in buildir/gcc
./cc1 -fmelt-mode=runfile -fmelt-module-path=melt-modules:. \
-fmelt-source-path=.:melt-source \
-fmelt-tempdir=/tmp \
-fmelt-arg=$GCCMELT_SOURCE/gcc/testsuite/melt/tvariadic-1.melt \
-fmelt-debug empty-file-for-melt.c
|#
(defun initial-vari (v0)
(list v0))
(defun value-vari (l v)
(list_append l v))
(defun long-vari (l :long n)
(list_append l (make_integerbox discr_integer l)))
(defun final-vari (l)
(list_to_multiple l discr_multiple))
(defvariadic myvariadic (v0)
:initial initial-vari
:value value-vari
:long long-vari
:final final-vari)
(defun testvariadic (x)
(debug_msg x "testvariadic start")
(let ((l (myvariadic 'a 1 'b)))
(debug_msg l "testvariadic result")))
(testvariadic 'foo)
;; eof tvariadic-1.melt
|