Snap! Websites
An Open Source CMS System in C++
The optimizer sub-namespace. More...
Namespaces anonymous_namespace{optimizer_matches.cpp} Hide all optimizer compare implementation details.This namespace is used to define all the optimizer internal tables, functions, and classes.
We have a separate namespace because the number of tables in the optimizer is really large and could clash with other parts of the libraries.
Definition at line 147 of file optimizer_tables.h.
Definition at line 102 of file optimizer_tables.h.
This function applies all the optimization functions on the specified array of nodes one after the other.
If a parameter (node) is invalid for a function, an exception is raised. Because the optimizer is expected to properly match nodes before an optimization can be applied, the possibility for an error here should be zero.
Definition at line 2070 of file optimizer_optimize.cpp.
References as2js::optimizer_details::anonymous_namespace{optimizer_optimize.cpp}::apply_one_function(), and as2js::Optimizer::optimize().
Referenced by as2js::optimizer_details::anonymous_namespace{optimizer_tables.cpp}::apply_optimization().
This function goes through a node tree and and optimization tree. If they both match, then the function returns true.
The function is generally called using the node to be checked and the match / match_count parameters as found in an optimization structure.
The depth is expected to start at zero.
The function is recursive in order to handle the whole tree (i.e. when the function determines that the node is a match with the current match level, it then checks all the children of the current node if required.)
Definition at line 327 of file optimizer_matches.cpp.
References as2js::optimizer_details::optimization_match_t::f_depth, as2js::optimizer_details::optimization_match_t::f_match_flags, as2js::optimizer_details::anonymous_namespace{optimizer_matches.cpp}::match_node(), and OPTIMIZATION_MATCH_FLAG_CHILDREN.
Referenced by as2js::optimizer_details::anonymous_namespace{optimizer_tables.cpp}::apply_optimization().
This function checks the specified node against all the available optimizations defined in the optimizer.
Definition at line 213 of file optimizer_tables.cpp.
References as2js::optimizer_details::anonymous_namespace{optimizer_tables.cpp}::apply_optimization(), as2js::optimizer_details::anonymous_namespace{optimizer_tables.cpp}::g_optimizer_tables_count, and as2js::Node::NODE_UNKNOWN.
Referenced by as2js::Optimizer::optimize().
Definition at line 156 of file optimizer_tables.h.
Referenced by as2js::optimizer_details::anonymous_namespace{optimizer_tables.cpp}::apply_optimization().
Definition at line 157 of file optimizer_tables.h.
Definition at line 73 of file optimizer_tables.h.
Referenced by match_tree().
This document is part of the Snap! Websites Project.
Copyright by Made to Order Software Corp.
Snap! Websites
An Open Source CMS System in C++