Skip to content

Commit

Permalink
Disable optimization for removing unused context for debugging
Browse files Browse the repository at this point in the history
Otherwise, we can’t access the outer lexical scope in the debugger, which is at the very least not nice. But, generally not desirable.

Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Apr 25, 2017
1 parent 6db2d06 commit a62c03f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/som/compiler/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ private ExpressionNode primary(final MethodBuilder builder) throws ProgramDefini
AccessModifier.BLOCK_METHOD, lastMethodsSourceSection);
builder.addEmbeddedBlockMethod(blockMethod);

if (bgenc.requiresContext()) {
if (bgenc.requiresContext() || VmSettings.TRUFFLE_DEBUGGER_ENABLED) {
return new BlockNodeWithContext(blockMethod, lastMethodsSourceSection);
} else {
return new BlockNode(blockMethod, lastMethodsSourceSection);
Expand Down

0 comments on commit a62c03f

Please sign in to comment.