Changeset 4360 for proto/Compiler


Ignore:
Timestamp:
Dec 26, 2014, 10:14:24 AM (4 years ago)
Author:
cameron
Message:

Omit do_final_block option

Location:
proto/Compiler
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/config.py

    r3571 r4360  
    1616        default='template.c',
    1717        help='default:template.c',
     18        )
     19
     20    parser.add_option(
     21        '-Z',
     22        '--omit_do_final',
     23        dest='omit_do_final_block',
     24        action='store_true',
     25        default=False,
     26        help='omit generation of do_final_block',
    1827        )
    1928
  • proto/Compiler/pablo.py

    r3571 r4360  
    740740        do_block_function = self.do_block(self.do_block_parameters(stream_function.parameters), stream_function.declarations, stream_function.initializations, stream_function.statements)
    741741        clear_function = self.mk_clear(stream_function.carry_count)
    742 
    743         do_final_block_function = self.do_final_block(self.do_final_block_parameters(stream_function.parameters), stream_function.declarations, stream_function.initializations, stream_function.final_block_statements)
     742       
     743        if omit_do_final_block: do_final_block_function = ""
     744        else: do_final_block_function = self.do_final_block(self.do_final_block_parameters(stream_function.parameters), stream_function.declarations, stream_function.initializations, stream_function.final_block_statements)
    744745
    745746        do_segment_function = self.do_segment(self.do_segment_parameters(stream_function.parameters), self.do_segment_args(stream_function.parameters))
     
    967968
    968969            stream_function.statements = Cgen.py2C(4).gen(node.body)
    969             stream_function.final_block_statements = Cgen.py2C(4).gen(final_block_node.body)
     970            if omit_do_final_block: stream_function.final_block_statements = ""
     971            else: stream_function.final_block_statements = Cgen.py2C(4).gen(final_block_node.body)
    970972            self.stream_functions[stream_function.type_name] = stream_function
    971973
  • proto/Compiler/pablomain.py

    r3571 r4360  
    102102    pablo.multicarryWhileMode = options.multicarryWhileMode
    103103    pablo.pablo_char_type = options.pablo_char_type
     104    pablo.omit_do_final_block = options.omit_do_final_block
    104105
    105106    if options.use_IDISA:
Note: See TracChangeset for help on using the changeset viewer.