compiler/PPCAbstractPredicateNode.st
changeset 421 7e08b31e0dae
parent 414 0eaf09920532
child 422 116d2b2af905
--- a/compiler/PPCAbstractPredicateNode.st	Wed Nov 19 10:52:37 2014 +0000
+++ b/compiler/PPCAbstractPredicateNode.st	Mon Nov 24 00:09:23 2014 +0000
@@ -1,7 +1,7 @@
 "{ Package: 'stx:goodies/petitparser/compiler' }"
 
 PPCNode subclass:#PPCAbstractPredicateNode
-	instanceVariableNames:'predicate methodStrategy'
+	instanceVariableNames:'predicate'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'PetitCompiler-Nodes'
@@ -17,16 +17,6 @@
 
 !PPCAbstractPredicateNode methodsFor:'accessing'!
 
-methodStrategy
-	
-	^ methodStrategy
-!
-
-methodStrategy: anObject
-	
-	methodStrategy := anObject
-!
-
 predicate
 	
 	^ predicate
@@ -43,15 +33,6 @@
 
 !PPCAbstractPredicateNode methodsFor:'analysis'!
 
-= anotherNode
-	(self == anotherNode) ifTrue: [ ^ true ].
-	(anotherNode class = self class) ifFalse: [ ^ false ].
-	
-	(anotherNode name = name) ifFalse: [ ^ false ].
-	(anotherNode methodStrategy = methodStrategy) ifFalse: [ ^ false ].
-	^ anotherNode children = self children.
-!
-
 acceptsEpsilon
 	^ false
 !
@@ -64,6 +45,17 @@
 	^ PPCharSetPredicate on: predicate
 ! !
 
+!PPCAbstractPredicateNode methodsFor:'comparison'!
+
+= anotherNode
+	super = anotherNode ifFalse: [ ^ false ].
+	^ predicate = anotherNode predicate.
+!
+
+hash
+	^ super hash bitXor: predicate hash
+! !
+
 !PPCAbstractPredicateNode methodsFor:'compiling'!
 
 bodyOfPredicate: compiler
@@ -85,19 +77,12 @@
 
 initialize
 	super initialize.
-	methodStrategy := PPCMethodStrategy new
 ! !
 
 !PPCAbstractPredicateNode methodsFor:'optimizing'!
 
 asInlined
 	^ super asInlined
-"	(methodStrategy == (PPCInlineStrategy instance)) ifFalse: [ 
-		^ self copy 
-			methodStrategy: PPCInlineStrategy instance;
-			yourself
-	].
-	^ self"
 !
 
 optimize: params status: changeStatus