fix inheritance

This commit is contained in:
Torsten Ruger 2015-04-10 14:02:28 +03:00
parent aaf6da8808
commit c14bacd171

View File

@ -7,7 +7,7 @@ module Ast
# So we view ConstantExpressions like functions that return the value of the constant. # So we view ConstantExpressions like functions that return the value of the constant.
# In other words, their storage is the return slot as it would be for a method # In other words, their storage is the return slot as it would be for a method
# The current approach moves the constant into a varaible before using it # The current approach moves the constant into a variable before using it
# But in the future (in the one that holds great things) we optimize those unneccesay moves away # But in the future (in the one that holds great things) we optimize those unneccesay moves away
class IntegerExpression < Expression class IntegerExpression < Expression
@ -20,7 +20,7 @@ module Ast
end end
end end
class TrueExpression class TrueExpression < Expression
def compile method , message def compile method , message
value = Virtual::TrueConstant.new value = Virtual::TrueConstant.new
to = Virtual::Return.new(Virtual::Reference , value) to = Virtual::Return.new(Virtual::Reference , value)
@ -29,7 +29,7 @@ module Ast
end end
end end
class FalseExpression class FalseExpression < Expression
def compile method , message def compile method , message
value = Virtual::FalseConstant.new value = Virtual::FalseConstant.new
to = Virtual::Return.new(Virtual::Reference , value) to = Virtual::Return.new(Virtual::Reference , value)
@ -38,7 +38,7 @@ module Ast
end end
end end
class NilExpression class NilExpression < Expression
def compile method , message def compile method , message
value = Virtual::NilConstant.new value = Virtual::NilConstant.new
to = Virtual::Return.new(Virtual::Reference , value) to = Virtual::Return.new(Virtual::Reference , value)