v3_core: Eliminate double processing of patterns
v3_core: Eliminate double processing of patterns

Internally in the v3_core pass, an #imatch{} record represents
a match expression:

  Pattern = Expression

If Pattern is a single, unbound variable, #imatch{} will be
rewritten to #iset{}; otherwise it will be rewritten to #icase{}.

To determine how #imatch{} should be translated, the pattern is
processed using upattern/3. The return value from upattern/3 is thrown
away (after having been used for determing how the #imatch{} record
should be translated).

That means that every pattern in an #imatch{} is processed twice,
which is wasteful.

We can easily avoid the double processing of patterns by
introducing a new helper function that determines whether the
pattern is a new variable.

bjorng/otp,saleyn/otp,neeraj9/otp,aboroska/otp,neeraj9/otp,legoscia/otp,goertzenator/otp,massemanet/otp,isvilen/otp,emacsmirror/erlang,rlipscombe/otp,electricimp/otp,dumbbell/otp,aboroska/otp,neeraj9/otp,goertzenator/otp,emacsmirror/erlang,basho/otp,vinoski/otp,bernardd/otp,saleyn/otp,lrascao/otp,legoscia/otp,psyeugenic/otp,aboroska/otp,vinoski/otp,psyeugenic/otp,basho/otp,legoscia/otp,aboroska/otp,dumbbell/otp,getong/otp,dgud/otp,getong/otp,getong/otp,g-andrade/otp,getong/otp,ahmedshafeeq/otp,jj1bdx/otp,bernardd/otp,RaimoNiskanen/otp,g-andrade/otp,kvakvs/otp,matwey/otp,saleyn/otp,erlang/otp,RoadRunnr/otp,RaimoNiskanen/otp,emacsmirror/erlang,ferd/otp,bugs-erlang-org/otp,erlang/otp,psyeugenic/otp,dumbbell/otp,ahmedshafeeq/otp,falkevik/otp,ferd/otp,vladdu/otp,ahmedshafeeq/otp,bernardd/otp,jj1bdx/otp,jj1bdx/otp,electricimp/otp,lrascao/otp,emile/otp,cobusc/otp,mikpe/otp,matwey/otp,kvakvs/otp,matwey/otp,dgud/otp,isvilen/otp,potatosalad/otp,aboroska/otp,uabboli/otp,massemanet/otp,dumbbell/otp,jj1bdx/otp,RoadRunnr/otp,cobusc/otp,bsmr-erlang/otp,mikpe/otp,dgud/otp,bsmr-erlang/otp,fenollp/otp,g-andrade/otp,uabboli/otp,emacsmirror/erlang,g-andrade/otp,vinoski/otp,lrascao/otp,goertzenator/otp,isvilen/otp,fenollp/otp,electricimp/otp,bjorng/otp,bsmr-erlang/otp,release-project/otp,isvilen/otp,isvilen/otp,isvilen/otp,fenollp/otp,RoadRunnr/otp,jj1bdx/otp,emile/otp,bugs-erlang-org/otp,saleyn/otp,potatosalad/otp,saleyn/otp,goertzenator/otp,lemenkov/otp,jj1bdx/otp,dumbbell/otp,emile/otp,ahmedshafeeq/otp,RoadRunnr/otp,legoscia/otp,lrascao/otp,bjorng/otp,uabboli/otp,bjorng/otp,mikpe/otp,bernardd/otp,release-project/otp,ferd/otp,getong/otp,vladdu/otp,saleyn/otp,basho/otp,getong/otp,ferd/otp,kvakvs/otp,tuncer/otp,rlipscombe/otp,emacsmirror/erlang,tuncer/otp,fenollp/otp,rlipscombe/otp,electricimp/otp,weisslj/otp,rlipscombe/otp,neeraj9/otp,erlang/otp,lightcyphers/otp,bernardd/otp,massemanet/otp,RaimoNiskanen/otp,release-project/otp,rlipscombe/otp,tuncer/otp,electricimp/otp,goertzenator/otp,vinoski/otp,falkevik/otp,saleyn/otp,electricimp/otp,kvakvs/otp,lemenkov/otp,legoscia/otp,bjorng/otp,rlipscombe/otp,jj1bdx/otp,jj1bdx/otp,massemanet/otp,goertzenator/otp,lightcyphers/otp,mikpe/otp,erlang/otp,rlipscombe/otp,emacsmirror/erlang,bugs-erlang-org/otp,tuncer/otp,emile/otp,aboroska/otp,psyeugenic/otp,fenollp/otp,basho/otp,dgud/otp,isvilen/otp,cobusc/otp,uabboli/otp,emacsmirror/erlang,saleyn/otp,erlang/otp,goertzenator/otp,basho/otp,vinoski/otp,emile/otp,falkevik/otp,matwey/otp,matwey/otp,lightcyphers/otp,weisslj/otp,ahmedshafeeq/otp,jj1bdx/otp,matwey/otp,psyeugenic/otp,psyeugenic/otp,potatosalad/otp,cobusc/otp,vinoski/otp,uabboli/otp,bsmr-erlang/otp,bugs-erlang-org/otp,release-project/otp,bernardd/otp,tuncer/otp,g-andrade/otp,emacsmirror/erlang,mikpe/otp,weisslj/otp,bernardd/otp,dgud/otp,saleyn/otp,mikpe/otp,RoadRunnr/otp,lrascao/otp,g-andrade/otp,ferd/otp,bsmr-erlang/otp,bjorng/otp,weisslj/otp,isvilen/otp,erlang/otp,potatosalad/otp,emacsmirror/erlang,basho/otp,legoscia/otp,weisslj/otp,RoadRunnr/otp,dumbbell/otp,release-project/otp,vinoski/otp,aboroska/otp,tuncer/otp,RaimoNiskanen/otp,lightcyphers/otp,uabboli/otp,bugs-erlang-org/otp,emile/otp,erlang/otp,basho/otp,erlang/otp,potatosalad/otp,bjorng/otp,lrascao/otp,lemenkov/otp,neeraj9/otp,lrascao/otp,weisslj/otp,release-project/otp,massemanet/otp,g-andrade/otp,vladdu/otp,potatosalad/otp,weisslj/otp,isvilen/otp,neeraj9/otp,vladdu/otp,kvakvs/otp,dgud/otp,emile/otp,dgud/otp,RoadRunnr/otp,vladdu/otp,potatosalad/otp,erlang/otp,matwey/otp,RaimoNiskanen/otp,rlipscombe/otp,weisslj/otp,bugs-erlang-org/otp,release-project/otp,aboroska/otp,vladdu/otp,falkevik/otp,ferd/otp,psyeugenic/otp,falkevik/otp,dgud/otp,basho/otp,bjorng/otp,uabboli/otp,massemanet/otp,goertzenator/otp,erlang/otp,bernardd/otp,lightcyphers/otp,ahmedshafeeq/otp,ferd/otp,lemenkov/otp,isvilen/otp,legoscia/otp,vinoski/otp,massemanet/otp,getong/otp,mikpe/otp,bugs-erlang-org/otp,kvakvs/otp,goertzenator/otp,vinoski/otp,fenollp/otp,fenollp/otp,rlipscombe/otp,bsmr-erlang/otp,vinoski/otp,bsmr-erlang/otp,psyeugenic/otp,vladdu/otp,rlipscombe/otp,lemenkov/otp,getong/otp,uabboli/otp,kvakvs/otp,bjorng/otp,vladdu/otp,bjorng/otp,emile/otp,dumbbell/otp,dumbbell/otp,neeraj9/otp,bernardd/otp,emacsmirror/erlang,mikpe/otp,basho/otp,RoadRunnr/otp,bsmr-erlang/otp,potatosalad/otp,ahmedshafeeq/otp,dumbbell/otp,mikpe/otp,ahmedshafeeq/otp,electricimp/otp,lightcyphers/otp,g-andrade/otp,legoscia/otp,getong/otp,RaimoNiskanen/otp,ferd/otp,lrascao/otp,lrascao/otp,cobusc/otp,neeraj9/otp,lemenkov/otp,emile/otp,kvakvs/otp,tuncer/otp,falkevik/otp,cobusc/otp,RaimoNiskanen/otp,potatosalad/otp,weisslj/otp,falkevik/otp,tuncer/otp,uabboli/otp,ferd/otp,matwey/otp,fenollp/otp,massemanet/otp,lightcyphers/otp,falkevik/otp,kvakvs/otp,electricimp/otp,release-project/otp,ahmedshafeeq/otp,vladdu/otp,falkevik/otp,bsmr-erlang/otp,RaimoNiskanen/otp,bugs-erlang-org/otp,matwey/otp,potatosalad/otp,cobusc/otp,cobusc/otp,RoadRunnr/otp,g-andrade/otp,legoscia/otp,lemenkov/otp,dgud/otp,RaimoNiskanen/otp,jj1bdx/otp,dgud/otp,dumbbell/otp,mikpe/otp,aboroska/otp,getong/otp,electricimp/otp,tuncer/otp,lightcyphers/otp,lemenkov/otp,fenollp/otp,g-andrade/otp,massemanet/otp,release-project/otp