예제 #1
0
def enforce(input_file, output_file, interfaces, inside, **opts):
    if inside:
        tkn = 'inside'
    else:
        tkn = 'outside'
    return previrt(input_file, output_file, ['-Penforce-%s' % tkn] +
                   all_args('-Penforce-%s-input' % tkn, interfaces), **opts)
예제 #2
0
파일: passes.py 프로젝트: sunlifeng/OCCAM
def enforce(input_file, output_file, interfaces, inside, **opts):
    if inside:
        tkn = 'inside'
    else:
        tkn = 'outside'
    return previrt(input_file, output_file,
                   ['-Penforce-%s' % tkn] +
                   all_args('-Penforce-%s-input' % tkn, interfaces), 
                   **opts)
예제 #3
0
def specialize(input_file, output_file, rewrite_file, interfaces, **opts):
    "inter module specialization, rewrite_file and output_file and the file names for the output files"
    args = ['-Pspecialize']
    if not (rewrite_file is None):
        args += ['-Pspecialize-output', rewrite_file]
    if output_file is None:
        output_file = '/dev/null'
    return previrt(input_file, output_file,
                   args + all_args('-Pspecialize-input', interfaces), **opts)
예제 #4
0
파일: passes.py 프로젝트: sunlifeng/OCCAM
def specialize(input_file, output_file, rewrite_file, interfaces, **opts):
    "inter module specialization, rewrite_file and output_file and the file names for the output files"
    args = ['-Pspecialize']
    if not (rewrite_file is None):
        args += ['-Pspecialize-output', rewrite_file]
    if output_file is None:
        output_file = '/dev/null'
    return previrt(input_file, output_file,
                   args + all_args('-Pspecialize-input', interfaces), 
                   **opts)
예제 #5
0
파일: passes.py 프로젝트: sunlifeng/OCCAM
def intern(input_file, output_file, interfaces, **opts):
    "strips unused symbols"
    return previrt_progress(input_file, output_file,
                            ['-Poccam'] + 
                            all_args('-Poccam-input', interfaces), 
                            **opts)
예제 #6
0
파일: passes.py 프로젝트: sunlifeng/OCCAM
def rewrite(input_file, output_file, rewrites, debug=None, **opts):
    "inter module rewriting"
    return previrt_progress(input_file, output_file,
                            ['-Prewrite'] + 
                            all_args('-Prewrite-input', rewrites), 
                            **opts)
예제 #7
0
파일: passes.py 프로젝트: sunlifeng/OCCAM
def interface(input_file, output_file, wrt, **opts):
    return previrt(input_file, '/dev/null',
                   ['-Pinterface2', '-Pinterface2-output', output_file] +
                   all_args('-Pinterface2-entry', wrt),
                   **opts)
예제 #8
0
def intern(input_file, output_file, interfaces, **opts):
    "strips unused symbols"
    return previrt_progress(input_file, output_file, ['-Poccam'] +
                            all_args('-Poccam-input', interfaces), **opts)
예제 #9
0
def rewrite(input_file, output_file, rewrites, debug=None, **opts):
    "inter module rewriting"
    return previrt_progress(input_file, output_file, ['-Prewrite'] +
                            all_args('-Prewrite-input', rewrites), **opts)
예제 #10
0
def interface(input_file, output_file, wrt, **opts):
    return previrt(input_file, '/dev/null',
                   ['-Pinterface2', '-Pinterface2-output', output_file] +
                   all_args('-Pinterface2-entry', wrt), **opts)