File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -396,7 +396,7 @@ var cwrap, ccall;
396
396
return ret ;
397
397
}
398
398
399
- var sourceRegex = / ^ f u n c t i o n \s \( ( . * ) \) \s * { \s * ( [ ^ * ] * ?) [ \s ; ] * (?: r e t u r n \s * ( .* ?) [ ; \s ] * ) ? } $ / ;
399
+ var sourceRegex = / ^ f u n c t i o n \s \( ( [ ^ ) ] * ) \) \s * { \s * ( [ ^ * ] * ?) [ \s ; ] * (?: r e t u r n \s * ( .* ?) [ ; \s ] * ) ? } $ / ;
400
400
function parseJSFunc ( jsfunc ) {
401
401
// Match the body and the return value of a javascript function source
402
402
var parsed = jsfunc . toString ( ) . match ( sourceRegex ) . slice ( 1 ) ;
Original file line number Diff line number Diff line change @@ -5453,9 +5453,6 @@ def test_corruption_3(self):
5453
5453
### Integration tests
5454
5454
5455
5455
def test_ccall (self ):
5456
- if self .emcc_args is not None and '-O2' in self .emcc_args :
5457
- self .emcc_args += ['--closure' , '1' ] # Use closure here, to test we export things right
5458
-
5459
5456
post = '''
5460
5457
def process(filename):
5461
5458
src = \' \' \'
@@ -5499,6 +5496,11 @@ def process(filename):
5499
5496
5500
5497
self .do_run_from_file (src , output , post_build = post )
5501
5498
5499
+ if self .emcc_args is not None and '-O2' in self .emcc_args :
5500
+ print 'with closure'
5501
+ self .emcc_args += ['--closure' , '1' ]
5502
+ self .do_run_from_file (src , output , post_build = post )
5503
+
5502
5504
def test_pgo (self ):
5503
5505
if Settings .ASM_JS : return self .skip ('PGO does not work in asm mode' )
5504
5506
You can’t perform that action at this time.
0 commit comments