Module: sip-router Branch: andrei/script_vars Commit: 0b3512af8f5c42bea2e17de6efce9571e85241f8 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0b3512af...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Thu Dec 11 19:30:41 2008 +0100
script engine: more rvalue optimizations
- optimize: ($v * a) * b -> $v * (a * b) if '*' is associative (a * $v) * b -> (a * b) * $v if '*' is assoc. and commutative a * ($v * b) -> (a * b) * $v if '*' is assoc. and commutative a * (b * $v) -> (a * b) * $v if '*' is associative where a & b are constants, $v is a var (pvar or avp) and '*' is the operator.
- special hacks for optimizing '+' ('+' is a special case because in the current form it can work both with strings and ints which combined with the dynamic typed vars make it very hard to optimize)
---
rvalue.c | 400 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 366 insertions(+), 34 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=0b35...