@@ -414,17 +414,6 @@ def decorated(self, *args, **kwargs):
414414 return decorated
415415
416416
417- def requires_wasm_legacy_eh (func ):
418- assert callable (func )
419-
420- @wraps (func )
421- def decorated (self , * args , ** kwargs ):
422- self .require_wasm_legacy_eh ()
423- return func (self , * args , ** kwargs )
424-
425- return decorated
426-
427-
428417def requires_wasm_eh (func ):
429418 assert callable (func )
430419
@@ -632,31 +621,6 @@ def metafunc(self, rawfs, *args, **kwargs):
632621 return metafunc
633622
634623
635- # Decorator version of env_modify
636- def also_with_env_modify (name_updates_mapping ):
637-
638- def decorated (f ):
639- @wraps (f )
640- def metafunc (self , updates , * args , ** kwargs ):
641- if DEBUG :
642- print ('parameterize:env_modify=%s' % (updates ))
643- if updates :
644- with env_modify (updates ):
645- return f (self , * args , ** kwargs )
646- else :
647- return f (self , * args , ** kwargs )
648-
649- params = {'' : (None ,)}
650- for name , updates in name_updates_mapping .items ():
651- params [name ] = (updates ,)
652-
653- parameterize (metafunc , params )
654-
655- return metafunc
656-
657- return decorated
658-
659-
660624def also_with_minimal_runtime (f ):
661625 assert callable (f )
662626
@@ -1638,32 +1602,6 @@ def get_func(self, src, name):
16381602 t += 1
16391603 assert t < len (src )
16401604
1641- def count_funcs (self , javascript_file ):
1642- num_funcs = 0
1643- start_tok = "// EMSCRIPTEN_START_FUNCS"
1644- end_tok = "// EMSCRIPTEN_END_FUNCS"
1645- start_off = 0
1646- end_off = 0
1647-
1648- js = read_file (javascript_file )
1649- blob = "" .join (js .splitlines ())
1650-
1651- start_off = blob .find (start_tok ) + len (start_tok )
1652- end_off = blob .find (end_tok )
1653- asm_chunk = blob [start_off :end_off ]
1654- num_funcs = asm_chunk .count ('function ' )
1655- return num_funcs
1656-
1657- def count_wasm_contents (self , wasm_binary , what ):
1658- out = self .run_process ([os .path .join (building .get_binaryen_bin (), 'wasm-opt' ), wasm_binary , '--metrics' ], stdout = PIPE ).stdout
1659- # output is something like
1660- # [?] : 125
1661- for line in out .splitlines ():
1662- if '[' + what + ']' in line :
1663- ret = line .split (':' )[1 ].strip ()
1664- return int (ret )
1665- self .fail ('Failed to find [%s] in wasm-opt output' % what )
1666-
16671605 def get_wasm_text (self , wasm_binary ):
16681606 return self .run_process ([WASM_DIS , wasm_binary ], stdout = PIPE ).stdout
16691607
0 commit comments