| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a6c691a commit 24a3947
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -172,6 +172,7 @@ SOURCE_GROUP_FILES("simulate" SIMULATE_SRC) | |||
| 172 | 172 | ||
| 173 | 173 | SET(MAIN_SRC | |
| 174 | 174 | include/daScript/daScript.h | |
| 175 | + include/daScript/daScriptModule.h | ||
| 175 | 176 | include/daScript/das_config.h | |
| 176 | 177 | ) | |
| 177 | 178 | SOURCE_GROUP_FILES("main" MAIN_SRC) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1566,8 +1566,6 @@ namespace das | |||
| 1566 | 1566 | mutable map<string, ExprCallFactory> callThis; | |
| 1567 | 1567 | string name; | |
| 1568 | 1568 | bool builtIn = false; | |
| 1569 | - public: | ||
| 1570 | - static intptr_t Karma; | ||
| 1571 | 1569 | private: | |
| 1572 | 1570 | Module * next = nullptr; | |
| 1573 | 1571 | static Module * modules; | |
@@ -1586,10 +1584,6 @@ namespace das | |||
| 1586 | 1584 | return module_##ClassName; \ | |
| 1587 | 1585 | } | |
| 1588 | 1586 | ||
| 1589 | - #define NEED_MODULE(ClassName) \ | ||
| 1590 | - extern das::Module * register_##ClassName (); \ | ||
| 1591 | - das::Module::Karma += intptr_t(register_##ClassName()); | ||
| 1592 | - | ||
| 1593 | 1587 | class ModuleLibrary { | |
| 1594 | 1588 | friend class Module; | |
| 1595 | 1589 | friend class Program; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | 1 | #pragma once | |
| 2 | 2 | ||
| 3 | + #include <daScript/daScriptModule.h> | ||
| 3 | 4 | #include <daScript/misc/platform.h> | |
| 4 | 5 | #include <daScript/ast/ast.h> | |
| 5 | 6 | #include <daScript/ast/ast_interop.h> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,10 @@ | |||
| 1 | + #pragma once | ||
| 2 | + namespace das | ||
| 3 | + { | ||
| 4 | + extern intptr_t ModuleKarma; | ||
| 5 | + class Module; | ||
| 6 | + }; | ||
| 7 | + | ||
| 8 | + #define NEED_MODULE(ClassName) \ | ||
| 9 | + extern das::Module * register_##ClassName (); \ | ||
| 10 | + das::ModuleKarma += intptr_t(register_##ClassName()); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | 5 | namespace das { | |
| 6 | 6 | ||
| 7 | + intptr_t ModuleKarma = 0; | ||
| 8 | + | ||
| 7 | 9 | bool splitTypeName ( const string & name, string & moduleName, string & funcName ) { | |
| 8 | 10 | auto at = name.find("::"); | |
| 9 | 11 | if ( at!=string::npos ) { | |
@@ -33,7 +35,6 @@ namespace das { | |||
| 33 | 35 | ||
| 34 | 36 | // MODULE | |
| 35 | 37 | ||
| 36 | - intptr_t Module::Karma = 0; | ||
| 37 | 38 | Module * Module::modules = nullptr; | |
| 38 | 39 | ||
| 39 | 40 | TypeAnnotation * Module::resolveAnnotation ( TypeInfo * info ) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments