renamed program to assembler (to avoid clashes in vm)
This commit is contained in:
@ -6,14 +6,14 @@ require "asm/string_literal"
|
||||
|
||||
module Asm
|
||||
|
||||
# Program is the the top-level of the code hierachy, except it is not derived from code
|
||||
# instead a Program is a list of blocks (and string constants)
|
||||
# Assembler is the the top-level of the code hierachy, except it is not derived from code
|
||||
# instead a Assembler is a list of blocks (and string constants)
|
||||
|
||||
# All code is created in blocks (see there) and there are two styles for that, for forward of backward
|
||||
# referencing. Read function block and add_block and Block.set
|
||||
|
||||
|
||||
class Program
|
||||
class Assembler
|
||||
|
||||
def initialize
|
||||
@blocks = []
|
@ -119,7 +119,7 @@ module Asm
|
||||
end
|
||||
|
||||
# length of the codes. In arm it would be the length * 4
|
||||
# (strings are stored globally in the Program)
|
||||
# (strings are stored globally in the Assembler)
|
||||
def length
|
||||
@codes.inject(0) {| sum , item | sum + item.length}
|
||||
end
|
||||
|
@ -1,6 +1,6 @@
|
||||
require 'parslet'
|
||||
|
||||
require "asm/program"
|
||||
require "asm/assembler"
|
||||
require "elf/object_writer"
|
||||
require 'parser/composed'
|
||||
require 'parser/transform'
|
||||
|
Reference in New Issue
Block a user