github.com/goccy/go-jit@v0.0.0-20200514131505-ff78d45cf6af/internal/ccall/include/jit/jit-block.h (about) 1 /* 2 * jit-block.h - Functions for manipulating blocks. 3 * 4 * Copyright (C) 2004 Southern Storm Software, Pty Ltd. 5 * 6 * The libjit library is free software: you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public License 8 * as published by the Free Software Foundation, either version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * The libjit library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with the libjit library. If not, see 18 * <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef _JIT_BLOCK_H 22 #define _JIT_BLOCK_H 23 24 #include <jit/jit-common.h> 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 jit_function_t jit_block_get_function(jit_block_t block) JIT_NOTHROW; 31 jit_context_t jit_block_get_context(jit_block_t block) JIT_NOTHROW; 32 jit_label_t jit_block_get_label(jit_block_t block) JIT_NOTHROW; 33 jit_label_t jit_block_get_next_label(jit_block_t block, 34 jit_label_t label) JIT_NOTHROW; 35 jit_block_t jit_block_next(jit_function_t func, 36 jit_block_t previous) JIT_NOTHROW; 37 jit_block_t jit_block_previous(jit_function_t func, 38 jit_block_t previous) JIT_NOTHROW; 39 jit_block_t jit_block_from_label(jit_function_t func, 40 jit_label_t label) JIT_NOTHROW; 41 int jit_block_set_meta(jit_block_t block, int type, void *data, 42 jit_meta_free_func free_data) JIT_NOTHROW; 43 void *jit_block_get_meta(jit_block_t block, int type) JIT_NOTHROW; 44 void jit_block_free_meta(jit_block_t block, int type) JIT_NOTHROW; 45 int jit_block_is_reachable(jit_block_t block) JIT_NOTHROW; 46 int jit_block_ends_in_dead(jit_block_t block) JIT_NOTHROW; 47 int jit_block_current_is_dead(jit_function_t func) JIT_NOTHROW; 48 49 #ifdef __cplusplus 50 }; 51 #endif 52 53 #endif /* _JIT_BLOCK_H */