compiler/PPCPluggableNode.st
changeset 438 20598d7ce9fa
parent 422 116d2b2af905
child 452 9f4558b3be66
--- a/compiler/PPCPluggableNode.st	Tue Apr 21 17:20:11 2015 +0100
+++ b/compiler/PPCPluggableNode.st	Thu Apr 30 23:43:14 2015 +0200
@@ -19,9 +19,13 @@
 block: anObject
 	
 	block := anObject
+!
+
+prefix
+	^ #plug
 ! !
 
-!PPCPluggableNode methodsFor:'as yet unclassified'!
+!PPCPluggableNode methodsFor:'analysis'!
 
 acceptsEpsilon
 	^ true
@@ -31,38 +35,8 @@
 	^ true
 !
 
-asInlined
-    "Sadly, on Smalltalk/X blocks cannot be inlined because
-     the VM does not provide enough information to map
-     it back to source code. Very bad indeed!!"
-
-    ((Smalltalk respondsTo:#isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[
-		^ super asInlined
-    ] ifFalse:[
-		^ PPCInlinePluggableNode new
-			name: name;
-			block: block;
-			yourself
-    ]
-
-!
-
-compileWith: compiler effect: effect id: id
-	| blockId |
-	blockId := compiler idFor: block prefixed: #block.
-	
-	compiler startMethod: id.
-	compiler addConstant: block as: blockId.
-	compiler add: '^ ', blockId, ' value: context.'.
- ^ compiler stopMethod.
-!
-
 firstCharSet
 	^ PPCharSetPredicate on: [:char | (block asParser parse: char asString) isPetitFailure not ]
-!
-
-prefix
-	^ #plug
 ! !
 
 !PPCPluggableNode methodsFor:'comparing'!
@@ -76,3 +50,9 @@
 	^ super hash bitXor: block hash
 ! !
 
+!PPCPluggableNode methodsFor:'visiting'!
+
+accept: visitor
+	^ visitor visitPluggableNode: self
+! !
+