@@ -241,23 +241,6 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
241241 CHANGED = true ;
242242 return node . name ;
243243 }
244- else if ( node instanceof U . AST_DestructuredArray ) {
245- var expr = node . elements [ 0 ] ;
246- if ( expr && ! ( expr instanceof U . AST_Hole ) ) {
247- node . start . _permute ++ ;
248- CHANGED = true ;
249- return expr ;
250- }
251- }
252- else if ( node instanceof U . AST_DestructuredObject ) {
253- // first property's value
254- var expr = node . properties [ 0 ] ;
255- if ( expr ) {
256- node . start . _permute ++ ;
257- CHANGED = true ;
258- return expr . value ;
259- }
260- }
261244 else if ( node instanceof U . AST_Defun ) {
262245 switch ( ( ( node . start . _permute += step ) * steps | 0 ) % 2 ) {
263246 case 0 :
@@ -275,6 +258,23 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
275258 }
276259 }
277260 }
261+ else if ( node instanceof U . AST_DestructuredArray ) {
262+ var expr = node . elements [ 0 ] ;
263+ if ( expr && ! ( expr instanceof U . AST_Hole ) ) {
264+ node . start . _permute ++ ;
265+ CHANGED = true ;
266+ return expr ;
267+ }
268+ }
269+ else if ( node instanceof U . AST_DestructuredObject ) {
270+ // first property's value
271+ var expr = node . properties [ 0 ] ;
272+ if ( expr ) {
273+ node . start . _permute ++ ;
274+ CHANGED = true ;
275+ return expr . value ;
276+ }
277+ }
278278 else if ( node instanceof U . AST_DWLoop ) {
279279 var expr = [
280280 node . condition ,
@@ -296,6 +296,16 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
296296 return to_statement ( expr ) ;
297297 }
298298 }
299+ else if ( node instanceof U . AST_ExportDeclaration ) {
300+ node . start . _permute ++ ;
301+ CHANGED = true ;
302+ return node . body ;
303+ }
304+ else if ( node instanceof U . AST_ExportDefault ) {
305+ node . start . _permute ++ ;
306+ CHANGED = true ;
307+ return to_statement ( node . body ) ;
308+ }
299309 else if ( node instanceof U . AST_Finally ) {
300310 // drop finally block
301311 node . start . _permute ++ ;
@@ -351,6 +361,15 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
351361 return to_statement ( expr ) ;
352362 }
353363 }
364+ else if ( node instanceof U . AST_LabeledStatement ) {
365+ if ( node . body instanceof U . AST_Statement
366+ && ! has_loopcontrol ( node . body , node . body , node ) ) {
367+ // replace labelled statement with its non-labelled body
368+ node . start . _permute = REPLACEMENTS . length ;
369+ CHANGED = true ;
370+ return node . body ;
371+ }
372+ }
354373 else if ( node instanceof U . AST_Object ) {
355374 // first property's value
356375 var expr = node . properties [ 0 ] ;
@@ -441,15 +460,6 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
441460 return to_statement ( node . definitions [ 0 ] . value ) ;
442461 }
443462 }
444- else if ( node instanceof U . AST_LabeledStatement ) {
445- if ( node . body instanceof U . AST_Statement
446- && ! has_loopcontrol ( node . body , node . body , node ) ) {
447- // replace labelled statement with its non-labelled body
448- node . start . _permute = REPLACEMENTS . length ;
449- CHANGED = true ;
450- return node . body ;
451- }
452- }
453463
454464 if ( in_list ) {
455465 // drop switch branches
0 commit comments