ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/libcpjit/cpjit.h.PL
Revision: 1.2
Committed: Tue Oct 11 20:18:18 2005 UTC (21 years ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.1: +29 -12 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #!/usr/bin/perl
2    
3     # create cpjit.h
4    
5     open STDOUT, ">cpjit.h"
6     or die "cpijit.h: $!";
7    
8     print <<EOF;
9     /*
10 root 1.2 This file is AUTOMAGICALLY created by cpjit.h.PL. Modifications will
11     be lost.
12    
13 root 1.1 cpjit.h -- c portable jit in time compiler
14     Copyright (C) 2005 Marc Lehmann <cpjit@schmorp.de>
15    
16     This file is part of libcpjit.
17    
18     libcpjit is free software; you can redistribute it and/or modify
19     it under the terms of the GNU General Public License as published by
20     the Free Software Foundation; either version 2 of the License, or
21     (at your option) any later version.
22    
23     This program is distributed in the hope that it will be useful,
24     but WITHOUT ANY WARRANTY; without even the implied warranty of
25     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26     GNU General Public License for more details.
27    
28     You should have received a copy of the GNU General Public License
29     along with gvpe; if not, write to the Free Software
30     Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
31     */
32    
33     namespace cpjit
34     {
35    
36 root 1.2 // environment for persistent or temporary storage
37     struct env
38     {
39     };
40    
41     struct func_base
42     {
43     };
44    
45     struct funcbuilder_base
46     {
47     };
48    
49     template<typename R, typename A1>
50     struct function : func_base
51     {
52     function (env &e, id i)
53     : func_base (e, i, typestr<typename R>)
54     {
55     typename R
56     operator ()(A1 a1)
57     {
58     return ((typename R (*)(A1 a1)) ptr ())(a1);
59     }
60     };
61    
62 root 1.1 EOF
63    
64     print <<EOF;
65     }
66     EOF
67