Beispiel #1
0
def on_finish():
    # Now traverse all of the data seen at every previous pass
    print('on_finish')

    if 0:
        print('num_ggc_collections: %i ' % num_ggc_collections)

    # Call gcc._force_garbage_collection(), and verify that on_ggc_start
    # gets called:
    old_collections = num_ggc_collections
    gcc._force_garbage_collection()

    # num_ggc_collections should have increased by 1:
    assert num_ggc_collections > 0
    assert num_ggc_collections == old_collections + 1
    print('num_ggc_collections: new - old: %i '
          % (num_ggc_collections - old_collections))

    if 0:
        print('num_ggc_collections: %i ' % num_ggc_collections)
Beispiel #2
0
def on_finish():
    # Now traverse all of the data seen at every previous pass
    print('on_finish')

    if 0:
        print('num_ggc_collections: %i ' % num_ggc_collections)

    # Call gcc._force_garbage_collection(), and verify that on_ggc_start
    # gets called:
    old_collections = num_ggc_collections
    gcc._force_garbage_collection()

    # num_ggc_collections should have increased by 1:
    assert num_ggc_collections > 0
    assert num_ggc_collections == old_collections + 1
    print('num_ggc_collections: new - old: %i ' %
          (num_ggc_collections - old_collections))

    if 0:
        print('num_ggc_collections: %i ' % num_ggc_collections)
Beispiel #3
0
import gcc


class UnusedArg(gcc.GimplePass):
    def execute(self, fun):
        pass


ps = UnusedArg(name='UnusedArg')
ps.register_after('lower')

gcc._force_garbage_collection()
Beispiel #4
0
import gcc

class UnusedArg(gcc.GimplePass):
    def execute(self, fun):
        pass

ps = UnusedArg(name='UnusedArg')
ps.register_after('lower')

gcc._force_garbage_collection()