[apparmor] [RFC/patch] parser: reduce virtual_cast<> calls when normalizing tree
Steve Beattie
steve at nxnw.org
Wed Apr 6 00:59:46 UTC 2011
On Tue, Apr 05, 2011 at 05:36:48PM -0700, Steve Beattie wrote:
> This is a prototype patch tries to reduce the number of
> dynamic_cast<>s needed during normalization by pushing the operations
> of normalize_tree() into the expr-tree classes themselves rather
> than perform it as an external function. This eliminates the need
> for dynamic_cast<> checks on the current object under inspection and
> reduces the number of checks needing to be performed on child Nodes
> as well.
<
> Index: b/parser/libapparmor_re/expr-tree.cc
> ===================================================================
> --- a/parser/libapparmor_re/expr-tree.cc
> +++ b/parser/libapparmor_re/expr-tree.cc
> +extern iostream cerr;
Whoops, that leaked in from attempting to add debugging points. Removed
locally.
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20110405/954fcb2a/attachment.pgp>
More information about the AppArmor
mailing list