From 53cb50a3494a5e5e2e6b2d535cb602caaf3f100d Mon Sep 17 00:00:00 2001 From: Wen HU Date: Tue, 25 Jan 2022 16:48:50 -0500 Subject: [PATCH 1/3] add imported node once --- src/MapleFE/shared/src/parser.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/MapleFE/shared/src/parser.cpp b/src/MapleFE/shared/src/parser.cpp index 46d3cd9aa3..a4736a6b93 100644 --- a/src/MapleFE/shared/src/parser.cpp +++ b/src/MapleFE/shared/src/parser.cpp @@ -638,8 +638,6 @@ ParseStatus Parser::ParseStmt() { if (tree) { if (!mLineMode) { mASTModule->AddTree(tree); - if (tree->IsImport()) - mASTModule->AddImport(static_cast(tree)); } } -- Gitee From 8ea2fdb58b94aff3e31dbffa2ec3a07250d32330 Mon Sep 17 00:00:00 2001 From: Wen HU Date: Tue, 25 Jan 2022 17:01:13 -0500 Subject: [PATCH 2/3] remove mImports in module --- src/MapleFE/shared/include/ast_module.h | 6 ------ src/MapleFE/shared/src/ast_module.cpp | 1 - 2 files changed, 7 deletions(-) diff --git a/src/MapleFE/shared/include/ast_module.h b/src/MapleFE/shared/include/ast_module.h index a7b3bdc255..adc2467ed3 100644 --- a/src/MapleFE/shared/include/ast_module.h +++ b/src/MapleFE/shared/include/ast_module.h @@ -36,7 +36,6 @@ class ModuleNode : public TreeNode { public: const char *mFilename; PackageNode *mPackage; - SmallVector mImports; public: SmallList mTrees; // All trees in the module. ASTScope *mRootScope; // the scope corresponding to a module. All other scopes @@ -64,11 +63,6 @@ public: SrcLang GetSrcLang(); std::string GetSrcLangString(); - unsigned GetImportsNum() {return mImports.GetNum();} - ImportNode* GetImport(unsigned i) {return mImports.ValueAtIndex(i);} - void SetImport(unsigned i, ImportNode* n) {*(mImports.RefAtIndex(i)) = n;} - void AddImport(ImportNode *imp) {mImports.PushBack(imp); if(imp) imp->SetParent(this);} - unsigned GetTreesNum() {return mTrees.GetNum();} TreeNode* GetTree(unsigned i) {return mTrees.ValueAtIndex(i);} void SetTree(unsigned i, TreeNode* t) {*(mTrees.RefAtIndex(i)) = t;} diff --git a/src/MapleFE/shared/src/ast_module.cpp b/src/MapleFE/shared/src/ast_module.cpp index 245c97abde..0d4c7e830a 100644 --- a/src/MapleFE/shared/src/ast_module.cpp +++ b/src/MapleFE/shared/src/ast_module.cpp @@ -27,7 +27,6 @@ ModuleNode::ModuleNode() : TreeNode(NK_Module), mPackage(NULL), mSrcLang(SrcLang ModuleNode::~ModuleNode() { mTrees.Release(); - mImports.Release(); } // AFAIK, all languages allow only one package name if it allows. -- Gitee From 3f0e377fb12b264a6a8b4a1e65dea0c93a54c5fc Mon Sep 17 00:00:00 2001 From: Wen HU Date: Tue, 25 Jan 2022 19:28:52 -0500 Subject: [PATCH 3/3] add MapleFE discord link --- Readme.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 4a7bda810b..36f87f0258 100644 --- a/Readme.md +++ b/Readme.md @@ -76,4 +76,7 @@ C example: ## Real-time Chat Channel - [Discord-OpenArkCompiler](https://discord.gg/CJeJWQXxMP) -- 9:00 am - 10:30 am everyday, developers can discuss community issues in the voice channel "panel discussion" \ No newline at end of file +- 9:00 am - 10:30 am everyday, developers can discuss community issues in the voice channel "panel discussion" + +- [Discord-MapleFE](https://discord.gg/sBj3cc4GhM) +- we have weekly meeting about projects related to MapleFE \ No newline at end of file -- Gitee