pass assertions to emterpretify

This commit is contained in:
Alon Zakai 2015-02-09 14:21:52 -08:00
Родитель 9be0275876
Коммит 21e91d472e
2 изменённых файлов: 3 добавлений и 1 удалений

2
emcc
Просмотреть файл

@ -1592,6 +1592,8 @@ try:
args += ['ASYNC=1']
if profiling or profiling_funcs:
args += ['PROFILING=1']
if shared.Settings.ASSERTIONS:
args += ['ASSERTIONS=1']
execute(args)
final = final + '.em.js'
finally:

Просмотреть файл

@ -721,7 +721,7 @@ if __name__ == '__main__':
external_emterpreted_funcs = filter(lambda func: func in tabled_funcs or func in exported_funcs or func in reachable_funcs, emterpreted_funcs)
# process functions, generating bytecode
shared.Building.js_optimizer(infile, ['emterpretify'], extra_info={ 'emterpretedFuncs': list(emterpreted_funcs), 'externalEmterpretedFuncs': list(external_emterpreted_funcs), 'opcodes': OPCODES, 'ropcodes': ROPCODES, 'ASYNC': ASYNC, 'PROFILING': PROFILING }, output_filename=temp, just_concat=True)
shared.Building.js_optimizer(infile, ['emterpretify'], extra_info={ 'emterpretedFuncs': list(emterpreted_funcs), 'externalEmterpretedFuncs': list(external_emterpreted_funcs), 'opcodes': OPCODES, 'ropcodes': ROPCODES, 'ASYNC': ASYNC, 'PROFILING': PROFILING, 'ASSERTIONS': ASSERTIONS }, output_filename=temp, just_concat=True)
# load the module and modify it
asm = asm_module.AsmModule(temp)