# HG changeset patch # User Jan Vrany # Date 1441676405 -3600 # Node ID 02d90f0038fdc6cf0afa3ce32a08c2c641a6f4aa # Parent bb97dcbe2359b626ac1d83856a78152c652216ba Poratbility: do not use #removeAtIndex: under Pharo. Pharo does not have #removeAtIndex: which is actually and ANSI protocol. But Pharoers do not like ANSI and don't give a shit about compatibility. To workaround it, use super-ugly #respondsTo: test. diff -r bb97dcbe2359 -r 02d90f0038fd compiler/PPCCompiler.st --- a/compiler/PPCCompiler.st Tue Sep 08 02:06:11 2015 +0100 +++ b/compiler/PPCCompiler.st Tue Sep 08 02:40:05 2015 +0100 @@ -100,12 +100,26 @@ [ index := passes indexOf: pass. index ~~ 0 - ] whileTrue:[ - passes removeAtIndex: index + ] whileTrue:[ + "Fuck it!! + Pharo does not have #removeAtIndex: which is actually + and ANSI protocol. But Pharoers do not like ANSI and don't + give a shit about compatibility. Hence the following piece + of crap." + (passes respondsTo: #removeAtIndex:) ifTrue:[ + passes removeAtIndex: index. + ] ifFalse:[ + "Try Pharo's non-standard removeAt:" + (passes respondsTo: #removeAt:) ifTrue:[ + passes removeAt: index + ] ifFalse:[ + self error: 'Don''t know how to remove object at index...' + ]. + ]. ]. "Created: / 04-09-2015 / 11:24:45 / Jan Vrany " - "Modified: / 04-09-2015 / 16:02:17 / Jan Vrany " + "Modified: / 08-09-2015 / 02:36:09 / Jan Vrany " ! ! !PPCCompiler methodsFor:'compiling'!