Skip to content

Commit

Permalink
remove useless lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Josep M. Bach committed Sep 27, 2012
1 parent 977e0e5 commit b4204a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
28 changes: 14 additions & 14 deletions lib/lambra/bootstrap.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ def call(*args)
end end
end end


class Function # class Function
def initialize(blk_env) # def initialize(blk_env)
@block_environment = blk_env # @block_environment = blk_env
@executable = blk_env.compiled_code # @executable = blk_env.compiled_code
end # end

#
def call(*args) # def call(*args)
@executable.invoke(:anonymous, @executable.scope.module, Object.new, args, nil) # @executable.invoke(:anonymous, @executable.scope.module, Object.new, args, nil)
end # end

#
def to_proc # def to_proc
Proc.__from_block__(@block_environment) # Proc.__from_block__(@block_environment)
end # end
end # end


class PrimitiveScope class PrimitiveScope
def initialize(bindings, parent=nil) def initialize(bindings, parent=nil)
Expand Down
4 changes: 1 addition & 3 deletions lib/lambra/bytecode_compiler.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ class BytecodeCompiler


def initialize(generator=nil) def initialize(generator=nil)
@generator = generator || Rubinius::Generator.new @generator = generator || Rubinius::Generator.new
# parent_scope = parent ? parent.scope : nil
# @scope = Scope.new(@generator, parent_scope)
end end


def compile(ast, debugging=false) def compile(ast, debugging=false)
Expand Down Expand Up @@ -63,7 +61,7 @@ def visit_SpecialForm(car, cdr)
name = cdr.shift.name name = cdr.shift.name


cdr.first.accept(self) cdr.first.accept(self)

local = g.state.scope.new_local(name) local = g.state.scope.new_local(name)
g.set_local local.slot g.set_local local.slot
when 'fn' when 'fn'
Expand Down

0 comments on commit b4204a6

Please sign in to comment.