opcode_dict.h

Go to the documentation of this file.
00001 /* TinyaML
00002  * Copyright (C) 2007 Damien Leroux
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017  */
00018 
00019 #ifndef _BML_OPCODE_DICT_H_
00020 #define _BML_OPCODE_DICT_H_
00021 
00022 #include <stdio.h>
00023 
00030 opcode_dict_t opcode_dict_new();
00031 void opcode_dict_free(opcode_dict_t);
00032 void opcode_dict_init(opcode_dict_t);
00033 void opcode_dict_deinit(opcode_dict_t);
00034 
00035 void opcode_dict_add(opcode_dict_t, opcode_arg_t, const char*, opcode_stub_t);
00036 
00037 opcode_stub_t opcode_stub_by_name(opcode_dict_t, opcode_arg_t, const char*);
00038 opcode_stub_t opcode_stub_by_code(opcode_dict_t, word_t);
00039 word_t opcode_code_by_stub(opcode_dict_t, opcode_stub_t);
00040 const char* opcode_name_by_stub(opcode_dict_t, opcode_stub_t);
00041 
00042 int opcode_dict_link_stubs(opcode_dict_t target, opcode_dict_t src);
00043 int opcode_dict_resolve_stubs(opcode_dict_t src);
00044 
00045 
00046 void opcode_dict_serialize(opcode_dict_t od, writer_t);
00047 void opcode_dict_unserialize(opcode_dict_t od, reader_t, void*);
00048 
00049 opcode_dict_t opcode_dict_optimize(vm_t vm, program_t prog);
00050 
00051 
00054 #endif
00055 

Generated on Wed Feb 6 14:46:04 2008 for TinyaML by  doxygen 1.5.3