run.h

00001 /*
00002  * Copyright (c) 2011 Jiri Svoboda
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * - Redistributions of source code must retain the above copyright
00010  *   notice, this list of conditions and the following disclaimer.
00011  * - Redistributions in binary form must reproduce the above copyright
00012  *   notice, this list of conditions and the following disclaimer in the
00013  *   documentation and/or other materials provided with the distribution.
00014  * - The name of the author may not be used to endorse or promote products
00015  *   derived from this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00018  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00019  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00020  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00021  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
00022  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00023  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00024  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00025  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00026  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027  */
00028 
00029 #ifndef RUN_H_
00030 #define RUN_H_
00031 
00032 #include "mytypes.h"
00033 
00034 void run_init(run_t *run);
00035 void run_gdata_init(run_t *run);
00036 void run_program(run_t *run, stree_program_t *prog);
00037 void run_proc(run_t *run, run_proc_ar_t *proc_ar, rdata_item_t **res);
00038 void run_stat(run_t *run, stree_stat_t *stat, rdata_item_t **res);
00039 
00040 void run_print_fun_bt(run_t *run);
00041 
00042 void run_exc_check_unhandled(run_t *run);
00043 void run_raise_error(run_t *run);
00044 rdata_item_t *run_recovery_item(run_t *run);
00045 
00046 rdata_var_t *run_local_vars_lookup(run_t *run, sid_t name);
00047 run_proc_ar_t *run_get_current_proc_ar(run_t *run);
00048 run_block_ar_t *run_get_current_block_ar(run_t *run);
00049 stree_csi_t *run_get_current_csi(run_t *run);
00050 
00051 rdata_var_t *run_sobject_get(run_t *run, stree_csi_t *pcsi,
00052     rdata_var_t *pobj_var, sid_t name);
00053 rdata_var_t *run_sobject_find(run_t *run, stree_csi_t *csi);
00054 rdata_var_t *run_fun_sobject_find(run_t *run, stree_fun_t *fun);
00055 
00056 void run_value_item_to_var(rdata_item_t *item, rdata_var_t **var);
00057 void run_proc_ar_set_args(run_t *run, run_proc_ar_t *proc_ar,
00058     list_t *arg_vals);
00059 void run_proc_ar_set_setter_arg(run_t *run, run_proc_ar_t *proc_ar,
00060     rdata_item_t *arg_val);
00061 void run_proc_ar_create(run_t *run, rdata_var_t *obj, stree_proc_t *proc,
00062     run_proc_ar_t **rproc_ar);
00063 void run_proc_ar_destroy(run_t *run, run_proc_ar_t *proc_ar);
00064 
00065 var_class_t run_item_get_vc(run_t *run, rdata_item_t *item);
00066 void run_cvt_value_item(run_t *run, rdata_item_t *item, rdata_item_t **ritem);
00067 void run_address_read(run_t *run, rdata_address_t *address,
00068     rdata_item_t **ritem);
00069 void run_address_write(run_t *run, rdata_address_t *address,
00070     rdata_value_t *value);
00071 void run_reference(run_t *run, rdata_var_t *var, rdata_item_t **res);
00072 void run_dereference(run_t *run, rdata_item_t *ref, cspan_t *cspan,
00073     rdata_item_t **ritem);
00074 
00075 void run_raise_exc(run_t *run, stree_csi_t *csi, cspan_t *cspan);
00076 bool_t run_is_bo(run_t *run);
00077 
00078 void run_var_new(run_t *run, tdata_item_t *ti, rdata_var_t **rvar);
00079 
00080 run_thread_ar_t *run_thread_ar_new(void);
00081 run_proc_ar_t *run_proc_ar_new(void);
00082 void run_proc_ar_delete(run_proc_ar_t *proc_ar);
00083 run_block_ar_t *run_block_ar_new(void);
00084 void run_block_ar_delete(run_block_ar_t *block_ar);
00085 void run_proc_ar_delete(run_proc_ar_t *proc_ar);
00086 void run_block_ar_destroy(run_t *run, run_block_ar_t *block_ar);
00087 
00088 
00089 #endif

Generated on Thu Jun 2 07:45:42 2011 for HelenOS/USB by  doxygen 1.4.7