With both translate1 and translate2 in the function registry:
Source:
#set $a = 'a'
$translate1(a)
$translate2(123)
Compiled:
## translate1 ok:
25 a = u'a'
26 _buffer_write('%s' % _self_filter_function(translate1(a), translate1))
27 _buffer_write(u'\n')
28 if _cphAC9C6496 is None:
## translate2 not optmized: uses resolve_placeholder()
29 _globals['_cphAC9C6496'] =
_self_filter_function(resolve_placeholder('translate2', template=self,
local_vars=locals(), global_vars=_globals)(123),
resolve_placeholder('translate2', template=self, local_vars=locals(),
global_vars=_globals))
This is because CacheNode doesn't get visited by the optimizer.
Original issue reported on code.google.com by shalabh....@gmail.com on 25 Jan 2010 at 7:30
Original issue reported on code.google.com by
shalabh....@gmail.com
on 25 Jan 2010 at 7:30