[SR-Dev] git:andrei/script_vars: script engine: generalised lvalues & rvalues

Andrei Pelinescu-Onciul andrei at iptel.org
Thu Dec 4 01:11:30 CET 2008


Module: sip-router
Branch: andrei/script_vars
Commit: 1c7e485e4a8b77271d7a65c5e7a1263d2d73dda8
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1c7e485e4a8b77271d7a65c5e7a1263d2d73dda8

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Thu Dec  4 00:47:29 2008 +0100

script engine: generalised lvalues & rvalues

- support for rvalues (anything that can appear on the right side
  of an assignment). For now an rvalue can be an avp, pvar,
  select, number, string, logical expression or script command.
  rvalues expressions are also supported (rvalue operator rvalue
  ...).
  Evaluation of integer rvalue expression is highly optimized.
  For performance reasons the rvalue expressions are completely
  separated from the logical expressions (eval_elem/eval_expr).
- rvalue expression fixup (apart for normal fixup stuff will also
  optimize away simple expressions, like 2+3 or "a" + "b").
- support for more general lvalues (anything in the left side of
  an assignment operator). For now an lvalue is either an avp or a
  script pvar. lvalue = rvalue_expression.
  Direct assignments (lvalue to avp or pvar) are optimised.

---

 lvalue.c |  361 ++++++++++++++++
 lvalue.h |   67 +++
 rvalue.c | 1377 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 rvalue.h |  175 ++++++++
 4 files changed, 1980 insertions(+), 0 deletions(-)

Diff:   http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=1c7e485e4a8b77271d7a65c5e7a1263d2d73dda8



More information about the sr-dev mailing list