File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,9 @@ Resolver.prototype.resolveSplits = function resolveSplits() {
160160} ;
161161
162162Resolver . prototype . resolveSplit = function resolveSplit ( from , to ) {
163- assert . equal ( from . end ( ) , to . start ( ) , 'Split in the lifetime hole' ) ;
163+ // Split happened in the life-time hole, will be handled by `resolveFlow`
164+ if ( from . end ( ) !== to . start ( ) )
165+ return ;
164166
165167 if ( from . value . isEqual ( to . value ) )
166168 return ;
Original file line number Diff line number Diff line change @@ -312,4 +312,38 @@ describe('Interval Resolver', function() {
312312 22: return %0
313313 */ } ) ;
314314 } ) ;
315+
316+ it ( 'should resolve branch without merge' , function ( ) {
317+ var r = fixtures . createResolver ( fixtures . options , function ( ) { /*
318+ pipeline {
319+ b0 {
320+ i0 = rbx-out
321+ i1 = if ^b0
322+ }
323+ b0 -> b1, b2
324+
325+ b1 {
326+ i2 = return ^b1, i0
327+ }
328+
329+ b2 {
330+ i3 = return ^b2, i0
331+ }
332+ }
333+ */ } ) ;
334+
335+ r . resolve ( ) ;
336+
337+ // TODO(indutny): figure out how to move similar moves to the branch
338+ check ( r , function ( ) { /*
339+ 2: %1 = rbx-out
340+ 4: if &8, &12
341+
342+ 8: gap {%1=>%0}
343+ 9: return %0
344+
345+ 12: gap {%1=>%0}
346+ 14: return %0
347+ */ } ) ;
348+ } ) ;
315349} ) ;
You can’t perform that action at this time.
0 commit comments