Export to GitHub

spitfire - issue #4

CacheNode not visited by optimizer


Posted on Jan 25, 2010 by Swift Kangaroo

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.

Comment #1

Posted on Jan 25, 2010 by Swift Kangaroo

Fixed in 114.

Status: Fixed

Labels:
Type-Defect Priority-Medium