class Opal::Nodes::DefinedNode

def compile_defined_ivar(node)

def compile_defined_ivar(node)
  name = node.children[0].to_s[1..-1]
  # FIXME: this check should be positive for ivars initialized as nil too.
  # Since currently all known ivars are inialized to nil in the constructor
  # we can't tell if it was the user that put nil and made the ivar #defined?
  # or not.
  tmp = scope.new_temp
  push "(#{tmp} = #{scope.self}['#{name}'], #{tmp} != null && #{tmp} !== nil)"
  tmp
end