mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
Adds: - ast/UserFunction AST node for user-defined functions. - astbuilder/AvailableUserFunction: reference to a parse tree for a user function. - The AST builder only generates ASTs for user functions that are actually referenced. - astbuilder/UserFunctionVisitor: visits (builds an AST for) a parse tree for a user function. - This happens after the .src or .inc file has been otherwise processed, so this class serves to hook up the correct SourceFileIdentifier to the AST.
40 lines
1 KiB
C++
40 lines
1 KiB
C++
#ifndef POLSERVER_PROFILE_H
|
|
#define POLSERVER_PROFILE_H
|
|
|
|
#include <atomic>
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
class Profile
|
|
{
|
|
public:
|
|
std::atomic<long long> build_workspace_micros;
|
|
std::atomic<long long> register_const_declarations_micros;
|
|
std::atomic<long long> optimize_micros;
|
|
std::atomic<long long> disambiguate_micros;
|
|
std::atomic<long long> analyze_micros;
|
|
std::atomic<long long> codegen_micros;
|
|
std::atomic<long long> prune_cache_select_micros;
|
|
std::atomic<long long> prune_cache_delete_micros;
|
|
|
|
std::atomic<long> ambiguities;
|
|
|
|
std::atomic<long> parse_em_count;
|
|
std::atomic<long> parse_src_count;
|
|
|
|
std::atomic<long long> load_em_micros;
|
|
std::atomic<long long> parse_em_micros;
|
|
std::atomic<long long> ast_em_micros;
|
|
|
|
std::atomic<long long> parse_src_micros;
|
|
std::atomic<long long> ast_src_micros;
|
|
|
|
std::atomic<long long> ast_resolve_functions_micros;
|
|
|
|
std::atomic<long> cache_hits;
|
|
std::atomic<long> cache_misses;
|
|
};
|
|
|
|
} // namespace Pol::Bscript::Compiler
|
|
|
|
#endif // POLSERVER_PROFILE_H
|