Hoist index computation into a helper.
Hoist index computation into a helper.

MozReview-Commit-ID: ALeggMDh92m

paulrouget/servo,cbrewster/servo,cbrewster/servo,saneyuki/servo,paulrouget/servo,sadmansk/servo,jimberlage/servo,sadmansk/servo,SimonSapin/servo,KiChjang/servo,peterjoel/servo,anthgur/servo,saneyuki/servo,pyfisch/servo,rnestler/servo,sadmansk/servo,rnestler/servo,peterjoel/servo,szeged/servo,DominoTree/servo,SimonSapin/servo,eddyb/servo,peterjoel/servo,mbrubeck/servo,thiagopnts/servo,fiji-flo/servo,jimberlage/servo,notriddle/servo,nnethercote/servo,jimberlage/servo,pyfisch/servo,DominoTree/servo,fiji-flo/servo,SimonSapin/servo,szeged/servo,KiChjang/servo,saneyuki/servo,saneyuki/servo,splav/servo,upsuper/servo,szeged/servo,DominoTree/servo,rnestler/servo,avadacatavra/servo,paulrouget/servo,avadacatavra/servo,thiagopnts/servo,emilio/servo,larsbergstrom/servo,notriddle/servo,anthgur/servo,mattnenterprise/servo,sadmansk/servo,peterjoel/servo,eddyb/servo,KiChjang/servo,szeged/servo,dati91/servo,mbrubeck/servo,larsbergstrom/servo,anthgur/servo,pyfisch/servo,cbrewster/servo,KiChjang/servo,avadacatavra/servo,thiagopnts/servo,cbrewster/servo,avadacatavra/servo,szeged/servo,SimonSapin/servo,canaltinova/servo,mattnenterprise/servo,emilio/servo,nnethercote/servo,pyfisch/servo,DominoTree/servo,jimberlage/servo,pyfisch/servo,saneyuki/servo,rnestler/servo,splav/servo,thiagopnts/servo,emilio/servo,thiagopnts/servo,splav/servo,anthgur/servo,DominoTree/servo,notriddle/servo,CJ8664/servo,jimberlage/servo,nnethercote/servo,KiChjang/servo,CJ8664/servo,cbrewster/servo,splav/servo,DominoTree/servo,larsbergstrom/servo,canaltinova/servo,thiagopnts/servo,nnethercote/servo,mattnenterprise/servo,dsandeephegde/servo,cbrewster/servo,SimonSapin/servo,CJ8664/servo,SimonSapin/servo,upsuper/servo,jimberlage/servo,eddyb/servo,fiji-flo/servo,dsandeephegde/servo,upsuper/servo,mbrubeck/servo,anthgur/servo,paulrouget/servo,cbrewster/servo,mbrubeck/servo,CJ8664/servo,pyfisch/servo,ConnorGBrewster/servo,anthgur/servo,szeged/servo,eddyb/servo,dsandeephegde/servo,emilio/servo,splav/servo,mattnenterprise/servo,nnethercote/servo,emilio/servo,sadmansk/servo,mattnenterprise/servo,avadacatavra/servo,paulrouget/servo,dsandeephegde/servo,KiChjang/servo,notriddle/servo,dsandeephegde/servo,splav/servo,dati91/servo,splav/servo,larsbergstrom/servo,saneyuki/servo,sadmansk/servo,larsbergstrom/servo,splav/servo,CJ8664/servo,saneyuki/servo,larsbergstrom/servo,szeged/servo,pyfisch/servo,pyfisch/servo,saneyuki/servo,splav/servo,DominoTree/servo,jimberlage/servo,notriddle/servo,eddyb/servo,DominoTree/servo,fiji-flo/servo,pyfisch/servo,canaltinova/servo,ConnorGBrewster/servo,paulrouget/servo,KiChjang/servo,dsandeephegde/servo,dati91/servo,upsuper/servo,CJ8664/servo,paulrouget/servo,SimonSapin/servo,fiji-flo/servo,dati91/servo,emilio/servo,sadmansk/servo,eddyb/servo,nnethercote/servo,mbrubeck/servo,paulrouget/servo,DominoTree/servo,notriddle/servo,nnethercote/servo,avadacatavra/servo,canaltinova/servo,thiagopnts/servo,jimberlage/servo,ConnorGBrewster/servo,szeged/servo,CJ8664/servo,ConnorGBrewster/servo,avadacatavra/servo,avadacatavra/servo,paulrouget/servo,upsuper/servo,KiChjang/servo,anthgur/servo,notriddle/servo,sadmansk/servo,saneyuki/servo,peterjoel/servo,ConnorGBrewster/servo,dati91/servo,saneyuki/servo,peterjoel/servo,emilio/servo,splav/servo,nnethercote/servo,larsbergstrom/servo,dsandeephegde/servo,canaltinova/servo,canaltinova/servo,upsuper/servo,canaltinova/servo,ConnorGBrewster/servo,mbrubeck/servo,emilio/servo,larsbergstrom/servo,mbrubeck/servo,fiji-flo/servo,DominoTree/servo,thiagopnts/servo,mattnenterprise/servo,dati91/servo,canaltinova/servo,KiChjang/servo,paulrouget/servo,peterjoel/servo,mattnenterprise/servo,ConnorGBrewster/servo,fiji-flo/servo,larsbergstrom/servo,fiji-flo/servo,notriddle/servo,emilio/servo,cbrewster/servo,jimberlage/servo,dati91/servo,SimonSapin/servo,peterjoel/servo,anthgur/servo,szeged/servo,rnestler/servo,eddyb/servo,upsuper/servo,CJ8664/servo,pyfisch/servo,upsuper/servo,notriddle/servo,KiChjang/servo,notriddle/servo,larsbergstrom/servo,nnethercote/servo,mattnenterprise/servo,peterjoel/servo,peterjoel/servo,rnestler/servo,mbrubeck/servo,ConnorGBrewster/servo,eddyb/servo,rnestler/servo,emilio/servo,rnestler/servo,szeged/servo,dati91/servo,nnethercote/servo,dsandeephegde/servo