I'm analyzing some code and what I do does not work for e.g. ifTrue:ifFalse. Is there a way to (temporary) deactivate using the jit or any optimization that handles those methods special? Norbert
On Jul 9, 2013, at 7:00 PM, Norbert Hartl <norbert@hartl.name> wrote:
I'm analyzing some code and what I do does not work for e.g. ifTrue:ifFalse. Is there a way to (temporary) deactivate using the jit or any optimization that handles those methods special?
This is not done on the JIT level but the compiler already decides to compile *any* send of ifTrue: and friend to jumps (without thinking). The new compiler in 3.0 has support to turn this off selectively per class and per method using compiler options. Marcus
To disable JIT, use StackVM instead of Cog. You can find it here: http://files.pharo.org/vm/. Now ifTrue:ifFalse: are compile time optimizations so using Stack will not change anything. With Opal compiler (by default in pharo 3.0), you can do something like: MyClass class>>compiler ^ super compiler options: #(- optInlineIf) Or <compilerOptions: #(- optInlineIf)> Then something like: MyClass compileAll to disable optimisations. With Pharo 2.0 compiler huhum. You can look at Encoder class, somewhere you can disable it too. Hope it helped you. 2013/7/9 Norbert Hartl <norbert@hartl.name>
I'm analyzing some code and what I do does not work for e.g. ifTrue:ifFalse. Is there a way to (temporary) deactivate using the jit or any optimization that handles those methods special?
Norbert
participants (3)
-
Clément Bera -
Marcus Denker -
Norbert Hartl