From d069ea235d807ecf74781c19dfe410461f926337 Mon Sep 17 00:00:00 2001 From: Andi Idogawa Date: Fri, 20 Nov 2026 08:46:34 +0100 Subject: [PATCH 1/2] C API: TracePoint, debug inspector and the last loose ends ruby/debug.h had no implementation: rb_tracepoint_new and friends raised NotImplementedError. rb_tracepoint_new now makes an ordinary TracePoint (the RUBY_EVENT_* bits are TraceEvents') whose hook calls the C function with the TracePoint; rb_tracearg_* answer from the TracePoint's readers, so rb_tracearg_from_tracepoint hands back the TracePoint's own handle. rb_debug_inspector_open lists the frames caller_locations reports. The C method that opened it and its Ruby caller get self, class and a binding. IronRuby keeps no chain of the callers' scopes, so frames further up have only their location. Also: - rb_iter_break called from a Ruby block (C method inside `3.times { ... }`) breaks out of the innermost block around the call, as a break in eval'd code does. It used to raise NotImplementedError. - Kernel#binding called from C (rb_funcall(self, "binding")) raises RuntimeError, as CRuby does, instead of capturing the C method's caller. - ObjectSpace.memsize_of a typed T_DATA object adds what its dsize function reports. IMemorySized moves into IronRuby.dll, so DataObject can implement it. - rb_time_new, rb_time_nano_new and rb_time_timespec_new no longer go through Time.at, which a program may redefine (CRuby makes the Time directly). They add an exact Rational to the epoch instead. - A FREEZE bit that C code wrote into RBASIC(obj)->flags itself now freezes the object. The receiver's and arguments' slots are checked when a C method returns. - rb_fd_fix_cloexec maps IronRuby's IO#fileno number to the native descriptor before fcntl, so the flag lands on the right descriptor. spec/optional/capi failures and errors go from 21 to 1 (digest_spec, next commit), with none new. IronRuby.Tests passes, and so do spec/core/tracepoint, Kernel#binding, Time.at and spec/library/objectspace. --- Src/Libraries/Builtins/ObjectSpace.cs | 8 - Src/Ruby/Builtins/IMemorySized.cs | 16 + Src/Ruby/CApi/CApi.Calls.cs | 26 +- Src/Ruby/CApi/CApi.Debug.cs | 242 +++ Src/Ruby/CApi/CApi.Generated.cs | 1480 ++++++++++++------- Src/Ruby/CApi/CApi.Library.cs | 11 + Src/Ruby/CApi/CApi.Values.cs | 17 + Src/Ruby/CApi/CApi.Variables.cs | 26 +- Src/Ruby/CApi/DataObject.cs | 7 +- Src/Ruby/CApi/functions.txt | 28 + Src/Ruby/CApi/native/capi.c | 38 +- Src/Ruby/CApi/native/capi.h | 2 + Src/Ruby/CApi/native/forwarders.generated.c | 282 +++- Util/capi/generate.rb | 2 +- 14 files changed, 1618 insertions(+), 567 deletions(-) create mode 100644 Src/Ruby/Builtins/IMemorySized.cs create mode 100644 Src/Ruby/CApi/CApi.Debug.cs diff --git a/Src/Libraries/Builtins/ObjectSpace.cs b/Src/Libraries/Builtins/ObjectSpace.cs index a69922d2f..018dcfef8 100644 --- a/Src/Libraries/Builtins/ObjectSpace.cs +++ b/Src/Libraries/Builtins/ObjectSpace.cs @@ -23,14 +23,6 @@ using System.Runtime.CompilerServices; namespace IronRuby.Builtins { - /// - /// What a C extension's rb_data_type_t.dsize function reports: the bytes an object holds - /// outside its slot. ObjectSpace.memsize_of adds it to the slot, as MRI does. - /// - internal interface IMemorySized { - long ExtraMemorySize { get; } - } - [RubyModule("ObjectSpace")] public static class ObjectSpace { #region define_finalizer, undefine_finalizer diff --git a/Src/Ruby/Builtins/IMemorySized.cs b/Src/Ruby/Builtins/IMemorySized.cs new file mode 100644 index 000000000..bdfb402ce --- /dev/null +++ b/Src/Ruby/Builtins/IMemorySized.cs @@ -0,0 +1,16 @@ +/* **************************************************************************** + * + * This source code is subject to terms and conditions of the Apache License, Version 2.0. A + * copy of the license can be found in the License.html file at the root of this distribution. + * + * ***************************************************************************/ + +namespace IronRuby.Builtins { + /// + /// The bytes an object holds outside its slot, as a C extension's rb_data_type_t.dsize function + /// reports them. ObjectSpace.memsize_of adds it to the slot, as MRI does. + /// + public interface IMemorySized { + long ExtraMemorySize { get; } + } +} diff --git a/Src/Ruby/CApi/CApi.Calls.cs b/Src/Ruby/CApi/CApi.Calls.cs index 43d0bc2d2..5e290359d 100644 --- a/Src/Ruby/CApi/CApi.Calls.cs +++ b/Src/Ruby/CApi/CApi.Calls.cs @@ -126,7 +126,11 @@ internal static object InvokeMethod(CMethod/*!*/ method, RubyScope/*!*/ scope, o argv[i] = ToValue(args[i]); } result = CallMethod(method.Function, method.Arity, selfValue, argc, argv); + for (int i = 0; i < argc; i++) { + SyncRawFreeze(argv[i]); + } } + SyncRawFreeze(selfValue); return FromValue(result); } catch (CBlockBreak b) when (b.Bfc == frame.Bfc && frame.Bfc != null) { return b.ReturnValue; @@ -299,9 +303,18 @@ internal static object SendWith(bool publicOnly, object target, string/*!*/ name // caller's frame - $~ by Regexp#match, $_ by gets - is the Ruby frame that called the C // method, as in CRuby (the svar of the nearest Ruby-level frame). RubyScope scope = (_frame != null ? _frame.Scope : null) ?? _context.EmptyScope; + if (name == "binding" && _frame != null && IsKernelBinding(target)) { + // Kernel#binding would capture the frame of the C method's caller + throw RubyExceptions.CreateRuntimeError("Can't create Binding from C level function"); + } return site.Target(site, scope, target, block, new RubyArray(args)); } + private static bool IsKernelBinding(object target) { + var method = _context.ResolveMethod(target, "binding", VisibilityContext.AllVisible).Info; + return method != null && method.DeclaringModule == _context.KernelModule; + } + private static Proc TakePassedBlock() { var block = _passedBlock; _passedBlock = null; @@ -531,9 +544,16 @@ internal static void rb_iter_break() { internal static void rb_iter_break_value(VALUE val) { if (_cBlockDepth == 0) { - // a break out of a Ruby block from C called inside it: IronRuby's break needs the - // block's own frame, which a C function is not given - throw RubyExceptions.CreateNotImplementedError("rb_iter_break outside a block written in C is not implemented by IronRuby's C API yet"); + // called from a Ruby block: break out of the innermost one around the call, as a + // break in eval'd code does (CRuby's rb_iter_break unwinds to the block's caller) + RubyBlockScope blockScope; + RubyMethodScope methodScope; + (_frame?.Scope ?? _context.EmptyScope).GetInnerMostBlockOrMethodScope(out blockScope, out methodScope); + if (blockScope == null) { + throw new LocalJumpError("break from proc-closure", "break", FromValue(val)); + } + var proc = blockScope.BlockFlowControl.Proc; + throw new EvalUnwinder(BlockReturnReason.Break, proc.Converter, proc.Kind, FromValue(val)); } throw new CIterBreak(FromValue(val)); } diff --git a/Src/Ruby/CApi/CApi.Debug.cs b/Src/Ruby/CApi/CApi.Debug.cs new file mode 100644 index 000000000..5c8f3bf01 --- /dev/null +++ b/Src/Ruby/CApi/CApi.Debug.cs @@ -0,0 +1,242 @@ +/* **************************************************************************** + * + * This source code is subject to terms and conditions of the Apache License, Version 2.0. A + * copy of the license can be found in the License.html file at the root of this distribution. + * + * ***************************************************************************/ + +using System; +using System.Runtime.InteropServices; +using IronRuby.Builtins; +using VALUE = System.UInt64; + +namespace IronRuby.Runtime.CApi { + /// + /// ruby/debug.h: TracePoints with a C hook, the trace argument readers, and the debug + /// inspector. ObjectSpace.memsize_of's call into a typed object's dsize function too. + /// + internal static unsafe partial class CApi { + + #region TracePoint + + private static delegate* unmanaged[Cdecl] _callTracepoint; + + // MRI's RUBY_EVENT_* bits, which TraceEvents shares; the names in bit order, as TracePoint#event + private static readonly string[] _traceEventNames = { + "line", "class", "end", "call", "return", "c_call", "c_return", "raise", + "b_call", "b_return", "thread_begin", "thread_end", "fiber_switch", "script_compiled", "rescue" + }; + + // The hook is func(tpval, data). target_thread is not supported by CRuby either (the + // parameter is named target_thread_not_supported_yet): it traces every thread. + internal static VALUE rb_tracepoint_new(VALUE target_thread, uint events, IntPtr func, void* data) { + if (_callTracepoint == null) { + _callTracepoint = (delegate* unmanaged[Cdecl])ShimExport("rb_ir_call_tracepoint"); + } + var handler = Proc.Create(_context, 0, new Func((b, self, unused, args) => { + int raised; + var depth = EnterNative(); + try { + _callTracepoint((void*)func, ToValue(args.Count > 0 ? args[0] : null), data, &raised); + } finally { + LeaveNative(depth); + } + if (raised != 0) { + Rethrow(); + } + return null; + })); + return ToValue(new TracePoint(_context, (TraceEvents)(events & (uint)TraceEvents.All), handler)); + } + + private static TracePoint/*!*/ ToTracePoint(VALUE tpval) { + var tp = FromValue(tpval) as TracePoint; + if (tp == null) { + throw RubyExceptions.CreateTypeError(String.Format("wrong argument type {0} (expected tracepoint)", ClassName(FromValue(tpval)))); + } + return tp; + } + + internal static VALUE rb_tracepoint_enable(VALUE tpval) { + ToTracePoint(tpval).Enable(); + return Qundef; + } + + internal static VALUE rb_tracepoint_disable(VALUE tpval) { + ToTracePoint(tpval).Disable(); + return Qundef; + } + + internal static VALUE rb_tracepoint_enabled_p(VALUE tpval) { + return ToTracePoint(tpval).IsEnabled ? Qtrue : Qfalse; + } + + // rb_trace_arg_t is opaque to extensions: IronRuby's is the TracePoint's handle, whose + // readers answer for the event being delivered, as tracearg's do. + internal static void* rb_tracearg_from_tracepoint(VALUE tpval) { + ToTracePoint(tpval); + return (void*)tpval; + } + + private static VALUE TraceArg(void* arg, string/*!*/ name) { + return CallV((VALUE)arg, name); + } + + internal static uint rb_tracearg_event_flag(void* arg) { + int i = Array.IndexOf(_traceEventNames, FromValue(TraceArg(arg, "event"))?.ToString()); + return i >= 0 ? 1u << i : 0; + } + + internal static VALUE rb_tracearg_event(void* arg) { return TraceArg(arg, "event"); } + internal static VALUE rb_tracearg_lineno(void* arg) { return TraceArg(arg, "lineno"); } + internal static VALUE rb_tracearg_path(void* arg) { return TraceArg(arg, "path"); } + internal static VALUE rb_tracearg_parameters(void* arg) { return TraceArg(arg, "parameters"); } + internal static VALUE rb_tracearg_method_id(void* arg) { return TraceArg(arg, "method_id"); } + internal static VALUE rb_tracearg_callee_id(void* arg) { return TraceArg(arg, "callee_id"); } + internal static VALUE rb_tracearg_defined_class(void* arg) { return TraceArg(arg, "defined_class"); } + internal static VALUE rb_tracearg_binding(void* arg) { return TraceArg(arg, "binding"); } + internal static VALUE rb_tracearg_self(void* arg) { return TraceArg(arg, "self"); } + internal static VALUE rb_tracearg_return_value(void* arg) { return TraceArg(arg, "return_value"); } + internal static VALUE rb_tracearg_raised_exception(void* arg) { return TraceArg(arg, "raised_exception"); } + internal static VALUE rb_tracearg_eval_script(void* arg) { return TraceArg(arg, "eval_script"); } + internal static VALUE rb_tracearg_instruction_sequence(void* arg) { return TraceArg(arg, "instruction_sequence"); } + + #endregion + + #region Debug inspector + + private static delegate* unmanaged[Cdecl] _callInspector; + + /// + /// One frame rb_debug_inspector_open saw. Only the C method that opened it and the Ruby + /// code that called that method are known in full: IronRuby keeps no chain of the callers' + /// scopes, so the frames above them have a location and nothing else. + /// + private sealed class InspectedFrame { + public object Self, Class, Binding, Location; + } + + private static InspectedFrame[]/*!*/ InspectFrames() { + var locations = Send(_context.KernelModule, "caller_locations", null, 0) as RubyArray ?? new RubyArray(); + var frame = _frame; + int offset = frame != null ? 1 : 0; + var frames = new InspectedFrame[locations.Count + offset]; + for (int i = 0; i < locations.Count; i++) { + frames[i + offset] = new InspectedFrame { Location = locations[i] }; + } + if (frame == null) { + return frames; + } + + // a C frame has no binding; its location is its caller's, as a cfunc frame's is in CRuby + frames[0] = new InspectedFrame { + Self = frame.Self, + Class = frame.Method.Owner, + Location = locations.Count > 0 ? locations[0] : null, + }; + var scope = frame.Scope; + if (scope != null && frames.Length > 1) { + var binding = Binding.Create(scope, scope.SelfObject); + string path; + int line; + if (scope.TryGetCurrentSourceLocation(out path, out line)) { + binding.SourcePath = path; + binding.SourceLine = line; + } + var methodScope = scope.GetInnerMostMethodScope(); + frames[1].Self = scope.SelfObject; + frames[1].Class = methodScope != null ? (object)methodScope.DeclaringModule : null; + frames[1].Binding = binding; + } + return frames; + } + + internal static VALUE rb_debug_inspector_open(IntPtr func, void* data) { + if (_callInspector == null) { + _callInspector = (delegate* unmanaged[Cdecl])ShimExport("rb_ir_call_inspector"); + } + var handle = GCHandle.Alloc(InspectFrames()); + try { + int raised; + VALUE result; + var depth = EnterNative(); + try { + result = _callInspector((void*)func, (void*)GCHandle.ToIntPtr(handle), data, &raised); + } finally { + LeaveNative(depth); + } + if (raised != 0) { + Rethrow(); + } + return result; + } finally { + handle.Free(); + } + } + + private static InspectedFrame/*!*/ InspectedFrameAt(void* dc, long index) { + var frames = (InspectedFrame[])GCHandle.FromIntPtr((IntPtr)dc).Target; + long i = index; + if (i < 0 || i >= frames.Length) { + throw RubyExceptions.CreateArgumentError("no such frame"); + } + return frames[i]; + } + + internal static VALUE rb_debug_inspector_backtrace_locations(void* dc) { + var frames = (InspectedFrame[])GCHandle.FromIntPtr((IntPtr)dc).Target; + var result = new RubyArray(frames.Length); + foreach (var frame in frames) { + result.Add(frame.Location); + } + return ToValue(result); + } + + internal static VALUE rb_debug_inspector_frame_self_get(void* dc, long index) { return ToValue(InspectedFrameAt(dc, index).Self); } + internal static VALUE rb_debug_inspector_frame_class_get(void* dc, long index) { return ToValue(InspectedFrameAt(dc, index).Class); } + internal static VALUE rb_debug_inspector_frame_binding_get(void* dc, long index) { return ToValue(InspectedFrameAt(dc, index).Binding); } + + // IronRuby has no RubyVM::InstructionSequence + internal static VALUE rb_debug_inspector_frame_iseq_get(void* dc, long index) { + InspectedFrameAt(dc, index); + return Qnil; + } + + // the frames are counted from the outermost, as CRuby's depth is + internal static VALUE rb_debug_inspector_frame_depth(void* dc, long index) { + var frames = (InspectedFrame[])GCHandle.FromIntPtr((IntPtr)dc).Target; + InspectedFrameAt(dc, index); + return ToValue(frames.Length - 1 - index); + } + + internal static VALUE rb_debug_inspector_current_depth() { + return ToValue((long)InspectFrames().Length); + } + + #endregion + + #region ObjectSpace.memsize_of + + private static delegate* unmanaged[Cdecl] _typedDataMemsize; + + internal static long TypedDataMemsize(DataObject/*!*/ obj) { + if (_typedDataMemsize == null) { + _typedDataMemsize = (delegate* unmanaged[Cdecl])ShimExport("rb_ir_typed_data_memsize"); + } + int raised; + nuint size; + var depth = EnterNative(); + try { + size = _typedDataMemsize(ToValue(obj), &raised); + } finally { + LeaveNative(depth); + } + if (raised != 0) { + Rethrow(); + } + return (long)size; + } + + #endregion + } +} diff --git a/Src/Ruby/CApi/CApi.Generated.cs b/Src/Ruby/CApi/CApi.Generated.cs index c34c3d29e..82a033f21 100644 --- a/Src/Ruby/CApi/CApi.Generated.cs +++ b/Src/Ruby/CApi/CApi.Generated.cs @@ -5,555 +5,583 @@ namespace IronRuby.Runtime.CApi { internal static unsafe partial class CApi { - internal const int FunctionCount = 546; + internal const int FunctionCount = 574; internal static void FillFunctionTable(IntPtr* table) { table[0] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_builtin_type; table[1] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rbasic_class; table[2] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_define_dummy_encoding; - table[3] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_fl_test; - table[4] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_fl_set; - table[5] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_fl_unset; - table[6] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_fl_reverse; - table[7] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rstring_len; - table[8] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rstring_ptr; - table[9] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rarray_len; - table[10] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rarray_ptr; - table[11] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rarray_aref; - table[12] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rarray_aset; - table[13] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_caught; - table[14] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rescue_match; - table[15] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_current_exception; - table[16] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_set_current_exception; - table[17] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_warn; - table[18] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_str_new_buffer; - table[19] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_raise_notimp; - table[20] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_bug; - table[21] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_string_value_cstr; - table[22] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_subpos; - table[23] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_id2name; - table[24] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_classname; - table[25] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_sourcefile; - table[26] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2dbl; - table[27] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cstr_to_dbl; - table[28] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_float_value; - table[29] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2dbl; - table[30] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_to_dbl; - table[31] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_frame_this_func; - table[32] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_intern2; - table[33] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_intern; - table[34] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_intern_str; - table[35] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_id; - table[36] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_symbol; - table[37] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_id_cstr; - table[38] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_symbol_cstr; - table[39] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_sym2id; - table[40] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_to_id; - table[41] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ascii8bit_encindex; - table[42] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_block_given_p; - table[43] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cmpint; - table[44] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_defined; - table[45] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_during_gc; - table[46] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_find_index; - table[47] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_get_index; - table[48] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_eql; - table[49] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_integer_pack; - table[50] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_keyword_given_p; - table[51] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_respond_to; - table[52] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_sourceline; - table[53] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_cmp; - table[54] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_usascii_encindex; - table[55] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_utf8_encindex; - table[56] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2ll; - table[57] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2ll; - table[58] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2long; - table[59] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fix2int; - table[60] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2int; - table[61] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2long; - table[62] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_strlen; - table[63] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_sublen; - table[64] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ascii8bit_encoding; - table[65] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_find; - table[66] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_from_index; - table[67] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_get; - table[68] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_to_encoding; - table[69] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_usascii_encoding; - table[70] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_utf8_encoding; - table[71] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fix2short; - table[72] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2short; - table[73] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_capacity; - table[74] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_hash; - table[75] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2ull; - table[76] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2ull; - table[77] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2ulong; - table[78] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2uint; - table[79] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2ulong; - table[80] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2ushort; - table[81] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_any_to_s; - table[82] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Array; - table[83] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_aref; - table[84] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_cat; - table[85] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_clear; - table[86] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_concat; - table[87] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_delete_at; - table[88] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_delete; - table[89] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_dup; - table[90] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_entry; - table[91] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_freeze; - table[92] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_hidden_new; - table[93] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_includes; - table[94] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_join; - table[95] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_new_capa; - table[96] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_new_from_values; - table[97] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_new; - table[98] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_plus; - table[99] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_pop; - table[100] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_push; - table[101] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_reverse; - table[102] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_rotate; - table[103] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_shift; - table[104] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_sort_bang; - table[105] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_sort; - table[106] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_subseq; - table[107] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_to_ary; - table[108] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_to_s; - table[109] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_unshift; - table[110] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_assoc_new; - table[111] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_attr_get; - table[112] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2str; - table[113] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_block_call; - table[114] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_block_proc; - table[115] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_call_super; - table[116] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_string_type; - table[117] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_get_superclass; - table[118] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_inherited_p; - table[119] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_name; - table[120] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_new_instance; - table[121] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_path; - table[122] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_superclass; - table[123] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_get_at; - table[124] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_get; - table[125] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cstr2inum; - table[126] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cstr_to_inum; - table[127] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_dbl2big; - table[128] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_class; - table[129] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_class_under; - table[130] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_module; - table[131] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_module_under; - table[132] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_each; - table[133] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_associate_index; - table[134] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_associate; - table[135] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_from_encoding; - table[136] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_interned_str; - table[137] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_interned_str_cstr; - table[138] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_buf_cat; - table[139] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_new; - table[140] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_new_cstr; - table[141] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_equal; - table[142] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_errinfo; - table[143] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_eval_string; - table[144] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_exc_new_cstr; - table[145] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_exc_new_str; - table[146] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_exc_new; - table[147] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_external_str_new; - table[148] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_external_str_new_cstr; - table[149] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_external_str_new_with_enc; - table[150] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fix2str; - table[151] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_float_new; - table[152] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_float_new_in_heap; - table[153] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Float; - table[154] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcall_passing_block; - table[155] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcallv_kw; - table[156] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcallv_public; - table[157] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcallv; - table[158] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcall_with_block; - table[159] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_location; - table[160] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gv_get; - table[161] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gv_set; - table[162] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_aref; - table[163] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_aset; - table[164] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_clear; - table[165] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_delete; - table[166] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_dup; - table[167] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_lookup2; - table[168] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_lookup; - table[169] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_new; - table[170] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_size; - table[171] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_id2str; - table[172] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_id2sym; - table[173] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_inspect; - table[174] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_int2big; - table[175] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Integer; - table[176] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_interned_str; - table[177] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_interned_str_cstr; - table[178] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_int_positive_pow; - table[179] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_iterate; - table[180] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ivar_defined; - table[181] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ivar_get; - table[182] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ivar_set; - table[183] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_iv_get; - table[184] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_iv_set; - table[185] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ll2inum; - table[186] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_locale_str_new; - table[187] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_locale_str_new_cstr; - table[188] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mod_ancestors; - table[189] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mod_name; - table[190] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_new; - table[191] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2fix; - table[192] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_alloc; - table[193] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_as_string; - table[194] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_class; - table[195] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_clone; - table[196] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_dup; - table[197] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_encoding; - table[198] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_freeze; - table[199] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_frozen_p; - table[200] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_hide; - table[201] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_id; - table[202] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_instance_eval; - table[203] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_is_instance_of; - table[204] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_is_kind_of; - table[205] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_reveal; - table[206] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_path2class; - table[207] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_require; - table[208] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_singleton_class; - table[209] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str2inum; - table[210] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_append; - table[211] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_buf_append; - table[212] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_buf_new; - table[213] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_cat_cstr; - table[214] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_cat; - table[215] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_conv_enc_opts; - table[216] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_conv_enc; - table[217] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_drop_bytes; - table[218] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_dup; - table[219] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_encode; - table[220] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_equal; - table[221] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_export_locale; - table[222] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_export_to_enc; - table[223] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_export; - table[224] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_freeze; - table[225] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_String; - table[226] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_string_value; - table[227] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_inspect; - table[228] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_intern; - table[229] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_length; - table[230] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_locktmp; - table[231] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new; - table[232] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new_cstr; - table[233] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new_frozen; - table[234] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new_shared; - table[235] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new_static; - table[236] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new_with_class; - table[237] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_plus; - table[238] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_resize; - table[239] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_split; - table[240] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_subseq; - table[241] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_substr; - table[242] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_times; - table[243] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_tmp_new; - table[244] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_to_interned_str; - table[245] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_to_str; - table[246] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_unlocktmp; - table[247] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_current; - table[248] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_to_int; - table[249] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ull2inum; - table[250] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_usascii_str_new; - table[251] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_usascii_str_new_cstr; - table[252] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_usascii_str_new_static; - table[253] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_utf8_str_new_static; - table[254] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_yield_values2; - table[255] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_yield; - table[256] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_store; - table[257] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_type; - table[258] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cmperr; - table[259] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_set; - table[260] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_alias; - table[261] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_alloc_func; - table[262] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_attr; - table[263] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_const; - table[264] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_global_function; - table[265] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_method; - table[266] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_module_function; - table[267] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_private_method; - table[268] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_protected_method; - table[269] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_singleton_method; - table[270] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_copy; - table[271] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_set_index; - table[272] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_error_arity; - table[273] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_error_frozen_object; - table[274] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_exc_fatal; - table[275] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_exc_raise; - table[276] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_extend_object; - table[277] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_mark_maybe; - table[278] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_mark_movable; - table[279] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_mark; - table[280] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_register_address; - table[281] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_register_mark_object; - table[282] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_unregister_address; - table[283] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_writebarrier_unprotect; - table[284] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_writebarrier; - table[285] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_global_variable; - table[286] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_foreach; - table[287] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_include_module; - table[288] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_iter_break_value; - table[289] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_iter_break; - table[290] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_jump_tag; - table[291] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mem_clear; - table[292] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_memerror; - table[293] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_need_block; - table[294] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_call_init; - table[295] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_out_of_int; - table[296] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_scan_args_bad_format; - table[297] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_scan_args_length_mismatch; - table[298] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_errinfo; - table[299] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_free; - table[300] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_modify_expand; - table[301] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_modify; - table[302] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_set_len; - table[303] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_update; - table[304] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_syserr_fail; - table[305] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_undef_alloc_func; - table[306] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_undef_method; - table[307] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_unexpected_type; - table[308] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_string_value_ptr; - table[309] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_new; - table[310] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_get_kwargs; - table[311] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_descriptor; - table[312] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_call_super_kw; - table[313] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_coderange; - table[314] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_method_arity; - table[315] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_to_integer; - table[316] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_array_type; - table[317] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_make_exception; - table[318] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fix2uint; - table[319] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_uint2big; - table[320] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_uint2inum; - table[321] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_int2inum; - table[322] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_absint_size; - table[323] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_absint_singlebit_p; - table[324] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big_sign; - table[325] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big_cmp; - table[326] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big_pack; - table[327] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_file_open_str; - table[328] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_file_open; - table[329] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_class_id_under; - table[330] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_module_id_under; - table[331] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_defined_at; - table[332] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_get_from; - table[333] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class2name; - table[334] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_real; - table[335] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_path_to_class; - table[336] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_funcall; - table[337] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_to_encoding_index; - table[338] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_to_index; - table[339] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_num_new; - table[340] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_aref; - table[341] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_aset; - table[342] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_getmember; - table[343] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_members; - table[344] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_s_members; - table[345] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_size; - table[346] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_initialize; - table[347] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num_coerce_cmp; - table[348] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num_coerce_relop; - table[349] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num_coerce_bin; - table[350] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_synchronize; - table[351] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_lock; - table[352] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_unlock; - table[353] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_trylock; - table[354] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_locked_p; - table[355] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_sleep; - table[356] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_instance_id; - table[357] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_const_id; - table[358] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_class_id; - table[359] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_local_id; - table[360] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_global_id; - table[361] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_attrset_id; - table[362] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_get_path; - table[363] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enumeratorize; - table[364] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enumeratorize_with_size; - table[365] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_new_instance_kw; - table[366] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcall_with_block_kw; - table[367] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_yield_splat; - table[368] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_to_symbol; - table[369] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_syserr_fail_str; - table[370] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_syserr_new_str; - table[371] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_syserr_new; - table[372] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_new; - table[373] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_new_str; - table[374] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_match; - table[375] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_nth_match; - table[376] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_options; - table[377] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_regcomp; - table[378] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_backref_get; - table[379] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_range_new; - table[380] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_range_values; - table[381] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_range_beg_len; - table[382] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_memcicmp; - table[383] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ivar_foreach; - table[384] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_write; - table[385] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_puts; - table[386] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_print; - table[387] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_addstr; - table[388] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_get_io; - table[389] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_io; - table[390] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_closed_p; - table[391] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_binmode; - table[392] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_close; - table[393] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_path; - table[394] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_taint_check; - table[395] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_initialized; - table[396] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_closed; - table[397] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_readable; - table[398] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_char_readable; - table[399] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_byte_readable; - table[400] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_writable; - table[401] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_mode; - table[402] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_set_nonblock; - table[403] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_wait; - table[404] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_check_ints; - table[405] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_sleep_forever; - table[406] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_wait_for; - table[407] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_public_instance_methods; - table[408] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_instance_methods; - table[409] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_private_instance_methods; - table[410] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_protected_instance_methods; - table[411] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_convert_type; - table[412] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_convert_type; - table[413] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_catch_obj; - table[414] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_throw_obj; - table[415] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_throw; - table[416] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_create; - table[417] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_wakeup; - table[418] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_local_aref; - table[419] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_local_aset; - table[420] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_alone; - table[421] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_new; - table[422] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_new_capa; - table[423] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_add; - table[424] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_delete; - table[425] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_lookup; - table[426] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_size; - table[427] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_clear; - table[428] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_foreach; - table[429] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_rational_new; - table[430] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_rational_num; - table[431] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_rational_den; - table[432] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_complex_new; - table[433] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_method; - table[434] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_method_boundp; - table[435] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_respond_to; - table[436] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_instance_variables; - table[437] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ivar_count; - table[438] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_prepend_module; - table[439] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_undef; - table[440] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_alias; - table[441] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_new; - table[442] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_get_alloc_func; - table[443] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_marshal_dump; - table[444] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_marshal_load; - table[445] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc; - table[446] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_enable; - table[447] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_disable; - table[448] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_new_static; - table[449] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_asciionly_p; - table[450] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_dummy_p; - table[451] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_compatible; - table[452] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_default_internal_encoding; - table[453] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_default_external_encoding; - table[454] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_locale_encoding; - table[455] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_locale_encindex; - table[456] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_filesystem_encoding; - table[457] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_filesystem_encindex; - table[458] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_check; - table[459] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_alias; - table[460] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_block_lambda; - table[461] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_sym2str; - table[462] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_intern3; - table[463] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_format; - table[464] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_f_sprintf; - table[465] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_global_const; - table[466] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_f_global_variables; - table[467] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_free_generic_ivar; - table[468] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_copy_generic_ivar; - table[469] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num_zerodiv; - table[470] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_make_backtrace; - table[471] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_singleton_methods; - table[472] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mod_constants; - table[473] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mod_module_eval; - table[474] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_instance_exec; - table[475] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_resize; - table[476] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_replace; - table[477] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_fetch; - table[478] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_set_ifnone; - table[479] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_start; - table[480] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_bulk_insert; - table[481] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_concat; - table[482] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_succ; - table[483] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_replace; - table[484] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_ellipsize; - table[485] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_scrub; - table[486] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_buf_new_cstr; - table[487] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_sym_to_s; - table[488] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_is_proc; - table[489] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_is_method; - table[490] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_call; - table[491] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_call_with_block; - table[492] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_arity; - table[493] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_lambda_p; - table[494] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_method_call; - table[495] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_end_proc; - table[496] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_frame_method_id_and_class; - table[497] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_blocking_begin; - table[498] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_blocking_end; - table[499] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_new; - table[500] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_nano_new; - table[501] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_timespec_new; - table[502] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_interval; - table[503] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_timeval; - table[504] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_timespec; - table[505] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_timespec_now; - table[506] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cvar_get; - table[507] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cvar_set; - table[508] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cvar_defined; - table[509] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cv_get; - table[510] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cv_set; - table[511] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_class_variable; - table[512] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_new_capa; - table[513] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash; - table[514] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_delete_if; - table[515] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_freeze; - table[516] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_new; - table[517] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_resume; - table[518] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_yield; - table[519] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_current; - table[520] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_alive_p; - table[521] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_raise; - table[522] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_call_kw; - table[523] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_call_with_block_kw; - table[524] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_catch; - table[525] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_variable; - table[526] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_readonly_variable; - table[527] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_hooked_variable; - table[528] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_virtual_variable; - table[529] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ident_hash_new; - table[530] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_data_new; - table[531] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_allocate_builtin; - table[532] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_apply; - table[533] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_utf8_str_new; - table[534] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_utf8_str_new_cstr; - table[535] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Hash; - table[536] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Rational; - table[537] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Complex; - table[538] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_backref_set; - table[539] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_lastline_get; - table[540] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_lastline_set; - table[541] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_finalizer; - table[542] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_undefine_finalizer; - table[543] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_arithmetic_sequence_extract; - table[544] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_arithmetic_sequence_beg_len_step; - table[545] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_latest_gc_info; + table[3] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_native_fd; + table[4] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_fl_test; + table[5] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_fl_set; + table[6] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_fl_unset; + table[7] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_fl_reverse; + table[8] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rstring_len; + table[9] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rstring_ptr; + table[10] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rarray_len; + table[11] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rarray_ptr; + table[12] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rarray_aref; + table[13] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rarray_aset; + table[14] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_caught; + table[15] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_rescue_match; + table[16] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_current_exception; + table[17] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_set_current_exception; + table[18] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_warn; + table[19] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_str_new_buffer; + table[20] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_raise_notimp; + table[21] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_bug; + table[22] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_string_value_cstr; + table[23] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_subpos; + table[24] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_id2name; + table[25] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_classname; + table[26] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_sourcefile; + table[27] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2dbl; + table[28] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cstr_to_dbl; + table[29] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_float_value; + table[30] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2dbl; + table[31] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_to_dbl; + table[32] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_frame_this_func; + table[33] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_intern2; + table[34] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_intern; + table[35] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_intern_str; + table[36] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_id; + table[37] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_symbol; + table[38] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_id_cstr; + table[39] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_symbol_cstr; + table[40] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_sym2id; + table[41] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_to_id; + table[42] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ascii8bit_encindex; + table[43] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_block_given_p; + table[44] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cmpint; + table[45] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_defined; + table[46] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_during_gc; + table[47] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_find_index; + table[48] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_get_index; + table[49] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_eql; + table[50] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_integer_pack; + table[51] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_keyword_given_p; + table[52] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_respond_to; + table[53] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_sourceline; + table[54] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_cmp; + table[55] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_usascii_encindex; + table[56] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_utf8_encindex; + table[57] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2ll; + table[58] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2ll; + table[59] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2long; + table[60] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fix2int; + table[61] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2int; + table[62] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2long; + table[63] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_strlen; + table[64] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_sublen; + table[65] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ascii8bit_encoding; + table[66] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_find; + table[67] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_from_index; + table[68] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_get; + table[69] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_to_encoding; + table[70] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_usascii_encoding; + table[71] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_utf8_encoding; + table[72] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fix2short; + table[73] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2short; + table[74] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_capacity; + table[75] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_hash; + table[76] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2ull; + table[77] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2ull; + table[78] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2ulong; + table[79] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2uint; + table[80] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2ulong; + table[81] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2ushort; + table[82] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_any_to_s; + table[83] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Array; + table[84] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_aref; + table[85] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_cat; + table[86] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_clear; + table[87] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_concat; + table[88] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_delete_at; + table[89] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_delete; + table[90] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_dup; + table[91] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_entry; + table[92] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_freeze; + table[93] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_hidden_new; + table[94] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_includes; + table[95] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_join; + table[96] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_new_capa; + table[97] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_new_from_values; + table[98] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_new; + table[99] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_plus; + table[100] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_pop; + table[101] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_push; + table[102] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_reverse; + table[103] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_rotate; + table[104] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_shift; + table[105] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_sort_bang; + table[106] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_sort; + table[107] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_subseq; + table[108] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_to_ary; + table[109] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_to_s; + table[110] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_unshift; + table[111] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_assoc_new; + table[112] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_attr_get; + table[113] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big2str; + table[114] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_block_call; + table[115] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_block_proc; + table[116] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_call_super; + table[117] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_string_type; + table[118] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_get_superclass; + table[119] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_inherited_p; + table[120] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_name; + table[121] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_new_instance; + table[122] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_path; + table[123] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_superclass; + table[124] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_get_at; + table[125] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_get; + table[126] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cstr2inum; + table[127] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cstr_to_inum; + table[128] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_dbl2big; + table[129] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_class; + table[130] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_class_under; + table[131] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_module; + table[132] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_module_under; + table[133] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_each; + table[134] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_associate_index; + table[135] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_associate; + table[136] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_from_encoding; + table[137] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_interned_str; + table[138] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_interned_str_cstr; + table[139] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_buf_cat; + table[140] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_new; + table[141] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_new_cstr; + table[142] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_equal; + table[143] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_errinfo; + table[144] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_eval_string; + table[145] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_exc_new_cstr; + table[146] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_exc_new_str; + table[147] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_exc_new; + table[148] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_external_str_new; + table[149] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_external_str_new_cstr; + table[150] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_external_str_new_with_enc; + table[151] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fix2str; + table[152] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_float_new; + table[153] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_float_new_in_heap; + table[154] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Float; + table[155] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcall_passing_block; + table[156] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcallv_kw; + table[157] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcallv_public; + table[158] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcallv; + table[159] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcall_with_block; + table[160] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_location; + table[161] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gv_get; + table[162] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gv_set; + table[163] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_aref; + table[164] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_aset; + table[165] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_clear; + table[166] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_delete; + table[167] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_dup; + table[168] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_lookup2; + table[169] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_lookup; + table[170] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_new; + table[171] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_size; + table[172] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_id2str; + table[173] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_id2sym; + table[174] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_inspect; + table[175] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_int2big; + table[176] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Integer; + table[177] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_interned_str; + table[178] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_interned_str_cstr; + table[179] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_int_positive_pow; + table[180] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_iterate; + table[181] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ivar_defined; + table[182] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ivar_get; + table[183] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ivar_set; + table[184] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_iv_get; + table[185] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_iv_set; + table[186] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ll2inum; + table[187] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_locale_str_new; + table[188] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_locale_str_new_cstr; + table[189] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mod_ancestors; + table[190] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mod_name; + table[191] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_new; + table[192] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num2fix; + table[193] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_alloc; + table[194] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_as_string; + table[195] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_class; + table[196] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_clone; + table[197] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_dup; + table[198] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_encoding; + table[199] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_freeze; + table[200] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_frozen_p; + table[201] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_hide; + table[202] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_id; + table[203] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_instance_eval; + table[204] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_is_instance_of; + table[205] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_is_kind_of; + table[206] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_reveal; + table[207] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_path2class; + table[208] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_require; + table[209] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_singleton_class; + table[210] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str2inum; + table[211] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_append; + table[212] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_buf_append; + table[213] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_buf_new; + table[214] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_cat_cstr; + table[215] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_cat; + table[216] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_conv_enc_opts; + table[217] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_conv_enc; + table[218] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_drop_bytes; + table[219] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_dup; + table[220] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_encode; + table[221] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_equal; + table[222] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_export_locale; + table[223] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_export_to_enc; + table[224] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_export; + table[225] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_freeze; + table[226] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_String; + table[227] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_string_value; + table[228] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_inspect; + table[229] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_intern; + table[230] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_length; + table[231] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_locktmp; + table[232] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new; + table[233] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new_cstr; + table[234] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new_frozen; + table[235] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new_shared; + table[236] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new_static; + table[237] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_new_with_class; + table[238] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_plus; + table[239] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_resize; + table[240] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_split; + table[241] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_subseq; + table[242] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_substr; + table[243] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_times; + table[244] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_tmp_new; + table[245] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_to_interned_str; + table[246] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_to_str; + table[247] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_unlocktmp; + table[248] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_current; + table[249] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_to_int; + table[250] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ull2inum; + table[251] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_usascii_str_new; + table[252] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_usascii_str_new_cstr; + table[253] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_usascii_str_new_static; + table[254] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_utf8_str_new_static; + table[255] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_yield_values2; + table[256] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_yield; + table[257] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_store; + table[258] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_type; + table[259] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cmperr; + table[260] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_set; + table[261] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_alias; + table[262] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_alloc_func; + table[263] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_attr; + table[264] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_const; + table[265] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_global_function; + table[266] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_method; + table[267] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_module_function; + table[268] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_private_method; + table[269] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_protected_method; + table[270] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_singleton_method; + table[271] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_copy; + table[272] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_set_index; + table[273] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_error_arity; + table[274] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_error_frozen_object; + table[275] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_exc_fatal; + table[276] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_exc_raise; + table[277] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_extend_object; + table[278] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_mark_maybe; + table[279] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_mark_movable; + table[280] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_mark; + table[281] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_register_address; + table[282] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_register_mark_object; + table[283] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_unregister_address; + table[284] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_writebarrier_unprotect; + table[285] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_writebarrier; + table[286] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_global_variable; + table[287] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_foreach; + table[288] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_include_module; + table[289] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_iter_break_value; + table[290] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_iter_break; + table[291] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_jump_tag; + table[292] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mem_clear; + table[293] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_memerror; + table[294] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_need_block; + table[295] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_call_init; + table[296] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_out_of_int; + table[297] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_scan_args_bad_format; + table[298] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_scan_args_length_mismatch; + table[299] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_errinfo; + table[300] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_free; + table[301] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_modify_expand; + table[302] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_modify; + table[303] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_set_len; + table[304] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_update; + table[305] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_syserr_fail; + table[306] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_undef_alloc_func; + table[307] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_undef_method; + table[308] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_unexpected_type; + table[309] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_string_value_ptr; + table[310] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_new; + table[311] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_get_kwargs; + table[312] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_descriptor; + table[313] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_call_super_kw; + table[314] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_coderange; + table[315] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_method_arity; + table[316] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_to_integer; + table[317] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_array_type; + table[318] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_make_exception; + table[319] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fix2uint; + table[320] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_uint2big; + table[321] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_uint2inum; + table[322] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_int2inum; + table[323] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_absint_size; + table[324] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_absint_singlebit_p; + table[325] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big_sign; + table[326] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big_cmp; + table[327] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_big_pack; + table[328] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_file_open_str; + table[329] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_file_open; + table[330] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_class_id_under; + table[331] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_module_id_under; + table[332] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_defined_at; + table[333] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_const_get_from; + table[334] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class2name; + table[335] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_real; + table[336] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_path_to_class; + table[337] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_funcall; + table[338] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_to_encoding_index; + table[339] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_to_index; + table[340] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_num_new; + table[341] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_aref; + table[342] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_aset; + table[343] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_getmember; + table[344] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_members; + table[345] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_s_members; + table[346] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_size; + table[347] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_struct_initialize; + table[348] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num_coerce_cmp; + table[349] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num_coerce_relop; + table[350] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num_coerce_bin; + table[351] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_synchronize; + table[352] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_lock; + table[353] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_unlock; + table[354] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_trylock; + table[355] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_locked_p; + table[356] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mutex_sleep; + table[357] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_instance_id; + table[358] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_const_id; + table[359] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_class_id; + table[360] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_local_id; + table[361] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_global_id; + table[362] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_is_attrset_id; + table[363] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_get_path; + table[364] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enumeratorize; + table[365] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enumeratorize_with_size; + table[366] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_new_instance_kw; + table[367] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_funcall_with_block_kw; + table[368] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_yield_splat; + table[369] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_to_symbol; + table[370] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_syserr_fail_str; + table[371] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_syserr_new_str; + table[372] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_syserr_new; + table[373] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_new; + table[374] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_new_str; + table[375] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_match; + table[376] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_nth_match; + table[377] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_options; + table[378] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_reg_regcomp; + table[379] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_backref_get; + table[380] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_range_new; + table[381] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_range_values; + table[382] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_range_beg_len; + table[383] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_memcicmp; + table[384] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ivar_foreach; + table[385] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_write; + table[386] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_puts; + table[387] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_print; + table[388] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_addstr; + table[389] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_get_io; + table[390] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_io; + table[391] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_closed_p; + table[392] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_binmode; + table[393] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_close; + table[394] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_path; + table[395] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_taint_check; + table[396] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_initialized; + table[397] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_closed; + table[398] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_readable; + table[399] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_char_readable; + table[400] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_byte_readable; + table[401] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_check_writable; + table[402] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_mode; + table[403] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_set_nonblock; + table[404] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_io_wait; + table[405] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_check_ints; + table[406] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_sleep_forever; + table[407] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_wait_for; + table[408] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_public_instance_methods; + table[409] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_instance_methods; + table[410] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_private_instance_methods; + table[411] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_protected_instance_methods; + table[412] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_check_convert_type; + table[413] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_convert_type; + table[414] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_catch_obj; + table[415] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_throw_obj; + table[416] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_throw; + table[417] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_create; + table[418] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_wakeup; + table[419] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_local_aref; + table[420] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_local_aset; + table[421] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_thread_alone; + table[422] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_new; + table[423] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_new_capa; + table[424] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_add; + table[425] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_delete; + table[426] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_lookup; + table[427] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_size; + table[428] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_clear; + table[429] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_foreach; + table[430] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_rational_new; + table[431] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_rational_num; + table[432] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_rational_den; + table[433] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_complex_new; + table[434] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_method; + table[435] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_method_boundp; + table[436] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_respond_to; + table[437] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_instance_variables; + table[438] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ivar_count; + table[439] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_prepend_module; + table[440] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_undef; + table[441] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_alias; + table[442] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_class_new; + table[443] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_get_alloc_func; + table[444] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_marshal_dump; + table[445] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_marshal_load; + table[446] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc; + table[447] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_enable; + table[448] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_disable; + table[449] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_new_static; + table[450] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_str_asciionly_p; + table[451] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_dummy_p; + table[452] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_compatible; + table[453] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_default_internal_encoding; + table[454] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_default_external_encoding; + table[455] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_locale_encoding; + table[456] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_locale_encindex; + table[457] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_filesystem_encoding; + table[458] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_filesystem_encindex; + table[459] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_check; + table[460] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_enc_alias; + table[461] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_block_lambda; + table[462] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_sym2str; + table[463] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_intern3; + table[464] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_format; + table[465] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_f_sprintf; + table[466] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_global_const; + table[467] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_f_global_variables; + table[468] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_free_generic_ivar; + table[469] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_copy_generic_ivar; + table[470] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_num_zerodiv; + table[471] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_make_backtrace; + table[472] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_singleton_methods; + table[473] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mod_constants; + table[474] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_mod_module_eval; + table[475] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_instance_exec; + table[476] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_resize; + table[477] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ary_replace; + table[478] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_fetch; + table[479] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_set_ifnone; + table[480] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_start; + table[481] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_bulk_insert; + table[482] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_concat; + table[483] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_succ; + table[484] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_replace; + table[485] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_ellipsize; + table[486] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_scrub; + table[487] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_str_buf_new_cstr; + table[488] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_sym_to_s; + table[489] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_is_proc; + table[490] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_obj_is_method; + table[491] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_call; + table[492] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_call_with_block; + table[493] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_arity; + table[494] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_lambda_p; + table[495] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_method_call; + table[496] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_set_end_proc; + table[497] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_frame_method_id_and_class; + table[498] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_blocking_begin; + table[499] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_blocking_end; + table[500] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_new; + table[501] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_nano_new; + table[502] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_timespec_new; + table[503] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_interval; + table[504] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_timeval; + table[505] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_time_timespec; + table[506] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_timespec_now; + table[507] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cvar_get; + table[508] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cvar_set; + table[509] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cvar_defined; + table[510] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cv_get; + table[511] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_cv_set; + table[512] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_class_variable; + table[513] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_new_capa; + table[514] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash; + table[515] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_delete_if; + table[516] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_hash_freeze; + table[517] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_new; + table[518] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_resume; + table[519] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_yield; + table[520] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_current; + table[521] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_alive_p; + table[522] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_fiber_raise; + table[523] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_call_kw; + table[524] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_proc_call_with_block_kw; + table[525] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_catch; + table[526] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_variable; + table[527] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_readonly_variable; + table[528] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_hooked_variable; + table[529] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_virtual_variable; + table[530] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ident_hash_new; + table[531] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_data_new; + table[532] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_ir_allocate_builtin; + table[533] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_apply; + table[534] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_utf8_str_new; + table[535] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_utf8_str_new_cstr; + table[536] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Hash; + table[537] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Rational; + table[538] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_Complex; + table[539] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_backref_set; + table[540] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_lastline_get; + table[541] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_lastline_set; + table[542] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_define_finalizer; + table[543] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_undefine_finalizer; + table[544] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_arithmetic_sequence_extract; + table[545] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_arithmetic_sequence_beg_len_step; + table[546] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_gc_latest_gc_info; + table[547] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracepoint_new; + table[548] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracepoint_enable; + table[549] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracepoint_disable; + table[550] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracepoint_enabled_p; + table[551] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_from_tracepoint; + table[552] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_event_flag; + table[553] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_event; + table[554] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_lineno; + table[555] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_path; + table[556] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_parameters; + table[557] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_method_id; + table[558] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_callee_id; + table[559] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_defined_class; + table[560] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_binding; + table[561] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_self; + table[562] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_return_value; + table[563] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_raised_exception; + table[564] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_eval_script; + table[565] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_tracearg_instruction_sequence; + table[566] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_debug_inspector_open; + table[567] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_debug_inspector_backtrace_locations; + table[568] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_debug_inspector_frame_self_get; + table[569] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_debug_inspector_frame_class_get; + table[570] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_debug_inspector_frame_binding_get; + table[571] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_debug_inspector_frame_iseq_get; + table[572] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_debug_inspector_frame_depth; + table[573] = (IntPtr)(delegate* unmanaged[Cdecl])&Entry_rb_debug_inspector_current_depth; } [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] @@ -595,6 +623,19 @@ private static int Entry_rb_ir_define_dummy_encoding(byte* name) { } } + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static int Entry_rb_ir_native_fd(int fd) { + var frame = EnterManaged(); + try { + return rb_ir_native_fd(fd); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] private static ulong Entry_rb_ir_fl_test(ulong obj, ulong flags) { var frame = EnterManaged(); @@ -7653,5 +7694,356 @@ private static ulong Entry_rb_gc_latest_gc_info(ulong key) { LeaveManaged(frame); } } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracepoint_new(ulong target_thread_not_supported_yet, uint events, IntPtr func, void* data) { + var frame = EnterManaged(); + try { + return rb_tracepoint_new(target_thread_not_supported_yet, events, func, data); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracepoint_enable(ulong tpval) { + var frame = EnterManaged(); + try { + return rb_tracepoint_enable(tpval); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracepoint_disable(ulong tpval) { + var frame = EnterManaged(); + try { + return rb_tracepoint_disable(tpval); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracepoint_enabled_p(ulong tpval) { + var frame = EnterManaged(); + try { + return rb_tracepoint_enabled_p(tpval); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static void* Entry_rb_tracearg_from_tracepoint(ulong tpval) { + var frame = EnterManaged(); + try { + return rb_tracearg_from_tracepoint(tpval); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static uint Entry_rb_tracearg_event_flag(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_event_flag(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_event(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_event(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_lineno(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_lineno(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_path(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_path(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_parameters(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_parameters(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_method_id(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_method_id(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_callee_id(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_callee_id(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_defined_class(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_defined_class(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_binding(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_binding(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_self(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_self(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_return_value(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_return_value(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_raised_exception(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_raised_exception(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_eval_script(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_eval_script(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_tracearg_instruction_sequence(void* trace_arg) { + var frame = EnterManaged(); + try { + return rb_tracearg_instruction_sequence(trace_arg); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_debug_inspector_open(IntPtr func, void* data) { + var frame = EnterManaged(); + try { + return rb_debug_inspector_open(func, data); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_debug_inspector_backtrace_locations(void* dc) { + var frame = EnterManaged(); + try { + return rb_debug_inspector_backtrace_locations(dc); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_debug_inspector_frame_self_get(void* dc, CLong index) { + var frame = EnterManaged(); + try { + return rb_debug_inspector_frame_self_get(dc, (long)index.Value); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_debug_inspector_frame_class_get(void* dc, CLong index) { + var frame = EnterManaged(); + try { + return rb_debug_inspector_frame_class_get(dc, (long)index.Value); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_debug_inspector_frame_binding_get(void* dc, CLong index) { + var frame = EnterManaged(); + try { + return rb_debug_inspector_frame_binding_get(dc, (long)index.Value); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_debug_inspector_frame_iseq_get(void* dc, CLong index) { + var frame = EnterManaged(); + try { + return rb_debug_inspector_frame_iseq_get(dc, (long)index.Value); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_debug_inspector_frame_depth(void* dc, CLong index) { + var frame = EnterManaged(); + try { + return rb_debug_inspector_frame_depth(dc, (long)index.Value); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } + + [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] + private static ulong Entry_rb_debug_inspector_current_depth() { + var frame = EnterManaged(); + try { + return rb_debug_inspector_current_depth(); + } catch (Exception e) { + SetPending(e); + return default; + } finally { + LeaveManaged(frame); + } + } } } diff --git a/Src/Ruby/CApi/CApi.Library.cs b/Src/Ruby/CApi/CApi.Library.cs index df727261f..5e0e38f25 100644 --- a/Src/Ruby/CApi/CApi.Library.cs +++ b/Src/Ruby/CApi/CApi.Library.cs @@ -573,6 +573,17 @@ internal static void rb_set_end_proc(IntPtr func, VALUE arg) { #region IO + // The descriptor the OS knows for one of IronRuby's (IO#fileno numbers a stream in IronRuby's + // own table), or fd itself when IronRuby has no stream under it: what an extension got + // from rb_cloexec_open or open(2) is native already. -1 for a stream with no descriptor. + internal static int rb_ir_native_fd(int fd) { + if (fd <= 2) { + return fd; + } + var stream = _context.GetStream(fd); + return stream != null ? RubyIO.DescriptorOf(stream) : fd; + } + internal static int rb_io_descriptor(VALUE io) { return (int)Call(FromValue(io), "fileno"); } diff --git a/Src/Ruby/CApi/CApi.Values.cs b/Src/Ruby/CApi/CApi.Values.cs index 07cb7f5a4..2e4a2ba68 100644 --- a/Src/Ruby/CApi/CApi.Values.cs +++ b/Src/Ruby/CApi/CApi.Values.cs @@ -362,6 +362,23 @@ internal static VALUE GetFlags(object obj) { return flags; } + /// + /// Code that writes RBASIC(obj)->flags itself (RBASIC_SET_FLAGS) writes the handle's slot, + /// which IronRuby never reads. A FREEZE bit there on an object that is not frozen was put + /// there that way - the slot only ever starts with it when the object was frozen already, + /// and nothing unfreezes - so the object is frozen now. Checked for the receiver and + /// arguments of a C method when it returns: the objects it is likeliest to have written. + /// + private static void SyncRawFreeze(VALUE value) { + if (value == 0 || (value & 7) != 0 || HandleIndex(value) < 0 || (*(VALUE*)value & FL_FREEZE) == 0) { + return; + } + object obj = FromValue(value); + if (!_context.IsObjectFrozen(obj)) { + _context.FreezeObject(obj); + } + } + private static void SetUserFlags(object obj, VALUE set, VALUE clear) { if ((set & FL_FREEZE) != 0) { _context.FreezeObject(obj); diff --git a/Src/Ruby/CApi/CApi.Variables.cs b/Src/Ruby/CApi/CApi.Variables.cs index c73c2afd4..817396f0c 100644 --- a/Src/Ruby/CApi/CApi.Variables.cs +++ b/Src/Ruby/CApi/CApi.Variables.cs @@ -36,25 +36,35 @@ internal struct TimeSpec { public long tv_nsec { get { return (long)nsec.Value; } set { nsec = new CLong((nint)value); } } } + // The instant sec + frac / per_second, as a UTC Time. CRuby's rb_time_*_new make the + // Time directly, not through Time.at, which a program may have redefined: this goes + // through the epoch and Time#+ with an exact Rational instead. + private static object TimeFromParts(long sec, long frac, long perSecond) { + object epoch = Call(Constant("Time"), "utc", 1970); + object offset = frac == 0 ? Normalize(sec) : + Call(_context.KernelModule, "Rational", Normalize(new BigInteger(sec) * perSecond + frac), Normalize(perSecond)); + return Call(epoch, "+", offset); + } + internal static VALUE rb_time_new(long sec, long usec) { - return ToValue(Call(Constant("Time"), "at", Normalize(sec), Normalize(usec), Sym("usec"))); + return ToValue(Call(TimeFromParts(sec, usec, 1000000), "localtime")); } internal static VALUE rb_time_nano_new(long sec, long nsec) { - return ToValue(Call(Constant("Time"), "at", Normalize(sec), Normalize(nsec), Sym("nsec"))); + return ToValue(Call(TimeFromParts(sec, nsec, 1000000000), "localtime")); } // offset INT_MAX: local time; INT_MAX - 1: UTC; otherwise seconds east of UTC internal static VALUE rb_time_timespec_new(TimeSpec* ts, int offset) { - object t = Call(Constant("Time"), "at", Normalize(ts->tv_sec), Normalize(ts->tv_nsec), Sym("nsec")); + if (offset != Int32.MaxValue && offset != Int32.MaxValue - 1 && (offset <= -86400 || offset >= 86400)) { + throw RubyExceptions.CreateArgumentError("utc_offset out of range"); + } + object t = TimeFromParts(ts->tv_sec, ts->tv_nsec, 1000000000); if (offset == Int32.MaxValue) { - return ToValue(t); + return ToValue(Call(t, "localtime")); } if (offset == Int32.MaxValue - 1) { - return ToValue(Call(t, "utc")); - } - if (offset <= -86400 || offset >= 86400) { - throw RubyExceptions.CreateArgumentError("utc_offset out of range"); + return ToValue(t); } return ToValue(Call(t, "localtime", offset)); } diff --git a/Src/Ruby/CApi/DataObject.cs b/Src/Ruby/CApi/DataObject.cs index 4ca78c142..b51d83ed1 100644 --- a/Src/Ruby/CApi/DataObject.cs +++ b/Src/Ruby/CApi/DataObject.cs @@ -13,7 +13,7 @@ namespace IronRuby.Runtime.CApi { /// TypedData_Wrap_Struct. Its fields - dmark/dfree or the rb_data_type_t, and the data /// pointer - live in its handle's slot (CApi.Values.cs), where the C macros read them. /// - public sealed class DataObject : RubyObject { + public sealed class DataObject : RubyObject, IMemorySized { internal readonly bool Typed; internal DataObject(RubyClass/*!*/ cls, bool typed) @@ -21,6 +21,11 @@ internal DataObject(RubyClass/*!*/ cls, bool typed) Typed = typed; } + // what the type's dsize function says (rb_objspace_data_type_memsize); untyped data has none + long IMemorySized.ExtraMemorySize { + get { return Typed ? CApi.TypedDataMemsize(this) : 0; } + } + /// /// dup and clone allocate through the class's allocator, as MRI's do; the extension's /// initialize_copy then copies the data. diff --git a/Src/Ruby/CApi/functions.txt b/Src/Ruby/CApi/functions.txt index 2aa5cd179..623e0e6cf 100644 --- a/Src/Ruby/CApi/functions.txt +++ b/Src/Ruby/CApi/functions.txt @@ -10,6 +10,7 @@ VALUE rb_ir_builtin_type(VALUE obj); VALUE rb_ir_rbasic_class(VALUE obj); int rb_ir_define_dummy_encoding(const char *name); +int rb_ir_native_fd(int fd); VALUE rb_ir_fl_test(VALUE obj, VALUE flags); void rb_ir_fl_set(VALUE obj, VALUE flags); void rb_ir_fl_unset(VALUE obj, VALUE flags); @@ -559,3 +560,30 @@ VALUE rb_undefine_finalizer(VALUE obj); int rb_arithmetic_sequence_extract(VALUE as, rb_arithmetic_sequence_components_t *buf); VALUE rb_arithmetic_sequence_beg_len_step(VALUE as, long *begp, long *lenp, long *stepp, long len, int err); VALUE rb_gc_latest_gc_info(VALUE key); +VALUE rb_tracepoint_new(VALUE target_thread_not_supported_yet, rb_event_flag_t events, void (*func)(VALUE, void *), void *data); +VALUE rb_tracepoint_enable(VALUE tpval); +VALUE rb_tracepoint_disable(VALUE tpval); +VALUE rb_tracepoint_enabled_p(VALUE tpval); +rb_trace_arg_t *rb_tracearg_from_tracepoint(VALUE tpval); +rb_event_flag_t rb_tracearg_event_flag(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_event(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_lineno(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_path(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_parameters(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_method_id(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_callee_id(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_defined_class(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_binding(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_self(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_return_value(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_raised_exception(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_eval_script(rb_trace_arg_t *trace_arg); +VALUE rb_tracearg_instruction_sequence(rb_trace_arg_t *trace_arg); +VALUE rb_debug_inspector_open(rb_debug_inspector_func_t func, void *data); +VALUE rb_debug_inspector_backtrace_locations(const rb_debug_inspector_t *dc); +VALUE rb_debug_inspector_frame_self_get(const rb_debug_inspector_t *dc, long index); +VALUE rb_debug_inspector_frame_class_get(const rb_debug_inspector_t *dc, long index); +VALUE rb_debug_inspector_frame_binding_get(const rb_debug_inspector_t *dc, long index); +VALUE rb_debug_inspector_frame_iseq_get(const rb_debug_inspector_t *dc, long index); +VALUE rb_debug_inspector_frame_depth(const rb_debug_inspector_t *dc, long index); +VALUE rb_debug_inspector_current_depth(void); diff --git a/Src/Ruby/CApi/native/capi.c b/Src/Ruby/CApi/native/capi.c index 001392563..00219e28b 100644 --- a/Src/Ruby/CApi/native/capi.c +++ b/Src/Ruby/CApi/native/capi.c @@ -115,6 +115,40 @@ rb_ir_call_func1(void *fn, VALUE arg, int *raised) return result; } +/* rb_tracepoint_new's hook: void (*)(VALUE tpval, void *data). */ +RB_IR_EXPORT void +rb_ir_call_tracepoint(void *fn, VALUE tpval, void *data, int *raised) +{ + struct rb_ir_frame frame; + *raised = 0; + RB_IR_PROTECT(frame, ((void (*)(VALUE, void *))fn)(tpval, data), *raised = 1); +} + +/* rb_debug_inspector_open's callback: rb_debug_inspector_func_t. */ +RB_IR_EXPORT VALUE +rb_ir_call_inspector(void *fn, const rb_debug_inspector_t *dc, void *data, int *raised) +{ + struct rb_ir_frame frame; + VALUE result = Qnil; + *raised = 0; + RB_IR_PROTECT(frame, result = ((rb_debug_inspector_func_t)fn)(dc, data), *raised = 1); + return result; +} + +/* What a typed object's dsize function says it holds outside its slot (ObjectSpace.memsize_of). */ +RB_IR_EXPORT size_t +rb_ir_typed_data_memsize(VALUE obj, int *raised) +{ + struct rb_ir_frame frame; + size_t result = 0; + *raised = 0; + const rb_data_type_t *type = RTYPEDDATA_TYPE(obj); + void *data = RTYPEDDATA_GET_DATA(obj); + if (type == NULL || type->function.dsize == NULL || data == NULL) return 0; + RB_IR_PROTECT(frame, result = type->function.dsize(data), *raised = 1); + return result; +} + /* A block written in C: rb_block_call_func. */ RB_IR_EXPORT VALUE rb_ir_call_block(void *fn, VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg, int *raised) @@ -2044,7 +2078,9 @@ rb_update_max_fd(int fd) void rb_fd_fix_cloexec(int fd) { - rb_maygvl_fd_fix_cloexec(fd); + /* IO#fileno is IronRuby's own number for the stream, which rb_io_descriptor hands out */ + int native = rb_ir_native_fd(fd); + if (native >= 0) rb_maygvl_fd_fix_cloexec(native); rb_update_max_fd(fd); } diff --git a/Src/Ruby/CApi/native/capi.h b/Src/Ruby/CApi/native/capi.h index f166e6b42..c99d7737f 100644 --- a/Src/Ruby/CApi/native/capi.h +++ b/Src/Ruby/CApi/native/capi.h @@ -18,6 +18,7 @@ #include "ruby.h" #include "ruby/encoding.h" +#include "ruby/debug.h" #include "ruby/io.h" #include #include @@ -78,6 +79,7 @@ int rb_ir_caught(void); int rb_ir_rescue_match(int count, const VALUE *classes); VALUE rb_ir_current_exception(void); int rb_ir_define_dummy_encoding(const char *name); +int rb_ir_native_fd(int fd); void rb_ir_set_current_exception(VALUE exc); void rb_ir_warn(VALUE message, int verbose_only); VALUE rb_ir_str_new_buffer(const char *ptr, long len, int encindex); diff --git a/Src/Ruby/CApi/native/forwarders.generated.c b/Src/Ruby/CApi/native/forwarders.generated.c index 32bcca376..153307192 100644 --- a/Src/Ruby/CApi/native/forwarders.generated.c +++ b/Src/Ruby/CApi/native/forwarders.generated.c @@ -4,6 +4,7 @@ #undef rb_ir_builtin_type #undef rb_ir_rbasic_class #undef rb_ir_define_dummy_encoding +#undef rb_ir_native_fd #undef rb_ir_fl_test #undef rb_ir_fl_set #undef rb_ir_fl_unset @@ -547,11 +548,39 @@ #undef rb_arithmetic_sequence_extract #undef rb_arithmetic_sequence_beg_len_step #undef rb_gc_latest_gc_info +#undef rb_tracepoint_new +#undef rb_tracepoint_enable +#undef rb_tracepoint_disable +#undef rb_tracepoint_enabled_p +#undef rb_tracearg_from_tracepoint +#undef rb_tracearg_event_flag +#undef rb_tracearg_event +#undef rb_tracearg_lineno +#undef rb_tracearg_path +#undef rb_tracearg_parameters +#undef rb_tracearg_method_id +#undef rb_tracearg_callee_id +#undef rb_tracearg_defined_class +#undef rb_tracearg_binding +#undef rb_tracearg_self +#undef rb_tracearg_return_value +#undef rb_tracearg_raised_exception +#undef rb_tracearg_eval_script +#undef rb_tracearg_instruction_sequence +#undef rb_debug_inspector_open +#undef rb_debug_inspector_backtrace_locations +#undef rb_debug_inspector_frame_self_get +#undef rb_debug_inspector_frame_class_get +#undef rb_debug_inspector_frame_binding_get +#undef rb_debug_inspector_frame_iseq_get +#undef rb_debug_inspector_frame_depth +#undef rb_debug_inspector_current_depth struct rb_ir_function_table { VALUE (*rb_ir_builtin_type)(VALUE obj); VALUE (*rb_ir_rbasic_class)(VALUE obj); int (*rb_ir_define_dummy_encoding)(const char *name); + int (*rb_ir_native_fd)(int fd); VALUE (*rb_ir_fl_test)(VALUE obj, VALUE flags); void (*rb_ir_fl_set)(VALUE obj, VALUE flags); void (*rb_ir_fl_unset)(VALUE obj, VALUE flags); @@ -1095,10 +1124,37 @@ struct rb_ir_function_table { int (*rb_arithmetic_sequence_extract)(VALUE as, rb_arithmetic_sequence_components_t *buf); VALUE (*rb_arithmetic_sequence_beg_len_step)(VALUE as, long *begp, long *lenp, long *stepp, long len, int err); VALUE (*rb_gc_latest_gc_info)(VALUE key); + VALUE (*rb_tracepoint_new)(VALUE target_thread_not_supported_yet, rb_event_flag_t events, void (*func)(VALUE, void *), void *data); + VALUE (*rb_tracepoint_enable)(VALUE tpval); + VALUE (*rb_tracepoint_disable)(VALUE tpval); + VALUE (*rb_tracepoint_enabled_p)(VALUE tpval); + rb_trace_arg_t * (*rb_tracearg_from_tracepoint)(VALUE tpval); + rb_event_flag_t (*rb_tracearg_event_flag)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_event)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_lineno)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_path)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_parameters)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_method_id)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_callee_id)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_defined_class)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_binding)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_self)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_return_value)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_raised_exception)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_eval_script)(rb_trace_arg_t *trace_arg); + VALUE (*rb_tracearg_instruction_sequence)(rb_trace_arg_t *trace_arg); + VALUE (*rb_debug_inspector_open)(rb_debug_inspector_func_t func, void *data); + VALUE (*rb_debug_inspector_backtrace_locations)(const rb_debug_inspector_t *dc); + VALUE (*rb_debug_inspector_frame_self_get)(const rb_debug_inspector_t *dc, long index); + VALUE (*rb_debug_inspector_frame_class_get)(const rb_debug_inspector_t *dc, long index); + VALUE (*rb_debug_inspector_frame_binding_get)(const rb_debug_inspector_t *dc, long index); + VALUE (*rb_debug_inspector_frame_iseq_get)(const rb_debug_inspector_t *dc, long index); + VALUE (*rb_debug_inspector_frame_depth)(const rb_debug_inspector_t *dc, long index); + VALUE (*rb_debug_inspector_current_depth)(void); }; static struct rb_ir_function_table rb_ir_fns; -const int rb_ir_function_count = 546; +const int rb_ir_function_count = 574; void rb_ir_set_functions(void **table) { memcpy(&rb_ir_fns, table, sizeof(rb_ir_fns)); @@ -1128,6 +1184,14 @@ int return rb_ir_result; } +int +(rb_ir_native_fd)(int fd) +{ + int rb_ir_result = rb_ir_fns.rb_ir_native_fd(fd); + RB_IR_CHECK(); + return rb_ir_result; +} + VALUE (rb_ir_fl_test)(VALUE obj, VALUE flags) { @@ -5375,3 +5439,219 @@ VALUE return rb_ir_result; } +VALUE +(rb_tracepoint_new)(VALUE target_thread_not_supported_yet, rb_event_flag_t events, void (*func)(VALUE, void *), void *data) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracepoint_new(target_thread_not_supported_yet, events, func, data); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracepoint_enable)(VALUE tpval) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracepoint_enable(tpval); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracepoint_disable)(VALUE tpval) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracepoint_disable(tpval); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracepoint_enabled_p)(VALUE tpval) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracepoint_enabled_p(tpval); + RB_IR_CHECK(); + return rb_ir_result; +} + +rb_trace_arg_t * +(rb_tracearg_from_tracepoint)(VALUE tpval) +{ + rb_trace_arg_t * rb_ir_result = rb_ir_fns.rb_tracearg_from_tracepoint(tpval); + RB_IR_CHECK(); + return rb_ir_result; +} + +rb_event_flag_t +(rb_tracearg_event_flag)(rb_trace_arg_t *trace_arg) +{ + rb_event_flag_t rb_ir_result = rb_ir_fns.rb_tracearg_event_flag(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_event)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_event(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_lineno)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_lineno(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_path)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_path(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_parameters)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_parameters(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_method_id)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_method_id(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_callee_id)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_callee_id(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_defined_class)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_defined_class(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_binding)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_binding(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_self)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_self(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_return_value)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_return_value(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_raised_exception)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_raised_exception(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_eval_script)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_eval_script(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_tracearg_instruction_sequence)(rb_trace_arg_t *trace_arg) +{ + VALUE rb_ir_result = rb_ir_fns.rb_tracearg_instruction_sequence(trace_arg); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_debug_inspector_open)(rb_debug_inspector_func_t func, void *data) +{ + VALUE rb_ir_result = rb_ir_fns.rb_debug_inspector_open(func, data); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_debug_inspector_backtrace_locations)(const rb_debug_inspector_t *dc) +{ + VALUE rb_ir_result = rb_ir_fns.rb_debug_inspector_backtrace_locations(dc); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_debug_inspector_frame_self_get)(const rb_debug_inspector_t *dc, long index) +{ + VALUE rb_ir_result = rb_ir_fns.rb_debug_inspector_frame_self_get(dc, index); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_debug_inspector_frame_class_get)(const rb_debug_inspector_t *dc, long index) +{ + VALUE rb_ir_result = rb_ir_fns.rb_debug_inspector_frame_class_get(dc, index); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_debug_inspector_frame_binding_get)(const rb_debug_inspector_t *dc, long index) +{ + VALUE rb_ir_result = rb_ir_fns.rb_debug_inspector_frame_binding_get(dc, index); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_debug_inspector_frame_iseq_get)(const rb_debug_inspector_t *dc, long index) +{ + VALUE rb_ir_result = rb_ir_fns.rb_debug_inspector_frame_iseq_get(dc, index); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_debug_inspector_frame_depth)(const rb_debug_inspector_t *dc, long index) +{ + VALUE rb_ir_result = rb_ir_fns.rb_debug_inspector_frame_depth(dc, index); + RB_IR_CHECK(); + return rb_ir_result; +} + +VALUE +(rb_debug_inspector_current_depth)(void) +{ + VALUE rb_ir_result = rb_ir_fns.rb_debug_inspector_current_depth(); + RB_IR_CHECK(); + return rb_ir_result; +} + diff --git a/Util/capi/generate.rb b/Util/capi/generate.rb index 743153cf8..a50a1052c 100644 --- a/Util/capi/generate.rb +++ b/Util/capi/generate.rb @@ -34,7 +34,7 @@ 'uint64_t' => 'ulong', 'int64_t' => 'long', # function pointer typedefs 'rb_block_call_func_t' => 'IntPtr', 'rb_alloc_func_t' => 'IntPtr', 'RUBY_DATA_FUNC' => 'IntPtr', - 'rb_unblock_function_t' => 'IntPtr', 'rb_postponed_job_func_t' => 'IntPtr', + 'rb_unblock_function_t' => 'IntPtr', 'rb_postponed_job_func_t' => 'IntPtr', 'rb_debug_inspector_func_t' => 'IntPtr', # structs passed by value (CApi.Time.cs) 'timeval' => 'TimeVal', 'timespec' => 'TimeSpec', } From e0283168441466772843413e2bad66c5c9f70ac6 Mon Sep 17 00:00:00 2001 From: Andi Idogawa Date: Fri, 20 Nov 2026 08:46:35 +0100 Subject: [PATCH 2/2] C API: digest plugins (ruby/digest.h) A C extension can bring its own hash function to Digest: it wraps an rb_digest_metadata_t with rb_digest_wrap_metadata, which ruby/digest.h finds through rb_ext_resolve_symbol("digest.so", ...), sets it as the "metadata" of a Digest::Base subclass, and digest.so's Base then runs the plugin's init/update/finish functions on a context of ctx_size bytes. On IronRuby rb_ext_resolve_symbol answered NULL, so such an extension failed to load with "rb_digest_wrap_metadata not found", and a Ruby subclass of Digest::Base could not be instantiated at all. The shim now provides the wrapper (a typed object of type "digest/metadata"). Digest::Base gets a constructor for Ruby subclasses: like digest.so's allocator, it looks for "metadata" up the class chain, raises "Digest::Base cannot be directly inherited in Ruby" when there is none, and otherwise creates and initializes the native context (NativeDigest). #update, #finish (which starts the context over, as digest.so's does), #reset, #initialize_copy, #block_length and #digest_length then go to the plugin. The prebuilt AOT subclass of Base gains the matching constructor (Util/aot/gen-subclasses.rb). spec/optional/capi/digest_spec.rb passes, so the C API specs now pass in full (1660 examples). spec/library/digest and IronRuby.Tests pass. --- Src/Libraries/AotSubclasses.Generated.cs | 5 + Src/Libraries/Digest/Digest.cs | 47 ++++++++- Src/Ruby/CApi/CApi.Mirrors.cs | 4 +- Src/Ruby/CApi/CApi.cs | 4 +- Src/Ruby/CApi/NativeDigest.cs | 119 +++++++++++++++++++++++ Src/Ruby/CApi/native/capi.c | 57 +++++++++++ 6 files changed, 231 insertions(+), 5 deletions(-) create mode 100644 Src/Ruby/CApi/NativeDigest.cs diff --git a/Src/Libraries/AotSubclasses.Generated.cs b/Src/Libraries/AotSubclasses.Generated.cs index d808d8ec6..9381b53ea 100644 --- a/Src/Libraries/AotSubclasses.Generated.cs +++ b/Src/Libraries/AotSubclasses.Generated.cs @@ -1296,6 +1296,11 @@ public IronRuby_StandardLibrary_Digest_Digest_Base_Subclass(global::IronRuby.Bui _immediateClass = rubyClass; } + public IronRuby_StandardLibrary_Digest_Digest_Base_Subclass(global::IronRuby.Builtins.RubyClass/*!*/ rubyClass) + : base(rubyClass) { + _immediateClass = rubyClass; + } + public RubyClass/*!*/ ImmediateClass { get { return _immediateClass; } set { _immediateClass = value; } } public RubyInstanceData TryGetInstanceData() { return _instanceData; } public RubyInstanceData/*!*/ GetInstanceData() { return RubyOps.GetInstanceData(ref _instanceData); } diff --git a/Src/Libraries/Digest/Digest.cs b/Src/Libraries/Digest/Digest.cs index d8bd5e91f..3262d0206 100644 --- a/Src/Libraries/Digest/Digest.cs +++ b/Src/Libraries/Digest/Digest.cs @@ -17,6 +17,7 @@ using System.Security.Cryptography; using IronRuby.Builtins; using IronRuby.Runtime; +using IronRuby.Runtime.CApi; using Microsoft.Scripting.Runtime; using Microsoft.Scripting.Utils; @@ -96,6 +97,9 @@ public class Base : Class { private IncrementalHash _incremental; + // A hash function a C extension brings (ruby/digest.h): everything goes to it instead. + private readonly NativeDigest _native; + protected Base(HashAlgorithm/*!*/ algorithm, int blockLength) { Assert.NotNull(algorithm); _algorithm = algorithm; @@ -103,6 +107,29 @@ protected Base(HashAlgorithm/*!*/ algorithm, int blockLength) { _blockLength = blockLength; } + /// + /// A subclass defined in Ruby, which only a C extension's digest plugin is: it sets the + /// class's "metadata" to its rb_digest_metadata_t, and the new object's context starts + /// initialized, as digest.so's allocator leaves it. + /// + protected Base(RubyClass/*!*/ cls) { + object metadata = null; + RubyClass owner = cls; + while (owner != null && !cls.Context.TryGetInstanceVariable(owner, "metadata", out metadata)) { + owner = owner.SuperClass; + } + if (owner == null) { + throw RubyExceptions.CreateRuntimeError("Digest::Base cannot be directly inherited in Ruby"); + } + _native = NativeDigest.TryCreate(metadata); + if (_native == null) { + throw RubyExceptions.CreateTypeError(String.Format("wrong argument type {0} (expected digest/metadata)", + cls.Context.GetClassDisplayName(metadata))); + } + _digestLength = _native.DigestLength; + _blockLength = _native.BlockLength; + } + private protected Base(HashAlgorithmName algorithmName, Func/*!*/ hashData, int digestLength, int blockLength) { Assert.NotNull(hashData); _algorithmName = algorithmName; @@ -131,6 +158,10 @@ public static int DigestLength(Base/*!*/ self) { [RubyMethod("<<")] [RubyMethod("update")] public static Base/*!*/ Update(RubyContext/*!*/ context, Base/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ str) { + if (self._native != null) { + self._native.Update(str.ToByteArray()); + return self; + } self.Append(str.ToByteArray()); return self; } @@ -176,6 +207,13 @@ private void Append(byte[]/*!*/ data) { /// [RubyMethod("initialize_copy", RubyMethodAttributes.PrivateInstance)] public static Base/*!*/ InitializeCopy(Base/*!*/ self, [NotNull]Base/*!*/ other) { + if (self._native != null || other._native != null) { + if (self._native == null || other._native == null) { + throw RubyExceptions.CreateTypeError("different algorithms"); + } + self._native.CopyFrom(other._native); + return self; + } self.Clear(); self._buffer = other._buffer.AsSpan(0, other._count).ToArray(); self._count = other._count; @@ -187,11 +225,18 @@ private void Append(byte[]/*!*/ data) { [RubyMethod("finish", RubyMethodAttributes.PrivateInstance)] public static MutableString/*!*/ Finish(RubyContext/*!*/ context, Base/*!*/ self) { + if (self._native != null) { + return MutableString.CreateBinary(self._native.Finish()); + } return MutableString.CreateBinary(self.GetCurrentHash()); } [RubyMethod("reset")] public static Base/*!*/ Reset(RubyContext/*!*/ context, Base/*!*/ self) { + if (self._native != null) { + self._native.Reset(); + return self; + } self.Clear(); if (self._algorithm != null) { self._algorithm.Initialize(); @@ -216,7 +261,7 @@ private void Clear() { /// internal static bool CanSnapshot(RubyContext/*!*/ context, object obj) { var digest = obj as Base; - if (digest == null) { + if (digest == null || digest._native != null) { return false; } RubyClass cls = context.GetImmediateClassOf(obj); diff --git a/Src/Ruby/CApi/CApi.Mirrors.cs b/Src/Ruby/CApi/CApi.Mirrors.cs index ad92866f1..1cc09f3f6 100644 --- a/Src/Ruby/CApi/CApi.Mirrors.cs +++ b/Src/Ruby/CApi/CApi.Mirrors.cs @@ -246,7 +246,7 @@ private static void RefreshAll() { /// /// Before IronRuby calls C: Ruby code may have changed what C has pointers into. /// - private static int EnterNative() { + internal static int EnterNative() { if (_nativeDepth > 0) { RefreshAll(); } @@ -256,7 +256,7 @@ private static int EnterNative() { /// /// After C returns (or unwinds) to IronRuby. /// - private static void LeaveNative(int depth) { + internal static void LeaveNative(int depth) { _nativeDepth = depth; var mirrors = _activeMirrors; if (mirrors != null && mirrors.Count > 0) { diff --git a/Src/Ruby/CApi/CApi.cs b/Src/Ruby/CApi/CApi.cs index ef5fada59..d6a15e039 100644 --- a/Src/Ruby/CApi/CApi.cs +++ b/Src/Ruby/CApi/CApi.cs @@ -249,7 +249,7 @@ private static void Initialize(RubyContext/*!*/ context) { _defaultAllocator = ShimExport("rb_ir_default_allocator"); } - private static IntPtr ShimExport(string/*!*/ name) { + internal static IntPtr ShimExport(string/*!*/ name) { IntPtr result = Symbol(_shim, name); if (result == IntPtr.Zero) { throw RubyExceptions.CreateLoadError("libironruby-capi has no " + name + " (rebuild it with Util/build-capi.sh)"); @@ -325,7 +325,7 @@ private static object ResolveGlobal(RubyContext/*!*/ context, string/*!*/ path) /// /// Rethrows what a C function raised: called when a trampoline reports that it unwound. /// - private static void Rethrow() { + internal static void Rethrow() { Exception e = _pending; _pending = null; if (e == null) { diff --git a/Src/Ruby/CApi/NativeDigest.cs b/Src/Ruby/CApi/NativeDigest.cs new file mode 100644 index 000000000..012ba0784 --- /dev/null +++ b/Src/Ruby/CApi/NativeDigest.cs @@ -0,0 +1,119 @@ +/* **************************************************************************** + * + * This source code is subject to terms and conditions of the Apache License, Version 2.0. A + * copy of the license can be found in the License.html file at the root of this distribution. + * + * ***************************************************************************/ + +using System; +using System.Runtime.InteropServices; +using IronRuby.Builtins; +using VALUE = System.UInt64; + +namespace IronRuby.Runtime.CApi { + /// + /// One Digest::Base instance whose hash function a C extension brings (ruby/digest.h): the + /// class's "metadata" wraps the extension's rb_digest_metadata_t, and the hash state is a + /// context of its ctx_size, which init_func, update_func and finish_func work on, as in + /// digest.so's Digest::Base. + /// + public sealed unsafe class NativeDigest { + [StructLayout(LayoutKind.Sequential)] + private struct Metadata { + public int ApiVersion; + public nuint DigestLength, BlockLength, ContextSize; + public IntPtr Init, Update, Finish; + } + + private const int ApiVersion = 3; // RUBY_DIGEST_API_VERSION + private const int OpInit = 0, OpUpdate = 1, OpFinish = 2; + + private static delegate* unmanaged[Cdecl] _metadataOf; + private static delegate* unmanaged[Cdecl] _call; + + private readonly Metadata* _meta; + private readonly void* _context; + + private NativeDigest(Metadata* meta) { + _meta = meta; + _context = NativeMemory.AllocZeroed(Math.Max(meta->ContextSize, 1)); + } + + ~NativeDigest() { + NativeMemory.Free(_context); + } + + public int DigestLength { get { return checked((int)_meta->DigestLength); } } + public int BlockLength { get { return checked((int)_meta->BlockLength); } } + + /// + /// The digest for an object of a class whose "metadata" is , + /// initialized; null when that is not plugin metadata at all. + /// + public static NativeDigest TryCreate(object metadata) { + var data = metadata as DataObject; + if (data == null || !data.Typed) { + return null; + } + if (_metadataOf == null) { + _call = (delegate* unmanaged[Cdecl])CApi.ShimExport("rb_ir_digest_call"); + _metadataOf = (delegate* unmanaged[Cdecl])CApi.ShimExport("rb_ir_digest_metadata"); + } + Metadata* meta = _metadataOf(CApi.ToValue(data)); + if (meta == null) { + return null; + } + if (meta->ApiVersion != ApiVersion) { + throw RubyExceptions.CreateRuntimeError("Incompatible digest API version"); + } + var result = new NativeDigest(meta); + result.Reset(); + return result; + } + + private int Call(int op, byte* ptr, nuint length) { + int raised, result; + var depth = CApi.EnterNative(); + try { + result = _call(_meta, op, _context, ptr, length, &raised); + } finally { + CApi.LeaveNative(depth); + } + GC.KeepAlive(this); + if (raised != 0) { + CApi.Rethrow(); + } + return result; + } + + public void Reset() { + if (Call(OpInit, null, 0) != 1) { + throw RubyExceptions.CreateRuntimeError("Digest initialization failed."); + } + } + + public void Update(byte[]/*!*/ data) { + fixed (byte* p = data) { + Call(OpUpdate, p, (nuint)data.Length); + } + } + + /// The digest, after which the context starts over, as digest.so's #finish leaves it. + public byte[]/*!*/ Finish() { + var result = new byte[DigestLength]; + fixed (byte* p = result) { + Call(OpFinish, p, 0); + } + Reset(); + return result; + } + + public void CopyFrom(NativeDigest/*!*/ other) { + if (other._meta != _meta) { + throw RubyExceptions.CreateTypeError("different algorithms"); + } + Buffer.MemoryCopy(other._context, _context, _meta->ContextSize, _meta->ContextSize); + GC.KeepAlive(other); + } + } +} diff --git a/Src/Ruby/CApi/native/capi.c b/Src/Ruby/CApi/native/capi.c index 00219e28b..9d523a32b 100644 --- a/Src/Ruby/CApi/native/capi.c +++ b/Src/Ruby/CApi/native/capi.c @@ -1353,9 +1353,66 @@ ruby_scan_hex(const char *start, size_t len, size_t *retlen) return v; } +/* ------------------------------------------------------------------------------------------ + * Digest plugins: an extension that brings its own hash function hands digest.so an + * rb_digest_metadata_t, wrapped by rb_digest_wrap_metadata, which ruby/digest.h finds through + * rb_ext_resolve_symbol("digest.so", ...). IronRuby's digest is C#: the wrapper is here, and + * Digest::Base calls the plugin's functions through rb_ir_digest_call (NativeDigest.cs). + */ +typedef struct { + int api_version; + size_t digest_len; + size_t block_len; + size_t ctx_size; + int (*init_func)(void *); + void (*update_func)(void *, unsigned char *, size_t); + int (*finish_func)(void *, unsigned char *); +} rb_ir_digest_metadata_t; /* ruby/digest.h's rb_digest_metadata_t */ + +static const rb_data_type_t rb_ir_digest_metadata_type = { + "digest/metadata", + { 0, 0, 0, }, + 0, 0, + RUBY_TYPED_FREE_IMMEDIATELY, +}; + +static VALUE +rb_ir_digest_wrap_metadata(const rb_ir_digest_metadata_t *meta) +{ + return rb_obj_freeze(TypedData_Wrap_Struct(0, &rb_ir_digest_metadata_type, (void *)meta)); +} + +/* The metadata a Digest::Base subclass's "metadata" holds, or NULL for any other typed object. */ +RB_IR_EXPORT const rb_ir_digest_metadata_t * +rb_ir_digest_metadata(VALUE obj) +{ + return RTYPEDDATA_TYPE(obj) == &rb_ir_digest_metadata_type ? RTYPEDDATA_GET_DATA(obj) : NULL; +} + +/* op 0: init_func(ctx); 1: update_func(ctx, ptr, len); 2: finish_func(ctx, ptr) */ +RB_IR_EXPORT int +rb_ir_digest_call(const rb_ir_digest_metadata_t *meta, int op, void *ctx, unsigned char *ptr, size_t len, int *raised) +{ + struct rb_ir_frame frame; + int result = 0; + *raised = 0; + switch (op) { + case 0: RB_IR_PROTECT(frame, result = meta->init_func(ctx), *raised = 1); break; + case 1: RB_IR_PROTECT(frame, meta->update_func(ctx, ptr, len), *raised = 1); break; + case 2: RB_IR_PROTECT(frame, result = meta->finish_func(ctx, ptr), *raised = 1); break; + } + return result; +} + +/* Only digest.so's rb_digest_wrap_metadata, which is all CRuby's own extensions look up with it. */ void * rb_ext_resolve_symbol(const char *feature, const char *symbol) { + if ((strcmp(feature, "digest.so") == 0 || strcmp(feature, "digest") == 0) && + strcmp(symbol, "rb_digest_wrap_metadata") == 0) { + rb_require("digest"); + return (void *)(uintptr_t)rb_ir_digest_wrap_metadata; + } return NULL; }