rename code.length tp mem_length with lots of noise impact

This commit is contained in:
Torsten Ruger
2014-09-16 17:16:56 +03:00
parent cffa7f1953
commit 8b8a8eea56
14 changed files with 124 additions and 50 deletions

View File

@@ -1,6 +1,6 @@
module Virtual
class Constant < ::Virtual::Value
class Constant < ::Virtual::Object
end
class TrueConstant < Constant
end
@@ -15,7 +15,7 @@ module Virtual
def type
Virtual::Reference
end
def claszz
def clazz
raise "abstract #{self}"
end
end
@@ -40,12 +40,19 @@ module Virtual
@string = str
end
attr_reader :string
def result= value
class_for(MoveInstruction).new(value , self , :opcode => :mov)
end
def clazz
BootSpace.space.get_or_create_class(:String)
end
def layout
Virtual::Object.layout
end
def mem_length
padded(1 + string.length)
end
end
end