Skip to content

Commit 7fb8c83

Browse files
committed
evaluator: Fix destruction order of patterns
1 parent 7daf3b3 commit 7fb8c83

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/include/pl/core/evaluator.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,10 @@ namespace pl::core {
497497
std::map<u64, api::Section> m_sections;
498498
u64 m_sectionId = 0;
499499

500+
std::vector<std::shared_ptr<ptrn::Pattern>> m_patterns;
500501
std::vector<std::unique_ptr<Scope>> m_scopes;
502+
std::map<std::string, std::set<ptrn::Pattern*>> m_attributedPatterns;
503+
501504
std::unordered_map <std::string, api::Function> m_customFunctions;
502505
std::unordered_map <std::string, api::Function> m_builtinFunctions;
503506
std::vector<std::unique_ptr<ast::ASTNode>> m_customFunctionDefinitions;
@@ -519,9 +522,6 @@ namespace pl::core {
519522
ControlFlowStatement m_currControlFlowStatement = ControlFlowStatement::None;
520523
std::vector<StackTrace> m_callStack;
521524

522-
std::map<std::string, std::set<ptrn::Pattern*>> m_attributedPatterns;
523-
std::vector<std::shared_ptr<ptrn::Pattern>> m_patterns;
524-
525525
std::set<std::string> m_stringPool;
526526

527527
u64 m_dataBaseAddress = 0x00;

0 commit comments

Comments
 (0)