Alien-LibJIT
view release on metacpan or search on metacpan
libjit/include/jit/jit-plus.h view on Meta::CPAN
/*
* jit-plus.h - C++ binding for the JIT library.
*
* Copyright (C) 2004 Southern Storm Software, Pty Ltd.
*
* The libjit library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 2.1 of
* the License, or (at your option) any later version.
*
* The libjit library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the libjit library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef _JIT_PLUS_H
#define _JIT_PLUS_H
#include <jit/jit.h>
#ifdef __cplusplus
class jit_build_exception
{
public:
jit_build_exception(int result) { this->result = result; }
~jit_build_exception() {}
int result;
};
class jit_value
{
public:
jit_value() { this->value = 0; }
jit_value(jit_value_t value) { this->value = value; }
jit_value(const jit_value& value) { this->value = value.value; }
~jit_value() {}
jit_value& operator=(const jit_value& value)
{ this->value = value.value; return *this; }
jit_value_t raw() const { return value; }
int is_valid() const { return (value != 0); }
int is_temporary() const { return jit_value_is_temporary(value); }
int is_local() const { return jit_value_is_local(value); }
int is_constant() const { return jit_value_is_constant(value); }
int is_parameter() const { return jit_value_is_parameter(value); }
void set_volatile() { jit_value_set_volatile(value); }
int is_volatile() const { return jit_value_is_volatile(value); }
void set_addressable() { jit_value_set_addressable(value); }
int is_addressable() const { return jit_value_is_addressable(value); }
jit_type_t type() const { return jit_value_get_type(value); }
( run in 1.096 second using v1.01-cache-2.11-cpan-2398b32b56e )