#42: More loop autovariables
-----------------------------+----------------------------------------------
Reporter: louis.dejardin | Owner:
Type: enhancement | Status: closed
Priority: major | Component: Spark Core
Resolution: fixed | Keywords:
-----------------------------+----------------------------------------------
Changes (by louis.dejardin):
* status: new => closed
* resolution: => fixed
Comment:
foreach(var varname in collection) code now has auto variables for
varnameIndex varnameCount varnameIsFirst and varnameIsLast.
It will also do a simple string search on the code inside the foreach
scope to see if each of the four autovariables is used, and only the ones
that are used will be generated. That's because varnameCount and
varnameIsLast are potentially slightly more expensive, especially if the
collection is the results of inline method calls.
So if you don't reference count or islast there's no impact at all.
--
Ticket URL: <
http://dev.dejardin.org/trac/spark/ticket/42#comment:1>