dmd.importc

Contains semantic routines specific to ImportC

Specification: C11

Members

Functions

addDefaultCInitializer
void addDefaultCInitializer(VarDeclaration dsym)

Determine default initializer for const global symbol.

arrayFuncConv
Expression arrayFuncConv(Expression e, Scope* sc)

C11 6.3.2.1-3 Convert expression that is an array of type to a pointer to type. C11 6.3.2.1-4 Convert expression that is a function to a pointer to a function.

cAdjustParamType
Type cAdjustParamType(Type t, Scope* sc)

C11 does not allow array or function parameters. Hence, adjust those types per C11 6.7.6.3 rules.

cFuncEquivalence
bool cFuncEquivalence(TypeFunction tf1, TypeFunction tf2)

Implement the C11 notion of function equivalence, which allows prototyped functions to match K+R functions, even though they are different.

cTypeEquivalence
bool cTypeEquivalence(Type t1, Type t2)

Types haven't been merged yet, because we haven't done semantic() yet. But we still need to see if t1 and t2 are the same type.

carraySemantic
Expression carraySemantic(ArrayExp ae, Scope* sc)

C11 6.5.2.1-2 Apply C semantics to E[I] expression. E1E2 is lowered to *(E1 + E2)

castCallAmbiguity
Expression castCallAmbiguity(Expression e, Scope* sc)

Resolve cast/call grammar ambiguity.

fieldLookup
Expression fieldLookup(Expression e, Scope* sc, Identifier id, bool arrow)

Run semantic on e. Expression e evaluates to an instance of a struct. Look up ident as a field of that struct.

Meta