PR149: Used wrong class loader.
[cacao.git] / src / vm / jit / stubs.hpp
1 /* src/vm/jit/stubs.hpp - JIT stubs
2
3    Copyright (C) 2008 Theobroma Systems Ltd.
4
5    This file is part of CACAO.
6
7    This program is free software; you can redistribute it and/or
8    modify it under the terms of the GNU General Public License as
9    published by the Free Software Foundation; either version 2, or (at
10    your option) any later version.
11
12    This program is distributed in the hope that it will be useful, but
13    WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15    General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20    02110-1301, USA.
21
22 */
23
24
25 #ifndef _STUBS_HPP
26 #define _STUBS_HPP
27
28 #include "config.h"
29
30 #include <stdint.h>
31
32 #include "vm/method.hpp"
33
34 #include "vm/jit/code.hpp"
35
36
37 #ifdef __cplusplus
38
39 /**
40  * Class for compiler stub generation.
41  */
42 class CompilerStub {
43 public:
44         static inline int get_code_size();
45
46         static void* generate(methodinfo* m);
47         static void  remove(void* stub);
48 };
49
50
51 /**
52  * Class for builtin stub generation.
53  */
54 class BuiltinStub {
55 public:
56         static void generate(methodinfo* m, builtintable_entry* bte);
57 };
58
59
60 /**
61  * Class for native stub generation.
62  */
63 class NativeStub {
64 public:
65         static codeinfo* generate(methodinfo* m, functionptr f);
66         static void      remove(void* stub);
67 };
68
69
70 // Include machine dependent implementation.
71 #include "md-stubs.hpp"
72
73 #endif
74
75 #endif // _STUBS_HPP
76
77
78 /*
79  * These are local overrides for various environment variables in Emacs.
80  * Please do not remove this and leave it at the end of the file, where
81  * Emacs will automagically detect them.
82  * ---------------------------------------------------------------------
83  * Local variables:
84  * mode: c++
85  * indent-tabs-mode: t
86  * c-basic-offset: 4
87  * tab-width: 4
88  * End:
89  * vim:noexpandtab:sw=4:ts=4:
90  */