public IRubyObject get(ThreadContext context, StructLayout.Storage cache, Member m, AbstractMemory ptr) { return op.get(context, ptr, m.offset); }
@JRubyMethod(name = { "read_array_of_type" }, required = 2) public IRubyObject read_array_of_type(ThreadContext context, IRubyObject typeArg, IRubyObject lenArg) { Type type = context.runtime.getFFI().getTypeResolver().findType(context.runtime, typeArg); MemoryOp op = MemoryOp.getMemoryOp(type); if (op == null) { throw context.runtime.newTypeError("cannot get memory reader for type " + type); } int len = checkArrayLength(lenArg); RubyArray arr = RubyArray.newArray(context.runtime, len); for (int i = 0, off = 0; i < len; i++, off += type.size) { arr.add(op.get(context, getMemoryIO(), off)); } return arr; }
public IRubyObject get(ThreadContext context, StructLayout.Storage cache, Member m, AbstractMemory ptr) { return op.get(context, ptr, m.offset); }
@JRubyMethod(name = { "read_array_of_type" }, required = 2) public IRubyObject read_array_of_type(ThreadContext context, IRubyObject typeArg, IRubyObject lenArg) { Type type = context.runtime.getFFI().getTypeResolver().findType(context.runtime, typeArg); MemoryOp op = MemoryOp.getMemoryOp(type); if (op == null) { throw context.runtime.newTypeError("cannot get memory reader for type " + type); } int len = checkArrayLength(lenArg); RubyArray arr = RubyArray.newArray(context.runtime, len); for (int i = 0, off = 0; i < len; i++, off += type.size) { arr.add(op.get(context, getMemoryIO(), off)); } return arr; }
public IRubyObject get(ThreadContext context, StructLayout.Storage cache, Member m, AbstractMemory ptr) { return op.get(context, ptr, m.offset); }
public IRubyObject get(ThreadContext context, StructLayout.Storage cache, Member m, AbstractMemory ptr) { // Read an int from the native memory, then upcall to the ruby value // lookup code to convert it to the appropriate symbol return m.type.callMethod(context, "find", op.get(context, ptr, m.offset)); }
public IRubyObject get(ThreadContext context, StructLayout.Storage cache, Member m, AbstractMemory ptr) { // Read an int from the native memory, then upcall to the ruby value // lookup code to convert it to the appropriate symbol return m.type.callMethod(context, "find", op.get(context, ptr, m.offset)); }
@Override IRubyObject get(ThreadContext context, MemoryIO io, long offset) { return mappedType.fromNative(context, nativeOp.get(context, io, offset)); }
@Override IRubyObject get(ThreadContext context, AbstractMemory ptr, long offset) { return mappedType.fromNative(context, nativeOp.get(context, ptr, offset)); }
@Override IRubyObject get(ThreadContext context, MemoryIO io, long offset) { return mappedType.fromNative(context, nativeOp.get(context, io, offset)); }
public IRubyObject get(ThreadContext context, StructLayout.Storage cache, Member m, AbstractMemory ptr) { // Read an int from the native memory, then upcall to the ruby value // lookup code to convert it to the appropriate symbol return m.type.callMethod(context, "find", op.get(context, ptr, m.offset)); }
IRubyObject get(ThreadContext context, AbstractMemory ptr, long offset) { return get(context, ptr.getMemoryIO(), offset); }
@Override IRubyObject get(ThreadContext context, AbstractMemory ptr, long offset) { return mappedType.fromNative(context, nativeOp.get(context, ptr, offset)); }
IRubyObject get(ThreadContext context, AbstractMemory ptr, long offset) { return get(context, ptr.getMemoryIO(), offset); }
public IRubyObject get(ThreadContext context, StructLayout.Storage cache, Member m, AbstractMemory ptr) { // Read an int from the native memory, then upcall to the ruby value // lookup code to convert it to the appropriate symbol return m.type.callMethod(context, "find", op.get(context, ptr, m.offset)); }
@Override IRubyObject get(ThreadContext context, MemoryIO io, long offset) { return mappedType.fromNative(context, nativeOp.get(context, io, offset)); }
private IRubyObject get(ThreadContext context, int index) { IRubyObject obj; if (valueCache != null && (obj = valueCache[index]) != null) { return obj; } putCachedValue(index, obj = aio.get(context, ptr, getOffset(index))); return obj; }
private IRubyObject get(ThreadContext context, int index) { IRubyObject obj; if (valueCache != null && (obj = valueCache[index]) != null) { return obj; } putCachedValue(index, obj = aio.get(context, ptr, getOffset(index))); return obj; }
private IRubyObject get(ThreadContext context, int index) { IRubyObject obj; if (valueCache != null && (obj = valueCache[index]) != null) { return obj; } putCachedValue(index, obj = aio.get(context, ptr, getOffset(index))); return obj; }
private IRubyObject get(ThreadContext context, int index) { IRubyObject obj; if (valueCache != null && (obj = valueCache[index]) != null) { return obj; } putCachedValue(index, obj = aio.get(context, ptr, getOffset(index))); return obj; }