PolymorphicInlineCache.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 17 Sep 2015 08:30:10 +0100
branchjv
changeset 18756 dd41c8e43373
parent 18366 a6e62e167c32
child 20131 4118d61ddba0
permissions -rw-r--r--
FFI: Simplified handling of custom ExternalAddress subclasses Merged branches for FFI return type #pointer and #handle. Send #initilize from C code and return from there rather than magically change local variable and then hadling this in Smalltalk code (this was bit tricky and hard to understand)

"
 COPYRIGHT (c) 2011 by Jan Vrany & Jan Kurs
		       SWING Research Group, Czech Technical University in Prague

 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
 files (the 'Software'), to deal in the Software without
 restriction, including without limitation the rights to use,
 copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the
 Software is furnished to do so, subject to the following
 conditions:

 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
"
"{ Package: 'stx:libbasic' }"

Object subclass:#PolymorphicInlineCache
	instanceVariableNames:'address numArgs'
	classVariableNames:''
	poolDictionaries:''
	category:'Kernel-Classes'
!

!PolymorphicInlineCache class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2011 by Jan Vrany & Jan Kurs
		       SWING Research Group, Czech Technical University in Prague

 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
 files (the 'Software'), to deal in the Software without
 restriction, including without limitation the rights to use,
 copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the
 Software is furnished to do so, subject to the following
 conditions:

 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.

"
!

documentation
"
    This class provides a basic access to inline cache structure as
    used by the virtual machine.

    [author:]
	Jan Vrany <jan.vrany@fit.cvut.cz>
	Janb Kurs <kursjan@fit.cvut.cz>

    [instance variables:]
	address     <ExternalAddress> a pointer to the VM inline cache structure.
				    if the adress is NULL, then PolymorphicInlineCache
				    is invalid.
	numArgs    <SmallInteger> a number of arguments
    [class variables:]

    [see also:]

"
! !

!PolymorphicInlineCache methodsFor:'binding / unbinding'!

bindTo: aMethod forClass: aClass
    | selector |

    selector := aMethod selector.
%{
    __ilcBind(self, aClass, aMethod,  selector);
    RETURN(self);
%}.
    self primitiveFailed.

    "Created: / 02-10-2011 / 18:05:26 / Jan Kurs <kursjan@fit.cvut.cz>"
! !

!PolymorphicInlineCache class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/PolymorphicInlineCache.st,v 1.2 2015-05-17 23:57:27 cg Exp $'
!

version_CVS
    ^ '$Header: /cvs/stx/stx/libbasic/PolymorphicInlineCache.st,v 1.2 2015-05-17 23:57:27 cg Exp $'
! !