Permalink
Browse files

fix a bug when compiling a module/class scope where scoped dvars woul…

…d be incorrectly taken into account
  • Loading branch information...
1 parent 000b533 commit 6aaa619dc0915b34dc74fada00551a288a9b7274 Laurent Sansonetti committed Jun 1, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 compiler.cpp
View
@@ -4026,6 +4026,9 @@ RoxorCompiler::compile_node0(NODE *node)
= ivars_slots_cache;
old_ivars_slots_cache.clear();
+ std::vector<ID> old_dvars = dvars;
+ dvars.clear();
+
// Compile the scope.
DEBUG_LEVEL_INC();
Value *val = compile_node(body);
@@ -4034,6 +4037,8 @@ RoxorCompiler::compile_node0(NODE *node)
GET_CORE()->optimize(f);
DEBUG_LEVEL_DEC();
+ dvars = old_dvars;
+
ivars_slots_cache = old_ivars_slots_cache;
block_declaration = old_block_declaration;

0 comments on commit 6aaa619

Please sign in to comment.