# HG changeset patch # User Jan Vrany # Date 1415240576 0 # Node ID b0fd54ee0412cab99e8e24106592c2f7e7d1e981 # Parent f30eb7ea54cdaac3b23129f2ac2b84dfb2e71ebe Do not try to inline PPCPluggableNode on Smalltalk/X Sadly, on Smalltalk/X blocks cannot be inlined because the VM does not provide enough information to map it back to the source code. Very bad indeed! diff -r f30eb7ea54cd -r b0fd54ee0412 compiler/PPCPluggableNode.st --- a/compiler/PPCPluggableNode.st Thu Nov 06 01:41:10 2014 +0000 +++ b/compiler/PPCPluggableNode.st Thu Nov 06 02:22:56 2014 +0000 @@ -30,10 +30,20 @@ ! asInlined - ^ PPCInlinePluggableNode new - name: name; - block: block; - yourself + "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 + ] + + "Modified: / 06-11-2014 / 01:46:08 / Jan Vrany " ! compileWith: compiler effect: effect id: id diff -r f30eb7ea54cd -r b0fd54ee0412 compiler/tests/PPCNodeCompilingTest.st --- a/compiler/tests/PPCNodeCompilingTest.st Thu Nov 06 01:41:10 2014 +0000 +++ b/compiler/tests/PPCNodeCompilingTest.st Thu Nov 06 02:22:56 2014 +0000 @@ -498,15 +498,22 @@ ! testInlinePluggable + "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:[ + self skipIf: true description: 'Blocks cannot be inlined due to a lack of proper VM support'. + ]. + tree := PPCSequenceNode new - children: { PPCInlinePluggableNode new block: [ :ctx | tree. ctx next ]. $a asParser asCompilerNode }. + children: { PPCInlinePluggableNode new block: [ :ctx | ctx next ]. $a asParser asCompilerNode }. parser := self compileTree: tree. self assert: parser class methodDictionary size = 3. self assert: parser parse: 'ba' to: #($b $a). - "Modified: / 06-11-2014 / 01:20:46 / Jan Vrany " + "Modified: / 06-11-2014 / 01:48:07 / Jan Vrany " ! ! !PPCNodeCompilingTest class methodsFor:'documentation'!