GCCJIT
view release on metacpan or search on metacpan
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
# DO NOT EDIT - this file is autogenerated by tools/regen.pl
package GCCJIT::Wrapper;
use strict;
use warnings;
use Scalar::Util qw/weaken/;
use GCCJIT;
my %stash;
sub gcc_jit_blockPtr::add_assignment {
die "this block is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_blockPtr"}{$_[0]};
GCCJIT::gcc_jit_block_add_assignment(@_);
}
sub gcc_jit_blockPtr::add_assignment_op {
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
unless defined $stash{"gcc_jit_blockPtr"}{$_[0]};
GCCJIT::gcc_jit_block_add_eval(@_);
}
sub gcc_jit_blockPtr::as_object {
die "this block is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_blockPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_block_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_blockPtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_blockPtr::end_with_conditional {
die "this block is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_blockPtr"}{$_[0]};
GCCJIT::gcc_jit_block_end_with_conditional(@_);
}
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
unless defined $stash{"gcc_jit_blockPtr"}{$_[0]};
GCCJIT::gcc_jit_block_end_with_void_return(@_);
}
sub gcc_jit_blockPtr::get_function {
die "this block is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_blockPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_block_get_function(@_);
if (defined $obj) {
$stash{"gcc_jit_functionPtr"}{$obj} = $stash{"gcc_jit_blockPtr"}{$_[0]};
weaken $stash{"gcc_jit_functionPtr"}{$obj};
}
$obj;
}
sub gcc_jit_casePtr::as_object {
die "this case is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_casePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_case_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_casePtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::acquire {
my $obj = GCCJIT::gcc_jit_context_acquire(@_);
if (defined $obj) {
$stash{"gcc_jit_contextPtr"}{$obj} = $_[0];
}
$obj;
lib/GCCJIT/Wrapper.pm view on Meta::CPAN
*gcc_jit_contextPtr::compile_to_file = \&GCCJIT::gcc_jit_context_compile_to_file;
*gcc_jit_contextPtr::dump_reproducer_to_file = \&GCCJIT::gcc_jit_context_dump_reproducer_to_file;
*gcc_jit_contextPtr::dump_to_file = \&GCCJIT::gcc_jit_context_dump_to_file;
sub gcc_jit_contextPtr::get_builtin_function {
my $obj = GCCJIT::gcc_jit_context_get_builtin_function(@_);
if (defined $obj) {
$stash{"gcc_jit_functionPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_functionPtr"}{$obj};
}
$obj;
}
*gcc_jit_contextPtr::get_first_error = \&GCCJIT::gcc_jit_context_get_first_error;
sub gcc_jit_contextPtr::get_int_type {
my $obj = GCCJIT::gcc_jit_context_get_int_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
*gcc_jit_contextPtr::get_last_error = \&GCCJIT::gcc_jit_context_get_last_error;
sub gcc_jit_contextPtr::get_type {
my $obj = GCCJIT::gcc_jit_context_get_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_array_access {
my $obj = GCCJIT::gcc_jit_context_new_array_access(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_array_type {
my $obj = GCCJIT::gcc_jit_context_new_array_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_binary_op {
my $obj = GCCJIT::gcc_jit_context_new_binary_op(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_call {
my $obj = GCCJIT::gcc_jit_context_new_call(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_call_through_ptr {
my $obj = GCCJIT::gcc_jit_context_new_call_through_ptr(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_case {
my $obj = GCCJIT::gcc_jit_context_new_case(@_);
if (defined $obj) {
$stash{"gcc_jit_casePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_casePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_cast {
my $obj = GCCJIT::gcc_jit_context_new_cast(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_child_context {
my $obj = GCCJIT::gcc_jit_context_new_child_context(@_);
if (defined $obj) {
$stash{"gcc_jit_contextPtr"}{$obj} = $_[0];
}
$obj;
}
sub gcc_jit_contextPtr::new_comparison {
my $obj = GCCJIT::gcc_jit_context_new_comparison(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_field {
my $obj = GCCJIT::gcc_jit_context_new_field(@_);
if (defined $obj) {
$stash{"gcc_jit_fieldPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_fieldPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_function {
my $obj = GCCJIT::gcc_jit_context_new_function(@_);
if (defined $obj) {
$stash{"gcc_jit_functionPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_functionPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_function_ptr_type {
my $obj = GCCJIT::gcc_jit_context_new_function_ptr_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_global {
my $obj = GCCJIT::gcc_jit_context_new_global(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_location {
my $obj = GCCJIT::gcc_jit_context_new_location(@_);
if (defined $obj) {
$stash{"gcc_jit_locationPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_locationPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_opaque_struct {
my $obj = GCCJIT::gcc_jit_context_new_opaque_struct(@_);
if (defined $obj) {
$stash{"gcc_jit_structPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_structPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_param {
my $obj = GCCJIT::gcc_jit_context_new_param(@_);
if (defined $obj) {
$stash{"gcc_jit_paramPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_paramPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_rvalue_from_double {
my $obj = GCCJIT::gcc_jit_context_new_rvalue_from_double(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_rvalue_from_int {
my $obj = GCCJIT::gcc_jit_context_new_rvalue_from_int(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_rvalue_from_long {
my $obj = GCCJIT::gcc_jit_context_new_rvalue_from_long(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_rvalue_from_ptr {
my $obj = GCCJIT::gcc_jit_context_new_rvalue_from_ptr(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_string_literal {
my $obj = GCCJIT::gcc_jit_context_new_string_literal(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_struct_type {
my $obj = GCCJIT::gcc_jit_context_new_struct_type(@_);
if (defined $obj) {
$stash{"gcc_jit_structPtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_structPtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_unary_op {
my $obj = GCCJIT::gcc_jit_context_new_unary_op(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::new_union_type {
my $obj = GCCJIT::gcc_jit_context_new_union_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::null {
my $obj = GCCJIT::gcc_jit_context_null(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_contextPtr::one {
my $obj = GCCJIT::gcc_jit_context_one(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
*gcc_jit_contextPtr::set_bool_allow_unreachable_blocks = \&GCCJIT::gcc_jit_context_set_bool_allow_unreachable_blocks;
*gcc_jit_contextPtr::set_bool_option = \&GCCJIT::gcc_jit_context_set_bool_option;
*gcc_jit_contextPtr::set_int_option = \&GCCJIT::gcc_jit_context_set_int_option;
*gcc_jit_contextPtr::set_logfile = \&GCCJIT::gcc_jit_context_set_logfile;
*gcc_jit_contextPtr::set_str_option = \&GCCJIT::gcc_jit_context_set_str_option;
sub gcc_jit_contextPtr::zero {
my $obj = GCCJIT::gcc_jit_context_zero(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $_[0];
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_fieldPtr::as_object {
die "this field is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_fieldPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_field_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_fieldPtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_functionPtr::as_object {
die "this function is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_functionPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_function_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_functionPtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_functionPtr::dump_to_dot {
die "this function is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_functionPtr"}{$_[0]};
GCCJIT::gcc_jit_function_dump_to_dot(@_);
}
sub gcc_jit_functionPtr::get_param {
die "this function is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_functionPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_function_get_param(@_);
if (defined $obj) {
$stash{"gcc_jit_paramPtr"}{$obj} = $stash{"gcc_jit_functionPtr"}{$_[0]};
weaken $stash{"gcc_jit_paramPtr"}{$obj};
}
$obj;
}
sub gcc_jit_functionPtr::new_block {
die "this function is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_functionPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_function_new_block(@_);
if (defined $obj) {
$stash{"gcc_jit_blockPtr"}{$obj} = $stash{"gcc_jit_functionPtr"}{$_[0]};
weaken $stash{"gcc_jit_blockPtr"}{$obj};
}
$obj;
}
sub gcc_jit_functionPtr::new_local {
die "this function is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_functionPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_function_new_local(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $stash{"gcc_jit_functionPtr"}{$_[0]};
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_locationPtr::as_object {
die "this location is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_locationPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_location_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_locationPtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_lvaluePtr::access_field {
die "this lvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_lvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_lvalue_access_field(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $stash{"gcc_jit_lvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_lvaluePtr::as_object {
die "this lvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_lvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_lvalue_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_lvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_lvaluePtr::as_rvalue {
die "this lvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_lvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_lvalue_as_rvalue(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $stash{"gcc_jit_lvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_lvaluePtr::get_address {
die "this lvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_lvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_lvalue_get_address(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $stash{"gcc_jit_lvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_objectPtr::get_context {
$stash{"gcc_jit_objectPtr"}{$_[0]}
}
sub gcc_jit_objectPtr::get_debug_string {
die "this object is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_objectPtr"}{$_[0]};
GCCJIT::gcc_jit_object_get_debug_string(@_);
}
sub gcc_jit_paramPtr::as_lvalue {
die "this param is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_paramPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_param_as_lvalue(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $stash{"gcc_jit_paramPtr"}{$_[0]};
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_paramPtr::as_object {
die "this param is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_paramPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_param_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_paramPtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_paramPtr::as_rvalue {
die "this param is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_paramPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_param_as_rvalue(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $stash{"gcc_jit_paramPtr"}{$_[0]};
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
*gcc_jit_resultPtr::get_code = \&GCCJIT::gcc_jit_result_get_code;
*gcc_jit_resultPtr::get_global = \&GCCJIT::gcc_jit_result_get_global;
sub gcc_jit_rvaluePtr::access_field {
die "this rvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_rvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_rvalue_access_field(@_);
if (defined $obj) {
$stash{"gcc_jit_rvaluePtr"}{$obj} = $stash{"gcc_jit_rvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_rvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_rvaluePtr::as_object {
die "this rvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_rvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_rvalue_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_rvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_rvaluePtr::dereference {
die "this rvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_rvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_rvalue_dereference(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $stash{"gcc_jit_rvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_rvaluePtr::dereference_field {
die "this rvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_rvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_rvalue_dereference_field(@_);
if (defined $obj) {
$stash{"gcc_jit_lvaluePtr"}{$obj} = $stash{"gcc_jit_rvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_lvaluePtr"}{$obj};
}
$obj;
}
sub gcc_jit_rvaluePtr::get_type {
die "this rvalue is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_rvaluePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_rvalue_get_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $stash{"gcc_jit_rvaluePtr"}{$_[0]};
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_structPtr::as_type {
die "this struct is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_structPtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_struct_as_type(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $stash{"gcc_jit_structPtr"}{$_[0]};
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_structPtr::set_fields {
die "this struct is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_structPtr"}{$_[0]};
GCCJIT::gcc_jit_struct_set_fields(@_);
}
sub gcc_jit_typePtr::as_object {
die "this type is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_typePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_type_as_object(@_);
if (defined $obj) {
$stash{"gcc_jit_objectPtr"}{$obj} = $stash{"gcc_jit_typePtr"}{$_[0]};
weaken $stash{"gcc_jit_objectPtr"}{$obj};
}
$obj;
}
sub gcc_jit_typePtr::get_const {
die "this type is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_typePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_type_get_const(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $stash{"gcc_jit_typePtr"}{$_[0]};
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_typePtr::get_pointer {
die "this type is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_typePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_type_get_pointer(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $stash{"gcc_jit_typePtr"}{$_[0]};
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_typePtr::get_volatile {
die "this type is no longer usable because parent context was destroyed"
unless defined $stash{"gcc_jit_typePtr"}{$_[0]};
my $obj = GCCJIT::gcc_jit_type_get_volatile(@_);
if (defined $obj) {
$stash{"gcc_jit_typePtr"}{$obj} = $stash{"gcc_jit_typePtr"}{$_[0]};
weaken $stash{"gcc_jit_typePtr"}{$obj};
}
$obj;
}
sub gcc_jit_blockPtr::DESTROY {
delete $stash{"gcc_jit_blockPtr"}{$_[0]};
}
sub gcc_jit_casePtr::DESTROY {
delete $stash{"gcc_jit_casePtr"}{$_[0]};
sv_pvutf8||5.006000|
sv_pv||5.006000|
sv_recode_to_utf8||5.007003|
sv_reftype|||
sv_ref|||
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_resetpvn|||
sv_reset|||
sv_rvweaken||5.006000|
sv_sethek|||
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p
sv_setpvf_mg_nocontext|||pvn
sv_setpvf_mg|5.006000|5.004000|pv
sv_setpvf_nocontext|||vn
sv_setpvf||5.004000|v
tools/regen.pl view on Meta::CPAN
return \@decl;
}
my $xs_decls = read_xs_decl("GCCJIT.xs");
print "# DO NOT EDIT - this file is autogenerated by tools/regen.pl\n";
print "package GCCJIT::Wrapper;\n";
print "use strict;\n";
print "use warnings;\n";
print "use Scalar::Util qw/weaken/;\n";
print "use $_;\n" foreach (uniq sort map $_->{package}, @$xs_decls);
print "\nmy %stash;\n";
my %destructor_code;
sub is_memory_owner {
shift() =~ /^gcc_jit_(context|result)Ptr$/;
}
tools/regen.pl view on Meta::CPAN
print "}\n\n";
next;
}
if ($method eq "release") {
$destructor_code{$objpkg}{release} = "$decl->{package}::$decl->{name}(\$_[0])";
next;
}
my $need_check = is_managed_type($objpkg);
my $need_stash = is_managed_type($retpkg) || $objpkg eq $retpkg;
my $need_weaken = is_managed_type($retpkg);
if ($need_stash) {
$destructor_code{$retpkg}{unstash} = "delete \$stash{\"$retpkg\"}{\$_[0]}";
}
unless ($need_check || $need_stash) {
print "*${objpkg}::${method} = \\&$decl->{package}::$decl->{name};\n\n";
} else {
print "sub ${objpkg}::${method} {\n";
tools/regen.pl view on Meta::CPAN
print "$decl->{package}::$decl->{name}(\@_);\n";
if ($need_stash) {
print " if (defined \$obj) {\n";
if ($objpkg eq "gcc_jit_contextPtr") {
print " \$stash{\"$retpkg\"}{\$obj} = \$_[0];\n";
}
else {
print " \$stash{\"$retpkg\"}{\$obj} = \$stash{\"$objpkg\"}{\$_[0]};\n";
}
if ($need_weaken) {
print " weaken \$stash{\"$retpkg\"}{\$obj};\n";
}
print " }\n";
print " \$obj;\n";
}
print "}\n\n";
}
}
foreach my $pkg (sort keys %destructor_code) {
( run in 0.333 second using v1.01-cache-2.11-cpan-1f129e94a17 )