mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
Resolving nested context for structs.
* * * Another fix for nested structs * * * Yet another fix for nested structs
This commit is contained in:
12
gen/nested.h
12
gen/nested.h
@@ -4,6 +4,7 @@
|
||||
#include "declaration.h"
|
||||
#include "mtype.h"
|
||||
#include "gen/dvalue.h"
|
||||
#include "gen/llvm.h"
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Nested variable and context helpers
|
||||
@@ -15,8 +16,15 @@ void DtoCreateNestedContext(FuncDeclaration* fd);
|
||||
/// Allocate space for variable accessed from nested function.
|
||||
void DtoNestedInit(VarDeclaration* vd);
|
||||
|
||||
/// Gets the context value for a call to a nested function or newing a nested
|
||||
/// class with arbitrary nesting.
|
||||
/// Resolves the nested context for classes and structs with arbitrary nesting.
|
||||
#if DMDV2
|
||||
LLValue* DtoResolveNestedContext(Loc loc, AggregateDeclaration *decl, LLValue *value);
|
||||
#else
|
||||
LLValue* DtoResolveNestedContext(Loc loc, ClassDeclaration *decl, LLValue *value);
|
||||
#endif
|
||||
|
||||
/// Gets the context value for a call to a nested function or creating a nested
|
||||
/// class or struct with arbitrary nesting.
|
||||
llvm::Value* DtoNestedContext(Loc loc, Dsymbol* sym);
|
||||
|
||||
/// Gets the DValue of a nested variable with arbitrary nesting.
|
||||
|
||||
Reference in New Issue
Block a user