Module: sip-router Branch: andrei/switch Commit: 4221104f5cb3f60866d13ceedf05f00c62c0160f URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4221104f...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Wed Feb 4 20:48:04 2009 +0100
script engine: switch() fixup and optimizations
- optimize/transform switch() statements into: - jump tables (if small enough) - condition tables - simple blocks (optimization when the expression in switch() is constant) - only a condition evaluator (when the switch body is empty, but the switch expression has side-effect and hence cannot be optimized away)
---
route.c | 25 ++++- switch.c | 374 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 398 insertions(+), 1 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=4221...