mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-23 07:45:59 +08:00
...
This commit is contained in:
@@ -463,8 +463,11 @@ WfLexicalScopeManager
|
||||
baseConstructorCallResolvings.Clear();
|
||||
}
|
||||
|
||||
void WfLexicalScopeManager::Rebuild(bool keepTypeDescriptorNames)
|
||||
#define CALLBACK(EXPR) if (callback) callback->EXPR
|
||||
|
||||
void WfLexicalScopeManager::Rebuild(bool keepTypeDescriptorNames, IWfCompilerCallback* callback)
|
||||
{
|
||||
CALLBACK(OnLoadEnvironment());
|
||||
Clear(keepTypeDescriptorNames, false);
|
||||
if (!globalName)
|
||||
{
|
||||
@@ -472,6 +475,7 @@ WfLexicalScopeManager
|
||||
BuildGlobalNameFromTypeDescriptors(this);
|
||||
}
|
||||
|
||||
CALLBACK(OnInitialize(this));
|
||||
vint errorCount = errors.Count();
|
||||
|
||||
#define EXIT_IF_ERRORS_EXIST\
|
||||
@@ -507,12 +511,15 @@ WfLexicalScopeManager
|
||||
EXIT_IF_ERRORS_EXIST;
|
||||
FOREACH(Ptr<WfModule>, module, modules)
|
||||
{
|
||||
CALLBACK(OnValidateModule(module));
|
||||
ValidateModuleSemantic(this, module);
|
||||
}
|
||||
|
||||
#undef EXIT_IF_ERRORS_EXIST
|
||||
}
|
||||
|
||||
#undef CALLBACK
|
||||
|
||||
bool WfLexicalScopeManager::ResolveMember(ITypeDescriptor* typeDescriptor, const WString& name, bool preferStatic, collections::SortedList<ITypeDescriptor*>& searchedTypes, collections::List<ResolveExpressionResult>& results)
|
||||
{
|
||||
if (searchedTypes.Contains(typeDescriptor))
|
||||
@@ -20661,8 +20668,11 @@ GenerateTypeCastInstructions
|
||||
GenerateAssembly
|
||||
***********************************************************************/
|
||||
|
||||
Ptr<runtime::WfAssembly> GenerateAssembly(analyzer::WfLexicalScopeManager* manager)
|
||||
#define CALLBACK(EXPR) if (callback) callback->EXPR
|
||||
|
||||
Ptr<runtime::WfAssembly> GenerateAssembly(analyzer::WfLexicalScopeManager* manager, IWfCompilerCallback* callback)
|
||||
{
|
||||
CALLBACK(OnGenerateMetadata());
|
||||
auto assembly = MakePtr<WfAssembly>();
|
||||
assembly->insBeforeCodegen = new WfInstructionDebugInfo;
|
||||
assembly->insAfterCodegen = new WfInstructionDebugInfo;
|
||||
@@ -20757,16 +20767,19 @@ GenerateAssembly
|
||||
|
||||
FOREACH(Ptr<WfModule>, module, manager->GetModules())
|
||||
{
|
||||
CALLBACK(OnGenerateCode(module));
|
||||
FOREACH(Ptr<WfDeclaration>, decl, module->declarations)
|
||||
{
|
||||
GenerateDeclarationInstructions(context, decl);
|
||||
}
|
||||
}
|
||||
|
||||
CALLBACK(OnGenerateDebugInfo());
|
||||
assembly->Initialize();
|
||||
return assembly;
|
||||
}
|
||||
|
||||
#undef CALLBACK
|
||||
#undef INSTRUCTION
|
||||
|
||||
/***********************************************************************
|
||||
|
||||
Reference in New Issue
Block a user