[Wisp-cvs] wisp/users/dig tran.py,1.131,1.132
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-05-22 18:59:55
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv25625 Modified Files: tran.py Log Message: dropped the section_name argument of Interpreter.__init__ Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- tran.py 22 May 2003 18:11:40 -0000 1.131 +++ tran.py 22 May 2003 18:59:52 -0000 1.132 @@ -257,21 +257,20 @@ if linkie == None: linkie = Linkie(this.byte_order) this.sections[name] = linkie + if this.current == None: this.current = linkie def switch_to_section (this, name): this.current = this.sections[name] - def __init__ (this, byte_order, section_name = '.text'): + def __init__ (this, byte_order): this.meaning = Interpreter.universal_meaning.copy() + this.current = None + this.sections = {} # if first argument is a linkie, all output goes to that linkie if isinstance(byte_order, Linkie): - this.sections = None this.current = byte_order this.byte_order = this.current.get_byte_order() else: - this.sections = {} this.byte_order = byte_order - this.add_section(section_name) - this.current = this.sections[section_name] this.register_names = {} reg = Register([], names = this.register_names) this.meaning['reg'] = reg @@ -375,8 +374,8 @@ byte_order = target[0] sections = target[1:] - interp = Interpreter(byte_order = byte_order, section_name = sections[0]) - for s in sections[1:]: + interp = Interpreter(byte_order = byte_order) + for s in sections: interp.add_section(s) for i in include: interp.run(i + '.tran') interp.run(toksrc, verbose = verbose) |