# Path: src/som/interpreter/ast/nodes/contextual_node.py
# class ContextualNode(ExpressionNode):
# 
#     _immutable_fields_ = ["_context_level"]
# 
#     def __init__(self, context_level, source_section = None):
#         ExpressionNode.__init__(self, source_section)
#         assert context_level >= 0
#         self._context_level = context_level
# 
#     def get_context_level(self):
#         return self._context_level
# 
#     def accesses_outer_context(self):
#         return self._context_level > 0
# 
#     @unroll_safe
#     def determine_block(self, frame):
#         assert self._context_level > 0
# 
#         block = frame.get_self()
#         for i in range(0, self._context_level - 1):
#             block = block.get_outer_self()
#         return block
# 
#     @unroll_safe
#     def determine_outer_self(self, frame):
#         outer_self = frame.get_self()
#         for i in range(0, self._context_level):
#             outer_self = outer_self.get_outer_self()
#         return outer_self
# 
# Path: src/som/interpreter/ast/nodes/expression_node.py
# class ExpressionNode(Node):
# 
#     def __init__(self, source_section):
#         Node.__init__(self, source_section)
# 
#     def is_super_node(self):
#         return False


from .contextual_node import ContextualNode
from .expression_node import ExpressionNode
from rlib import jit
from som.vmobjects.block_ast import AstBlock
        ExpressionNode.__init__(self, source_section)
        self._var           = var
        self._context_level = context_level

    def execute(self, frame):
        return self._specialize().execute(frame)

    def _specialize(self):
        return self.replace(self._var.get_initialized_read_node(
            self._context_level, self._source_section))


class UninitializedWriteNode(ExpressionNode):

    _immutable_fields_ = ['_var', '_context_level', '_value_expr']

    def __init__(self, var, context_level, value_expr, source_section):
        ExpressionNode.__init__(self, source_section)
        self._var           = var
        self._context_level = context_level
        self._value_expr    = value_expr

    def execute(self, frame):
        return self._specialize().execute(frame)

    def _specialize(self):
        return self.replace(self._var.get_initialized_write_node(
            self._context_level, self._value_expr, self._source_section))



# Path: src/som/interpreter/ast/nodes/contextual_node.py
# class ContextualNode(ExpressionNode):
# 
#     _immutable_fields_ = ["_context_level"]
# 
#     def __init__(self, context_level, source_section = None):
#         ExpressionNode.__init__(self, source_section)
#         assert context_level >= 0
#         self._context_level = context_level
# 
#     def get_context_level(self):
#         return self._context_level
# 
#     def accesses_outer_context(self):
#         return self._context_level > 0
# 
#     @unroll_safe
#     def determine_block(self, frame):
#         assert self._context_level > 0
# 
#         block = frame.get_self()
#         for i in range(0, self._context_level - 1):
#             block = block.get_outer_self()
#         return block
# 
#     @unroll_safe
#     def determine_outer_self(self, frame):
#         outer_self = frame.get_self()
#         for i in range(0, self._context_level):
#             outer_self = outer_self.get_outer_self()
#         return outer_self
# 
# Path: src/som/interpreter/ast/nodes/expression_node.py
# class ExpressionNode(Node):
# 
#     def __init__(self, source_section):
#         Node.__init__(self, source_section)
# 
#     def is_super_node(self):
#         return False


# Path: src/som/interpreter/ast/nodes/variable_node.py
from .contextual_node import ContextualNode
from .expression_node import ExpressionNode
from rlib import jit
from som.vmobjects.block_ast import AstBlock

        ExpressionNode.__init__(self, source_section)
        self._var           = var
        self._context_level = context_level

    def execute(self, frame):
        return self._specialize().execute(frame)

    def _specialize(self):
        return self.replace(self._var.get_initialized_read_node(
            self._context_level, self._source_section))


class UninitializedWriteNode(ExpressionNode):

    _immutable_fields_ = ['_var', '_context_level', '_value_expr']

    def __init__(self, var, context_level, value_expr, source_section):
        ExpressionNode.__init__(self, source_section)
        self._var           = var
        self._context_level = context_level
        self._value_expr    = value_expr

    def execute(self, frame):
        return self._specialize().execute(frame)

    def _specialize(self):
        return self.replace(self._var.get_initialized_write_node(
            self._context_level, self._value_expr, self._source_section))



class _NonLocalVariableNode(ContextualNode):