Logo Search packages:      
Sourcecode: jruby1.1 version File versions

org::jruby::ext::ffi::AbstractMemoryPointer Class Reference

Inheritance diagram for org::jruby::ext::ffi::AbstractMemoryPointer:

org::jruby::ext::ffi::AbstractMemory org::jruby::RubyObject org::jruby::runtime::builtin::IRubyObject org::jruby::runtime::builtin::InstanceVariables org::jruby::runtime::builtin::InternalVariables

List of all members.


Detailed Description

C memory pointer operations.

This implements the Rubinius FFI MemoryPointer class, but in java for speed.

Definition at line 50 of file AbstractMemoryPointer.java.


Public Member Functions

void addFinalizer (IRubyObject finalizer)
IRubyObject anyToString ()
IRubyObject as (Class javaClass)
String asJavaString ()
RubyString asString ()
void attachToObjectSpace ()
IRubyObject autorelease (ThreadContext context, IRubyObject release)
final void callInit (IRubyObject[] args, Block block)
final IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject arg)
final IRubyObject callMethod (ThreadContext context, int methodIndex, String name)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, Block block)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject arg)
final IRubyObject callMethod (ThreadContext context, String name)
IRubyObject callSuper (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject checkArrayType ()
IRubyObject checkStringType ()
IRubyObject clear (ThreadContext context)
RubyArray convertToArray ()
RubyFloat convertToFloat ()
RubyHash convertToHash ()
RubyInteger convertToInteger (int convertMethodIndex, String convertMethod)
RubyInteger convertToInteger ()
RubyString convertToString ()
final IRubyObject convertToType (RubyClass target, int convertMethodIndex)
synchronized Object dataGetStruct ()
synchronized void dataWrapStruct (Object obj)
IRubyObject display (ThreadContext context, IRubyObject[] args)
IRubyObject dup ()
final boolean eql (IRubyObject other)
IRubyObject eql_p (IRubyObject obj)
IRubyObject equal_p (ThreadContext context, IRubyObject obj)
boolean equals (Object obj)
IRubyObject evalUnder (final ThreadContext context, RubyModule under, RubyString src, String file, int line)
IRubyObject evalUnder (final ThreadContext context, RubyModule under, IRubyObject src, IRubyObject file, IRubyObject line)
IRubyObject extend (IRubyObject[] args)
IRubyObject fastGetInstanceVariable (String internedName)
IRubyObject fastGetInternalVariable (String internedName)
boolean fastHasInstanceVariable (String internedName)
boolean fastHasInternalVariable (String internedName)
IRubyObject fastSetInstanceVariable (String internedName, IRubyObject value)
void fastSetInternalVariable (String internedName, IRubyObject value)
IRubyObject free (ThreadContext context)
IRubyObject freeze (ThreadContext context)
RubyBoolean frozen_p (ThreadContext context)
IRubyObject get_array_of_float (ThreadContext context, IRubyObject offset, IRubyObject length)
IRubyObject get_array_of_float64 (ThreadContext context, IRubyObject offset, IRubyObject length)
IRubyObject get_array_of_int16 (ThreadContext context, IRubyObject offset, IRubyObject length)
IRubyObject get_array_of_int32 (ThreadContext context, IRubyObject offset, IRubyObject length)
IRubyObject get_array_of_int64 (ThreadContext context, IRubyObject offset, IRubyObject length)
IRubyObject get_array_of_int8 (ThreadContext context, IRubyObject offset, IRubyObject length)
IRubyObject get_array_of_long (ThreadContext context, IRubyObject offset, IRubyObject length)
IRubyObject get_buffer (ThreadContext context, IRubyObject off, IRubyObject len_)
IRubyObject get_float32 (ThreadContext context, IRubyObject offset)
IRubyObject get_float64 (ThreadContext context, IRubyObject offset)
IRubyObject get_int16 (ThreadContext context, IRubyObject offset)
IRubyObject get_int32 (ThreadContext context, IRubyObject offset)
IRubyObject get_int64 (ThreadContext context, IRubyObject offset)
IRubyObject get_int8 (ThreadContext context, IRubyObject offset)
IRubyObject get_long (ThreadContext context, IRubyObject offset)
IRubyObject get_pointer (ThreadContext context, IRubyObject offset)
IRubyObject get_string (ThreadContext context, IRubyObject offArg, IRubyObject lenArg)
IRubyObject get_string (ThreadContext context, IRubyObject offArg)
IRubyObject get_uint16 (ThreadContext context, IRubyObject offset)
IRubyObject get_uint32 (ThreadContext context, IRubyObject offset)
IRubyObject get_uint8 (ThreadContext context, IRubyObject offset)
IRubyObject get_ulong (ThreadContext context, IRubyObject offset)
final boolean getFlag (int flag)
IRubyObject getInstanceVariable (String name)
List< Variable< IRubyObject > > getInstanceVariableList ()
List< String > getInstanceVariableNameList ()
InstanceVariables getInstanceVariables ()
IRubyObject getInternalVariable (String name)
List< Variable< IRubyObject > > getInternalVariableList ()
InternalVariables getInternalVariables ()
Class getJavaClass ()
final RubyClass getMetaClass ()
int getNativeTypeIndex ()
final Ruby getRuntime ()
RubyClass getSingletonClass ()
RubyClass getType ()
int getVariableCount ()
List< Variable< IRubyObject > > getVariableList ()
Map getVariableMap ()
List< String > getVariableNameList ()
RubyFixnum hash ()
RubyFixnum hash (ThreadContext context)
int hashCode ()
boolean hasInstanceVariable (String name)
boolean hasInternalVariable (String name)
boolean hasVariables ()
synchronized IRubyObject id ()
synchronized IRubyObject id_deprecated ()
IRubyObject infectBy (IRubyObject obj)
IRubyObject initialize ()
IRubyObject initialize_copy (IRubyObject original)
IRubyObject inspect ()
IRubyObject instance_eval (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, Block block)
IRubyObject instance_eval (ThreadContext context, Block block)
IRubyObject instance_exec (ThreadContext context, IRubyObject[] args, Block block)
RubyBoolean instance_of_p (ThreadContext context, IRubyObject type)
IRubyObject instance_variable_defined_p (ThreadContext context, IRubyObject name)
IRubyObject instance_variable_get (ThreadContext context, IRubyObject name)
IRubyObject instance_variable_set (IRubyObject name, IRubyObject value)
RubyArray instance_variables (ThreadContext context)
boolean isClass ()
final boolean isFalse ()
boolean isFrozen ()
boolean isImmediate ()
boolean isModule ()
final boolean isNil ()
boolean isTaint ()
final boolean isTrue ()
RubyBoolean kind_of_p (ThreadContext context, IRubyObject type)
RubyClass makeMetaClass (RubyClass superClass)
IRubyObject method (IRubyObject symbol)
IRubyObject methods (ThreadContext context, IRubyObject[] args)
IRubyObject nil_p (ThreadContext context)
IRubyObject null_p (ThreadContext context)
IRubyObject op_eqq (ThreadContext context, IRubyObject other)
IRubyObject op_equal (ThreadContext context, IRubyObject obj)
IRubyObject op_match (ThreadContext context, IRubyObject arg)
IRubyObject private_methods (ThreadContext context, IRubyObject[] args)
IRubyObject protected_methods (ThreadContext context, IRubyObject[] args)
IRubyObject public_methods (ThreadContext context, IRubyObject[] args)
IRubyObject put_array_of_float (ThreadContext context, IRubyObject offset, IRubyObject arrParam)
IRubyObject put_array_of_float64 (ThreadContext context, IRubyObject offset, IRubyObject arrParam)
IRubyObject put_array_of_int16 (ThreadContext context, IRubyObject offset, IRubyObject arrParam)
IRubyObject put_array_of_int32 (ThreadContext context, IRubyObject offset, IRubyObject arrParam)
IRubyObject put_array_of_int64 (ThreadContext context, IRubyObject offset, IRubyObject arrParam)
IRubyObject put_array_of_int8 (ThreadContext context, IRubyObject offset, IRubyObject arrParam)
IRubyObject put_array_of_long (ThreadContext context, IRubyObject offset, IRubyObject arr)
IRubyObject put_buffer (ThreadContext context, IRubyObject off, IRubyObject str, IRubyObject len_)
IRubyObject put_float32 (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject put_float64 (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject put_int16 (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject put_int32 (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject put_int64 (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject put_int8 (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject put_long (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject put_string (ThreadContext context, IRubyObject[] args)
IRubyObject put_uint16 (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject put_uint32 (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject put_uint8 (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject put_ulong (ThreadContext context, IRubyObject offset, IRubyObject value)
IRubyObject rbClone ()
IRubyObject read_pointer (ThreadContext context)
IRubyObject remove_instance_variable (ThreadContext context, IRubyObject name, Block block)
void removeFinalizers ()
IRubyObject removeInstanceVariable (String name)
IRubyObject removeInternalVariable (String name)
RubyBoolean respond_to_p (IRubyObject mname, IRubyObject includePrivate)
RubyBoolean respond_to_p (IRubyObject mname)
final boolean respondsTo (String name)
IRubyObject send (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, Block block)
IRubyObject send (ThreadContext context, Block block)
final void setFlag (int flag, boolean set)
void setFrozen (boolean frozen)
IRubyObject setInstanceVariable (String name, IRubyObject value)
void setInternalVariable (String name, IRubyObject value)
void setMetaClass (RubyClass metaClass)
void setTaint (boolean taint)
RubyArray singleton_methods (ThreadContext context, IRubyObject[] args)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject[] args, Block block)
void syncVariables (List< Variable< IRubyObject >> variables)
IRubyObject taint (ThreadContext context)
RubyBoolean tainted_p (ThreadContext context)
RubyArray to_a ()
IRubyObject to_java ()
IRubyObject to_s ()
IRubyObject to_s (ThreadContext context, IRubyObject[] args)
String toString ()
IRubyObject total (ThreadContext context)
RubyClass type ()
RubyClass type_deprecated ()
IRubyObject untaint (ThreadContext context)

Static Public Member Functions

static RubyClass createAbstractMemoryClass (Ruby runtime)
static RubyClass createMemoryPointerClass (Ruby runtime)
static RubyClass createObjectClass (Ruby runtime, RubyClass objectClass)
static void puts (Object obj)

Static Public Attributes

static final String ABSTRACT_MEMORY_RUBY_CLASS = "AbstractMemory"
static final int ALL_F = -1
static final String className = "AbstractMemoryPointer"
static final int FALSE_F = 1 << 0
static final int FL_USHIFT = 4
static final int FROZEN_F = 1 << 2
static final IRubyObject NEVER = new RubyObject()
static final int NIL_F = 1 << 1
static final IRubyObject[] NULL_ARRAY = new IRubyObject[0]
static final ObjectAllocator OBJECT_ALLOCATOR
static final int TAINTED_F = 1 << 3
static final IRubyObject UNDEF = new RubyObject()
static final int USER0_F = (1<<(FL_USHIFT+0))
static final int USER1_F = (1<<(FL_USHIFT+1))
static final int USER2_F = (1<<(FL_USHIFT+2))
static final int USER3_F = (1<<(FL_USHIFT+3))
static final int USER4_F = (1<<(FL_USHIFT+4))
static final int USER5_F = (1<<(FL_USHIFT+5))
static final int USER6_F = (1<<(FL_USHIFT+6))
static final int USER7_F = (1<<(FL_USHIFT+7))

Protected Member Functions

 AbstractMemoryPointer (Ruby runtime, RubyClass klass, MemoryIO io, long offset, long size)
final long checkBounds (ThreadContext context, IRubyObject offArg, long len)
final void checkBounds (ThreadContext context, long off, long len)
void checkFrozen ()
void copySpecialInstanceVariables (IRubyObject clone)
void ensureInstanceVariablesSettable ()
final MemoryIO getMemoryIO ()
abstract AbstractMemoryPointer getMemoryPointer (Ruby runtime, long offset)
final long getOffset ()
final long getOffset (IRubyObject offset)
RubyClass getSingletonClassClone ()
final void testFrozen (String message)
String validateInstanceVariable (String name)
boolean variableTableContains (String name)
boolean variableTableFastContains (String internedName)
IRubyObject variableTableFastFetch (String internedName)
IRubyObject variableTableFastStore (String internedName, IRubyObject value)
IRubyObject variableTableFetch (String name)
Map variableTableGetMap (Map map)
Map variableTableGetMap ()
int variableTableGetSize ()
VariableTableEntry[] variableTableGetTable ()
synchronized IRubyObject variableTableReadLocked (VariableTableEntry entry)
final VariableTableEntry[] variableTableRehash ()
IRubyObject variableTableRemove (String name)
IRubyObject variableTableStore (String name, IRubyObject value)
void variableTableSync (List< Variable< IRubyObject >> vars)

Static Protected Member Functions

static final void checkBounds (ThreadContext context, long size, long off, long len)
static boolean eqlInternal (final ThreadContext context, final IRubyObject that, final IRubyObject other)
static boolean equalInternal (final ThreadContext context, final IRubyObject that, final IRubyObject other)
static final boolean isRubyVariable (String name)

Protected Attributes

transient Object dataStruct
int flags
final MemoryIO io
transient RubyClass metaClass
final long offset
final long size
transient volatile
VariableTableEntry[] 
variableTable
transient int variableTableSize
transient int variableTableThreshold

Static Protected Attributes

static final String ERR_INSECURE_SET_INST_VAR = "Insecure: can't modify instance variable"
static final int VARIABLE_TABLE_DEFAULT_CAPACITY = 8
static final VariableTableEntry[] VARIABLE_TABLE_EMPTY_TABLE = new VariableTableEntry[0]
static final float VARIABLE_TABLE_LOAD_FACTOR = 0.75f
static final int VARIABLE_TABLE_MAXIMUM_CAPACITY = 1 << 30

Static Package Functions

static RubyString inspect (ThreadContext context, IRubyObject object)

Static Private Attributes

static final Map
< AbstractMemoryPointer,
Object > 
pointerSet = new ConcurrentHashMap()

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index