compiler/PPCNode.st
changeset 464 f6d77fee9811
parent 459 4751c407bb40
child 470 f59795ddcd90
child 502 1e45d3c96ec5
equal deleted inserted replaced
459:4751c407bb40 464:f6d77fee9811
    75 prefix
    75 prefix
    76     ^ 'node' 
    76     ^ 'node' 
    77 !
    77 !
    78 
    78 
    79 suffix
    79 suffix
    80     ^ ''
    80     ^ self isMarkedForInline ifTrue: [ '_inlined' ] ifFalse: [ '' ]
    81 !
    81 !
    82 
    82 
    83 unmarkForGuard
    83 unmarkForGuard
    84     "Forbids compiling of guards, if guards would be available"
    84     "Forbids compiling of guards, if guards would be available"
    85     self propertyAt: #guard put: false
    85     self propertyAt: #guard put: false
   265 = anotherNode
   265 = anotherNode
   266     (self == anotherNode) ifTrue: [ ^ true ].
   266     (self == anotherNode) ifTrue: [ ^ true ].
   267     (anotherNode class = self class) ifFalse: [ ^ false ].
   267     (anotherNode class = self class) ifFalse: [ ^ false ].
   268     
   268     
   269     (anotherNode name = name) ifFalse: [ ^ false ].
   269     (anotherNode name = name) ifFalse: [ ^ false ].
       
   270     (anotherNode isMarkedForInline  = self isMarkedForInline) ifFalse: [ ^ false ].
   270     ^ anotherNode children = self children.
   271     ^ anotherNode children = self children.
   271 !
   272 !
   272 
   273 
   273 hash
   274 hash
   274     "TODO JK: IMO not a good hashing function bacause of children size, 
   275     "TODO JK: IMO not a good hashing function bacause of children size, 
   275         but at least it is not recursive, which would be worse :)
   276         but at least it is not recursive, which would be worse :)
   276     "
   277     "
   277     ^ self class hash bitXor: (name hash bitXor: self children size hash)
   278     ^ self class hash bitXor: (name hash bitXor: (self isMarkedForInline hash bitXor: (self children size hash)))
   278 ! !
   279 ! !
   279 
   280 
   280 !PPCNode methodsFor:'copying'!
   281 !PPCNode methodsFor:'copying'!
   281 
   282 
   282 postCopy
   283 postCopy