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

@@ -37,9 +37,9 @@ module Virtual
# Code interface follows. Note position is inheitted as is from Code
# length of the Plock is the length of the block, plus the branch, plus data.
def length
len = @data.inject(super) {| sum , item | sum + item.length}
len + @branch_code.length
def mem_length
len = @data.inject(super) {| sum , item | sum + item.mem_length}
len + @branch_code.mem_length
end
# again, super + branch plus data
@@ -48,7 +48,7 @@ module Virtual
@branch_code.link_at pos , context
@data.each do |code|
code.link_at(pos , context)
pos += code.length
pos += code.mem_length
end
end