code
stringlengths 3
10M
| language
stringclasses 31
values |
|---|---|
/**
* Takes a token stream from the lexer, and parses it into an abstract syntax tree.
*
* Specification: $(LINK2 https://dlang.org/spec/grammar.html, D Grammar)
*
* Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 http://www.digitalmars.com, Walter Bright)
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/parse.d, _parse.d)
* Documentation: https://dlang.org/phobos/dmd_parse.html
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/parse.d
*/
module dmd.parse;
import core.stdc.stdio;
import core.stdc.string;
import dmd.globals;
import dmd.id;
import dmd.identifier;
import dmd.lexer;
import dmd.errors;
import dmd.root.filename;
import dmd.root.outbuffer;
import dmd.root.rmem;
import dmd.root.rootobject;
import dmd.root.string;
import dmd.tokens;
// How multiple declarations are parsed.
// If 1, treat as C.
// If 0, treat:
// int *p, i;
// as:
// int* p;
// int* i;
private enum CDECLSYNTAX = 0;
// Support C cast syntax:
// (type)(expression)
private enum CCASTSYNTAX = 1;
// Support postfix C array declarations, such as
// int a[3][4];
private enum CARRAYDECL = 1;
/**********************************
* Set operator precedence for each operator.
*
* Used by hdrgen
*/
immutable PREC[TOK.max + 1] precedence =
[
TOK.type : PREC.expr,
TOK.error : PREC.expr,
TOK.objcClassReference : PREC.expr, // Objective-C class reference, same as TOK.type
TOK.typeof_ : PREC.primary,
TOK.mixin_ : PREC.primary,
TOK.import_ : PREC.primary,
TOK.dotVariable : PREC.primary,
TOK.scope_ : PREC.primary,
TOK.identifier : PREC.primary,
TOK.this_ : PREC.primary,
TOK.super_ : PREC.primary,
TOK.int64 : PREC.primary,
TOK.float64 : PREC.primary,
TOK.complex80 : PREC.primary,
TOK.null_ : PREC.primary,
TOK.string_ : PREC.primary,
TOK.arrayLiteral : PREC.primary,
TOK.assocArrayLiteral : PREC.primary,
TOK.classReference : PREC.primary,
TOK.file : PREC.primary,
TOK.fileFullPath : PREC.primary,
TOK.line : PREC.primary,
TOK.moduleString : PREC.primary,
TOK.functionString : PREC.primary,
TOK.prettyFunction : PREC.primary,
TOK.typeid_ : PREC.primary,
TOK.is_ : PREC.primary,
TOK.assert_ : PREC.primary,
TOK.halt : PREC.primary,
TOK.template_ : PREC.primary,
TOK.dSymbol : PREC.primary,
TOK.function_ : PREC.primary,
TOK.variable : PREC.primary,
TOK.symbolOffset : PREC.primary,
TOK.structLiteral : PREC.primary,
TOK.arrayLength : PREC.primary,
TOK.delegatePointer : PREC.primary,
TOK.delegateFunctionPointer : PREC.primary,
TOK.remove : PREC.primary,
TOK.tuple : PREC.primary,
TOK.traits : PREC.primary,
TOK.default_ : PREC.primary,
TOK.overloadSet : PREC.primary,
TOK.void_ : PREC.primary,
TOK.vectorArray : PREC.primary,
// post
TOK.dotTemplateInstance : PREC.primary,
TOK.dotIdentifier : PREC.primary,
TOK.dotTemplateDeclaration : PREC.primary,
TOK.dot : PREC.primary,
TOK.dotType : PREC.primary,
TOK.plusPlus : PREC.primary,
TOK.minusMinus : PREC.primary,
TOK.prePlusPlus : PREC.primary,
TOK.preMinusMinus : PREC.primary,
TOK.call : PREC.primary,
TOK.slice : PREC.primary,
TOK.array : PREC.primary,
TOK.index : PREC.primary,
TOK.delegate_ : PREC.unary,
TOK.address : PREC.unary,
TOK.star : PREC.unary,
TOK.negate : PREC.unary,
TOK.uadd : PREC.unary,
TOK.not : PREC.unary,
TOK.tilde : PREC.unary,
TOK.delete_ : PREC.unary,
TOK.new_ : PREC.unary,
TOK.newAnonymousClass : PREC.unary,
TOK.cast_ : PREC.unary,
TOK.vector : PREC.unary,
TOK.pow : PREC.pow,
TOK.mul : PREC.mul,
TOK.div : PREC.mul,
TOK.mod : PREC.mul,
TOK.add : PREC.add,
TOK.min : PREC.add,
TOK.concatenate : PREC.add,
TOK.leftShift : PREC.shift,
TOK.rightShift : PREC.shift,
TOK.unsignedRightShift : PREC.shift,
TOK.lessThan : PREC.rel,
TOK.lessOrEqual : PREC.rel,
TOK.greaterThan : PREC.rel,
TOK.greaterOrEqual : PREC.rel,
TOK.in_ : PREC.rel,
/* Note that we changed precedence, so that < and != have the same
* precedence. This change is in the parser, too.
*/
TOK.equal : PREC.rel,
TOK.notEqual : PREC.rel,
TOK.identity : PREC.rel,
TOK.notIdentity : PREC.rel,
TOK.and : PREC.and,
TOK.xor : PREC.xor,
TOK.or : PREC.or,
TOK.andAnd : PREC.andand,
TOK.orOr : PREC.oror,
TOK.question : PREC.cond,
TOK.assign : PREC.assign,
TOK.construct : PREC.assign,
TOK.blit : PREC.assign,
TOK.addAssign : PREC.assign,
TOK.minAssign : PREC.assign,
TOK.concatenateAssign : PREC.assign,
TOK.concatenateElemAssign : PREC.assign,
TOK.concatenateDcharAssign : PREC.assign,
TOK.mulAssign : PREC.assign,
TOK.divAssign : PREC.assign,
TOK.modAssign : PREC.assign,
TOK.powAssign : PREC.assign,
TOK.leftShiftAssign : PREC.assign,
TOK.rightShiftAssign : PREC.assign,
TOK.unsignedRightShiftAssign : PREC.assign,
TOK.andAssign : PREC.assign,
TOK.orAssign : PREC.assign,
TOK.xorAssign : PREC.assign,
TOK.comma : PREC.expr,
TOK.declaration : PREC.expr,
TOK.interval : PREC.assign,
];
enum ParseStatementFlags : int
{
semi = 1, // empty ';' statements are allowed, but deprecated
scope_ = 2, // start a new scope
curly = 4, // { } statement is required
curlyScope = 8, // { } starts a new scope
semiOk = 0x10, // empty ';' are really ok
}
private struct PrefixAttributes(AST)
{
StorageClass storageClass;
AST.Expression depmsg;
LINK link;
AST.Visibility visibility;
bool setAlignment;
AST.Expression ealign;
AST.Expressions* udas;
const(char)* comment;
}
/*****************************
* Destructively extract storage class from pAttrs.
*/
private StorageClass getStorageClass(AST)(PrefixAttributes!(AST)* pAttrs)
{
StorageClass stc = AST.STC.undefined_;
if (pAttrs)
{
stc = pAttrs.storageClass;
pAttrs.storageClass = AST.STC.undefined_;
}
return stc;
}
/**************************************
* dump mixin expansion to file for better debugging
*/
private bool writeMixin(const(char)[] s, ref Loc loc)
{
if (!global.params.mixinOut)
return false;
OutBuffer* ob = global.params.mixinOut;
ob.writestring("// expansion at ");
ob.writestring(loc.toChars());
ob.writenl();
global.params.mixinLines++;
loc = Loc(global.params.mixinFile, global.params.mixinLines + 1, loc.charnum);
// write by line to create consistent line endings
size_t lastpos = 0;
for (size_t i = 0; i < s.length; ++i)
{
// detect LF and CRLF
const c = s[i];
if (c == '\n' || (c == '\r' && i+1 < s.length && s[i+1] == '\n'))
{
ob.writestring(s[lastpos .. i]);
ob.writenl();
global.params.mixinLines++;
if (c == '\r')
++i;
lastpos = i + 1;
}
}
if(lastpos < s.length)
ob.writestring(s[lastpos .. $]);
if (s.length == 0 || s[$-1] != '\n')
{
ob.writenl(); // ensure empty line after expansion
global.params.mixinLines++;
}
ob.writenl();
global.params.mixinLines++;
return true;
}
/***********************************************************
*/
final class Parser(AST) : Lexer
{
AST.ModuleDeclaration* md;
alias STC = AST.STC;
private
{
AST.Module mod;
LINK linkage;
Loc linkLoc;
CPPMANGLE cppmangle;
Loc endloc; // set to location of last right curly
int inBrackets; // inside [] of array index or slice
Loc lookingForElse; // location of lonely if looking for an else
}
/*********************
* Use this constructor for string mixins.
* Input:
* loc location in source file of mixin
*/
extern (D) this(const ref Loc loc, AST.Module _module, const(char)[] input, bool doDocComment)
{
super(_module ? _module.srcfile.toChars() : null, input.ptr, 0, input.length, doDocComment, false);
//printf("Parser::Parser()\n");
scanloc = loc;
if (!writeMixin(input, scanloc) && loc.filename)
{
/* Create a pseudo-filename for the mixin string, as it may not even exist
* in the source file.
*/
char* filename = cast(char*)mem.xmalloc(strlen(loc.filename) + 7 + (loc.linnum).sizeof * 3 + 1);
sprintf(filename, "%s-mixin-%d", loc.filename, cast(int)loc.linnum);
scanloc.filename = filename;
}
mod = _module;
linkage = LINK.d;
//nextToken(); // start up the scanner
}
extern (D) this(AST.Module _module, const(char)[] input, bool doDocComment)
{
super(_module ? _module.srcfile.toChars() : null, input.ptr, 0, input.length, doDocComment, false);
//printf("Parser::Parser()\n");
mod = _module;
linkage = LINK.d;
//nextToken(); // start up the scanner
}
AST.Dsymbols* parseModule()
{
const comment = token.blockComment;
bool isdeprecated = false;
AST.Expression msg = null;
AST.Expressions* udas = null;
AST.Dsymbols* decldefs;
AST.Dsymbol lastDecl = mod; // for attaching ddoc unittests to module decl
Token* tk;
if (skipAttributes(&token, &tk) && tk.value == TOK.module_)
{
while (token.value != TOK.module_)
{
switch (token.value)
{
case TOK.deprecated_:
{
// deprecated (...) module ...
if (isdeprecated)
error("there is only one deprecation attribute allowed for module declaration");
isdeprecated = true;
nextToken();
if (token.value == TOK.leftParenthesis)
{
check(TOK.leftParenthesis);
msg = parseAssignExp();
check(TOK.rightParenthesis);
}
break;
}
case TOK.at:
{
AST.Expressions* exps = null;
const stc = parseAttribute(exps);
if (stc & atAttrGroup)
{
error("`@%s` attribute for module declaration is not supported", token.toChars());
}
else
{
udas = AST.UserAttributeDeclaration.concat(udas, exps);
}
if (stc)
nextToken();
break;
}
default:
{
error("`module` expected instead of `%s`", token.toChars());
nextToken();
break;
}
}
}
}
if (udas)
{
auto a = new AST.Dsymbols();
auto udad = new AST.UserAttributeDeclaration(udas, a);
mod.userAttribDecl = udad;
}
// ModuleDeclation leads off
if (token.value == TOK.module_)
{
const loc = token.loc;
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected following `module`");
goto Lerr;
}
Identifier[] a;
Identifier id = token.ident;
while (nextToken() == TOK.dot)
{
a ~= id;
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected following `package`");
goto Lerr;
}
id = token.ident;
}
md = new AST.ModuleDeclaration(loc, a, id, msg, isdeprecated);
if (token.value != TOK.semicolon)
error("`;` expected following module declaration instead of `%s`", token.toChars());
nextToken();
addComment(mod, comment);
}
decldefs = parseDeclDefs(0, &lastDecl);
if (token.value != TOK.endOfFile)
{
error(token.loc, "unrecognized declaration");
goto Lerr;
}
return decldefs;
Lerr:
while (token.value != TOK.semicolon && token.value != TOK.endOfFile)
nextToken();
nextToken();
return new AST.Dsymbols();
}
/**
* Parses a `deprecated` declaration
*
* Params:
* msg = Deprecated message, if any.
* Used to support overriding a deprecated storage class with
* a deprecated declaration with a message, but to error
* if both declaration have a message.
*
* Returns:
* Whether the deprecated declaration has a message
*/
private bool parseDeprecatedAttribute(ref AST.Expression msg)
{
if (peekNext() != TOK.leftParenthesis)
return false;
nextToken();
check(TOK.leftParenthesis);
AST.Expression e = parseAssignExp();
check(TOK.rightParenthesis);
if (msg)
{
error("conflicting storage class `deprecated(%s)` and `deprecated(%s)`", msg.toChars(), e.toChars());
}
msg = e;
return true;
}
AST.Dsymbols* parseDeclDefs(int once, AST.Dsymbol* pLastDecl = null, PrefixAttributes!AST* pAttrs = null)
{
AST.Dsymbol lastDecl = null; // used to link unittest to its previous declaration
if (!pLastDecl)
pLastDecl = &lastDecl;
const linksave = linkage; // save global state
//printf("Parser::parseDeclDefs()\n");
auto decldefs = new AST.Dsymbols();
do
{
// parse result
AST.Dsymbol s = null;
AST.Dsymbols* a = null;
PrefixAttributes!AST attrs;
if (!once || !pAttrs)
{
pAttrs = &attrs;
pAttrs.comment = token.blockComment.ptr;
}
AST.Visibility.Kind prot;
StorageClass stc;
AST.Condition condition;
linkage = linksave;
Loc startloc;
switch (token.value)
{
case TOK.enum_:
{
/* Determine if this is a manifest constant declaration,
* or a conventional enum.
*/
const tv = peekNext();
if (tv == TOK.leftCurly || tv == TOK.colon)
s = parseEnum();
else if (tv != TOK.identifier)
goto Ldeclaration;
else
{
const nextv = peekNext2();
if (nextv == TOK.leftCurly || nextv == TOK.colon || nextv == TOK.semicolon)
s = parseEnum();
else
goto Ldeclaration;
}
break;
}
case TOK.import_:
a = parseImport();
// keep pLastDecl
break;
case TOK.template_:
s = cast(AST.Dsymbol)parseTemplateDeclaration();
break;
case TOK.mixin_:
{
const loc = token.loc;
switch (peekNext())
{
case TOK.leftParenthesis:
{
// mixin(string)
nextToken();
auto exps = parseArguments();
check(TOK.semicolon);
s = new AST.CompileDeclaration(loc, exps);
break;
}
case TOK.template_:
// mixin template
nextToken();
s = cast(AST.Dsymbol)parseTemplateDeclaration(true);
break;
default:
s = parseMixin();
break;
}
break;
}
case TOK.wchar_:
case TOK.dchar_:
case TOK.bool_:
case TOK.char_:
case TOK.int8:
case TOK.uns8:
case TOK.int16:
case TOK.uns16:
case TOK.int32:
case TOK.uns32:
case TOK.int64:
case TOK.uns64:
case TOK.int128:
case TOK.uns128:
case TOK.float32:
case TOK.float64:
case TOK.float80:
case TOK.imaginary32:
case TOK.imaginary64:
case TOK.imaginary80:
case TOK.complex32:
case TOK.complex64:
case TOK.complex80:
case TOK.void_:
case TOK.alias_:
case TOK.identifier:
case TOK.super_:
case TOK.typeof_:
case TOK.dot:
case TOK.vector:
case TOK.struct_:
case TOK.union_:
case TOK.class_:
case TOK.interface_:
case TOK.traits:
Ldeclaration:
a = parseDeclarations(false, pAttrs, pAttrs.comment);
if (a && a.dim)
*pLastDecl = (*a)[a.dim - 1];
break;
case TOK.this_:
if (peekNext() == TOK.dot)
goto Ldeclaration;
s = parseCtor(pAttrs);
break;
case TOK.tilde:
s = parseDtor(pAttrs);
break;
case TOK.invariant_:
const tv = peekNext();
if (tv == TOK.leftParenthesis || tv == TOK.leftCurly)
{
// invariant { statements... }
// invariant() { statements... }
// invariant (expression);
s = parseInvariant(pAttrs);
break;
}
error("invariant body expected, not `%s`", token.toChars());
goto Lerror;
case TOK.unittest_:
if (global.params.useUnitTests || global.params.doDocComments || global.params.doHdrGeneration)
{
s = parseUnitTest(pAttrs);
if (*pLastDecl)
(*pLastDecl).ddocUnittest = cast(AST.UnitTestDeclaration)s;
}
else
{
// Skip over unittest block by counting { }
Loc loc = token.loc;
int braces = 0;
while (1)
{
nextToken();
switch (token.value)
{
case TOK.leftCurly:
++braces;
continue;
case TOK.rightCurly:
if (--braces)
continue;
nextToken();
break;
case TOK.endOfFile:
/* { */
error(loc, "closing `}` of unittest not found before end of file");
goto Lerror;
default:
continue;
}
break;
}
// Workaround 14894. Add an empty unittest declaration to keep
// the number of symbols in this scope independent of -unittest.
s = new AST.UnitTestDeclaration(loc, token.loc, STC.undefined_, null);
}
break;
case TOK.new_:
s = parseNew(pAttrs);
break;
case TOK.colon:
case TOK.leftCurly:
error("declaration expected, not `%s`", token.toChars());
goto Lerror;
case TOK.rightCurly:
case TOK.endOfFile:
if (once)
error("declaration expected, not `%s`", token.toChars());
return decldefs;
case TOK.static_:
{
const next = peekNext();
if (next == TOK.this_)
s = parseStaticCtor(pAttrs);
else if (next == TOK.tilde)
s = parseStaticDtor(pAttrs);
else if (next == TOK.assert_)
s = parseStaticAssert();
else if (next == TOK.if_)
{
const Loc loc = token.loc;
condition = parseStaticIfCondition();
AST.Dsymbols* athen;
if (token.value == TOK.colon)
athen = parseBlock(pLastDecl);
else
{
const lookingForElseSave = lookingForElse;
lookingForElse = token.loc;
athen = parseBlock(pLastDecl);
lookingForElse = lookingForElseSave;
}
AST.Dsymbols* aelse = null;
if (token.value == TOK.else_)
{
const elseloc = token.loc;
nextToken();
aelse = parseBlock(pLastDecl);
checkDanglingElse(elseloc);
}
s = new AST.StaticIfDeclaration(loc, condition, athen, aelse);
}
else if (next == TOK.import_)
{
a = parseImport();
// keep pLastDecl
}
else if (next == TOK.foreach_ || next == TOK.foreach_reverse_)
{
s = parseForeach!(true,true)(token.loc, pLastDecl);
}
else
{
stc = STC.static_;
goto Lstc;
}
break;
}
case TOK.const_:
if (peekNext() == TOK.leftParenthesis)
goto Ldeclaration;
stc = STC.const_;
goto Lstc;
case TOK.immutable_:
if (peekNext() == TOK.leftParenthesis)
goto Ldeclaration;
stc = STC.immutable_;
goto Lstc;
case TOK.shared_:
{
const next = peekNext();
if (next == TOK.leftParenthesis)
goto Ldeclaration;
if (next == TOK.static_)
{
TOK next2 = peekNext2();
if (next2 == TOK.this_)
{
s = parseSharedStaticCtor(pAttrs);
break;
}
if (next2 == TOK.tilde)
{
s = parseSharedStaticDtor(pAttrs);
break;
}
}
stc = STC.shared_;
goto Lstc;
}
case TOK.inout_:
if (peekNext() == TOK.leftParenthesis)
goto Ldeclaration;
stc = STC.wild;
goto Lstc;
case TOK.final_:
stc = STC.final_;
goto Lstc;
case TOK.auto_:
stc = STC.auto_;
goto Lstc;
case TOK.scope_:
stc = STC.scope_;
goto Lstc;
case TOK.override_:
stc = STC.override_;
goto Lstc;
case TOK.abstract_:
stc = STC.abstract_;
goto Lstc;
case TOK.synchronized_:
stc = STC.synchronized_;
goto Lstc;
case TOK.nothrow_:
stc = STC.nothrow_;
goto Lstc;
case TOK.pure_:
stc = STC.pure_;
goto Lstc;
case TOK.ref_:
stc = STC.ref_;
goto Lstc;
case TOK.gshared:
stc = STC.gshared;
goto Lstc;
case TOK.at:
{
AST.Expressions* exps = null;
stc = parseAttribute(exps);
if (stc)
goto Lstc; // it's a predefined attribute
// no redundant/conflicting check for UDAs
pAttrs.udas = AST.UserAttributeDeclaration.concat(pAttrs.udas, exps);
goto Lautodecl;
}
Lstc:
pAttrs.storageClass = appendStorageClass(pAttrs.storageClass, stc);
nextToken();
Lautodecl:
/* Look for auto initializers:
* storage_class identifier = initializer;
* storage_class identifier(...) = initializer;
*/
if (token.value == TOK.identifier && hasOptionalParensThen(peek(&token), TOK.assign))
{
a = parseAutoDeclarations(getStorageClass!AST(pAttrs), pAttrs.comment);
if (a && a.dim)
*pLastDecl = (*a)[a.dim - 1];
if (pAttrs.udas)
{
s = new AST.UserAttributeDeclaration(pAttrs.udas, a);
pAttrs.udas = null;
}
break;
}
/* Look for return type inference for template functions.
*/
Token* tk;
if (token.value == TOK.identifier && skipParens(peek(&token), &tk) && skipAttributes(tk, &tk) &&
(tk.value == TOK.leftParenthesis || tk.value == TOK.leftCurly || tk.value == TOK.in_ ||
tk.value == TOK.out_ || tk.value == TOK.do_ || tk.value == TOK.goesTo ||
tk.value == TOK.identifier && tk.ident == Id._body))
{
// @@@DEPRECATED@@@
// https://github.com/dlang/DIPs/blob/1f5959abe482b1f9094f6484a7d0a3ade77fc2fc/DIPs/accepted/DIP1003.md
// Deprecated in 2.097 - Can be removed from 2.117
// The deprecation period is longer than usual as `body`
// was quite widely used.
if (tk.value == TOK.identifier && tk.ident == Id._body)
deprecation("Usage of the `body` keyword is deprecated. Use `do` instead.");
a = parseDeclarations(true, pAttrs, pAttrs.comment);
if (a && a.dim)
*pLastDecl = (*a)[a.dim - 1];
if (pAttrs.udas)
{
s = new AST.UserAttributeDeclaration(pAttrs.udas, a);
pAttrs.udas = null;
}
break;
}
a = parseBlock(pLastDecl, pAttrs);
auto stc2 = getStorageClass!AST(pAttrs);
if (stc2 != STC.undefined_)
{
s = new AST.StorageClassDeclaration(stc2, a);
}
if (pAttrs.udas)
{
if (s)
{
a = new AST.Dsymbols();
a.push(s);
}
s = new AST.UserAttributeDeclaration(pAttrs.udas, a);
pAttrs.udas = null;
}
break;
case TOK.deprecated_:
{
stc |= STC.deprecated_;
if (!parseDeprecatedAttribute(pAttrs.depmsg))
goto Lstc;
a = parseBlock(pLastDecl, pAttrs);
s = new AST.DeprecatedDeclaration(pAttrs.depmsg, a);
pAttrs.depmsg = null;
break;
}
case TOK.leftBracket:
{
if (peekNext() == TOK.rightBracket)
error("empty attribute list is not allowed");
error("use `@(attributes)` instead of `[attributes]`");
AST.Expressions* exps = parseArguments();
// no redundant/conflicting check for UDAs
pAttrs.udas = AST.UserAttributeDeclaration.concat(pAttrs.udas, exps);
a = parseBlock(pLastDecl, pAttrs);
if (pAttrs.udas)
{
s = new AST.UserAttributeDeclaration(pAttrs.udas, a);
pAttrs.udas = null;
}
break;
}
case TOK.extern_:
{
if (peekNext() != TOK.leftParenthesis)
{
stc = STC.extern_;
goto Lstc;
}
const linkLoc = token.loc;
AST.Identifiers* idents = null;
AST.Expressions* identExps = null;
CPPMANGLE cppmangle;
bool cppMangleOnly = false;
const link = parseLinkage(&idents, &identExps, cppmangle, cppMangleOnly);
if (pAttrs.link != LINK.default_)
{
if (pAttrs.link != link)
{
error("conflicting linkage `extern (%s)` and `extern (%s)`", AST.linkageToChars(pAttrs.link), AST.linkageToChars(link));
}
else if (idents || identExps || cppmangle != CPPMANGLE.def)
{
// Allow:
// extern(C++, foo) extern(C++, bar) void foo();
// to be equivalent with:
// extern(C++, foo.bar) void foo();
// Allow also:
// extern(C++, "ns") extern(C++, class) struct test {}
// extern(C++, class) extern(C++, "ns") struct test {}
}
else
error("redundant linkage `extern (%s)`", AST.linkageToChars(pAttrs.link));
}
pAttrs.link = link;
this.linkage = link;
this.linkLoc = linkLoc;
a = parseBlock(pLastDecl, pAttrs);
if (idents)
{
assert(link == LINK.cpp);
assert(idents.dim);
for (size_t i = idents.dim; i;)
{
Identifier id = (*idents)[--i];
if (s)
{
a = new AST.Dsymbols();
a.push(s);
}
if (cppMangleOnly)
s = new AST.CPPNamespaceDeclaration(linkLoc, id, a);
else
s = new AST.Nspace(linkLoc, id, null, a);
}
pAttrs.link = LINK.default_;
}
else if (identExps)
{
assert(link == LINK.cpp);
assert(identExps.dim);
for (size_t i = identExps.dim; i;)
{
AST.Expression exp = (*identExps)[--i];
if (s)
{
a = new AST.Dsymbols();
a.push(s);
}
if (cppMangleOnly)
s = new AST.CPPNamespaceDeclaration(linkLoc, exp, a);
else
s = new AST.Nspace(linkLoc, null, exp, a);
}
pAttrs.link = LINK.default_;
}
else if (cppmangle != CPPMANGLE.def)
{
assert(link == LINK.cpp);
s = new AST.CPPMangleDeclaration(linkLoc, cppmangle, a);
}
else if (pAttrs.link != LINK.default_)
{
s = new AST.LinkDeclaration(linkLoc, pAttrs.link, a);
pAttrs.link = LINK.default_;
}
break;
}
case TOK.private_:
prot = AST.Visibility.Kind.private_;
goto Lprot;
case TOK.package_:
prot = AST.Visibility.Kind.package_;
goto Lprot;
case TOK.protected_:
prot = AST.Visibility.Kind.protected_;
goto Lprot;
case TOK.public_:
prot = AST.Visibility.Kind.public_;
goto Lprot;
case TOK.export_:
prot = AST.Visibility.Kind.export_;
goto Lprot;
Lprot:
{
if (pAttrs.visibility.kind != AST.Visibility.Kind.undefined)
{
if (pAttrs.visibility.kind != prot)
error("conflicting visibility attribute `%s` and `%s`", AST.visibilityToChars(pAttrs.visibility.kind), AST.visibilityToChars(prot));
else
error("redundant visibility attribute `%s`", AST.visibilityToChars(prot));
}
pAttrs.visibility.kind = prot;
nextToken();
// optional qualified package identifier to bind
// visibility to
Identifier[] pkg_prot_idents;
if (pAttrs.visibility.kind == AST.Visibility.Kind.package_ && token.value == TOK.leftParenthesis)
{
pkg_prot_idents = parseQualifiedIdentifier("protection package");
if (pkg_prot_idents)
check(TOK.rightParenthesis);
else
{
while (token.value != TOK.semicolon && token.value != TOK.endOfFile)
nextToken();
nextToken();
break;
}
}
const attrloc = token.loc;
a = parseBlock(pLastDecl, pAttrs);
if (pAttrs.visibility.kind != AST.Visibility.Kind.undefined)
{
if (pAttrs.visibility.kind == AST.Visibility.Kind.package_ && pkg_prot_idents)
s = new AST.VisibilityDeclaration(attrloc, pkg_prot_idents, a);
else
s = new AST.VisibilityDeclaration(attrloc, pAttrs.visibility, a);
pAttrs.visibility = AST.Visibility(AST.Visibility.Kind.undefined);
}
break;
}
case TOK.align_:
{
const attrLoc = token.loc;
nextToken();
AST.Expression e = null; // default
if (token.value == TOK.leftParenthesis)
{
nextToken();
e = parseAssignExp();
check(TOK.rightParenthesis);
}
if (pAttrs.setAlignment)
{
if (e)
error("redundant alignment attribute `align(%s)`", e.toChars());
else
error("redundant alignment attribute `align`");
}
pAttrs.setAlignment = true;
pAttrs.ealign = e;
a = parseBlock(pLastDecl, pAttrs);
if (pAttrs.setAlignment)
{
s = new AST.AlignDeclaration(attrLoc, pAttrs.ealign, a);
pAttrs.setAlignment = false;
pAttrs.ealign = null;
}
break;
}
case TOK.pragma_:
{
AST.Expressions* args = null;
const loc = token.loc;
nextToken();
check(TOK.leftParenthesis);
if (token.value != TOK.identifier)
{
error("`pragma(identifier)` expected");
goto Lerror;
}
Identifier ident = token.ident;
nextToken();
if (token.value == TOK.comma && peekNext() != TOK.rightParenthesis)
args = parseArguments(); // pragma(identifier, args...)
else
check(TOK.rightParenthesis); // pragma(identifier)
AST.Dsymbols* a2 = null;
if (token.value == TOK.semicolon)
{
/* https://issues.dlang.org/show_bug.cgi?id=2354
* Accept single semicolon as an empty
* DeclarationBlock following attribute.
*
* Attribute DeclarationBlock
* Pragma DeclDef
* ;
*/
nextToken();
}
else
a2 = parseBlock(pLastDecl);
s = new AST.PragmaDeclaration(loc, ident, args, a2);
break;
}
case TOK.debug_:
startloc = token.loc;
nextToken();
if (token.value == TOK.assign)
{
nextToken();
if (token.value == TOK.identifier)
s = new AST.DebugSymbol(token.loc, token.ident);
else if (token.value == TOK.int32Literal || token.value == TOK.int64Literal)
s = new AST.DebugSymbol(token.loc, cast(uint)token.unsvalue);
else
{
error("identifier or integer expected, not `%s`", token.toChars());
s = null;
}
nextToken();
if (token.value != TOK.semicolon)
error("semicolon expected");
nextToken();
break;
}
condition = parseDebugCondition();
goto Lcondition;
case TOK.version_:
startloc = token.loc;
nextToken();
if (token.value == TOK.assign)
{
nextToken();
if (token.value == TOK.identifier)
s = new AST.VersionSymbol(token.loc, token.ident);
else if (token.value == TOK.int32Literal || token.value == TOK.int64Literal)
s = new AST.VersionSymbol(token.loc, cast(uint)token.unsvalue);
else
{
error("identifier or integer expected, not `%s`", token.toChars());
s = null;
}
nextToken();
if (token.value != TOK.semicolon)
error("semicolon expected");
nextToken();
break;
}
condition = parseVersionCondition();
goto Lcondition;
Lcondition:
{
AST.Dsymbols* athen;
if (token.value == TOK.colon)
athen = parseBlock(pLastDecl);
else
{
const lookingForElseSave = lookingForElse;
lookingForElse = token.loc;
athen = parseBlock(pLastDecl);
lookingForElse = lookingForElseSave;
}
AST.Dsymbols* aelse = null;
if (token.value == TOK.else_)
{
const elseloc = token.loc;
nextToken();
aelse = parseBlock(pLastDecl);
checkDanglingElse(elseloc);
}
s = new AST.ConditionalDeclaration(startloc, condition, athen, aelse);
break;
}
case TOK.semicolon:
// empty declaration
//error("empty declaration");
nextToken();
continue;
default:
error("declaration expected, not `%s`", token.toChars());
Lerror:
while (token.value != TOK.semicolon && token.value != TOK.endOfFile)
nextToken();
nextToken();
s = null;
continue;
}
if (s)
{
if (!s.isAttribDeclaration())
*pLastDecl = s;
decldefs.push(s);
addComment(s, pAttrs.comment);
}
else if (a && a.dim)
{
decldefs.append(a);
}
}
while (!once);
linkage = linksave;
return decldefs;
}
/*****************************************
* Parse auto declarations of the form:
* storageClass ident = init, ident = init, ... ;
* and return the array of them.
* Starts with token on the first ident.
* Ends with scanner past closing ';'
*/
private AST.Dsymbols* parseAutoDeclarations(StorageClass storageClass, const(char)* comment)
{
//printf("parseAutoDeclarations\n");
auto a = new AST.Dsymbols();
while (1)
{
const loc = token.loc;
Identifier ident = token.ident;
nextToken(); // skip over ident
AST.TemplateParameters* tpl = null;
if (token.value == TOK.leftParenthesis)
tpl = parseTemplateParameterList();
check(TOK.assign); // skip over '='
AST.Initializer _init = parseInitializer();
auto v = new AST.VarDeclaration(loc, null, ident, _init, storageClass);
AST.Dsymbol s = v;
if (tpl)
{
auto a2 = new AST.Dsymbols();
a2.push(v);
auto tempdecl = new AST.TemplateDeclaration(loc, ident, tpl, null, a2, 0);
s = tempdecl;
}
a.push(s);
switch (token.value)
{
case TOK.semicolon:
nextToken();
addComment(s, comment);
break;
case TOK.comma:
nextToken();
if (!(token.value == TOK.identifier && hasOptionalParensThen(peek(&token), TOK.assign)))
{
error("identifier expected following comma");
break;
}
addComment(s, comment);
continue;
default:
error("semicolon expected following auto declaration, not `%s`", token.toChars());
break;
}
break;
}
return a;
}
/********************************************
* Parse declarations after an align, visibility, or extern decl.
*/
private AST.Dsymbols* parseBlock(AST.Dsymbol* pLastDecl, PrefixAttributes!AST* pAttrs = null)
{
AST.Dsymbols* a = null;
//printf("parseBlock()\n");
switch (token.value)
{
case TOK.semicolon:
error("declaration expected following attribute, not `;`");
nextToken();
break;
case TOK.endOfFile:
error("declaration expected following attribute, not end of file");
break;
case TOK.leftCurly:
{
const lookingForElseSave = lookingForElse;
lookingForElse = Loc();
nextToken();
a = parseDeclDefs(0, pLastDecl);
if (token.value != TOK.rightCurly)
{
/* { */
error("matching `}` expected, not `%s`", token.toChars());
}
else
nextToken();
lookingForElse = lookingForElseSave;
break;
}
case TOK.colon:
nextToken();
a = parseDeclDefs(0, pLastDecl); // grab declarations up to closing curly bracket
break;
default:
a = parseDeclDefs(1, pLastDecl, pAttrs);
break;
}
return a;
}
/**
* Provide an error message if `added` contains storage classes which are
* redundant with those in `orig`; otherwise, return the combination.
*
* Params:
* orig = The already applied storage class.
* added = The new storage class to add to `orig`.
*
* Returns:
* The combination of both storage classes (`orig | added`).
*/
private StorageClass appendStorageClass(StorageClass orig, StorageClass added)
{
if (orig & added)
{
OutBuffer buf;
AST.stcToBuffer(&buf, added);
error("redundant attribute `%s`", buf.peekChars());
return orig | added;
}
const Redundant = (STC.const_ | STC.scope_ |
(global.params.previewIn ? STC.ref_ : 0));
orig |= added;
if ((orig & STC.in_) && (added & Redundant))
{
if (added & STC.const_)
error("attribute `const` is redundant with previously-applied `in`");
else if (global.params.previewIn)
{
error("attribute `%s` is redundant with previously-applied `in`",
(orig & STC.scope_) ? "scope".ptr : "ref".ptr);
}
else
error("attribute `scope` cannot be applied with `in`, use `-preview=in` instead");
return orig;
}
if ((added & STC.in_) && (orig & Redundant))
{
if (orig & STC.const_)
error("attribute `in` cannot be added after `const`: remove `const`");
else if (global.params.previewIn)
{
// Windows `printf` does not support `%1$s`
const(char*) stc_str = (orig & STC.scope_) ? "scope".ptr : "ref".ptr;
error("attribute `in` cannot be added after `%s`: remove `%s`",
stc_str, stc_str);
}
else
error("attribute `in` cannot be added after `scope`: remove `scope` and use `-preview=in`");
return orig;
}
if (added & (STC.const_ | STC.immutable_ | STC.manifest))
{
StorageClass u = orig & (STC.const_ | STC.immutable_ | STC.manifest);
if (u & (u - 1))
error("conflicting attribute `%s`", Token.toChars(token.value));
}
if (added & (STC.gshared | STC.shared_ | STC.tls))
{
StorageClass u = orig & (STC.gshared | STC.shared_ | STC.tls);
if (u & (u - 1))
error("conflicting attribute `%s`", Token.toChars(token.value));
}
if (added & STC.safeGroup)
{
StorageClass u = orig & STC.safeGroup;
if (u & (u - 1))
error("conflicting attribute `@%s`", token.toChars());
}
return orig;
}
/***********************************************
* Parse attribute(s), lexer is on '@'.
*
* Attributes can be builtin (e.g. `@safe`, `@nogc`, etc...),
* or be user-defined (UDAs). In the former case, we return the storage
* class via the return value, while in thelater case we return `0`
* and set `pudas`.
*
* Params:
* pudas = An array of UDAs to append to
*
* Returns:
* If the attribute is builtin, the return value will be non-zero.
* Otherwise, 0 is returned, and `pudas` will be appended to.
*/
private StorageClass parseAttribute(ref AST.Expressions* udas)
{
nextToken();
if (token.value == TOK.identifier)
{
// If we find a builtin attribute, we're done, return immediately.
if (StorageClass stc = isBuiltinAtAttribute(token.ident))
return stc;
// Allow identifier, template instantiation, or function call
// for `@Argument` (single UDA) form.
AST.Expression exp = parsePrimaryExp();
if (token.value == TOK.leftParenthesis)
{
const loc = token.loc;
exp = new AST.CallExp(loc, exp, parseArguments());
}
if (udas is null)
udas = new AST.Expressions();
udas.push(exp);
return 0;
}
if (token.value == TOK.leftParenthesis)
{
// Multi-UDAs ( `@( ArgumentList )`) form, concatenate with existing
if (peekNext() == TOK.rightParenthesis)
error("empty attribute list is not allowed");
udas = AST.UserAttributeDeclaration.concat(udas, parseArguments());
return 0;
}
error("`@identifier` or `@(ArgumentList)` expected, not `@%s`", token.toChars());
return 0;
}
/***********************************************
* Parse const/immutable/shared/inout/nothrow/pure postfix
*/
private StorageClass parsePostfix(StorageClass storageClass, AST.Expressions** pudas)
{
while (1)
{
StorageClass stc;
switch (token.value)
{
case TOK.const_:
stc = STC.const_;
break;
case TOK.immutable_:
stc = STC.immutable_;
break;
case TOK.shared_:
stc = STC.shared_;
break;
case TOK.inout_:
stc = STC.wild;
break;
case TOK.nothrow_:
stc = STC.nothrow_;
break;
case TOK.pure_:
stc = STC.pure_;
break;
case TOK.return_:
stc = STC.return_;
break;
case TOK.scope_:
stc = STC.scope_;
break;
case TOK.at:
{
AST.Expressions* udas = null;
stc = parseAttribute(udas);
if (udas)
{
if (pudas)
*pudas = AST.UserAttributeDeclaration.concat(*pudas, udas);
else
{
// Disallow:
// void function() @uda fp;
// () @uda { return 1; }
error("user-defined attributes cannot appear as postfixes");
}
continue;
}
break;
}
default:
return storageClass;
}
storageClass = appendStorageClass(storageClass, stc);
nextToken();
}
}
private StorageClass parseTypeCtor()
{
StorageClass storageClass = STC.undefined_;
while (1)
{
if (peekNext() == TOK.leftParenthesis)
return storageClass;
StorageClass stc;
switch (token.value)
{
case TOK.const_:
stc = STC.const_;
break;
case TOK.immutable_:
stc = STC.immutable_;
break;
case TOK.shared_:
stc = STC.shared_;
break;
case TOK.inout_:
stc = STC.wild;
break;
default:
return storageClass;
}
storageClass = appendStorageClass(storageClass, stc);
nextToken();
}
}
/**************************************
* Parse constraint.
* Constraint is of the form:
* if ( ConstraintExpression )
*/
private AST.Expression parseConstraint()
{
AST.Expression e = null;
if (token.value == TOK.if_)
{
nextToken(); // skip over 'if'
check(TOK.leftParenthesis);
e = parseExpression();
check(TOK.rightParenthesis);
}
return e;
}
/**************************************
* Parse a TemplateDeclaration.
*/
private AST.TemplateDeclaration parseTemplateDeclaration(bool ismixin = false)
{
AST.TemplateDeclaration tempdecl;
Identifier id;
AST.TemplateParameters* tpl;
AST.Dsymbols* decldefs;
AST.Expression constraint = null;
const loc = token.loc;
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected following `template`");
goto Lerr;
}
id = token.ident;
nextToken();
tpl = parseTemplateParameterList();
if (!tpl)
goto Lerr;
constraint = parseConstraint();
if (token.value != TOK.leftCurly)
{
error("members of template declaration expected");
goto Lerr;
}
decldefs = parseBlock(null);
tempdecl = new AST.TemplateDeclaration(loc, id, tpl, constraint, decldefs, ismixin);
return tempdecl;
Lerr:
return null;
}
/******************************************
* Parse template parameter list.
* Input:
* flag 0: parsing "( list )"
* 1: parsing non-empty "list $(RPAREN)"
*/
private AST.TemplateParameters* parseTemplateParameterList(int flag = 0)
{
auto tpl = new AST.TemplateParameters();
if (!flag && token.value != TOK.leftParenthesis)
{
error("parenthesized template parameter list expected following template identifier");
goto Lerr;
}
nextToken();
// Get array of TemplateParameters
if (flag || token.value != TOK.rightParenthesis)
{
while (token.value != TOK.rightParenthesis)
{
AST.TemplateParameter tp;
Loc loc;
Identifier tp_ident = null;
AST.Type tp_spectype = null;
AST.Type tp_valtype = null;
AST.Type tp_defaulttype = null;
AST.Expression tp_specvalue = null;
AST.Expression tp_defaultvalue = null;
// Get TemplateParameter
// First, look ahead to see if it is a TypeParameter or a ValueParameter
const tv = peekNext();
if (token.value == TOK.alias_)
{
// AliasParameter
nextToken();
loc = token.loc; // todo
AST.Type spectype = null;
if (isDeclaration(&token, NeedDeclaratorId.must, TOK.reserved, null))
{
spectype = parseType(&tp_ident);
}
else
{
if (token.value != TOK.identifier)
{
error("identifier expected for template `alias` parameter");
goto Lerr;
}
tp_ident = token.ident;
nextToken();
}
RootObject spec = null;
if (token.value == TOK.colon) // : Type
{
nextToken();
if (isDeclaration(&token, NeedDeclaratorId.no, TOK.reserved, null))
spec = parseType();
else
spec = parseCondExp();
}
RootObject def = null;
if (token.value == TOK.assign) // = Type
{
nextToken();
if (isDeclaration(&token, NeedDeclaratorId.no, TOK.reserved, null))
def = parseType();
else
def = parseCondExp();
}
tp = new AST.TemplateAliasParameter(loc, tp_ident, spectype, spec, def);
}
else if (tv == TOK.colon || tv == TOK.assign || tv == TOK.comma || tv == TOK.rightParenthesis)
{
// TypeParameter
if (token.value != TOK.identifier)
{
error("identifier expected for template type parameter");
goto Lerr;
}
loc = token.loc;
tp_ident = token.ident;
nextToken();
if (token.value == TOK.colon) // : Type
{
nextToken();
tp_spectype = parseType();
}
if (token.value == TOK.assign) // = Type
{
nextToken();
tp_defaulttype = parseType();
}
tp = new AST.TemplateTypeParameter(loc, tp_ident, tp_spectype, tp_defaulttype);
}
else if (token.value == TOK.identifier && tv == TOK.dotDotDot)
{
// ident...
loc = token.loc;
tp_ident = token.ident;
nextToken();
nextToken();
tp = new AST.TemplateTupleParameter(loc, tp_ident);
}
else if (token.value == TOK.this_)
{
// ThisParameter
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected for template `this` parameter");
goto Lerr;
}
loc = token.loc;
tp_ident = token.ident;
nextToken();
if (token.value == TOK.colon) // : Type
{
nextToken();
tp_spectype = parseType();
}
if (token.value == TOK.assign) // = Type
{
nextToken();
tp_defaulttype = parseType();
}
tp = new AST.TemplateThisParameter(loc, tp_ident, tp_spectype, tp_defaulttype);
}
else
{
// ValueParameter
loc = token.loc; // todo
tp_valtype = parseType(&tp_ident);
if (!tp_ident)
{
error("identifier expected for template value parameter");
tp_ident = Identifier.idPool("error");
}
if (token.value == TOK.colon) // : CondExpression
{
nextToken();
tp_specvalue = parseCondExp();
}
if (token.value == TOK.assign) // = CondExpression
{
nextToken();
tp_defaultvalue = parseDefaultInitExp();
}
tp = new AST.TemplateValueParameter(loc, tp_ident, tp_valtype, tp_specvalue, tp_defaultvalue);
}
tpl.push(tp);
if (token.value != TOK.comma)
break;
nextToken();
}
}
check(TOK.rightParenthesis);
Lerr:
return tpl;
}
/******************************************
* Parse template mixin.
* mixin Foo;
* mixin Foo!(args);
* mixin a.b.c!(args).Foo!(args);
* mixin Foo!(args) identifier;
* mixin typeof(expr).identifier!(args);
*/
private AST.Dsymbol parseMixin()
{
AST.TemplateMixin tm;
Identifier id;
AST.Objects* tiargs;
//printf("parseMixin()\n");
const locMixin = token.loc;
nextToken(); // skip 'mixin'
auto loc = token.loc;
AST.TypeQualified tqual = null;
if (token.value == TOK.dot)
{
id = Id.empty;
}
else
{
if (token.value == TOK.typeof_)
{
tqual = parseTypeof();
check(TOK.dot);
}
if (token.value != TOK.identifier)
{
error("identifier expected, not `%s`", token.toChars());
id = Id.empty;
}
else
id = token.ident;
nextToken();
}
while (1)
{
tiargs = null;
if (token.value == TOK.not)
{
tiargs = parseTemplateArguments();
}
if (tiargs && token.value == TOK.dot)
{
auto tempinst = new AST.TemplateInstance(loc, id, tiargs);
if (!tqual)
tqual = new AST.TypeInstance(loc, tempinst);
else
tqual.addInst(tempinst);
tiargs = null;
}
else
{
if (!tqual)
tqual = new AST.TypeIdentifier(loc, id);
else
tqual.addIdent(id);
}
if (token.value != TOK.dot)
break;
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected following `.` instead of `%s`", token.toChars());
break;
}
loc = token.loc;
id = token.ident;
nextToken();
}
id = null;
if (token.value == TOK.identifier)
{
id = token.ident;
nextToken();
}
tm = new AST.TemplateMixin(locMixin, id, tqual, tiargs);
if (token.value != TOK.semicolon)
error("`;` expected after `mixin`");
nextToken();
return tm;
}
/******************************************
* Parse template arguments.
* Input:
* current token is opening '!'
* Output:
* current token is one after closing '$(RPAREN)'
*/
private AST.Objects* parseTemplateArguments()
{
AST.Objects* tiargs;
nextToken();
if (token.value == TOK.leftParenthesis)
{
// ident!(template_arguments)
tiargs = parseTemplateArgumentList();
}
else
{
// ident!template_argument
tiargs = parseTemplateSingleArgument();
}
if (token.value == TOK.not)
{
TOK tok = peekNext();
if (tok != TOK.is_ && tok != TOK.in_)
{
error("multiple ! arguments are not allowed");
Lagain:
nextToken();
if (token.value == TOK.leftParenthesis)
parseTemplateArgumentList();
else
parseTemplateSingleArgument();
if (token.value == TOK.not && (tok = peekNext()) != TOK.is_ && tok != TOK.in_)
goto Lagain;
}
}
return tiargs;
}
/******************************************
* Parse template argument list.
* Input:
* current token is opening '$(LPAREN)',
* or ',' for __traits
* Output:
* current token is one after closing '$(RPAREN)'
*/
private AST.Objects* parseTemplateArgumentList()
{
//printf("Parser::parseTemplateArgumentList()\n");
auto tiargs = new AST.Objects();
TOK endtok = TOK.rightParenthesis;
assert(token.value == TOK.leftParenthesis || token.value == TOK.comma);
nextToken();
// Get TemplateArgumentList
while (token.value != endtok)
{
tiargs.push(parseTypeOrAssignExp());
if (token.value != TOK.comma)
break;
nextToken();
}
check(endtok, "template argument list");
return tiargs;
}
/***************************************
* Parse a Type or an Expression
* Returns:
* RootObject representing the AST
*/
RootObject parseTypeOrAssignExp(TOK endtoken = TOK.reserved)
{
return isDeclaration(&token, NeedDeclaratorId.no, endtoken, null)
? parseType() // argument is a type
: parseAssignExp(); // argument is an expression
}
/*****************************
* Parse single template argument, to support the syntax:
* foo!arg
* Input:
* current token is the arg
*/
private AST.Objects* parseTemplateSingleArgument()
{
//printf("parseTemplateSingleArgument()\n");
auto tiargs = new AST.Objects();
AST.Type ta;
switch (token.value)
{
case TOK.identifier:
ta = new AST.TypeIdentifier(token.loc, token.ident);
goto LabelX;
case TOK.vector:
ta = parseVector();
goto LabelX;
case TOK.void_:
ta = AST.Type.tvoid;
goto LabelX;
case TOK.int8:
ta = AST.Type.tint8;
goto LabelX;
case TOK.uns8:
ta = AST.Type.tuns8;
goto LabelX;
case TOK.int16:
ta = AST.Type.tint16;
goto LabelX;
case TOK.uns16:
ta = AST.Type.tuns16;
goto LabelX;
case TOK.int32:
ta = AST.Type.tint32;
goto LabelX;
case TOK.uns32:
ta = AST.Type.tuns32;
goto LabelX;
case TOK.int64:
ta = AST.Type.tint64;
goto LabelX;
case TOK.uns64:
ta = AST.Type.tuns64;
goto LabelX;
case TOK.int128:
ta = AST.Type.tint128;
goto LabelX;
case TOK.uns128:
ta = AST.Type.tuns128;
goto LabelX;
case TOK.float32:
ta = AST.Type.tfloat32;
goto LabelX;
case TOK.float64:
ta = AST.Type.tfloat64;
goto LabelX;
case TOK.float80:
ta = AST.Type.tfloat80;
goto LabelX;
case TOK.imaginary32:
ta = AST.Type.timaginary32;
goto LabelX;
case TOK.imaginary64:
ta = AST.Type.timaginary64;
goto LabelX;
case TOK.imaginary80:
ta = AST.Type.timaginary80;
goto LabelX;
case TOK.complex32:
ta = AST.Type.tcomplex32;
goto LabelX;
case TOK.complex64:
ta = AST.Type.tcomplex64;
goto LabelX;
case TOK.complex80:
ta = AST.Type.tcomplex80;
goto LabelX;
case TOK.bool_:
ta = AST.Type.tbool;
goto LabelX;
case TOK.char_:
ta = AST.Type.tchar;
goto LabelX;
case TOK.wchar_:
ta = AST.Type.twchar;
goto LabelX;
case TOK.dchar_:
ta = AST.Type.tdchar;
goto LabelX;
LabelX:
tiargs.push(ta);
nextToken();
break;
case TOK.int32Literal:
case TOK.uns32Literal:
case TOK.int64Literal:
case TOK.uns64Literal:
case TOK.int128Literal:
case TOK.uns128Literal:
case TOK.float32Literal:
case TOK.float64Literal:
case TOK.float80Literal:
case TOK.imaginary32Literal:
case TOK.imaginary64Literal:
case TOK.imaginary80Literal:
case TOK.null_:
case TOK.true_:
case TOK.false_:
case TOK.charLiteral:
case TOK.wcharLiteral:
case TOK.dcharLiteral:
case TOK.string_:
case TOK.hexadecimalString:
case TOK.file:
case TOK.fileFullPath:
case TOK.line:
case TOK.moduleString:
case TOK.functionString:
case TOK.prettyFunction:
case TOK.this_:
{
// Template argument is an expression
AST.Expression ea = parsePrimaryExp();
tiargs.push(ea);
break;
}
default:
error("template argument expected following `!`");
break;
}
return tiargs;
}
/**********************************
* Parse a static assertion.
* Current token is 'static'.
*/
private AST.StaticAssert parseStaticAssert()
{
const loc = token.loc;
AST.Expression exp;
AST.Expression msg = null;
//printf("parseStaticAssert()\n");
nextToken();
nextToken();
check(TOK.leftParenthesis);
exp = parseAssignExp();
if (token.value == TOK.comma)
{
nextToken();
if (token.value != TOK.rightParenthesis)
{
msg = parseAssignExp();
if (token.value == TOK.comma)
nextToken();
}
}
check(TOK.rightParenthesis);
check(TOK.semicolon);
return new AST.StaticAssert(loc, exp, msg);
}
/***********************************
* Parse typeof(expression).
* Current token is on the 'typeof'.
*/
private AST.TypeQualified parseTypeof()
{
AST.TypeQualified t;
const loc = token.loc;
nextToken();
check(TOK.leftParenthesis);
if (token.value == TOK.return_) // typeof(return)
{
nextToken();
t = new AST.TypeReturn(loc);
}
else
{
AST.Expression exp = parseExpression(); // typeof(expression)
t = new AST.TypeTypeof(loc, exp);
}
check(TOK.rightParenthesis);
return t;
}
/***********************************
* Parse __vector(type).
* Current token is on the '__vector'.
*/
private AST.Type parseVector()
{
nextToken();
check(TOK.leftParenthesis);
AST.Type tb = parseType();
check(TOK.rightParenthesis);
return new AST.TypeVector(tb);
}
/***********************************
* Parse:
* extern (linkage)
* extern (C++, namespaces)
* extern (C++, "namespace", "namespaces", ...)
* extern (C++, (StringExp))
* The parser is on the 'extern' token.
*/
private LINK parseLinkage(AST.Identifiers** pidents, AST.Expressions** pIdentExps, out CPPMANGLE cppmangle, out bool cppMangleOnly)
{
AST.Identifiers* idents = null;
AST.Expressions* identExps = null;
cppmangle = CPPMANGLE.def;
nextToken();
assert(token.value == TOK.leftParenthesis);
nextToken();
LINK returnLinkage(LINK link)
{
check(TOK.rightParenthesis);
*pidents = idents;
*pIdentExps = identExps;
return link;
}
LINK invalidLinkage()
{
error("valid linkage identifiers are `D`, `C`, `C++`, `Objective-C`, `Windows`, `System`");
return returnLinkage(LINK.d);
}
if (token.value != TOK.identifier)
return returnLinkage(LINK.d);
Identifier id = token.ident;
nextToken();
if (id == Id.Windows)
return returnLinkage(LINK.windows);
else if (id == Id.D)
return returnLinkage(LINK.d);
else if (id == Id.System)
return returnLinkage(LINK.system);
else if (id == Id.Objective) // Looking for tokens "Objective-C"
{
if (token.value != TOK.min)
return invalidLinkage();
nextToken();
if (token.ident != Id.C)
return invalidLinkage();
nextToken();
return returnLinkage(LINK.objc);
}
else if (id != Id.C)
return invalidLinkage();
if (token.value != TOK.plusPlus)
return returnLinkage(LINK.c);
nextToken();
if (token.value != TOK.comma) // , namespaces or class or struct
return returnLinkage(LINK.cpp);
nextToken();
if (token.value == TOK.rightParenthesis)
return returnLinkage(LINK.cpp); // extern(C++,)
if (token.value == TOK.class_ || token.value == TOK.struct_)
{
cppmangle = token.value == TOK.class_ ? CPPMANGLE.asClass : CPPMANGLE.asStruct;
nextToken();
}
else if (token.value == TOK.identifier) // named scope namespace
{
idents = new AST.Identifiers();
while (1)
{
Identifier idn = token.ident;
idents.push(idn);
nextToken();
if (token.value == TOK.dot)
{
nextToken();
if (token.value == TOK.identifier)
continue;
error("identifier expected for C++ namespace");
idents = null; // error occurred, invalidate list of elements.
}
break;
}
}
else // non-scoped StringExp namespace
{
cppMangleOnly = true;
identExps = new AST.Expressions();
while (1)
{
identExps.push(parseCondExp());
if (token.value != TOK.comma)
break;
nextToken();
// Allow trailing commas as done for argument lists, arrays, ...
if (token.value == TOK.rightParenthesis)
break;
}
}
return returnLinkage(LINK.cpp);
}
/***********************************
* Parse ident1.ident2.ident3
*
* Params:
* entity = what qualified identifier is expected to resolve into.
* Used only for better error message
*
* Returns:
* array of identifiers with actual qualified one stored last
*/
private Identifier[] parseQualifiedIdentifier(const(char)* entity)
{
Identifier[] qualified;
do
{
nextToken();
if (token.value != TOK.identifier)
{
error("`%s` expected as dot-separated identifiers, got `%s`", entity, token.toChars());
return qualified;
}
Identifier id = token.ident;
qualified ~= id;
nextToken();
}
while (token.value == TOK.dot);
return qualified;
}
/**************************************
* Parse a debug conditional
*/
private AST.Condition parseDebugCondition()
{
uint level = 1;
Identifier id = null;
Loc loc = token.loc;
if (token.value == TOK.leftParenthesis)
{
nextToken();
if (token.value == TOK.identifier)
id = token.ident;
else if (token.value == TOK.int32Literal || token.value == TOK.int64Literal)
level = cast(uint)token.unsvalue;
else
error("identifier or integer expected inside `debug(...)`, not `%s`", token.toChars());
loc = token.loc;
nextToken();
check(TOK.rightParenthesis);
}
return new AST.DebugCondition(loc, mod, level, id);
}
/**************************************
* Parse a version conditional
*/
private AST.Condition parseVersionCondition()
{
uint level = 1;
Identifier id = null;
Loc loc;
if (token.value == TOK.leftParenthesis)
{
nextToken();
/* Allow:
* version (unittest)
* version (assert)
* even though they are keywords
*/
loc = token.loc;
if (token.value == TOK.identifier)
id = token.ident;
else if (token.value == TOK.int32Literal || token.value == TOK.int64Literal)
level = cast(uint)token.unsvalue;
else if (token.value == TOK.unittest_)
id = Identifier.idPool(Token.toString(TOK.unittest_));
else if (token.value == TOK.assert_)
id = Identifier.idPool(Token.toString(TOK.assert_));
else
error("identifier or integer expected inside `version(...)`, not `%s`", token.toChars());
nextToken();
check(TOK.rightParenthesis);
}
else
error("(condition) expected following `version`");
return new AST.VersionCondition(loc, mod, level, id);
}
/***********************************************
* static if (expression)
* body
* else
* body
* Current token is 'static'.
*/
private AST.Condition parseStaticIfCondition()
{
AST.Expression exp;
AST.Condition condition;
const loc = token.loc;
nextToken();
nextToken();
if (token.value == TOK.leftParenthesis)
{
nextToken();
exp = parseAssignExp();
check(TOK.rightParenthesis);
}
else
{
error("(expression) expected following `static if`");
exp = null;
}
condition = new AST.StaticIfCondition(loc, exp);
return condition;
}
/*****************************************
* Parse a constructor definition:
* this(parameters) { body }
* or postblit:
* this(this) { body }
* or constructor template:
* this(templateparameters)(parameters) { body }
* Current token is 'this'.
*/
private AST.Dsymbol parseCtor(PrefixAttributes!AST* pAttrs)
{
AST.Expressions* udas = null;
const loc = token.loc;
StorageClass stc = getStorageClass!AST(pAttrs);
nextToken();
if (token.value == TOK.leftParenthesis && peekNext() == TOK.this_ && peekNext2() == TOK.rightParenthesis)
{
// this(this) { ... }
nextToken();
nextToken();
check(TOK.rightParenthesis);
stc = parsePostfix(stc, &udas);
if (stc & STC.immutable_)
deprecation("`immutable` postblit is deprecated. Please use an unqualified postblit.");
if (stc & STC.shared_)
deprecation("`shared` postblit is deprecated. Please use an unqualified postblit.");
if (stc & STC.const_)
deprecation("`const` postblit is deprecated. Please use an unqualified postblit.");
if (stc & STC.static_)
error(loc, "postblit cannot be `static`");
auto f = new AST.PostBlitDeclaration(loc, Loc.initial, stc, Id.postblit);
AST.Dsymbol s = parseContracts(f);
if (udas)
{
auto a = new AST.Dsymbols();
a.push(f);
s = new AST.UserAttributeDeclaration(udas, a);
}
return s;
}
/* Look ahead to see if:
* this(...)(...)
* which is a constructor template
*/
AST.TemplateParameters* tpl = null;
if (token.value == TOK.leftParenthesis && peekPastParen(&token).value == TOK.leftParenthesis)
{
tpl = parseTemplateParameterList();
}
/* Just a regular constructor
*/
auto parameterList = parseParameterList(null);
stc = parsePostfix(stc, &udas);
if (parameterList.varargs != AST.VarArg.none || AST.Parameter.dim(parameterList.parameters) != 0)
{
if (stc & STC.static_)
error(loc, "constructor cannot be static");
}
else if (StorageClass ss = stc & (STC.shared_ | STC.static_)) // this()
{
if (ss == STC.static_)
error(loc, "use `static this()` to declare a static constructor");
else if (ss == (STC.shared_ | STC.static_))
error(loc, "use `shared static this()` to declare a shared static constructor");
}
AST.Expression constraint = tpl ? parseConstraint() : null;
AST.Type tf = new AST.TypeFunction(parameterList, null, linkage, stc); // RetrunType -> auto
tf = tf.addSTC(stc);
auto f = new AST.CtorDeclaration(loc, Loc.initial, stc, tf);
AST.Dsymbol s = parseContracts(f);
if (udas)
{
auto a = new AST.Dsymbols();
a.push(f);
s = new AST.UserAttributeDeclaration(udas, a);
}
if (tpl)
{
// Wrap a template around it
auto decldefs = new AST.Dsymbols();
decldefs.push(s);
s = new AST.TemplateDeclaration(loc, f.ident, tpl, constraint, decldefs);
}
return s;
}
/*****************************************
* Parse a destructor definition:
* ~this() { body }
* Current token is '~'.
*/
private AST.Dsymbol parseDtor(PrefixAttributes!AST* pAttrs)
{
AST.Expressions* udas = null;
const loc = token.loc;
StorageClass stc = getStorageClass!AST(pAttrs);
nextToken();
check(TOK.this_);
check(TOK.leftParenthesis);
check(TOK.rightParenthesis);
stc = parsePostfix(stc, &udas);
if (StorageClass ss = stc & (STC.shared_ | STC.static_))
{
if (ss == STC.static_)
error(loc, "use `static ~this()` to declare a static destructor");
else if (ss == (STC.shared_ | STC.static_))
error(loc, "use `shared static ~this()` to declare a shared static destructor");
}
auto f = new AST.DtorDeclaration(loc, Loc.initial, stc, Id.dtor);
AST.Dsymbol s = parseContracts(f);
if (udas)
{
auto a = new AST.Dsymbols();
a.push(f);
s = new AST.UserAttributeDeclaration(udas, a);
}
return s;
}
/*****************************************
* Parse a static constructor definition:
* static this() { body }
* Current token is 'static'.
*/
private AST.Dsymbol parseStaticCtor(PrefixAttributes!AST* pAttrs)
{
//Expressions *udas = NULL;
const loc = token.loc;
StorageClass stc = getStorageClass!AST(pAttrs);
nextToken();
nextToken();
check(TOK.leftParenthesis);
check(TOK.rightParenthesis);
stc = parsePostfix(stc & ~STC.TYPECTOR, null) | stc;
if (stc & STC.shared_)
error(loc, "use `shared static this()` to declare a shared static constructor");
else if (stc & STC.static_)
appendStorageClass(stc, STC.static_); // complaint for the redundancy
else if (StorageClass modStc = stc & STC.TYPECTOR)
{
OutBuffer buf;
AST.stcToBuffer(&buf, modStc);
error(loc, "static constructor cannot be `%s`", buf.peekChars());
}
stc &= ~(STC.static_ | STC.TYPECTOR);
auto f = new AST.StaticCtorDeclaration(loc, Loc.initial, stc);
AST.Dsymbol s = parseContracts(f);
return s;
}
/*****************************************
* Parse a static destructor definition:
* static ~this() { body }
* Current token is 'static'.
*/
private AST.Dsymbol parseStaticDtor(PrefixAttributes!AST* pAttrs)
{
AST.Expressions* udas = null;
const loc = token.loc;
StorageClass stc = getStorageClass!AST(pAttrs);
nextToken();
nextToken();
check(TOK.this_);
check(TOK.leftParenthesis);
check(TOK.rightParenthesis);
stc = parsePostfix(stc & ~STC.TYPECTOR, &udas) | stc;
if (stc & STC.shared_)
error(loc, "use `shared static ~this()` to declare a shared static destructor");
else if (stc & STC.static_)
appendStorageClass(stc, STC.static_); // complaint for the redundancy
else if (StorageClass modStc = stc & STC.TYPECTOR)
{
OutBuffer buf;
AST.stcToBuffer(&buf, modStc);
error(loc, "static destructor cannot be `%s`", buf.peekChars());
}
stc &= ~(STC.static_ | STC.TYPECTOR);
auto f = new AST.StaticDtorDeclaration(loc, Loc.initial, stc);
AST.Dsymbol s = parseContracts(f);
if (udas)
{
auto a = new AST.Dsymbols();
a.push(f);
s = new AST.UserAttributeDeclaration(udas, a);
}
return s;
}
/*****************************************
* Parse a shared static constructor definition:
* shared static this() { body }
* Current token is 'shared'.
*/
private AST.Dsymbol parseSharedStaticCtor(PrefixAttributes!AST* pAttrs)
{
//Expressions *udas = NULL;
const loc = token.loc;
StorageClass stc = getStorageClass!AST(pAttrs);
nextToken();
nextToken();
nextToken();
check(TOK.leftParenthesis);
check(TOK.rightParenthesis);
stc = parsePostfix(stc & ~STC.TYPECTOR, null) | stc;
if (StorageClass ss = stc & (STC.shared_ | STC.static_))
appendStorageClass(stc, ss); // complaint for the redundancy
else if (StorageClass modStc = stc & STC.TYPECTOR)
{
OutBuffer buf;
AST.stcToBuffer(&buf, modStc);
error(loc, "shared static constructor cannot be `%s`", buf.peekChars());
}
stc &= ~(STC.static_ | STC.TYPECTOR);
auto f = new AST.SharedStaticCtorDeclaration(loc, Loc.initial, stc);
AST.Dsymbol s = parseContracts(f);
return s;
}
/*****************************************
* Parse a shared static destructor definition:
* shared static ~this() { body }
* Current token is 'shared'.
*/
private AST.Dsymbol parseSharedStaticDtor(PrefixAttributes!AST* pAttrs)
{
AST.Expressions* udas = null;
const loc = token.loc;
StorageClass stc = getStorageClass!AST(pAttrs);
nextToken();
nextToken();
nextToken();
check(TOK.this_);
check(TOK.leftParenthesis);
check(TOK.rightParenthesis);
stc = parsePostfix(stc & ~STC.TYPECTOR, &udas) | stc;
if (StorageClass ss = stc & (STC.shared_ | STC.static_))
appendStorageClass(stc, ss); // complaint for the redundancy
else if (StorageClass modStc = stc & STC.TYPECTOR)
{
OutBuffer buf;
AST.stcToBuffer(&buf, modStc);
error(loc, "shared static destructor cannot be `%s`", buf.peekChars());
}
stc &= ~(STC.static_ | STC.TYPECTOR);
auto f = new AST.SharedStaticDtorDeclaration(loc, Loc.initial, stc);
AST.Dsymbol s = parseContracts(f);
if (udas)
{
auto a = new AST.Dsymbols();
a.push(f);
s = new AST.UserAttributeDeclaration(udas, a);
}
return s;
}
/*****************************************
* Parse an invariant definition:
* invariant { statements... }
* invariant() { statements... }
* invariant (expression);
* Current token is 'invariant'.
*/
private AST.Dsymbol parseInvariant(PrefixAttributes!AST* pAttrs)
{
const loc = token.loc;
StorageClass stc = getStorageClass!AST(pAttrs);
nextToken();
if (token.value == TOK.leftParenthesis) // optional () or invariant (expression);
{
nextToken();
if (token.value != TOK.rightParenthesis) // invariant (expression);
{
AST.Expression e = parseAssignExp(), msg = null;
if (token.value == TOK.comma)
{
nextToken();
if (token.value != TOK.rightParenthesis)
{
msg = parseAssignExp();
if (token.value == TOK.comma)
nextToken();
}
}
check(TOK.rightParenthesis);
check(TOK.semicolon);
e = new AST.AssertExp(loc, e, msg);
auto fbody = new AST.ExpStatement(loc, e);
auto f = new AST.InvariantDeclaration(loc, token.loc, stc, null, fbody);
return f;
}
nextToken();
}
auto fbody = parseStatement(ParseStatementFlags.curly);
auto f = new AST.InvariantDeclaration(loc, token.loc, stc, null, fbody);
return f;
}
/*****************************************
* Parse a unittest definition:
* unittest { body }
* Current token is 'unittest'.
*/
private AST.Dsymbol parseUnitTest(PrefixAttributes!AST* pAttrs)
{
const loc = token.loc;
StorageClass stc = getStorageClass!AST(pAttrs);
nextToken();
const(char)* begPtr = token.ptr + 1; // skip '{'
const(char)* endPtr = null;
AST.Statement sbody = parseStatement(ParseStatementFlags.curly, &endPtr);
/** Extract unittest body as a string. Must be done eagerly since memory
will be released by the lexer before doc gen. */
char* docline = null;
if (global.params.doDocComments && endPtr > begPtr)
{
/* Remove trailing whitespaces */
for (const(char)* p = endPtr - 1; begPtr <= p && (*p == ' ' || *p == '\r' || *p == '\n' || *p == '\t'); --p)
{
endPtr = p;
}
size_t len = endPtr - begPtr;
if (len > 0)
{
docline = cast(char*)mem.xmalloc_noscan(len + 2);
memcpy(docline, begPtr, len);
docline[len] = '\n'; // Terminate all lines by LF
docline[len + 1] = '\0';
}
}
auto f = new AST.UnitTestDeclaration(loc, token.loc, stc, docline);
f.fbody = sbody;
return f;
}
/*****************************************
* Parse a new definition:
* new(parameters) { body }
* Current token is 'new'.
*/
private AST.Dsymbol parseNew(PrefixAttributes!AST* pAttrs)
{
const loc = token.loc;
StorageClass stc = getStorageClass!AST(pAttrs);
nextToken();
auto parameterList = parseParameterList(null);
auto f = new AST.NewDeclaration(loc, Loc.initial, stc, parameterList);
AST.Dsymbol s = parseContracts(f);
return s;
}
/**********************************************
* Parse parameter list.
*/
private AST.ParameterList parseParameterList(AST.TemplateParameters** tpl)
{
auto parameters = new AST.Parameters();
AST.VarArg varargs = AST.VarArg.none;
int hasdefault = 0;
StorageClass varargsStc;
// Attributes allowed for ...
enum VarArgsStc = STC.const_ | STC.immutable_ | STC.shared_ | STC.scope_ | STC.return_;
check(TOK.leftParenthesis);
while (1)
{
Identifier ai = null;
AST.Type at;
StorageClass storageClass = 0;
StorageClass stc;
AST.Expression ae;
AST.Expressions* udas = null;
for (; 1; nextToken())
{
L3:
switch (token.value)
{
case TOK.rightParenthesis:
if (storageClass != 0 || udas !is null)
error("basic type expected, not `)`");
break;
case TOK.dotDotDot:
varargs = AST.VarArg.variadic;
varargsStc = storageClass;
if (varargsStc & ~VarArgsStc)
{
OutBuffer buf;
AST.stcToBuffer(&buf, varargsStc & ~VarArgsStc);
error("variadic parameter cannot have attributes `%s`", buf.peekChars());
varargsStc &= VarArgsStc;
}
nextToken();
break;
case TOK.const_:
if (peekNext() == TOK.leftParenthesis)
goto default;
stc = STC.const_;
goto L2;
case TOK.immutable_:
if (peekNext() == TOK.leftParenthesis)
goto default;
stc = STC.immutable_;
goto L2;
case TOK.shared_:
if (peekNext() == TOK.leftParenthesis)
goto default;
stc = STC.shared_;
goto L2;
case TOK.inout_:
if (peekNext() == TOK.leftParenthesis)
goto default;
stc = STC.wild;
goto L2;
case TOK.at:
{
AST.Expressions* exps = null;
StorageClass stc2 = parseAttribute(exps);
if (stc2 & atAttrGroup)
{
error("`@%s` attribute for function parameter is not supported", token.toChars());
}
else
{
udas = AST.UserAttributeDeclaration.concat(udas, exps);
}
if (token.value == TOK.dotDotDot)
error("variadic parameter cannot have user-defined attributes");
if (stc2)
nextToken();
goto L3;
// Don't call nextToken again.
}
case TOK.in_:
stc = STC.in_;
goto L2;
case TOK.out_:
stc = STC.out_;
goto L2;
case TOK.ref_:
stc = STC.ref_;
goto L2;
case TOK.lazy_:
stc = STC.lazy_;
goto L2;
case TOK.scope_:
stc = STC.scope_;
goto L2;
case TOK.final_:
stc = STC.final_;
goto L2;
case TOK.auto_:
stc = STC.auto_;
goto L2;
case TOK.return_:
stc = STC.return_;
goto L2;
L2:
storageClass = appendStorageClass(storageClass, stc);
continue;
version (none)
{
case TOK.static_:
stc = STC.static_;
goto L2;
case TOK.auto_:
storageClass = STC.auto_;
goto L4;
case TOK.alias_:
storageClass = STC.alias_;
goto L4;
L4:
nextToken();
ai = null;
if (token.value == TOK.identifier)
{
ai = token.ident;
nextToken();
}
at = null; // no type
ae = null; // no default argument
if (token.value == TOK.assign) // = defaultArg
{
nextToken();
ae = parseDefaultInitExp();
hasdefault = 1;
}
else
{
if (hasdefault)
error("default argument expected for `alias %s`", ai ? ai.toChars() : "");
}
goto L3;
}
default:
{
stc = storageClass & (STC.IOR | STC.lazy_);
// if stc is not a power of 2
if (stc & (stc - 1) && !(stc == (STC.in_ | STC.ref_)))
error("incompatible parameter storage classes");
//if ((storageClass & STC.scope_) && (storageClass & (STC.ref_ | STC.out_)))
//error("scope cannot be ref or out");
if (tpl && token.value == TOK.identifier)
{
const tv = peekNext();
if (tv == TOK.comma || tv == TOK.rightParenthesis || tv == TOK.dotDotDot)
{
Identifier id = Identifier.generateId("__T");
const loc = token.loc;
at = new AST.TypeIdentifier(loc, id);
if (!*tpl)
*tpl = new AST.TemplateParameters();
AST.TemplateParameter tp = new AST.TemplateTypeParameter(loc, id, null, null);
(*tpl).push(tp);
ai = token.ident;
nextToken();
}
else goto _else;
}
else
{
_else:
at = parseType(&ai);
}
ae = null;
if (token.value == TOK.assign) // = defaultArg
{
nextToken();
ae = parseDefaultInitExp();
hasdefault = 1;
}
else
{
if (hasdefault)
error("default argument expected for `%s`", ai ? ai.toChars() : at.toChars());
}
auto param = new AST.Parameter(storageClass | STC.parameter, at, ai, ae, null);
if (udas)
{
auto a = new AST.Dsymbols();
auto udad = new AST.UserAttributeDeclaration(udas, a);
param.userAttribDecl = udad;
}
if (token.value == TOK.at)
{
AST.Expressions* exps = null;
StorageClass stc2 = parseAttribute(exps);
if (stc2 & atAttrGroup)
{
error("`@%s` attribute for function parameter is not supported", token.toChars());
}
else
{
error("user-defined attributes cannot appear as postfixes", token.toChars());
}
if (stc2)
nextToken();
}
if (token.value == TOK.dotDotDot)
{
/* This is:
* at ai ...
*/
if (storageClass & (STC.out_ | STC.ref_))
error("variadic argument cannot be `out` or `ref`");
varargs = AST.VarArg.typesafe;
parameters.push(param);
nextToken();
break;
}
parameters.push(param);
if (token.value == TOK.comma)
{
nextToken();
goto L1;
}
break;
}
}
break;
}
break;
L1:
}
check(TOK.rightParenthesis);
return AST.ParameterList(parameters, varargs, varargsStc);
}
/*************************************
*/
private AST.EnumDeclaration parseEnum()
{
AST.EnumDeclaration e;
Identifier id;
AST.Type memtype;
auto loc = token.loc;
// printf("Parser::parseEnum()\n");
nextToken();
id = null;
if (token.value == TOK.identifier)
{
id = token.ident;
nextToken();
}
memtype = null;
if (token.value == TOK.colon)
{
nextToken();
int alt = 0;
const typeLoc = token.loc;
Identifier ident;
memtype = parseBasicType();
memtype = parseDeclarator(memtype, alt, ident);
if (ident)
error("unexpected identifier `%s` in declarator", ident.toChars());
checkCstyleTypeSyntax(typeLoc, memtype, alt, ident);
}
e = new AST.EnumDeclaration(loc, id, memtype);
if (token.value == TOK.semicolon && id)
nextToken();
else if (token.value == TOK.leftCurly)
{
bool isAnonymousEnum = !id;
TOK prevTOK;
//printf("enum definition\n");
e.members = new AST.Dsymbols();
nextToken();
const(char)[] comment = token.blockComment;
while (token.value != TOK.rightCurly)
{
/* Can take the following forms...
* 1. ident
* 2. ident = value
* 3. type ident = value
* ... prefixed by valid attributes
*/
loc = token.loc;
AST.Type type = null;
Identifier ident = null;
AST.Expressions* udas;
StorageClass stc;
AST.Expression deprecationMessage;
enum attributeErrorMessage = "`%s` is not a valid attribute for enum members";
while(token.value != TOK.rightCurly
&& token.value != TOK.comma
&& token.value != TOK.assign)
{
switch(token.value)
{
case TOK.at:
if (StorageClass _stc = parseAttribute(udas))
{
if (_stc == STC.disable)
stc |= _stc;
else
{
OutBuffer buf;
AST.stcToBuffer(&buf, _stc);
error(attributeErrorMessage, buf.peekChars());
}
prevTOK = token.value;
nextToken();
}
break;
case TOK.deprecated_:
stc |= STC.deprecated_;
if (!parseDeprecatedAttribute(deprecationMessage))
{
prevTOK = token.value;
nextToken();
}
break;
case TOK.identifier:
const tv = peekNext();
if (tv == TOK.assign || tv == TOK.comma || tv == TOK.rightCurly)
{
ident = token.ident;
type = null;
prevTOK = token.value;
nextToken();
}
else
{
goto default;
}
break;
default:
if (isAnonymousEnum)
{
type = parseType(&ident, null);
if (type == AST.Type.terror)
{
type = null;
prevTOK = token.value;
nextToken();
}
else
{
prevTOK = TOK.identifier;
}
}
else
{
error(attributeErrorMessage, token.toChars());
prevTOK = token.value;
nextToken();
}
break;
}
if (token.value == TOK.comma)
{
prevTOK = token.value;
}
}
if (type && type != AST.Type.terror)
{
if (!ident)
error("no identifier for declarator `%s`", type.toChars());
if (!isAnonymousEnum)
error("type only allowed if anonymous enum and no enum type");
}
AST.Expression value;
if (token.value == TOK.assign)
{
if (prevTOK == TOK.identifier)
{
nextToken();
value = parseAssignExp();
}
else
{
error("assignment must be preceded by an identifier");
nextToken();
}
}
else
{
value = null;
if (type && type != AST.Type.terror && isAnonymousEnum)
error("if type, there must be an initializer");
}
AST.DeprecatedDeclaration dd;
if (deprecationMessage)
{
dd = new AST.DeprecatedDeclaration(deprecationMessage, null);
stc |= STC.deprecated_;
}
auto em = new AST.EnumMember(loc, ident, value, type, stc, null, dd);
e.members.push(em);
if (udas)
{
auto s = new AST.Dsymbols();
s.push(em);
auto uad = new AST.UserAttributeDeclaration(udas, s);
em.userAttribDecl = uad;
}
if (token.value == TOK.rightCurly)
{
}
else
{
addComment(em, comment);
comment = null;
check(TOK.comma);
}
addComment(em, comment);
comment = token.blockComment;
if (token.value == TOK.endOfFile)
{
error("premature end of file");
break;
}
}
nextToken();
}
else
error("enum declaration is invalid");
//printf("-parseEnum() %s\n", e.toChars());
return e;
}
/********************************
* Parse struct, union, interface, class.
*/
private AST.Dsymbol parseAggregate()
{
AST.TemplateParameters* tpl = null;
AST.Expression constraint;
const loc = token.loc;
TOK tok = token.value;
//printf("Parser::parseAggregate()\n");
nextToken();
Identifier id;
if (token.value != TOK.identifier)
{
id = null;
}
else
{
id = token.ident;
nextToken();
if (token.value == TOK.leftParenthesis)
{
// struct/class template declaration.
tpl = parseTemplateParameterList();
constraint = parseConstraint();
}
}
// Collect base class(es)
AST.BaseClasses* baseclasses = null;
if (token.value == TOK.colon)
{
if (tok != TOK.interface_ && tok != TOK.class_)
error("base classes are not allowed for `%s`, did you mean `;`?", Token.toChars(tok));
nextToken();
baseclasses = parseBaseClasses();
}
if (token.value == TOK.if_)
{
if (constraint)
error("template constraints appear both before and after BaseClassList, put them before");
constraint = parseConstraint();
}
if (constraint)
{
if (!id)
error("template constraints not allowed for anonymous `%s`", Token.toChars(tok));
if (!tpl)
error("template constraints only allowed for templates");
}
AST.Dsymbols* members = null;
if (token.value == TOK.leftCurly)
{
//printf("aggregate definition\n");
const lookingForElseSave = lookingForElse;
lookingForElse = Loc();
nextToken();
members = parseDeclDefs(0);
lookingForElse = lookingForElseSave;
if (token.value != TOK.rightCurly)
{
/* { */
error("`}` expected following members in `%s` declaration at %s",
Token.toChars(tok), loc.toChars());
}
nextToken();
}
else if (token.value == TOK.semicolon && id)
{
if (baseclasses || constraint)
error("members expected");
nextToken();
}
else
{
error("{ } expected following `%s` declaration", Token.toChars(tok));
}
AST.AggregateDeclaration a;
switch (tok)
{
case TOK.interface_:
if (!id)
error(loc, "anonymous interfaces not allowed");
a = new AST.InterfaceDeclaration(loc, id, baseclasses);
a.members = members;
break;
case TOK.class_:
if (!id)
error(loc, "anonymous classes not allowed");
bool inObject = md && !md.packages && md.id == Id.object;
a = new AST.ClassDeclaration(loc, id, baseclasses, members, inObject);
break;
case TOK.struct_:
if (id)
{
bool inObject = md && !md.packages && md.id == Id.object;
a = new AST.StructDeclaration(loc, id, inObject);
a.members = members;
}
else
{
/* Anonymous structs/unions are more like attributes.
*/
assert(!tpl);
return new AST.AnonDeclaration(loc, false, members);
}
break;
case TOK.union_:
if (id)
{
a = new AST.UnionDeclaration(loc, id);
a.members = members;
}
else
{
/* Anonymous structs/unions are more like attributes.
*/
assert(!tpl);
return new AST.AnonDeclaration(loc, true, members);
}
break;
default:
assert(0);
}
if (tpl)
{
// Wrap a template around the aggregate declaration
auto decldefs = new AST.Dsymbols();
decldefs.push(a);
auto tempdecl = new AST.TemplateDeclaration(loc, id, tpl, constraint, decldefs);
return tempdecl;
}
return a;
}
/*******************************************
*/
private AST.BaseClasses* parseBaseClasses()
{
auto baseclasses = new AST.BaseClasses();
for (; 1; nextToken())
{
auto b = new AST.BaseClass(parseBasicType());
baseclasses.push(b);
if (token.value != TOK.comma)
break;
}
return baseclasses;
}
private AST.Dsymbols* parseImport()
{
auto decldefs = new AST.Dsymbols();
Identifier aliasid = null;
int isstatic = token.value == TOK.static_;
if (isstatic)
nextToken();
//printf("Parser::parseImport()\n");
do
{
L1:
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected following `import`");
break;
}
const loc = token.loc;
Identifier id = token.ident;
Identifier[] a;
nextToken();
if (!aliasid && token.value == TOK.assign)
{
aliasid = id;
goto L1;
}
while (token.value == TOK.dot)
{
a ~= id;
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected following `package`");
break;
}
id = token.ident;
nextToken();
}
auto s = new AST.Import(loc, a, id, aliasid, isstatic);
decldefs.push(s);
/* Look for
* : alias=name, alias=name;
* syntax.
*/
if (token.value == TOK.colon)
{
do
{
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected following `:`");
break;
}
Identifier _alias = token.ident;
Identifier name;
nextToken();
if (token.value == TOK.assign)
{
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected following `%s=`", _alias.toChars());
break;
}
name = token.ident;
nextToken();
}
else
{
name = _alias;
_alias = null;
}
s.addAlias(name, _alias);
}
while (token.value == TOK.comma);
break; // no comma-separated imports of this form
}
aliasid = null;
}
while (token.value == TOK.comma);
if (token.value == TOK.semicolon)
nextToken();
else
{
error("`;` expected");
nextToken();
}
return decldefs;
}
AST.Type parseType(Identifier* pident = null, AST.TemplateParameters** ptpl = null)
{
/* Take care of the storage class prefixes that
* serve as type attributes:
* const type
* immutable type
* shared type
* inout type
* inout const type
* shared const type
* shared inout type
* shared inout const type
*/
StorageClass stc = 0;
while (1)
{
switch (token.value)
{
case TOK.const_:
if (peekNext() == TOK.leftParenthesis)
break; // const as type constructor
stc |= STC.const_; // const as storage class
nextToken();
continue;
case TOK.immutable_:
if (peekNext() == TOK.leftParenthesis)
break;
stc |= STC.immutable_;
nextToken();
continue;
case TOK.shared_:
if (peekNext() == TOK.leftParenthesis)
break;
stc |= STC.shared_;
nextToken();
continue;
case TOK.inout_:
if (peekNext() == TOK.leftParenthesis)
break;
stc |= STC.wild;
nextToken();
continue;
default:
break;
}
break;
}
const typeLoc = token.loc;
AST.Type t;
t = parseBasicType();
int alt = 0;
Identifier ident;
t = parseDeclarator(t, alt, ident, ptpl);
checkCstyleTypeSyntax(typeLoc, t, alt, ident);
if (pident)
*pident = ident;
t = t.addSTC(stc);
return t;
}
private AST.Type parseBasicType(bool dontLookDotIdents = false)
{
AST.Type t;
Loc loc;
Identifier id;
//printf("parseBasicType()\n");
switch (token.value)
{
case TOK.void_:
t = AST.Type.tvoid;
goto LabelX;
case TOK.int8:
t = AST.Type.tint8;
goto LabelX;
case TOK.uns8:
t = AST.Type.tuns8;
goto LabelX;
case TOK.int16:
t = AST.Type.tint16;
goto LabelX;
case TOK.uns16:
t = AST.Type.tuns16;
goto LabelX;
case TOK.int32:
t = AST.Type.tint32;
goto LabelX;
case TOK.uns32:
t = AST.Type.tuns32;
goto LabelX;
case TOK.int64:
t = AST.Type.tint64;
nextToken();
if (token.value == TOK.int64) // if `long long`
{
error("use `long` for a 64 bit integer instead of `long long`");
nextToken();
}
else if (token.value == TOK.float64) // if `long double`
{
error("use `real` instead of `long double`");
t = AST.Type.tfloat80;
nextToken();
}
break;
case TOK.uns64:
t = AST.Type.tuns64;
goto LabelX;
case TOK.int128:
t = AST.Type.tint128;
goto LabelX;
case TOK.uns128:
t = AST.Type.tuns128;
goto LabelX;
case TOK.float32:
t = AST.Type.tfloat32;
goto LabelX;
case TOK.float64:
t = AST.Type.tfloat64;
goto LabelX;
case TOK.float80:
t = AST.Type.tfloat80;
goto LabelX;
case TOK.imaginary32:
t = AST.Type.timaginary32;
goto LabelX;
case TOK.imaginary64:
t = AST.Type.timaginary64;
goto LabelX;
case TOK.imaginary80:
t = AST.Type.timaginary80;
goto LabelX;
case TOK.complex32:
t = AST.Type.tcomplex32;
goto LabelX;
case TOK.complex64:
t = AST.Type.tcomplex64;
goto LabelX;
case TOK.complex80:
t = AST.Type.tcomplex80;
goto LabelX;
case TOK.bool_:
t = AST.Type.tbool;
goto LabelX;
case TOK.char_:
t = AST.Type.tchar;
goto LabelX;
case TOK.wchar_:
t = AST.Type.twchar;
goto LabelX;
case TOK.dchar_:
t = AST.Type.tdchar;
goto LabelX;
LabelX:
nextToken();
break;
case TOK.this_:
case TOK.super_:
case TOK.identifier:
loc = token.loc;
id = token.ident;
nextToken();
if (token.value == TOK.not)
{
// ident!(template_arguments)
auto tempinst = new AST.TemplateInstance(loc, id, parseTemplateArguments());
t = parseBasicTypeStartingAt(new AST.TypeInstance(loc, tempinst), dontLookDotIdents);
}
else
{
t = parseBasicTypeStartingAt(new AST.TypeIdentifier(loc, id), dontLookDotIdents);
}
break;
case TOK.mixin_:
// https://dlang.org/spec/expression.html#mixin_types
loc = token.loc;
nextToken();
if (token.value != TOK.leftParenthesis)
error("found `%s` when expecting `%s` following %s", token.toChars(), Token.toChars(TOK.leftParenthesis), "`mixin`".ptr);
auto exps = parseArguments();
t = new AST.TypeMixin(loc, exps);
break;
case TOK.dot:
// Leading . as in .foo
t = parseBasicTypeStartingAt(new AST.TypeIdentifier(token.loc, Id.empty), dontLookDotIdents);
break;
case TOK.typeof_:
// typeof(expression)
t = parseBasicTypeStartingAt(parseTypeof(), dontLookDotIdents);
break;
case TOK.vector:
t = parseVector();
break;
case TOK.traits:
if (AST.TraitsExp te = cast(AST.TraitsExp) parsePrimaryExp())
if (te.ident && te.args)
{
t = new AST.TypeTraits(token.loc, te);
break;
}
t = new AST.TypeError;
break;
case TOK.const_:
// const(type)
nextToken();
check(TOK.leftParenthesis);
t = parseType().addSTC(STC.const_);
check(TOK.rightParenthesis);
break;
case TOK.immutable_:
// immutable(type)
nextToken();
check(TOK.leftParenthesis);
t = parseType().addSTC(STC.immutable_);
check(TOK.rightParenthesis);
break;
case TOK.shared_:
// shared(type)
nextToken();
check(TOK.leftParenthesis);
t = parseType().addSTC(STC.shared_);
check(TOK.rightParenthesis);
break;
case TOK.inout_:
// wild(type)
nextToken();
check(TOK.leftParenthesis);
t = parseType().addSTC(STC.wild);
check(TOK.rightParenthesis);
break;
default:
error("basic type expected, not `%s`", token.toChars());
if (token.value == TOK.else_)
errorSupplemental(token.loc, "There's no `static else`, use `else` instead.");
t = AST.Type.terror;
break;
}
return t;
}
private AST.Type parseBasicTypeStartingAt(AST.TypeQualified tid, bool dontLookDotIdents)
{
AST.Type maybeArray = null;
// See https://issues.dlang.org/show_bug.cgi?id=1215
// A basic type can look like MyType (typical case), but also:
// MyType.T -> A type
// MyType[expr] -> Either a static array of MyType or a type (iif MyType is a Ttuple)
// MyType[expr].T -> A type.
// MyType[expr].T[expr] -> Either a static array of MyType[expr].T or a type
// (iif MyType[expr].T is a Ttuple)
while (1)
{
switch (token.value)
{
case TOK.dot:
{
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected following `.` instead of `%s`", token.toChars());
break;
}
if (maybeArray)
{
// This is actually a TypeTuple index, not an {a/s}array.
// We need to have a while loop to unwind all index taking:
// T[e1][e2].U -> T, addIndex(e1), addIndex(e2)
AST.Objects dimStack;
AST.Type t = maybeArray;
while (true)
{
if (t.ty == AST.Tsarray)
{
// The index expression is an Expression.
AST.TypeSArray a = cast(AST.TypeSArray)t;
dimStack.push(a.dim.syntaxCopy());
t = a.next.syntaxCopy();
}
else if (t.ty == AST.Taarray)
{
// The index expression is a Type. It will be interpreted as an expression at semantic time.
AST.TypeAArray a = cast(AST.TypeAArray)t;
dimStack.push(a.index.syntaxCopy());
t = a.next.syntaxCopy();
}
else
{
break;
}
}
assert(dimStack.dim > 0);
// We're good. Replay indices in the reverse order.
tid = cast(AST.TypeQualified)t;
while (dimStack.dim)
{
tid.addIndex(dimStack.pop());
}
maybeArray = null;
}
const loc = token.loc;
Identifier id = token.ident;
nextToken();
if (token.value == TOK.not)
{
auto tempinst = new AST.TemplateInstance(loc, id, parseTemplateArguments());
tid.addInst(tempinst);
}
else
tid.addIdent(id);
continue;
}
case TOK.leftBracket:
{
if (dontLookDotIdents) // workaround for https://issues.dlang.org/show_bug.cgi?id=14911
goto Lend;
nextToken();
AST.Type t = maybeArray ? maybeArray : cast(AST.Type)tid;
if (token.value == TOK.rightBracket)
{
// It's a dynamic array, and we're done:
// T[].U does not make sense.
t = new AST.TypeDArray(t);
nextToken();
return t;
}
else if (isDeclaration(&token, NeedDeclaratorId.no, TOK.rightBracket, null))
{
// This can be one of two things:
// 1 - an associative array declaration, T[type]
// 2 - an associative array declaration, T[expr]
// These can only be disambiguated later.
AST.Type index = parseType(); // [ type ]
maybeArray = new AST.TypeAArray(t, index);
check(TOK.rightBracket);
}
else
{
// This can be one of three things:
// 1 - an static array declaration, T[expr]
// 2 - a slice, T[expr .. expr]
// 3 - a template parameter pack index expression, T[expr].U
// 1 and 3 can only be disambiguated later.
//printf("it's type[expression]\n");
inBrackets++;
AST.Expression e = parseAssignExp(); // [ expression ]
if (token.value == TOK.slice)
{
// It's a slice, and we're done.
nextToken();
AST.Expression e2 = parseAssignExp(); // [ exp .. exp ]
t = new AST.TypeSlice(t, e, e2);
inBrackets--;
check(TOK.rightBracket);
return t;
}
else
{
maybeArray = new AST.TypeSArray(t, e);
inBrackets--;
check(TOK.rightBracket);
continue;
}
}
break;
}
default:
goto Lend;
}
}
Lend:
return maybeArray ? maybeArray : cast(AST.Type)tid;
}
/******************************************
* Parse suffixes to type t.
* *
* []
* [AssignExpression]
* [AssignExpression .. AssignExpression]
* [Type]
* delegate Parameters MemberFunctionAttributes(opt)
* function Parameters FunctionAttributes(opt)
* Params:
* t = the already parsed type
* Returns:
* t with the suffixes added
* See_Also:
* https://dlang.org/spec/declaration.html#TypeSuffixes
*/
private AST.Type parseTypeSuffixes(AST.Type t)
{
//printf("parseTypeSuffixes()\n");
while (1)
{
switch (token.value)
{
case TOK.mul:
t = new AST.TypePointer(t);
nextToken();
continue;
case TOK.leftBracket:
// Handle []. Make sure things like
// int[3][1] a;
// is (array[1] of array[3] of int)
nextToken();
if (token.value == TOK.rightBracket)
{
t = new AST.TypeDArray(t); // []
nextToken();
}
else if (isDeclaration(&token, NeedDeclaratorId.no, TOK.rightBracket, null))
{
// It's an associative array declaration
//printf("it's an associative array\n");
AST.Type index = parseType(); // [ type ]
t = new AST.TypeAArray(t, index);
check(TOK.rightBracket);
}
else
{
//printf("it's type[expression]\n");
inBrackets++;
AST.Expression e = parseAssignExp(); // [ expression ]
if (!e)
{
inBrackets--;
check(TOK.rightBracket);
continue;
}
if (token.value == TOK.slice)
{
nextToken();
AST.Expression e2 = parseAssignExp(); // [ exp .. exp ]
t = new AST.TypeSlice(t, e, e2);
}
else
{
t = new AST.TypeSArray(t, e);
}
inBrackets--;
check(TOK.rightBracket);
}
continue;
case TOK.delegate_:
case TOK.function_:
{
// Handle delegate declaration:
// t delegate(parameter list) nothrow pure
// t function(parameter list) nothrow pure
TOK save = token.value;
nextToken();
auto parameterList = parseParameterList(null);
StorageClass stc = parsePostfix(STC.undefined_, null);
auto tf = new AST.TypeFunction(parameterList, t, linkage, stc);
if (stc & (STC.const_ | STC.immutable_ | STC.shared_ | STC.wild | STC.return_))
{
if (save == TOK.function_)
error("`const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions");
else
tf = cast(AST.TypeFunction)tf.addSTC(stc);
}
t = save == TOK.delegate_ ? new AST.TypeDelegate(tf) : new AST.TypePointer(tf); // pointer to function
continue;
}
default:
return t;
}
assert(0);
}
assert(0);
}
/**********************
* Parse Declarator
* Params:
* t = base type to start with
* palt = OR in 1 for C-style function pointer declaration syntax,
* 2 for C-style array declaration syntax, otherwise don't modify
* pident = set to Identifier if there is one, null if not
* tpl = if !null, then set to TemplateParameterList
* storageClass = any storage classes seen so far
* pdisable = set to true if @disable seen
* pudas = any user defined attributes seen so far. Merged with any more found
* Returns:
* type declared
* Reference: https://dlang.org/spec/declaration.html#Declarator
*/
private AST.Type parseDeclarator(AST.Type t, ref int palt, out Identifier pident,
AST.TemplateParameters** tpl = null, StorageClass storageClass = 0,
bool* pdisable = null, AST.Expressions** pudas = null)
{
//printf("parseDeclarator(tpl = %p)\n", tpl);
t = parseTypeSuffixes(t);
AST.Type ts;
switch (token.value)
{
case TOK.identifier:
pident = token.ident;
ts = t;
nextToken();
break;
case TOK.leftParenthesis:
{
// like: T (*fp)();
// like: T ((*fp))();
if (peekNext() == TOK.mul || peekNext() == TOK.leftParenthesis)
{
/* Parse things with parentheses around the identifier, like:
* int (*ident[3])[]
* although the D style would be:
* int[]*[3] ident
*/
palt |= 1;
nextToken();
ts = parseDeclarator(t, palt, pident);
check(TOK.rightParenthesis);
break;
}
ts = t;
Token* peekt = &token;
/* Completely disallow C-style things like:
* T (a);
* Improve error messages for the common bug of a missing return type
* by looking to see if (a) looks like a parameter list.
*/
if (isParameters(&peekt))
{
error("function declaration without return type. (Note that constructors are always named `this`)");
}
else
error("unexpected `(` in declarator");
break;
}
default:
ts = t;
break;
}
// parse DeclaratorSuffixes
while (1)
{
switch (token.value)
{
static if (CARRAYDECL)
{
/* Support C style array syntax:
* int ident[]
* as opposed to D-style:
* int[] ident
*/
case TOK.leftBracket:
{
// This is the old C-style post [] syntax.
AST.TypeNext ta;
nextToken();
if (token.value == TOK.rightBracket)
{
// It's a dynamic array
ta = new AST.TypeDArray(t); // []
nextToken();
palt |= 2;
}
else if (isDeclaration(&token, NeedDeclaratorId.no, TOK.rightBracket, null))
{
// It's an associative array
//printf("it's an associative array\n");
AST.Type index = parseType(); // [ type ]
check(TOK.rightBracket);
ta = new AST.TypeAArray(t, index);
palt |= 2;
}
else
{
//printf("It's a static array\n");
AST.Expression e = parseAssignExp(); // [ expression ]
ta = new AST.TypeSArray(t, e);
check(TOK.rightBracket);
palt |= 2;
}
/* Insert ta into
* ts -> ... -> t
* so that
* ts -> ... -> ta -> t
*/
AST.Type* pt;
for (pt = &ts; *pt != t; pt = &(cast(AST.TypeNext)*pt).next)
{
}
*pt = ta;
continue;
}
}
case TOK.leftParenthesis:
{
if (tpl)
{
Token* tk = peekPastParen(&token);
if (tk.value == TOK.leftParenthesis)
{
/* Look ahead to see if this is (...)(...),
* i.e. a function template declaration
*/
//printf("function template declaration\n");
// Gather template parameter list
*tpl = parseTemplateParameterList();
}
else if (tk.value == TOK.assign)
{
/* or (...) =,
* i.e. a variable template declaration
*/
//printf("variable template declaration\n");
*tpl = parseTemplateParameterList();
break;
}
}
auto parameterList = parseParameterList(null);
/* Parse const/immutable/shared/inout/nothrow/pure/return postfix
*/
// merge prefix storage classes
StorageClass stc = parsePostfix(storageClass, pudas);
AST.Type tf = new AST.TypeFunction(parameterList, t, linkage, stc);
tf = tf.addSTC(stc);
if (pdisable)
*pdisable = stc & STC.disable ? true : false;
/* Insert tf into
* ts -> ... -> t
* so that
* ts -> ... -> tf -> t
*/
AST.Type* pt;
for (pt = &ts; *pt != t; pt = &(cast(AST.TypeNext)*pt).next)
{
}
*pt = tf;
break;
}
default:
break;
}
break;
}
return ts;
}
private void parseStorageClasses(ref StorageClass storage_class, ref LINK link,
ref bool setAlignment, ref AST.Expression ealign, ref AST.Expressions* udas,
out Loc linkloc)
{
StorageClass stc;
bool sawLinkage = false; // seen a linkage declaration
linkloc = Loc.initial;
while (1)
{
switch (token.value)
{
case TOK.const_:
if (peekNext() == TOK.leftParenthesis)
break; // const as type constructor
stc = STC.const_; // const as storage class
goto L1;
case TOK.immutable_:
if (peekNext() == TOK.leftParenthesis)
break;
stc = STC.immutable_;
goto L1;
case TOK.shared_:
if (peekNext() == TOK.leftParenthesis)
break;
stc = STC.shared_;
goto L1;
case TOK.inout_:
if (peekNext() == TOK.leftParenthesis)
break;
stc = STC.wild;
goto L1;
case TOK.static_:
stc = STC.static_;
goto L1;
case TOK.final_:
stc = STC.final_;
goto L1;
case TOK.auto_:
stc = STC.auto_;
goto L1;
case TOK.scope_:
stc = STC.scope_;
goto L1;
case TOK.override_:
stc = STC.override_;
goto L1;
case TOK.abstract_:
stc = STC.abstract_;
goto L1;
case TOK.synchronized_:
stc = STC.synchronized_;
goto L1;
case TOK.deprecated_:
stc = STC.deprecated_;
goto L1;
case TOK.nothrow_:
stc = STC.nothrow_;
goto L1;
case TOK.pure_:
stc = STC.pure_;
goto L1;
case TOK.ref_:
stc = STC.ref_;
goto L1;
case TOK.gshared:
stc = STC.gshared;
goto L1;
case TOK.enum_:
{
const tv = peekNext();
if (tv == TOK.leftCurly || tv == TOK.colon)
break;
if (tv == TOK.identifier)
{
const nextv = peekNext2();
if (nextv == TOK.leftCurly || nextv == TOK.colon || nextv == TOK.semicolon)
break;
}
stc = STC.manifest;
goto L1;
}
case TOK.at:
{
stc = parseAttribute(udas);
if (stc)
goto L1;
continue;
}
L1:
storage_class = appendStorageClass(storage_class, stc);
nextToken();
continue;
case TOK.extern_:
{
if (peekNext() != TOK.leftParenthesis)
{
stc = STC.extern_;
goto L1;
}
if (sawLinkage)
error("redundant linkage declaration");
sawLinkage = true;
AST.Identifiers* idents = null;
AST.Expressions* identExps = null;
CPPMANGLE cppmangle;
bool cppMangleOnly = false;
linkloc = token.loc;
link = parseLinkage(&idents, &identExps, cppmangle, cppMangleOnly);
if (idents || identExps)
{
error("C++ name spaces not allowed here");
}
if (cppmangle != CPPMANGLE.def)
{
error("C++ mangle declaration not allowed here");
}
continue;
}
case TOK.align_:
{
nextToken();
setAlignment = true;
if (token.value == TOK.leftParenthesis)
{
nextToken();
ealign = parseExpression();
check(TOK.rightParenthesis);
}
continue;
}
default:
break;
}
break;
}
}
/**********************************
* Parse Declarations.
* These can be:
* 1. declarations at global/class level
* 2. declarations at statement level
* Return array of Declaration *'s.
*/
private AST.Dsymbols* parseDeclarations(bool autodecl, PrefixAttributes!AST* pAttrs, const(char)* comment)
{
StorageClass storage_class = STC.undefined_;
TOK tok = TOK.reserved;
LINK link = linkage;
Loc linkloc = this.linkLoc;
bool setAlignment = false;
AST.Expression ealign;
AST.Expressions* udas = null;
//printf("parseDeclarations() %s\n", token.toChars());
if (!comment)
comment = token.blockComment.ptr;
/* Look for AliasAssignment:
* identifier = type;
*/
if (token.value == TOK.identifier && peekNext() == TOK.assign)
{
const loc = token.loc;
auto ident = token.ident;
nextToken();
nextToken(); // advance past =
auto t = parseType();
AST.Dsymbol s = new AST.AliasAssign(loc, ident, t, null);
check(TOK.semicolon);
addComment(s, comment);
auto a = new AST.Dsymbols();
a.push(s);
return a;
}
if (token.value == TOK.alias_)
{
const loc = token.loc;
tok = token.value;
nextToken();
/* Look for:
* alias identifier this;
*/
if (token.value == TOK.identifier && peekNext() == TOK.this_)
{
auto s = new AST.AliasThis(loc, token.ident);
nextToken();
check(TOK.this_);
check(TOK.semicolon);
auto a = new AST.Dsymbols();
a.push(s);
addComment(s, comment);
return a;
}
version (none)
{
/* Look for:
* alias this = identifier;
*/
if (token.value == TOK.this_ && peekNext() == TOK.assign && peekNext2() == TOK.identifier)
{
check(TOK.this_);
check(TOK.assign);
auto s = new AliasThis(loc, token.ident);
nextToken();
check(TOK.semicolon);
auto a = new Dsymbols();
a.push(s);
addComment(s, comment);
return a;
}
}
/* Look for:
* alias identifier = type;
* alias identifier(...) = type;
*/
if (token.value == TOK.identifier && hasOptionalParensThen(peek(&token), TOK.assign))
{
auto a = new AST.Dsymbols();
while (1)
{
auto ident = token.ident;
nextToken();
AST.TemplateParameters* tpl = null;
if (token.value == TOK.leftParenthesis)
tpl = parseTemplateParameterList();
check(TOK.assign);
bool hasParsedAttributes;
void parseAttributes()
{
if (hasParsedAttributes) // only parse once
return;
hasParsedAttributes = true;
udas = null;
storage_class = STC.undefined_;
link = linkage;
linkloc = this.linkLoc;
setAlignment = false;
ealign = null;
parseStorageClasses(storage_class, link, setAlignment, ealign, udas, linkloc);
}
if (token.value == TOK.at)
parseAttributes;
AST.Declaration v;
AST.Dsymbol s;
// try to parse function type:
// TypeCtors? BasicType ( Parameters ) MemberFunctionAttributes
bool attributesAppended;
const StorageClass funcStc = parseTypeCtor();
Token* tlu = &token;
Token* tk;
if (token.value != TOK.function_ &&
token.value != TOK.delegate_ &&
isBasicType(&tlu) && tlu &&
tlu.value == TOK.leftParenthesis)
{
AST.Type tret = parseBasicType();
auto parameterList = parseParameterList(null);
parseAttributes();
if (udas)
error("user-defined attributes not allowed for `alias` declarations");
attributesAppended = true;
storage_class = appendStorageClass(storage_class, funcStc);
AST.Type tf = new AST.TypeFunction(parameterList, tret, link, storage_class);
v = new AST.AliasDeclaration(loc, ident, tf);
}
else if (token.value == TOK.function_ ||
token.value == TOK.delegate_ ||
token.value == TOK.leftParenthesis &&
skipAttributes(peekPastParen(&token), &tk) &&
(tk.value == TOK.goesTo || tk.value == TOK.leftCurly) ||
token.value == TOK.leftCurly ||
token.value == TOK.identifier && peekNext() == TOK.goesTo ||
token.value == TOK.ref_ && peekNext() == TOK.leftParenthesis &&
skipAttributes(peekPastParen(peek(&token)), &tk) &&
(tk.value == TOK.goesTo || tk.value == TOK.leftCurly)
)
{
// function (parameters) { statements... }
// delegate (parameters) { statements... }
// (parameters) { statements... }
// (parameters) => expression
// { statements... }
// identifier => expression
// ref (parameters) { statements... }
// ref (parameters) => expression
s = parseFunctionLiteral();
if (udas !is null)
{
if (storage_class != 0)
error("Cannot put a storage-class in an alias declaration.");
// parseAttributes shouldn't have set these variables
assert(link == linkage && !setAlignment && ealign is null);
auto tpl_ = cast(AST.TemplateDeclaration) s;
assert(tpl_ !is null && tpl_.members.dim == 1);
auto fd = cast(AST.FuncLiteralDeclaration) (*tpl_.members)[0];
auto tf = cast(AST.TypeFunction) fd.type;
assert(tf.parameterList.parameters.dim > 0);
auto as = new AST.Dsymbols();
(*tf.parameterList.parameters)[0].userAttribDecl = new AST.UserAttributeDeclaration(udas, as);
}
v = new AST.AliasDeclaration(loc, ident, s);
}
else
{
parseAttributes();
// type
if (udas)
error("user-defined attributes not allowed for `%s` declarations", Token.toChars(tok));
auto t = parseType();
// Disallow meaningless storage classes on type aliases
if (storage_class)
{
// Don't raise errors for STC that are part of a function/delegate type, e.g.
// `alias F = ref pure nothrow @nogc @safe int function();`
auto tp = t.isTypePointer;
const isFuncType = (tp && tp.next.isTypeFunction) || t.isTypeDelegate;
const remStc = isFuncType ? (storage_class & ~STC.FUNCATTR) : storage_class;
if (remStc)
{
OutBuffer buf;
AST.stcToBuffer(&buf, remStc);
// @@@DEPRECATED_2.093@@@
// Deprecated in 2020-07, can be made an error in 2.103
deprecation("storage class `%s` has no effect in type aliases", buf.peekChars());
}
}
v = new AST.AliasDeclaration(loc, ident, t);
}
if (!attributesAppended)
storage_class = appendStorageClass(storage_class, funcStc);
v.storage_class = storage_class;
s = v;
if (tpl)
{
auto a2 = new AST.Dsymbols();
a2.push(s);
auto tempdecl = new AST.TemplateDeclaration(loc, ident, tpl, null, a2);
s = tempdecl;
}
if (link != linkage)
{
auto a2 = new AST.Dsymbols();
a2.push(s);
s = new AST.LinkDeclaration(linkloc, link, a2);
}
a.push(s);
switch (token.value)
{
case TOK.semicolon:
nextToken();
addComment(s, comment);
break;
case TOK.comma:
nextToken();
addComment(s, comment);
if (token.value != TOK.identifier)
{
error("identifier expected following comma, not `%s`", token.toChars());
break;
}
if (peekNext() != TOK.assign && peekNext() != TOK.leftParenthesis)
{
error("`=` expected following identifier");
nextToken();
break;
}
continue;
default:
error("semicolon expected to close `%s` declaration", Token.toChars(tok));
break;
}
break;
}
return a;
}
// alias StorageClasses type ident;
}
AST.Type ts;
if (!autodecl)
{
parseStorageClasses(storage_class, link, setAlignment, ealign, udas, linkloc);
if (token.value == TOK.enum_)
{
AST.Dsymbol d = parseEnum();
auto a = new AST.Dsymbols();
a.push(d);
if (udas)
{
d = new AST.UserAttributeDeclaration(udas, a);
a = new AST.Dsymbols();
a.push(d);
}
addComment(d, comment);
return a;
}
if (token.value == TOK.struct_ ||
token.value == TOK.union_ ||
token.value == TOK.class_ ||
token.value == TOK.interface_)
{
AST.Dsymbol s = parseAggregate();
auto a = new AST.Dsymbols();
a.push(s);
if (storage_class)
{
s = new AST.StorageClassDeclaration(storage_class, a);
a = new AST.Dsymbols();
a.push(s);
}
if (setAlignment)
{
s = new AST.AlignDeclaration(s.loc, ealign, a);
a = new AST.Dsymbols();
a.push(s);
}
if (link != linkage)
{
s = new AST.LinkDeclaration(linkloc, link, a);
a = new AST.Dsymbols();
a.push(s);
}
if (udas)
{
s = new AST.UserAttributeDeclaration(udas, a);
a = new AST.Dsymbols();
a.push(s);
}
addComment(s, comment);
return a;
}
/* Look for auto initializers:
* storage_class identifier = initializer;
* storage_class identifier(...) = initializer;
*/
if ((storage_class || udas) && token.value == TOK.identifier && hasOptionalParensThen(peek(&token), TOK.assign))
{
AST.Dsymbols* a = parseAutoDeclarations(storage_class, comment);
if (udas)
{
AST.Dsymbol s = new AST.UserAttributeDeclaration(udas, a);
a = new AST.Dsymbols();
a.push(s);
}
return a;
}
/* Look for return type inference for template functions.
*/
{
Token* tk;
if ((storage_class || udas) && token.value == TOK.identifier && skipParens(peek(&token), &tk) &&
skipAttributes(tk, &tk) &&
(tk.value == TOK.leftParenthesis || tk.value == TOK.leftCurly || tk.value == TOK.in_ || tk.value == TOK.out_ || tk.value == TOK.goesTo ||
tk.value == TOK.do_ || tk.value == TOK.identifier && tk.ident == Id._body))
{
// @@@DEPRECATED@@@
// https://github.com/dlang/DIPs/blob/1f5959abe482b1f9094f6484a7d0a3ade77fc2fc/DIPs/accepted/DIP1003.md
// Deprecated in 2.097 - Can be removed from 2.117
// The deprecation period is longer than usual as `body`
// was quite widely used.
if (tk.value == TOK.identifier && tk.ident == Id._body)
deprecation("Usage of the `body` keyword is deprecated. Use `do` instead.");
ts = null;
}
else
{
ts = parseBasicType();
ts = parseTypeSuffixes(ts);
}
}
}
if (pAttrs)
{
storage_class |= pAttrs.storageClass;
//pAttrs.storageClass = STC.undefined_;
}
AST.Type tfirst = null;
auto a = new AST.Dsymbols();
while (1)
{
AST.TemplateParameters* tpl = null;
bool disable;
int alt = 0;
const loc = token.loc;
Identifier ident;
auto t = parseDeclarator(ts, alt, ident, &tpl, storage_class, &disable, &udas);
assert(t);
if (!tfirst)
tfirst = t;
else if (t != tfirst)
error("multiple declarations must have the same type, not `%s` and `%s`", tfirst.toChars(), t.toChars());
bool isThis = (t.ty == AST.Tident && (cast(AST.TypeIdentifier)t).ident == Id.This && token.value == TOK.assign);
if (ident)
checkCstyleTypeSyntax(loc, t, alt, ident);
else if (!isThis && (t != AST.Type.terror))
error("no identifier for declarator `%s`", t.toChars());
if (tok == TOK.alias_)
{
AST.Declaration v;
AST.Initializer _init = null;
/* Aliases can no longer have multiple declarators, storage classes,
* linkages, or auto declarations.
* These never made any sense, anyway.
* The code below needs to be fixed to reject them.
* The grammar has already been fixed to preclude them.
*/
if (udas)
error("user-defined attributes not allowed for `%s` declarations", Token.toChars(tok));
if (token.value == TOK.assign)
{
nextToken();
_init = parseInitializer();
}
if (_init)
{
if (isThis)
error("cannot use syntax `alias this = %s`, use `alias %s this` instead", _init.toChars(), _init.toChars());
else
error("alias cannot have initializer");
}
v = new AST.AliasDeclaration(loc, ident, t);
v.storage_class = storage_class;
if (pAttrs)
{
/* AliasDeclaration distinguish @safe, @system, @trusted attributes
* on prefix and postfix.
* @safe alias void function() FP1;
* alias @safe void function() FP2; // FP2 is not @safe
* alias void function() @safe FP3;
*/
pAttrs.storageClass &= STC.safeGroup;
}
AST.Dsymbol s = v;
if (link != linkage)
{
auto ax = new AST.Dsymbols();
ax.push(v);
s = new AST.LinkDeclaration(linkloc, link, ax);
}
a.push(s);
switch (token.value)
{
case TOK.semicolon:
nextToken();
addComment(s, comment);
break;
case TOK.comma:
nextToken();
addComment(s, comment);
continue;
default:
error("semicolon expected to close `%s` declaration", Token.toChars(tok));
break;
}
}
else if (t.ty == AST.Tfunction)
{
AST.Expression constraint = null;
//printf("%s funcdecl t = %s, storage_class = x%lx\n", loc.toChars(), t.toChars(), storage_class);
auto f = new AST.FuncDeclaration(loc, Loc.initial, ident, storage_class | (disable ? STC.disable : 0), t);
if (pAttrs)
pAttrs.storageClass = STC.undefined_;
if (tpl)
constraint = parseConstraint();
AST.Dsymbol s = parseContracts(f);
auto tplIdent = s.ident;
if (link != linkage)
{
auto ax = new AST.Dsymbols();
ax.push(s);
s = new AST.LinkDeclaration(linkloc, link, ax);
}
if (udas)
{
auto ax = new AST.Dsymbols();
ax.push(s);
s = new AST.UserAttributeDeclaration(udas, ax);
}
/* A template parameter list means it's a function template
*/
if (tpl)
{
// Wrap a template around the function declaration
auto decldefs = new AST.Dsymbols();
decldefs.push(s);
auto tempdecl = new AST.TemplateDeclaration(loc, tplIdent, tpl, constraint, decldefs);
s = tempdecl;
StorageClass stc2 = STC.undefined_;
if (storage_class & STC.static_)
{
assert(f.storage_class & STC.static_);
f.storage_class &= ~STC.static_;
stc2 |= STC.static_;
}
if (storage_class & STC.deprecated_)
{
assert(f.storage_class & STC.deprecated_);
f.storage_class &= ~STC.deprecated_;
stc2 |= STC.deprecated_;
}
if (stc2 != STC.undefined_)
{
auto ax = new AST.Dsymbols();
ax.push(s);
s = new AST.StorageClassDeclaration(stc2, ax);
}
}
a.push(s);
addComment(s, comment);
}
else if (ident)
{
AST.Initializer _init = null;
if (token.value == TOK.assign)
{
nextToken();
_init = parseInitializer();
}
auto v = new AST.VarDeclaration(loc, t, ident, _init);
v.storage_class = storage_class;
if (pAttrs)
pAttrs.storageClass = STC.undefined_;
AST.Dsymbol s = v;
if (tpl && _init)
{
auto a2 = new AST.Dsymbols();
a2.push(s);
auto tempdecl = new AST.TemplateDeclaration(loc, ident, tpl, null, a2, 0);
s = tempdecl;
}
if (setAlignment)
{
auto ax = new AST.Dsymbols();
ax.push(s);
s = new AST.AlignDeclaration(v.loc, ealign, ax);
}
if (link != linkage)
{
auto ax = new AST.Dsymbols();
ax.push(s);
s = new AST.LinkDeclaration(linkloc, link, ax);
}
if (udas)
{
auto ax = new AST.Dsymbols();
ax.push(s);
s = new AST.UserAttributeDeclaration(udas, ax);
}
a.push(s);
switch (token.value)
{
case TOK.semicolon:
nextToken();
addComment(s, comment);
break;
case TOK.comma:
nextToken();
addComment(s, comment);
continue;
default:
error("semicolon expected, not `%s`", token.toChars());
break;
}
}
break;
}
return a;
}
private AST.Dsymbol parseFunctionLiteral()
{
const loc = token.loc;
AST.TemplateParameters* tpl = null;
AST.ParameterList parameterList;
AST.Type tret = null;
StorageClass stc = 0;
TOK save = TOK.reserved;
switch (token.value)
{
case TOK.function_:
case TOK.delegate_:
save = token.value;
nextToken();
if (token.value == TOK.ref_)
{
// function ref (parameters) { statements... }
// delegate ref (parameters) { statements... }
stc = STC.ref_;
nextToken();
}
if (token.value != TOK.leftParenthesis && token.value != TOK.leftCurly)
{
// function type (parameters) { statements... }
// delegate type (parameters) { statements... }
tret = parseBasicType();
tret = parseTypeSuffixes(tret); // function return type
}
if (token.value == TOK.leftParenthesis)
{
// function (parameters) { statements... }
// delegate (parameters) { statements... }
}
else
{
// function { statements... }
// delegate { statements... }
break;
}
goto case TOK.leftParenthesis;
case TOK.ref_:
{
// ref (parameters) => expression
// ref (parameters) { statements... }
stc = STC.ref_;
nextToken();
goto case TOK.leftParenthesis;
}
case TOK.leftParenthesis:
{
// (parameters) => expression
// (parameters) { statements... }
parameterList = parseParameterList(&tpl);
stc = parsePostfix(stc, null);
if (StorageClass modStc = stc & STC.TYPECTOR)
{
if (save == TOK.function_)
{
OutBuffer buf;
AST.stcToBuffer(&buf, modStc);
error("function literal cannot be `%s`", buf.peekChars());
}
else
save = TOK.delegate_;
}
break;
}
case TOK.leftCurly:
// { statements... }
break;
case TOK.identifier:
{
// identifier => expression
parameterList.parameters = new AST.Parameters();
Identifier id = Identifier.generateId("__T");
AST.Type t = new AST.TypeIdentifier(loc, id);
parameterList.parameters.push(new AST.Parameter(STC.parameter, t, token.ident, null, null));
tpl = new AST.TemplateParameters();
AST.TemplateParameter tp = new AST.TemplateTypeParameter(loc, id, null, null);
tpl.push(tp);
nextToken();
break;
}
default:
assert(0);
}
auto tf = new AST.TypeFunction(parameterList, tret, linkage, stc);
tf = cast(AST.TypeFunction)tf.addSTC(stc);
auto fd = new AST.FuncLiteralDeclaration(loc, Loc.initial, tf, save, null);
if (token.value == TOK.goesTo)
{
check(TOK.goesTo);
const returnloc = token.loc;
AST.Expression ae = parseAssignExp();
fd.fbody = new AST.ReturnStatement(returnloc, ae);
fd.endloc = token.loc;
}
else
{
parseContracts(fd);
}
if (tpl)
{
// Wrap a template around function fd
auto decldefs = new AST.Dsymbols();
decldefs.push(fd);
return new AST.TemplateDeclaration(fd.loc, fd.ident, tpl, null, decldefs, false, true);
}
return fd;
}
/*****************************************
* Parse contracts following function declaration.
*/
private AST.FuncDeclaration parseContracts(AST.FuncDeclaration f)
{
LINK linksave = linkage;
bool literal = f.isFuncLiteralDeclaration() !is null;
// The following is irrelevant, as it is overridden by sc.linkage in
// TypeFunction::semantic
linkage = LINK.d; // nested functions have D linkage
bool requireDo = false;
L1:
switch (token.value)
{
case TOK.goesTo:
if (requireDo)
error("missing `do { ... }` after `in` or `out`");
if (!global.params.shortenedMethods)
error("=> shortened method not enabled, compile with compiler switch `-preview=shortenedMethods`");
const returnloc = token.loc;
nextToken();
f.fbody = new AST.ReturnStatement(returnloc, parseExpression());
f.endloc = token.loc;
check(TOK.semicolon);
break;
case TOK.leftCurly:
if (requireDo)
error("missing `do { ... }` after `in` or `out`");
f.fbody = parseStatement(ParseStatementFlags.semi);
f.endloc = endloc;
break;
case TOK.identifier:
if (token.ident == Id._body)
{
// @@@DEPRECATED@@@
// https://github.com/dlang/DIPs/blob/1f5959abe482b1f9094f6484a7d0a3ade77fc2fc/DIPs/accepted/DIP1003.md
// Deprecated in 2.097 - Can be removed from 2.117
// The deprecation period is longer than usual as `body`
// was quite widely used.
deprecation("Usage of the `body` keyword is deprecated. Use `do` instead.");
goto case TOK.do_;
}
goto default;
case TOK.do_:
nextToken();
f.fbody = parseStatement(ParseStatementFlags.curly);
f.endloc = endloc;
break;
version (none)
{
// Do we want this for function declarations, so we can do:
// int x, y, foo(), z;
case TOK.comma:
nextToken();
continue;
}
case TOK.in_:
// in { statements... }
// in (expression)
auto loc = token.loc;
nextToken();
if (!f.frequires)
{
f.frequires = new AST.Statements;
}
if (token.value == TOK.leftParenthesis)
{
nextToken();
AST.Expression e = parseAssignExp(), msg = null;
if (token.value == TOK.comma)
{
nextToken();
if (token.value != TOK.rightParenthesis)
{
msg = parseAssignExp();
if (token.value == TOK.comma)
nextToken();
}
}
check(TOK.rightParenthesis);
e = new AST.AssertExp(loc, e, msg);
f.frequires.push(new AST.ExpStatement(loc, e));
requireDo = false;
}
else
{
f.frequires.push(parseStatement(ParseStatementFlags.curly | ParseStatementFlags.scope_));
requireDo = true;
}
goto L1;
case TOK.out_:
// out { statements... }
// out (; expression)
// out (identifier) { statements... }
// out (identifier; expression)
auto loc = token.loc;
nextToken();
if (!f.fensures)
{
f.fensures = new AST.Ensures;
}
Identifier id = null;
if (token.value != TOK.leftCurly)
{
check(TOK.leftParenthesis);
if (token.value != TOK.identifier && token.value != TOK.semicolon)
error("`(identifier) { ... }` or `(identifier; expression)` following `out` expected, not `%s`", token.toChars());
if (token.value != TOK.semicolon)
{
id = token.ident;
nextToken();
}
if (token.value == TOK.semicolon)
{
nextToken();
AST.Expression e = parseAssignExp(), msg = null;
if (token.value == TOK.comma)
{
nextToken();
if (token.value != TOK.rightParenthesis)
{
msg = parseAssignExp();
if (token.value == TOK.comma)
nextToken();
}
}
check(TOK.rightParenthesis);
e = new AST.AssertExp(loc, e, msg);
f.fensures.push(AST.Ensure(id, new AST.ExpStatement(loc, e)));
requireDo = false;
goto L1;
}
check(TOK.rightParenthesis);
}
f.fensures.push(AST.Ensure(id, parseStatement(ParseStatementFlags.curly | ParseStatementFlags.scope_)));
requireDo = true;
goto L1;
case TOK.semicolon:
if (!literal)
{
// https://issues.dlang.org/show_bug.cgi?id=15799
// Semicolon becomes a part of function declaration
// only when 'do' is not required
if (!requireDo)
nextToken();
break;
}
goto default;
default:
if (literal)
{
const(char)* sbody = requireDo ? "do " : "";
error("missing `%s{ ... }` for function literal", sbody);
}
else if (!requireDo) // allow contracts even with no body
{
TOK t = token.value;
if (t == TOK.const_ || t == TOK.immutable_ || t == TOK.inout_ || t == TOK.return_ ||
t == TOK.shared_ || t == TOK.nothrow_ || t == TOK.pure_)
error("'%s' cannot be placed after a template constraint", token.toChars);
else if (t == TOK.at)
error("attributes cannot be placed after a template constraint");
else if (t == TOK.if_)
error("cannot use function constraints for non-template functions. Use `static if` instead");
else
error("semicolon expected following function declaration");
}
break;
}
if (literal && !f.fbody)
{
// Set empty function body for error recovery
f.fbody = new AST.CompoundStatement(Loc.initial, cast(AST.Statement)null);
}
linkage = linksave;
return f;
}
/*****************************************
*/
private void checkDanglingElse(Loc elseloc)
{
if (token.value != TOK.else_ && token.value != TOK.catch_ && token.value != TOK.finally_ && lookingForElse.linnum != 0)
{
warning(elseloc, "else is dangling, add { } after condition at %s", lookingForElse.toChars());
}
}
/* *************************
* Issue errors if C-style syntax
* Params:
* alt = !=0 for C-style syntax
*/
private void checkCstyleTypeSyntax(Loc loc, AST.Type t, int alt, Identifier ident)
{
if (!alt)
return;
const(char)* sp = !ident ? "" : " ";
const(char)* s = !ident ? "" : ident.toChars();
error(loc, "instead of C-style syntax, use D-style `%s%s%s`", t.toChars(), sp, s);
}
/*****************************************
* Determines additional argument types for parseForeach.
*/
private template ParseForeachArgs(bool isStatic, bool isDecl)
{
static alias Seq(T...) = T;
static if(isDecl)
{
alias ParseForeachArgs = Seq!(AST.Dsymbol*);
}
else
{
alias ParseForeachArgs = Seq!();
}
}
/*****************************************
* Determines the result type for parseForeach.
*/
private template ParseForeachRet(bool isStatic, bool isDecl)
{
static if(!isStatic)
{
alias ParseForeachRet = AST.Statement;
}
else static if(isDecl)
{
alias ParseForeachRet = AST.StaticForeachDeclaration;
}
else
{
alias ParseForeachRet = AST.StaticForeachStatement;
}
}
/*****************************************
* Parses `foreach` statements, `static foreach` statements and
* `static foreach` declarations. The template parameter
* `isStatic` is true, iff a `static foreach` should be parsed.
* If `isStatic` is true, `isDecl` can be true to indicate that a
* `static foreach` declaration should be parsed.
*/
private ParseForeachRet!(isStatic, isDecl) parseForeach(bool isStatic, bool isDecl)(Loc loc, ParseForeachArgs!(isStatic, isDecl) args)
{
static if(isDecl)
{
static assert(isStatic);
}
static if(isStatic)
{
nextToken();
static if(isDecl) auto pLastDecl = args[0];
}
TOK op = token.value;
nextToken();
check(TOK.leftParenthesis);
auto parameters = new AST.Parameters();
while (1)
{
Identifier ai = null;
AST.Type at;
StorageClass storageClass = 0;
StorageClass stc = 0;
Lagain:
if (stc)
{
storageClass = appendStorageClass(storageClass, stc);
nextToken();
}
switch (token.value)
{
case TOK.ref_:
stc = STC.ref_;
goto Lagain;
case TOK.enum_:
stc = STC.manifest;
goto Lagain;
case TOK.alias_:
storageClass = appendStorageClass(storageClass, STC.alias_);
nextToken();
break;
case TOK.const_:
if (peekNext() != TOK.leftParenthesis)
{
stc = STC.const_;
goto Lagain;
}
break;
case TOK.immutable_:
if (peekNext() != TOK.leftParenthesis)
{
stc = STC.immutable_;
goto Lagain;
}
break;
case TOK.shared_:
if (peekNext() != TOK.leftParenthesis)
{
stc = STC.shared_;
goto Lagain;
}
break;
case TOK.inout_:
if (peekNext() != TOK.leftParenthesis)
{
stc = STC.wild;
goto Lagain;
}
break;
default:
break;
}
if (token.value == TOK.identifier)
{
const tv = peekNext();
if (tv == TOK.comma || tv == TOK.semicolon)
{
ai = token.ident;
at = null; // infer argument type
nextToken();
goto Larg;
}
}
at = parseType(&ai);
if (!ai)
error("no identifier for declarator `%s`", at.toChars());
Larg:
auto p = new AST.Parameter(storageClass, at, ai, null, null);
parameters.push(p);
if (token.value == TOK.comma)
{
nextToken();
continue;
}
break;
}
check(TOK.semicolon);
AST.Expression aggr = parseExpression();
if (token.value == TOK.slice && parameters.dim == 1)
{
AST.Parameter p = (*parameters)[0];
nextToken();
AST.Expression upr = parseExpression();
check(TOK.rightParenthesis);
Loc endloc;
static if (!isDecl)
{
AST.Statement _body = parseStatement(0, null, &endloc);
}
else
{
AST.Statement _body = null;
}
auto rangefe = new AST.ForeachRangeStatement(loc, op, p, aggr, upr, _body, endloc);
static if (!isStatic)
{
return rangefe;
}
else static if(isDecl)
{
return new AST.StaticForeachDeclaration(new AST.StaticForeach(loc, null, rangefe), parseBlock(pLastDecl));
}
else
{
return new AST.StaticForeachStatement(loc, new AST.StaticForeach(loc, null, rangefe));
}
}
else
{
check(TOK.rightParenthesis);
Loc endloc;
static if (!isDecl)
{
AST.Statement _body = parseStatement(0, null, &endloc);
}
else
{
AST.Statement _body = null;
}
auto aggrfe = new AST.ForeachStatement(loc, op, parameters, aggr, _body, endloc);
static if(!isStatic)
{
return aggrfe;
}
else static if(isDecl)
{
return new AST.StaticForeachDeclaration(new AST.StaticForeach(loc, aggrfe, null), parseBlock(pLastDecl));
}
else
{
return new AST.StaticForeachStatement(loc, new AST.StaticForeach(loc, aggrfe, null));
}
}
}
/***
* Parse an assignment condition for if or while statements.
*
* Returns:
* The variable that is declared inside the condition
*/
AST.Parameter parseAssignCondition()
{
AST.Parameter param = null;
StorageClass storageClass = 0;
StorageClass stc = 0;
LagainStc:
if (stc)
{
storageClass = appendStorageClass(storageClass, stc);
nextToken();
}
switch (token.value)
{
case TOK.ref_:
stc = STC.ref_;
goto LagainStc;
case TOK.auto_:
stc = STC.auto_;
goto LagainStc;
case TOK.const_:
if (peekNext() != TOK.leftParenthesis)
{
stc = STC.const_;
goto LagainStc;
}
break;
case TOK.immutable_:
if (peekNext() != TOK.leftParenthesis)
{
stc = STC.immutable_;
goto LagainStc;
}
break;
case TOK.shared_:
if (peekNext() != TOK.leftParenthesis)
{
stc = STC.shared_;
goto LagainStc;
}
break;
case TOK.inout_:
if (peekNext() != TOK.leftParenthesis)
{
stc = STC.wild;
goto LagainStc;
}
break;
default:
break;
}
auto n = peek(&token);
if (storageClass != 0 && token.value == TOK.identifier && n.value == TOK.assign)
{
Identifier ai = token.ident;
AST.Type at = null; // infer parameter type
nextToken();
check(TOK.assign);
param = new AST.Parameter(storageClass, at, ai, null, null);
}
else if (isDeclaration(&token, NeedDeclaratorId.must, TOK.assign, null))
{
Identifier ai;
AST.Type at = parseType(&ai);
check(TOK.assign);
param = new AST.Parameter(storageClass, at, ai, null, null);
}
else if (storageClass != 0)
error("found `%s` while expecting `=` or identifier", n.toChars());
return param;
}
/*****************************************
* Input:
* flags PSxxxx
* Output:
* pEndloc if { ... statements ... }, store location of closing brace, otherwise loc of last token of statement
*/
AST.Statement parseStatement(int flags, const(char)** endPtr = null, Loc* pEndloc = null)
{
AST.Statement s;
AST.Condition cond;
AST.Statement ifbody;
AST.Statement elsebody;
bool isfinal;
const loc = token.loc;
//printf("parseStatement()\n");
if (flags & ParseStatementFlags.curly && token.value != TOK.leftCurly)
error("statement expected to be `{ }`, not `%s`", token.toChars());
switch (token.value)
{
case TOK.identifier:
{
/* A leading identifier can be a declaration, label, or expression.
* The easiest case to check first is label:
*/
if (peekNext() == TOK.colonColon)
{
// skip ident::
nextToken();
nextToken();
error("use `.` for member lookup, not `::`");
break;
}
if (peekNext() == TOK.colon)
{
// It's a label
Identifier ident = token.ident;
nextToken();
nextToken();
if (token.value == TOK.rightCurly)
s = null;
else if (token.value == TOK.leftCurly)
s = parseStatement(ParseStatementFlags.curly | ParseStatementFlags.scope_);
else
s = parseStatement(ParseStatementFlags.semiOk);
s = new AST.LabelStatement(loc, ident, s);
break;
}
goto case TOK.dot;
}
case TOK.dot:
case TOK.typeof_:
case TOK.vector:
case TOK.traits:
/* https://issues.dlang.org/show_bug.cgi?id=15163
* If tokens can be handled as
* old C-style declaration or D expression, prefer the latter.
*/
if (isDeclaration(&token, NeedDeclaratorId.mustIfDstyle, TOK.reserved, null))
goto Ldeclaration;
goto Lexp;
case TOK.assert_:
case TOK.this_:
case TOK.super_:
case TOK.int32Literal:
case TOK.uns32Literal:
case TOK.int64Literal:
case TOK.uns64Literal:
case TOK.int128Literal:
case TOK.uns128Literal:
case TOK.float32Literal:
case TOK.float64Literal:
case TOK.float80Literal:
case TOK.imaginary32Literal:
case TOK.imaginary64Literal:
case TOK.imaginary80Literal:
case TOK.charLiteral:
case TOK.wcharLiteral:
case TOK.dcharLiteral:
case TOK.null_:
case TOK.true_:
case TOK.false_:
case TOK.string_:
case TOK.hexadecimalString:
case TOK.leftParenthesis:
case TOK.cast_:
case TOK.mul:
case TOK.min:
case TOK.add:
case TOK.tilde:
case TOK.not:
case TOK.plusPlus:
case TOK.minusMinus:
case TOK.new_:
case TOK.delete_:
case TOK.delegate_:
case TOK.function_:
case TOK.typeid_:
case TOK.is_:
case TOK.leftBracket:
case TOK.file:
case TOK.fileFullPath:
case TOK.line:
case TOK.moduleString:
case TOK.functionString:
case TOK.prettyFunction:
Lexp:
{
AST.Expression exp = parseExpression();
/* https://issues.dlang.org/show_bug.cgi?id=15103
* Improve declaration / initialization syntax error message
* Error: found 'foo' when expecting ';' following statement
* becomes Error: found `(` when expecting `;` or `=`, did you mean `Foo foo = 42`?
*/
if (token.value == TOK.identifier && exp.op == TOK.identifier)
{
error("found `%s` when expecting `;` or `=`, did you mean `%s %s = %s`?", peek(&token).toChars(), exp.toChars(), token.toChars(), peek(peek(&token)).toChars());
nextToken();
}
else
check(TOK.semicolon, "statement");
s = new AST.ExpStatement(loc, exp);
break;
}
case TOK.static_:
{
// Look ahead to see if it's static assert() or static if()
const tv = peekNext();
if (tv == TOK.assert_)
{
s = new AST.StaticAssertStatement(parseStaticAssert());
break;
}
if (tv == TOK.if_)
{
cond = parseStaticIfCondition();
goto Lcondition;
}
if (tv == TOK.foreach_ || tv == TOK.foreach_reverse_)
{
s = parseForeach!(true,false)(loc);
if (flags & ParseStatementFlags.scope_)
s = new AST.ScopeStatement(loc, s, token.loc);
break;
}
if (tv == TOK.import_)
{
AST.Dsymbols* imports = parseImport();
s = new AST.ImportStatement(loc, imports);
if (flags & ParseStatementFlags.scope_)
s = new AST.ScopeStatement(loc, s, token.loc);
break;
}
goto Ldeclaration;
}
case TOK.final_:
if (peekNext() == TOK.switch_)
{
nextToken();
isfinal = true;
goto Lswitch;
}
goto Ldeclaration;
case TOK.wchar_:
case TOK.dchar_:
case TOK.bool_:
case TOK.char_:
case TOK.int8:
case TOK.uns8:
case TOK.int16:
case TOK.uns16:
case TOK.int32:
case TOK.uns32:
case TOK.int64:
case TOK.uns64:
case TOK.int128:
case TOK.uns128:
case TOK.float32:
case TOK.float64:
case TOK.float80:
case TOK.imaginary32:
case TOK.imaginary64:
case TOK.imaginary80:
case TOK.complex32:
case TOK.complex64:
case TOK.complex80:
case TOK.void_:
// bug 7773: int.max is always a part of expression
if (peekNext() == TOK.dot)
goto Lexp;
if (peekNext() == TOK.leftParenthesis)
goto Lexp;
goto case;
case TOK.alias_:
case TOK.const_:
case TOK.auto_:
case TOK.abstract_:
case TOK.extern_:
case TOK.align_:
case TOK.immutable_:
case TOK.shared_:
case TOK.inout_:
case TOK.deprecated_:
case TOK.nothrow_:
case TOK.pure_:
case TOK.ref_:
case TOK.gshared:
case TOK.at:
case TOK.struct_:
case TOK.union_:
case TOK.class_:
case TOK.interface_:
Ldeclaration:
{
AST.Dsymbols* a = parseDeclarations(false, null, null);
if (a.dim > 1)
{
auto as = new AST.Statements();
as.reserve(a.dim);
foreach (i; 0 .. a.dim)
{
AST.Dsymbol d = (*a)[i];
s = new AST.ExpStatement(loc, d);
as.push(s);
}
s = new AST.CompoundDeclarationStatement(loc, as);
}
else if (a.dim == 1)
{
AST.Dsymbol d = (*a)[0];
s = new AST.ExpStatement(loc, d);
}
else
s = new AST.ExpStatement(loc, cast(AST.Expression)null);
if (flags & ParseStatementFlags.scope_)
s = new AST.ScopeStatement(loc, s, token.loc);
break;
}
case TOK.enum_:
{
/* Determine if this is a manifest constant declaration,
* or a conventional enum.
*/
AST.Dsymbol d;
const tv = peekNext();
if (tv == TOK.leftCurly || tv == TOK.colon)
d = parseEnum();
else if (tv != TOK.identifier)
goto Ldeclaration;
else
{
const nextv = peekNext2();
if (nextv == TOK.leftCurly || nextv == TOK.colon || nextv == TOK.semicolon)
d = parseEnum();
else
goto Ldeclaration;
}
s = new AST.ExpStatement(loc, d);
if (flags & ParseStatementFlags.scope_)
s = new AST.ScopeStatement(loc, s, token.loc);
break;
}
case TOK.mixin_:
{
if (isDeclaration(&token, NeedDeclaratorId.mustIfDstyle, TOK.reserved, null))
goto Ldeclaration;
if (peekNext() == TOK.leftParenthesis)
{
// mixin(string)
AST.Expression e = parseAssignExp();
check(TOK.semicolon);
if (e.op == TOK.mixin_)
{
AST.MixinExp cpe = cast(AST.MixinExp)e;
s = new AST.CompileStatement(loc, cpe.exps);
}
else
{
s = new AST.ExpStatement(loc, e);
}
break;
}
AST.Dsymbol d = parseMixin();
s = new AST.ExpStatement(loc, d);
if (flags & ParseStatementFlags.scope_)
s = new AST.ScopeStatement(loc, s, token.loc);
break;
}
case TOK.leftCurly:
{
const lookingForElseSave = lookingForElse;
lookingForElse = Loc.initial;
nextToken();
//if (token.value == TOK.semicolon)
// error("use `{ }` for an empty statement, not `;`");
auto statements = new AST.Statements();
while (token.value != TOK.rightCurly && token.value != TOK.endOfFile)
{
statements.push(parseStatement(ParseStatementFlags.semi | ParseStatementFlags.curlyScope));
}
if (endPtr)
*endPtr = token.ptr;
endloc = token.loc;
if (pEndloc)
{
*pEndloc = token.loc;
pEndloc = null; // don't set it again
}
s = new AST.CompoundStatement(loc, statements);
if (flags & (ParseStatementFlags.scope_ | ParseStatementFlags.curlyScope))
s = new AST.ScopeStatement(loc, s, token.loc);
check(TOK.rightCurly, "compound statement");
lookingForElse = lookingForElseSave;
break;
}
case TOK.while_:
{
AST.Parameter param = null;
nextToken();
check(TOK.leftParenthesis);
param = parseAssignCondition();
AST.Expression condition = parseExpression();
check(TOK.rightParenthesis);
Loc endloc;
AST.Statement _body = parseStatement(ParseStatementFlags.scope_, null, &endloc);
s = new AST.WhileStatement(loc, condition, _body, endloc, param);
break;
}
case TOK.semicolon:
if (!(flags & ParseStatementFlags.semiOk))
{
if (flags & ParseStatementFlags.semi)
deprecation("use `{ }` for an empty statement, not `;`");
else
error("use `{ }` for an empty statement, not `;`");
}
nextToken();
s = new AST.ExpStatement(loc, cast(AST.Expression)null);
break;
case TOK.do_:
{
AST.Statement _body;
AST.Expression condition;
nextToken();
const lookingForElseSave = lookingForElse;
lookingForElse = Loc.initial;
_body = parseStatement(ParseStatementFlags.scope_);
lookingForElse = lookingForElseSave;
check(TOK.while_);
check(TOK.leftParenthesis);
condition = parseExpression();
check(TOK.rightParenthesis);
if (token.value == TOK.semicolon)
nextToken();
else
error("terminating `;` required after do-while statement");
s = new AST.DoStatement(loc, _body, condition, token.loc);
break;
}
case TOK.for_:
{
AST.Statement _init;
AST.Expression condition;
AST.Expression increment;
nextToken();
check(TOK.leftParenthesis);
if (token.value == TOK.semicolon)
{
_init = null;
nextToken();
}
else
{
const lookingForElseSave = lookingForElse;
lookingForElse = Loc.initial;
_init = parseStatement(0);
lookingForElse = lookingForElseSave;
}
if (token.value == TOK.semicolon)
{
condition = null;
nextToken();
}
else
{
condition = parseExpression();
check(TOK.semicolon, "`for` condition");
}
if (token.value == TOK.rightParenthesis)
{
increment = null;
nextToken();
}
else
{
increment = parseExpression();
check(TOK.rightParenthesis);
}
Loc endloc;
AST.Statement _body = parseStatement(ParseStatementFlags.scope_, null, &endloc);
s = new AST.ForStatement(loc, _init, condition, increment, _body, endloc);
break;
}
case TOK.foreach_:
case TOK.foreach_reverse_:
{
s = parseForeach!(false,false)(loc);
break;
}
case TOK.if_:
{
AST.Parameter param = null;
AST.Expression condition;
nextToken();
check(TOK.leftParenthesis);
param = parseAssignCondition();
condition = parseExpression();
check(TOK.rightParenthesis);
{
const lookingForElseSave = lookingForElse;
lookingForElse = loc;
ifbody = parseStatement(ParseStatementFlags.scope_);
lookingForElse = lookingForElseSave;
}
if (token.value == TOK.else_)
{
const elseloc = token.loc;
nextToken();
elsebody = parseStatement(ParseStatementFlags.scope_);
checkDanglingElse(elseloc);
}
else
elsebody = null;
if (condition && ifbody)
s = new AST.IfStatement(loc, param, condition, ifbody, elsebody, token.loc);
else
s = null; // don't propagate parsing errors
break;
}
case TOK.else_:
error("found `else` without a corresponding `if`, `version` or `debug` statement");
goto Lerror;
case TOK.scope_:
if (peekNext() != TOK.leftParenthesis)
goto Ldeclaration; // scope used as storage class
nextToken();
check(TOK.leftParenthesis);
if (token.value != TOK.identifier)
{
error("scope identifier expected");
goto Lerror;
}
else
{
TOK t = TOK.onScopeExit;
Identifier id = token.ident;
if (id == Id.exit)
t = TOK.onScopeExit;
else if (id == Id.failure)
t = TOK.onScopeFailure;
else if (id == Id.success)
t = TOK.onScopeSuccess;
else
error("valid scope identifiers are `exit`, `failure`, or `success`, not `%s`", id.toChars());
nextToken();
check(TOK.rightParenthesis);
AST.Statement st = parseStatement(ParseStatementFlags.scope_);
s = new AST.ScopeGuardStatement(loc, t, st);
break;
}
case TOK.debug_:
nextToken();
if (token.value == TOK.assign)
{
error("debug conditions can only be declared at module scope");
nextToken();
nextToken();
goto Lerror;
}
cond = parseDebugCondition();
goto Lcondition;
case TOK.version_:
nextToken();
if (token.value == TOK.assign)
{
error("version conditions can only be declared at module scope");
nextToken();
nextToken();
goto Lerror;
}
cond = parseVersionCondition();
goto Lcondition;
Lcondition:
{
const lookingForElseSave = lookingForElse;
lookingForElse = loc;
ifbody = parseStatement(0);
lookingForElse = lookingForElseSave;
}
elsebody = null;
if (token.value == TOK.else_)
{
const elseloc = token.loc;
nextToken();
elsebody = parseStatement(0);
checkDanglingElse(elseloc);
}
s = new AST.ConditionalStatement(loc, cond, ifbody, elsebody);
if (flags & ParseStatementFlags.scope_)
s = new AST.ScopeStatement(loc, s, token.loc);
break;
case TOK.pragma_:
{
Identifier ident;
AST.Expressions* args = null;
AST.Statement _body;
nextToken();
check(TOK.leftParenthesis);
if (token.value != TOK.identifier)
{
error("`pragma(identifier)` expected");
goto Lerror;
}
ident = token.ident;
nextToken();
if (token.value == TOK.comma && peekNext() != TOK.rightParenthesis)
args = parseArguments(); // pragma(identifier, args...);
else
check(TOK.rightParenthesis); // pragma(identifier);
if (token.value == TOK.semicolon)
{
nextToken();
_body = null;
}
else
_body = parseStatement(ParseStatementFlags.semi);
s = new AST.PragmaStatement(loc, ident, args, _body);
break;
}
case TOK.switch_:
isfinal = false;
goto Lswitch;
Lswitch:
{
nextToken();
check(TOK.leftParenthesis);
AST.Expression condition = parseExpression();
check(TOK.rightParenthesis);
AST.Statement _body = parseStatement(ParseStatementFlags.scope_);
s = new AST.SwitchStatement(loc, condition, _body, isfinal);
break;
}
case TOK.case_:
{
AST.Expression exp;
AST.Expressions cases; // array of Expression's
AST.Expression last = null;
while (1)
{
nextToken();
exp = parseAssignExp();
cases.push(exp);
if (token.value != TOK.comma)
break;
}
check(TOK.colon);
/* case exp: .. case last:
*/
if (token.value == TOK.slice)
{
if (cases.dim > 1)
error("only one `case` allowed for start of case range");
nextToken();
check(TOK.case_);
last = parseAssignExp();
check(TOK.colon);
}
if (flags & ParseStatementFlags.curlyScope)
{
auto statements = new AST.Statements();
while (token.value != TOK.case_ && token.value != TOK.default_ && token.value != TOK.endOfFile && token.value != TOK.rightCurly)
{
auto cur = parseStatement(ParseStatementFlags.semi | ParseStatementFlags.curlyScope);
statements.push(cur);
// https://issues.dlang.org/show_bug.cgi?id=21739
// Stop at the last break s.t. the following non-case statements are
// not merged into the current case. This can happen for
// case 1: ... break;
// debug { case 2: ... }
if (cur.isBreakStatement())
break;
}
s = new AST.CompoundStatement(loc, statements);
}
else
{
s = parseStatement(ParseStatementFlags.semi);
}
s = new AST.ScopeStatement(loc, s, token.loc);
if (last)
{
s = new AST.CaseRangeStatement(loc, exp, last, s);
}
else
{
// Keep cases in order by building the case statements backwards
for (size_t i = cases.dim; i; i--)
{
exp = cases[i - 1];
s = new AST.CaseStatement(loc, exp, s);
}
}
break;
}
case TOK.default_:
{
nextToken();
check(TOK.colon);
if (flags & ParseStatementFlags.curlyScope)
{
auto statements = new AST.Statements();
while (token.value != TOK.case_ && token.value != TOK.default_ && token.value != TOK.endOfFile && token.value != TOK.rightCurly)
{
statements.push(parseStatement(ParseStatementFlags.semi | ParseStatementFlags.curlyScope));
}
s = new AST.CompoundStatement(loc, statements);
}
else
s = parseStatement(ParseStatementFlags.semi);
s = new AST.ScopeStatement(loc, s, token.loc);
s = new AST.DefaultStatement(loc, s);
break;
}
case TOK.return_:
{
AST.Expression exp;
nextToken();
exp = token.value == TOK.semicolon ? null : parseExpression();
check(TOK.semicolon, "`return` statement");
s = new AST.ReturnStatement(loc, exp);
break;
}
case TOK.break_:
{
Identifier ident;
nextToken();
ident = null;
if (token.value == TOK.identifier)
{
ident = token.ident;
nextToken();
}
check(TOK.semicolon, "`break` statement");
s = new AST.BreakStatement(loc, ident);
break;
}
case TOK.continue_:
{
Identifier ident;
nextToken();
ident = null;
if (token.value == TOK.identifier)
{
ident = token.ident;
nextToken();
}
check(TOK.semicolon, "`continue` statement");
s = new AST.ContinueStatement(loc, ident);
break;
}
case TOK.goto_:
{
Identifier ident;
nextToken();
if (token.value == TOK.default_)
{
nextToken();
s = new AST.GotoDefaultStatement(loc);
}
else if (token.value == TOK.case_)
{
AST.Expression exp = null;
nextToken();
if (token.value != TOK.semicolon)
exp = parseExpression();
s = new AST.GotoCaseStatement(loc, exp);
}
else
{
if (token.value != TOK.identifier)
{
error("identifier expected following `goto`");
ident = null;
}
else
{
ident = token.ident;
nextToken();
}
s = new AST.GotoStatement(loc, ident);
}
check(TOK.semicolon, "`goto` statement");
break;
}
case TOK.synchronized_:
{
AST.Expression exp;
AST.Statement _body;
Token* t = peek(&token);
if (skipAttributes(t, &t) && t.value == TOK.class_)
goto Ldeclaration;
nextToken();
if (token.value == TOK.leftParenthesis)
{
nextToken();
exp = parseExpression();
check(TOK.rightParenthesis);
}
else
exp = null;
_body = parseStatement(ParseStatementFlags.scope_);
s = new AST.SynchronizedStatement(loc, exp, _body);
break;
}
case TOK.with_:
{
AST.Expression exp;
AST.Statement _body;
Loc endloc = loc;
nextToken();
check(TOK.leftParenthesis);
exp = parseExpression();
check(TOK.rightParenthesis);
_body = parseStatement(ParseStatementFlags.scope_, null, &endloc);
s = new AST.WithStatement(loc, exp, _body, endloc);
break;
}
case TOK.try_:
{
AST.Statement _body;
AST.Catches* catches = null;
AST.Statement finalbody = null;
nextToken();
const lookingForElseSave = lookingForElse;
lookingForElse = Loc.initial;
_body = parseStatement(ParseStatementFlags.scope_);
lookingForElse = lookingForElseSave;
while (token.value == TOK.catch_)
{
AST.Statement handler;
AST.Catch c;
AST.Type t;
Identifier id;
const catchloc = token.loc;
nextToken();
if (token.value == TOK.leftCurly || token.value != TOK.leftParenthesis)
{
t = null;
id = null;
}
else
{
check(TOK.leftParenthesis);
id = null;
t = parseType(&id);
check(TOK.rightParenthesis);
}
handler = parseStatement(0);
c = new AST.Catch(catchloc, t, id, handler);
if (!catches)
catches = new AST.Catches();
catches.push(c);
}
if (token.value == TOK.finally_)
{
nextToken();
finalbody = parseStatement(ParseStatementFlags.scope_);
}
s = _body;
if (!catches && !finalbody)
error("`catch` or `finally` expected following `try`");
else
{
if (catches)
s = new AST.TryCatchStatement(loc, _body, catches);
if (finalbody)
s = new AST.TryFinallyStatement(loc, s, finalbody);
}
break;
}
case TOK.throw_:
{
AST.Expression exp;
nextToken();
exp = parseExpression();
check(TOK.semicolon, "`throw` statement");
s = new AST.ThrowStatement(loc, exp);
break;
}
case TOK.asm_:
s = parseAsm();
break;
case TOK.import_:
{
/* https://issues.dlang.org/show_bug.cgi?id=16088
*
* At this point it can either be an
* https://dlang.org/spec/grammar.html#ImportExpression
* or an
* https://dlang.org/spec/grammar.html#ImportDeclaration.
* See if the next token after `import` is a `(`; if so,
* then it is an import expression.
*/
if (peekNext() == TOK.leftParenthesis)
{
AST.Expression e = parseExpression();
check(TOK.semicolon);
s = new AST.ExpStatement(loc, e);
}
else
{
AST.Dsymbols* imports = parseImport();
s = new AST.ImportStatement(loc, imports);
if (flags & ParseStatementFlags.scope_)
s = new AST.ScopeStatement(loc, s, token.loc);
}
break;
}
case TOK.template_:
{
AST.Dsymbol d = parseTemplateDeclaration();
s = new AST.ExpStatement(loc, d);
break;
}
default:
error("found `%s` instead of statement", token.toChars());
goto Lerror;
Lerror:
while (token.value != TOK.rightCurly && token.value != TOK.semicolon && token.value != TOK.endOfFile)
nextToken();
if (token.value == TOK.semicolon)
nextToken();
s = null;
break;
}
if (pEndloc)
*pEndloc = prevloc;
return s;
}
private AST.ExpInitializer parseExpInitializer(Loc loc)
{
auto ae = parseAssignExp();
return new AST.ExpInitializer(loc, ae);
}
private AST.Initializer parseStructInitializer(Loc loc)
{
/* Scan ahead to discern between a struct initializer and
* parameterless function literal.
*
* We'll scan the topmost curly bracket level for statement-related
* tokens, thereby ruling out a struct initializer. (A struct
* initializer which itself contains function literals may have
* statements at nested curly bracket levels.)
*
* It's important that this function literal check not be
* pendantic, otherwise a function having the slightest syntax
* error would emit confusing errors when we proceed to parse it
* as a struct initializer.
*
* The following two ambiguous cases will be treated as a struct
* initializer (best we can do without type info):
* {}
* {{statements...}} - i.e. it could be struct initializer
* with one function literal, or function literal having an
* extra level of curly brackets
* If a function literal is intended in these cases (unlikely),
* source can use a more explicit function literal syntax
* (e.g. prefix with "()" for empty parameter list).
*/
int braces = 1;
int parens = 0;
for (auto t = peek(&token); 1; t = peek(t))
{
switch (t.value)
{
case TOK.leftParenthesis:
parens++;
continue;
case TOK.rightParenthesis:
parens--;
continue;
// https://issues.dlang.org/show_bug.cgi?id=21163
// lambda params can have the `scope` storage class, e.g
// `S s = { (scope Type Id){} }`
case TOK.scope_:
if (!parens) goto case;
continue;
/* Look for a semicolon or keyword of statements which don't
* require a semicolon (typically containing BlockStatement).
* Tokens like "else", "catch", etc. are omitted where the
* leading token of the statement is sufficient.
*/
case TOK.asm_:
case TOK.class_:
case TOK.debug_:
case TOK.enum_:
case TOK.if_:
case TOK.interface_:
case TOK.pragma_:
case TOK.semicolon:
case TOK.struct_:
case TOK.switch_:
case TOK.synchronized_:
case TOK.try_:
case TOK.union_:
case TOK.version_:
case TOK.while_:
case TOK.with_:
if (braces == 1)
return parseExpInitializer(loc);
continue;
case TOK.leftCurly:
braces++;
continue;
case TOK.rightCurly:
if (--braces == 0)
break;
continue;
case TOK.endOfFile:
break;
default:
continue;
}
break;
}
auto _is = new AST.StructInitializer(loc);
bool commaExpected = false;
nextToken();
while (1)
{
switch (token.value)
{
case TOK.identifier:
{
if (commaExpected)
error("comma expected separating field initializers");
const t = peek(&token);
Identifier id;
if (t.value == TOK.colon)
{
id = token.ident;
nextToken();
nextToken(); // skip over ':'
}
auto value = parseInitializer();
_is.addInit(id, value);
commaExpected = true;
continue;
}
case TOK.comma:
if (!commaExpected)
error("expression expected, not `,`");
nextToken();
commaExpected = false;
continue;
case TOK.rightCurly: // allow trailing comma's
nextToken();
break;
case TOK.endOfFile:
error("found end of file instead of initializer");
break;
default:
if (commaExpected)
error("comma expected separating field initializers");
auto value = parseInitializer();
_is.addInit(null, value);
commaExpected = true;
continue;
}
break;
}
return _is;
}
/*****************************************
* Parse initializer for variable declaration.
*/
private AST.Initializer parseInitializer()
{
const loc = token.loc;
switch (token.value)
{
case TOK.leftCurly:
return parseStructInitializer(loc);
case TOK.leftBracket:
/* Scan ahead to see if it is an array initializer or
* an expression.
* If it ends with a ';' ',' or '}', it is an array initializer.
*/
int brackets = 1;
for (auto t = peek(&token); 1; t = peek(t))
{
switch (t.value)
{
case TOK.leftBracket:
brackets++;
continue;
case TOK.rightBracket:
if (--brackets == 0)
{
t = peek(t);
if (t.value != TOK.semicolon && t.value != TOK.comma && t.value != TOK.rightBracket && t.value != TOK.rightCurly)
return parseExpInitializer(loc);
break;
}
continue;
case TOK.endOfFile:
break;
default:
continue;
}
break;
}
auto ia = new AST.ArrayInitializer(loc);
bool commaExpected = false;
nextToken();
while (1)
{
switch (token.value)
{
default:
if (commaExpected)
{
error("comma expected separating array initializers, not `%s`", token.toChars());
nextToken();
break;
}
auto e = parseAssignExp();
if (!e)
break;
AST.Initializer value;
if (token.value == TOK.colon)
{
nextToken();
value = parseInitializer();
}
else
{
value = new AST.ExpInitializer(e.loc, e);
e = null;
}
ia.addInit(e, value);
commaExpected = true;
continue;
case TOK.leftCurly:
case TOK.leftBracket:
if (commaExpected)
error("comma expected separating array initializers, not `%s`", token.toChars());
auto value = parseInitializer();
AST.Expression e;
if (token.value == TOK.colon)
{
nextToken();
if (auto ei = value.isExpInitializer())
{
e = ei.exp;
value = parseInitializer();
}
else
error("initializer expression expected following colon, not `%s`", token.toChars());
}
ia.addInit(e, value);
commaExpected = true;
continue;
case TOK.comma:
if (!commaExpected)
error("expression expected, not `,`");
nextToken();
commaExpected = false;
continue;
case TOK.rightBracket: // allow trailing comma's
nextToken();
break;
case TOK.endOfFile:
error("found `%s` instead of array initializer", token.toChars());
break;
}
break;
}
return ia;
case TOK.void_:
const tv = peekNext();
if (tv == TOK.semicolon || tv == TOK.comma)
{
nextToken();
return new AST.VoidInitializer(loc);
}
return parseExpInitializer(loc);
default:
return parseExpInitializer(loc);
}
}
/*****************************************
* Parses default argument initializer expression that is an assign expression,
* with special handling for __FILE__, __FILE_DIR__, __LINE__, __MODULE__, __FUNCTION__, and __PRETTY_FUNCTION__.
*/
private AST.Expression parseDefaultInitExp()
{
AST.Expression e = null;
const tv = peekNext();
if (tv == TOK.comma || tv == TOK.rightParenthesis)
{
switch (token.value)
{
case TOK.file: e = new AST.FileInitExp(token.loc, TOK.file); break;
case TOK.fileFullPath: e = new AST.FileInitExp(token.loc, TOK.fileFullPath); break;
case TOK.line: e = new AST.LineInitExp(token.loc); break;
case TOK.moduleString: e = new AST.ModuleInitExp(token.loc); break;
case TOK.functionString: e = new AST.FuncInitExp(token.loc); break;
case TOK.prettyFunction: e = new AST.PrettyFuncInitExp(token.loc); break;
default: goto LExp;
}
nextToken();
return e;
}
LExp:
return parseAssignExp();
}
/********************
* Parse inline assembler block.
* Returns:
* inline assembler block as a Statement
*/
AST.Statement parseAsm()
{
// Parse the asm block into a sequence of AsmStatements,
// each AsmStatement is one instruction.
// Separate out labels.
// Defer parsing of AsmStatements until semantic processing.
const loc = token.loc;
Loc labelloc;
nextToken();
StorageClass stc = parsePostfix(STC.undefined_, null);
if (stc & (STC.const_ | STC.immutable_ | STC.shared_ | STC.wild))
error("`const`/`immutable`/`shared`/`inout` attributes are not allowed on `asm` blocks");
check(TOK.leftCurly);
Token* toklist = null;
Token** ptoklist = &toklist;
Identifier label = null;
auto statements = new AST.Statements();
size_t nestlevel = 0;
while (1)
{
switch (token.value)
{
case TOK.identifier:
if (!toklist)
{
// Look ahead to see if it is a label
if (peekNext() == TOK.colon)
{
// It's a label
label = token.ident;
labelloc = token.loc;
nextToken();
nextToken();
continue;
}
}
goto default;
case TOK.leftCurly:
++nestlevel;
goto default;
case TOK.rightCurly:
if (nestlevel > 0)
{
--nestlevel;
goto default;
}
if (toklist || label)
{
error("`asm` statements must end in `;`");
}
break;
case TOK.semicolon:
if (nestlevel != 0)
error("mismatched number of curly brackets");
if (toklist || label)
{
// Create AsmStatement from list of tokens we've saved
AST.Statement s = new AST.AsmStatement(token.loc, toklist);
toklist = null;
ptoklist = &toklist;
if (label)
{
s = new AST.LabelStatement(labelloc, label, s);
label = null;
}
statements.push(s);
}
nextToken();
continue;
case TOK.endOfFile:
/* { */
error("matching `}` expected, not end of file");
break;
case TOK.colonColon: // treat as two separate : tokens for iasmgcc
*ptoklist = allocateToken();
memcpy(*ptoklist, &token, Token.sizeof);
(*ptoklist).value = TOK.colon;
ptoklist = &(*ptoklist).next;
*ptoklist = allocateToken();
memcpy(*ptoklist, &token, Token.sizeof);
(*ptoklist).value = TOK.colon;
ptoklist = &(*ptoklist).next;
*ptoklist = null;
nextToken();
continue;
default:
*ptoklist = allocateToken();
memcpy(*ptoklist, &token, Token.sizeof);
ptoklist = &(*ptoklist).next;
*ptoklist = null;
nextToken();
continue;
}
break;
}
nextToken();
auto s = new AST.CompoundAsmStatement(loc, statements, stc);
return s;
}
private void check(Loc loc, TOK value)
{
if (token.value != value)
error(loc, "found `%s` when expecting `%s`", token.toChars(), Token.toChars(value));
nextToken();
}
void check(TOK value)
{
check(token.loc, value);
}
private void check(TOK value, const(char)* string)
{
if (token.value != value)
error("found `%s` when expecting `%s` following %s", token.toChars(), Token.toChars(value), string);
nextToken();
}
private void checkParens(TOK value, AST.Expression e)
{
if (precedence[e.op] == PREC.rel && !e.parens)
error(e.loc, "`%s` must be surrounded by parentheses when next to operator `%s`", e.toChars(), Token.toChars(value));
}
///
private enum NeedDeclaratorId
{
no, // Declarator part must have no identifier
opt, // Declarator part identifier is optional
must, // Declarator part must have identifier
mustIfDstyle, // Declarator part must have identifier, but don't recognize old C-style syntax
}
/************************************
* Determine if the scanner is sitting on the start of a declaration.
* Params:
* t = current token of the scanner
* needId = flag with additional requirements for a declaration
* endtok = ending token
* pt = will be set ending token (if not null)
* Output:
* true if the token `t` is a declaration, false otherwise
*/
private bool isDeclaration(Token* t, NeedDeclaratorId needId, TOK endtok, Token** pt)
{
//printf("isDeclaration(needId = %d)\n", needId);
int haveId = 0;
int haveTpl = 0;
while (1)
{
if ((t.value == TOK.const_ || t.value == TOK.immutable_ || t.value == TOK.inout_ || t.value == TOK.shared_) && peek(t).value != TOK.leftParenthesis)
{
/* const type
* immutable type
* shared type
* wild type
*/
t = peek(t);
continue;
}
break;
}
if (!isBasicType(&t))
{
goto Lisnot;
}
if (!isDeclarator(&t, &haveId, &haveTpl, endtok, needId != NeedDeclaratorId.mustIfDstyle))
goto Lisnot;
if ((needId == NeedDeclaratorId.no && !haveId) ||
(needId == NeedDeclaratorId.opt) ||
(needId == NeedDeclaratorId.must && haveId) ||
(needId == NeedDeclaratorId.mustIfDstyle && haveId))
{
if (pt)
*pt = t;
goto Lis;
}
goto Lisnot;
Lis:
//printf("\tis declaration, t = %s\n", t.toChars());
return true;
Lisnot:
//printf("\tis not declaration\n");
return false;
}
private bool isBasicType(Token** pt)
{
// This code parallels parseBasicType()
Token* t = *pt;
switch (t.value)
{
case TOK.wchar_:
case TOK.dchar_:
case TOK.bool_:
case TOK.char_:
case TOK.int8:
case TOK.uns8:
case TOK.int16:
case TOK.uns16:
case TOK.int32:
case TOK.uns32:
case TOK.int64:
case TOK.uns64:
case TOK.int128:
case TOK.uns128:
case TOK.float32:
case TOK.float64:
case TOK.float80:
case TOK.imaginary32:
case TOK.imaginary64:
case TOK.imaginary80:
case TOK.complex32:
case TOK.complex64:
case TOK.complex80:
case TOK.void_:
t = peek(t);
break;
case TOK.identifier:
L5:
t = peek(t);
if (t.value == TOK.not)
{
goto L4;
}
goto L3;
while (1)
{
L2:
t = peek(t);
L3:
if (t.value == TOK.dot)
{
Ldot:
t = peek(t);
if (t.value != TOK.identifier)
goto Lfalse;
t = peek(t);
if (t.value != TOK.not)
goto L3;
L4:
/* Seen a !
* Look for:
* !( args ), !identifier, etc.
*/
t = peek(t);
switch (t.value)
{
case TOK.identifier:
goto L5;
case TOK.leftParenthesis:
if (!skipParens(t, &t))
goto Lfalse;
goto L3;
case TOK.wchar_:
case TOK.dchar_:
case TOK.bool_:
case TOK.char_:
case TOK.int8:
case TOK.uns8:
case TOK.int16:
case TOK.uns16:
case TOK.int32:
case TOK.uns32:
case TOK.int64:
case TOK.uns64:
case TOK.int128:
case TOK.uns128:
case TOK.float32:
case TOK.float64:
case TOK.float80:
case TOK.imaginary32:
case TOK.imaginary64:
case TOK.imaginary80:
case TOK.complex32:
case TOK.complex64:
case TOK.complex80:
case TOK.void_:
case TOK.int32Literal:
case TOK.uns32Literal:
case TOK.int64Literal:
case TOK.uns64Literal:
case TOK.int128Literal:
case TOK.uns128Literal:
case TOK.float32Literal:
case TOK.float64Literal:
case TOK.float80Literal:
case TOK.imaginary32Literal:
case TOK.imaginary64Literal:
case TOK.imaginary80Literal:
case TOK.null_:
case TOK.true_:
case TOK.false_:
case TOK.charLiteral:
case TOK.wcharLiteral:
case TOK.dcharLiteral:
case TOK.string_:
case TOK.hexadecimalString:
case TOK.file:
case TOK.fileFullPath:
case TOK.line:
case TOK.moduleString:
case TOK.functionString:
case TOK.prettyFunction:
goto L2;
default:
goto Lfalse;
}
}
break;
}
break;
case TOK.dot:
goto Ldot;
case TOK.typeof_:
case TOK.vector:
case TOK.mixin_:
/* typeof(exp).identifier...
*/
t = peek(t);
if (!skipParens(t, &t))
goto Lfalse;
goto L3;
case TOK.traits:
// __traits(getMember
t = peek(t);
if (t.value != TOK.leftParenthesis)
goto Lfalse;
auto lp = t;
t = peek(t);
if (t.value != TOK.identifier || t.ident != Id.getMember)
goto Lfalse;
if (!skipParens(lp, &lp))
goto Lfalse;
// we are in a lookup for decl VS statement
// so we expect a declarator following __trait if it's a type.
// other usages wont be ambiguous (alias, template instance, type qual, etc.)
if (lp.value != TOK.identifier)
goto Lfalse;
break;
case TOK.const_:
case TOK.immutable_:
case TOK.shared_:
case TOK.inout_:
// const(type) or immutable(type) or shared(type) or wild(type)
t = peek(t);
if (t.value != TOK.leftParenthesis)
goto Lfalse;
t = peek(t);
if (!isDeclaration(t, NeedDeclaratorId.no, TOK.rightParenthesis, &t))
{
goto Lfalse;
}
t = peek(t);
break;
default:
goto Lfalse;
}
*pt = t;
//printf("is\n");
return true;
Lfalse:
//printf("is not\n");
return false;
}
private bool isDeclarator(Token** pt, int* haveId, int* haveTpl, TOK endtok, bool allowAltSyntax = true)
{
// This code parallels parseDeclarator()
Token* t = *pt;
int parens;
//printf("Parser::isDeclarator() %s\n", t.toChars());
if (t.value == TOK.assign)
return false;
while (1)
{
parens = false;
switch (t.value)
{
case TOK.mul:
//case TOK.and:
t = peek(t);
continue;
case TOK.leftBracket:
t = peek(t);
if (t.value == TOK.rightBracket)
{
t = peek(t);
}
else if (isDeclaration(t, NeedDeclaratorId.no, TOK.rightBracket, &t))
{
// It's an associative array declaration
t = peek(t);
// ...[type].ident
if (t.value == TOK.dot && peek(t).value == TOK.identifier)
{
t = peek(t);
t = peek(t);
}
}
else
{
// [ expression ]
// [ expression .. expression ]
if (!isExpression(&t))
return false;
if (t.value == TOK.slice)
{
t = peek(t);
if (!isExpression(&t))
return false;
if (t.value != TOK.rightBracket)
return false;
t = peek(t);
}
else
{
if (t.value != TOK.rightBracket)
return false;
t = peek(t);
// ...[index].ident
if (t.value == TOK.dot && peek(t).value == TOK.identifier)
{
t = peek(t);
t = peek(t);
}
}
}
continue;
case TOK.identifier:
if (*haveId)
return false;
*haveId = true;
t = peek(t);
break;
case TOK.leftParenthesis:
if (!allowAltSyntax)
return false; // Do not recognize C-style declarations.
t = peek(t);
if (t.value == TOK.rightParenthesis)
return false; // () is not a declarator
/* Regard ( identifier ) as not a declarator
* BUG: what about ( *identifier ) in
* f(*p)(x);
* where f is a class instance with overloaded () ?
* Should we just disallow C-style function pointer declarations?
*/
if (t.value == TOK.identifier)
{
Token* t2 = peek(t);
if (t2.value == TOK.rightParenthesis)
return false;
}
if (!isDeclarator(&t, haveId, null, TOK.rightParenthesis))
return false;
t = peek(t);
parens = true;
break;
case TOK.delegate_:
case TOK.function_:
t = peek(t);
if (!isParameters(&t))
return false;
skipAttributes(t, &t);
continue;
default:
break;
}
break;
}
while (1)
{
switch (t.value)
{
static if (CARRAYDECL)
{
case TOK.leftBracket:
parens = false;
t = peek(t);
if (t.value == TOK.rightBracket)
{
t = peek(t);
}
else if (isDeclaration(t, NeedDeclaratorId.no, TOK.rightBracket, &t))
{
// It's an associative array declaration
t = peek(t);
}
else
{
// [ expression ]
if (!isExpression(&t))
return false;
if (t.value != TOK.rightBracket)
return false;
t = peek(t);
}
continue;
}
case TOK.leftParenthesis:
parens = false;
if (Token* tk = peekPastParen(t))
{
if (tk.value == TOK.leftParenthesis)
{
if (!haveTpl)
return false;
*haveTpl = 1;
t = tk;
}
else if (tk.value == TOK.assign)
{
if (!haveTpl)
return false;
*haveTpl = 1;
*pt = tk;
return true;
}
}
if (!isParameters(&t))
return false;
while (1)
{
switch (t.value)
{
case TOK.const_:
case TOK.immutable_:
case TOK.shared_:
case TOK.inout_:
case TOK.pure_:
case TOK.nothrow_:
case TOK.return_:
case TOK.scope_:
t = peek(t);
continue;
case TOK.at:
t = peek(t); // skip '@'
t = peek(t); // skip identifier
continue;
default:
break;
}
break;
}
continue;
// Valid tokens that follow a declaration
case TOK.rightParenthesis:
case TOK.rightBracket:
case TOK.assign:
case TOK.comma:
case TOK.dotDotDot:
case TOK.semicolon:
case TOK.leftCurly:
case TOK.in_:
case TOK.out_:
case TOK.do_:
// The !parens is to disallow unnecessary parentheses
if (!parens && (endtok == TOK.reserved || endtok == t.value))
{
*pt = t;
return true;
}
return false;
case TOK.identifier:
if (t.ident == Id._body)
{
// @@@DEPRECATED@@@
// https://github.com/dlang/DIPs/blob/1f5959abe482b1f9094f6484a7d0a3ade77fc2fc/DIPs/accepted/DIP1003.md
// Deprecated in 2.097 - Can be removed from 2.117
// The deprecation period is longer than usual as `body`
// was quite widely used.
deprecation("Usage of the `body` keyword is deprecated. Use `do` instead.");
goto case TOK.do_;
}
goto default;
case TOK.if_:
return haveTpl ? true : false;
// Used for mixin type parsing
case TOK.endOfFile:
if (endtok == TOK.endOfFile)
goto case TOK.do_;
return false;
default:
return false;
}
}
assert(0);
}
private bool isParameters(Token** pt)
{
// This code parallels parseParameterList()
Token* t = *pt;
//printf("isParameters()\n");
if (t.value != TOK.leftParenthesis)
return false;
t = peek(t);
for (; 1; t = peek(t))
{
L1:
switch (t.value)
{
case TOK.rightParenthesis:
break;
case TOK.at:
Token* pastAttr;
if (skipAttributes(t, &pastAttr))
{
t = pastAttr;
goto default;
}
break;
case TOK.dotDotDot:
t = peek(t);
break;
case TOK.in_:
case TOK.out_:
case TOK.ref_:
case TOK.lazy_:
case TOK.scope_:
case TOK.final_:
case TOK.auto_:
case TOK.return_:
continue;
case TOK.const_:
case TOK.immutable_:
case TOK.shared_:
case TOK.inout_:
t = peek(t);
if (t.value == TOK.leftParenthesis)
{
t = peek(t);
if (!isDeclaration(t, NeedDeclaratorId.no, TOK.rightParenthesis, &t))
return false;
t = peek(t); // skip past closing ')'
goto L2;
}
goto L1;
version (none)
{
case TOK.static_:
continue;
case TOK.auto_:
case TOK.alias_:
t = peek(t);
if (t.value == TOK.identifier)
t = peek(t);
if (t.value == TOK.assign)
{
t = peek(t);
if (!isExpression(&t))
return false;
}
goto L3;
}
default:
{
if (!isBasicType(&t))
return false;
L2:
int tmp = false;
if (t.value != TOK.dotDotDot && !isDeclarator(&t, &tmp, null, TOK.reserved))
return false;
if (t.value == TOK.assign)
{
t = peek(t);
if (!isExpression(&t))
return false;
}
if (t.value == TOK.dotDotDot)
{
t = peek(t);
break;
}
}
if (t.value == TOK.comma)
{
continue;
}
break;
}
break;
}
if (t.value != TOK.rightParenthesis)
return false;
t = peek(t);
*pt = t;
return true;
}
private bool isExpression(Token** pt)
{
// This is supposed to determine if something is an expression.
// What it actually does is scan until a closing right bracket
// is found.
Token* t = *pt;
int brnest = 0;
int panest = 0;
int curlynest = 0;
for (;; t = peek(t))
{
switch (t.value)
{
case TOK.leftBracket:
brnest++;
continue;
case TOK.rightBracket:
if (--brnest >= 0)
continue;
break;
case TOK.leftParenthesis:
panest++;
continue;
case TOK.comma:
if (brnest || panest)
continue;
break;
case TOK.rightParenthesis:
if (--panest >= 0)
continue;
break;
case TOK.leftCurly:
curlynest++;
continue;
case TOK.rightCurly:
if (--curlynest >= 0)
continue;
return false;
case TOK.slice:
if (brnest)
continue;
break;
case TOK.semicolon:
if (curlynest)
continue;
return false;
case TOK.endOfFile:
return false;
default:
continue;
}
break;
}
*pt = t;
return true;
}
/*******************************************
* Skip parens, brackets.
* Input:
* t is on opening $(LPAREN)
* Output:
* *pt is set to closing token, which is '$(RPAREN)' on success
* Returns:
* true successful
* false some parsing error
*/
private bool skipParens(Token* t, Token** pt)
{
if (t.value != TOK.leftParenthesis)
return false;
int parens = 0;
while (1)
{
switch (t.value)
{
case TOK.leftParenthesis:
parens++;
break;
case TOK.rightParenthesis:
parens--;
if (parens < 0)
goto Lfalse;
if (parens == 0)
goto Ldone;
break;
case TOK.endOfFile:
goto Lfalse;
default:
break;
}
t = peek(t);
}
Ldone:
if (pt)
*pt = peek(t); // skip found rparen
return true;
Lfalse:
return false;
}
private bool skipParensIf(Token* t, Token** pt)
{
if (t.value != TOK.leftParenthesis)
{
if (pt)
*pt = t;
return true;
}
return skipParens(t, pt);
}
//returns true if the next value (after optional matching parens) is expected
private bool hasOptionalParensThen(Token* t, TOK expected)
{
Token* tk;
if (!skipParensIf(t, &tk))
return false;
return tk.value == expected;
}
/*******************************************
* Skip attributes.
* Input:
* t is on a candidate attribute
* Output:
* *pt is set to first non-attribute token on success
* Returns:
* true successful
* false some parsing error
*/
private bool skipAttributes(Token* t, Token** pt)
{
while (1)
{
switch (t.value)
{
case TOK.const_:
case TOK.immutable_:
case TOK.shared_:
case TOK.inout_:
case TOK.final_:
case TOK.auto_:
case TOK.scope_:
case TOK.override_:
case TOK.abstract_:
case TOK.synchronized_:
break;
case TOK.deprecated_:
if (peek(t).value == TOK.leftParenthesis)
{
t = peek(t);
if (!skipParens(t, &t))
goto Lerror;
// t is on the next of closing parenthesis
continue;
}
break;
case TOK.nothrow_:
case TOK.pure_:
case TOK.ref_:
case TOK.gshared:
case TOK.return_:
break;
case TOK.at:
t = peek(t);
if (t.value == TOK.identifier)
{
/* @identifier
* @identifier!arg
* @identifier!(arglist)
* any of the above followed by (arglist)
* @predefined_attribute
*/
if (isBuiltinAtAttribute(t.ident))
break;
t = peek(t);
if (t.value == TOK.not)
{
t = peek(t);
if (t.value == TOK.leftParenthesis)
{
// @identifier!(arglist)
if (!skipParens(t, &t))
goto Lerror;
// t is on the next of closing parenthesis
}
else
{
// @identifier!arg
// Do low rent skipTemplateArgument
if (t.value == TOK.vector)
{
// identifier!__vector(type)
t = peek(t);
if (!skipParens(t, &t))
goto Lerror;
}
else
t = peek(t);
}
}
if (t.value == TOK.leftParenthesis)
{
if (!skipParens(t, &t))
goto Lerror;
// t is on the next of closing parenthesis
continue;
}
continue;
}
if (t.value == TOK.leftParenthesis)
{
// @( ArgumentList )
if (!skipParens(t, &t))
goto Lerror;
// t is on the next of closing parenthesis
continue;
}
goto Lerror;
default:
goto Ldone;
}
t = peek(t);
}
Ldone:
if (pt)
*pt = t;
return true;
Lerror:
return false;
}
AST.Expression parseExpression()
{
auto loc = token.loc;
//printf("Parser::parseExpression() loc = %d\n", loc.linnum);
auto e = parseAssignExp();
while (token.value == TOK.comma)
{
nextToken();
auto e2 = parseAssignExp();
e = new AST.CommaExp(loc, e, e2, false);
loc = token.loc;
}
return e;
}
/********************************* Expression Parser ***************************/
AST.Expression parsePrimaryExp()
{
AST.Expression e;
AST.Type t;
Identifier id;
const loc = token.loc;
//printf("parsePrimaryExp(): loc = %d\n", loc.linnum);
switch (token.value)
{
case TOK.identifier:
{
if (peekNext() == TOK.arrow)
{
// skip `identifier ->`
nextToken();
nextToken();
error("use `.` for member lookup, not `->`");
goto Lerr;
}
if (peekNext() == TOK.goesTo)
goto case_delegate;
id = token.ident;
nextToken();
TOK save;
if (token.value == TOK.not && (save = peekNext()) != TOK.is_ && save != TOK.in_)
{
// identifier!(template-argument-list)
auto tempinst = new AST.TemplateInstance(loc, id, parseTemplateArguments());
e = new AST.ScopeExp(loc, tempinst);
}
else
e = new AST.IdentifierExp(loc, id);
break;
}
case TOK.dollar:
if (!inBrackets)
error("`$` is valid only inside [] of index or slice");
e = new AST.DollarExp(loc);
nextToken();
break;
case TOK.dot:
// Signal global scope '.' operator with "" identifier
e = new AST.IdentifierExp(loc, Id.empty);
break;
case TOK.this_:
e = new AST.ThisExp(loc);
nextToken();
break;
case TOK.super_:
e = new AST.SuperExp(loc);
nextToken();
break;
case TOK.int32Literal:
e = new AST.IntegerExp(loc, token.intvalue, AST.Type.tint32);
nextToken();
break;
case TOK.uns32Literal:
e = new AST.IntegerExp(loc, token.unsvalue, AST.Type.tuns32);
nextToken();
break;
case TOK.int64Literal:
e = new AST.IntegerExp(loc, token.intvalue, AST.Type.tint64);
nextToken();
break;
case TOK.uns64Literal:
e = new AST.IntegerExp(loc, token.unsvalue, AST.Type.tuns64);
nextToken();
break;
case TOK.float32Literal:
e = new AST.RealExp(loc, token.floatvalue, AST.Type.tfloat32);
nextToken();
break;
case TOK.float64Literal:
e = new AST.RealExp(loc, token.floatvalue, AST.Type.tfloat64);
nextToken();
break;
case TOK.float80Literal:
e = new AST.RealExp(loc, token.floatvalue, AST.Type.tfloat80);
nextToken();
break;
case TOK.imaginary32Literal:
e = new AST.RealExp(loc, token.floatvalue, AST.Type.timaginary32);
nextToken();
break;
case TOK.imaginary64Literal:
e = new AST.RealExp(loc, token.floatvalue, AST.Type.timaginary64);
nextToken();
break;
case TOK.imaginary80Literal:
e = new AST.RealExp(loc, token.floatvalue, AST.Type.timaginary80);
nextToken();
break;
case TOK.null_:
e = new AST.NullExp(loc);
nextToken();
break;
case TOK.file:
{
const(char)* s = loc.filename ? loc.filename : mod.ident.toChars();
e = new AST.StringExp(loc, s.toDString());
nextToken();
break;
}
case TOK.fileFullPath:
{
assert(loc.isValid(), "__FILE_FULL_PATH__ does not work with an invalid location");
const s = FileName.toAbsolute(loc.filename);
e = new AST.StringExp(loc, s.toDString());
nextToken();
break;
}
case TOK.line:
e = new AST.IntegerExp(loc, loc.linnum, AST.Type.tint32);
nextToken();
break;
case TOK.moduleString:
{
const(char)* s = md ? md.toChars() : mod.toChars();
e = new AST.StringExp(loc, s.toDString());
nextToken();
break;
}
case TOK.functionString:
e = new AST.FuncInitExp(loc);
nextToken();
break;
case TOK.prettyFunction:
e = new AST.PrettyFuncInitExp(loc);
nextToken();
break;
case TOK.true_:
e = new AST.IntegerExp(loc, 1, AST.Type.tbool);
nextToken();
break;
case TOK.false_:
e = new AST.IntegerExp(loc, 0, AST.Type.tbool);
nextToken();
break;
case TOK.charLiteral:
e = new AST.IntegerExp(loc, token.unsvalue, AST.Type.tchar);
nextToken();
break;
case TOK.wcharLiteral:
e = new AST.IntegerExp(loc, token.unsvalue, AST.Type.twchar);
nextToken();
break;
case TOK.dcharLiteral:
e = new AST.IntegerExp(loc, token.unsvalue, AST.Type.tdchar);
nextToken();
break;
case TOK.string_:
case TOK.hexadecimalString:
{
// cat adjacent strings
auto s = token.ustring;
auto len = token.len;
auto postfix = token.postfix;
while (1)
{
const prev = token;
nextToken();
if (token.value == TOK.string_ || token.value == TOK.hexadecimalString)
{
if (token.postfix)
{
if (token.postfix != postfix)
error("mismatched string literal postfixes `'%c'` and `'%c'`", postfix, token.postfix);
postfix = token.postfix;
}
error("Implicit string concatenation is error-prone and disallowed in D");
errorSupplemental(token.loc, "Use the explicit syntax instead " ~
"(concatenating literals is `@nogc`): %s ~ %s",
prev.toChars(), token.toChars());
const len1 = len;
const len2 = token.len;
len = len1 + len2;
auto s2 = cast(char*)mem.xmalloc_noscan(len * char.sizeof);
memcpy(s2, s, len1 * char.sizeof);
memcpy(s2 + len1, token.ustring, len2 * char.sizeof);
s = s2;
}
else
break;
}
e = new AST.StringExp(loc, s[0 .. len], len, 1, postfix);
break;
}
case TOK.void_:
t = AST.Type.tvoid;
goto LabelX;
case TOK.int8:
t = AST.Type.tint8;
goto LabelX;
case TOK.uns8:
t = AST.Type.tuns8;
goto LabelX;
case TOK.int16:
t = AST.Type.tint16;
goto LabelX;
case TOK.uns16:
t = AST.Type.tuns16;
goto LabelX;
case TOK.int32:
t = AST.Type.tint32;
goto LabelX;
case TOK.uns32:
t = AST.Type.tuns32;
goto LabelX;
case TOK.int64:
t = AST.Type.tint64;
goto LabelX;
case TOK.uns64:
t = AST.Type.tuns64;
goto LabelX;
case TOK.int128:
t = AST.Type.tint128;
goto LabelX;
case TOK.uns128:
t = AST.Type.tuns128;
goto LabelX;
case TOK.float32:
t = AST.Type.tfloat32;
goto LabelX;
case TOK.float64:
t = AST.Type.tfloat64;
goto LabelX;
case TOK.float80:
t = AST.Type.tfloat80;
goto LabelX;
case TOK.imaginary32:
t = AST.Type.timaginary32;
goto LabelX;
case TOK.imaginary64:
t = AST.Type.timaginary64;
goto LabelX;
case TOK.imaginary80:
t = AST.Type.timaginary80;
goto LabelX;
case TOK.complex32:
t = AST.Type.tcomplex32;
goto LabelX;
case TOK.complex64:
t = AST.Type.tcomplex64;
goto LabelX;
case TOK.complex80:
t = AST.Type.tcomplex80;
goto LabelX;
case TOK.bool_:
t = AST.Type.tbool;
goto LabelX;
case TOK.char_:
t = AST.Type.tchar;
goto LabelX;
case TOK.wchar_:
t = AST.Type.twchar;
goto LabelX;
case TOK.dchar_:
t = AST.Type.tdchar;
goto LabelX;
LabelX:
nextToken();
if (token.value == TOK.leftParenthesis)
{
e = new AST.TypeExp(loc, t);
e = new AST.CallExp(loc, e, parseArguments());
break;
}
check(TOK.dot, t.toChars());
if (token.value != TOK.identifier)
{
error("found `%s` when expecting identifier following `%s`.", token.toChars(), t.toChars());
goto Lerr;
}
e = new AST.DotIdExp(loc, new AST.TypeExp(loc, t), token.ident);
nextToken();
break;
case TOK.typeof_:
{
t = parseTypeof();
e = new AST.TypeExp(loc, t);
break;
}
case TOK.vector:
{
t = parseVector();
e = new AST.TypeExp(loc, t);
break;
}
case TOK.typeid_:
{
nextToken();
check(TOK.leftParenthesis, "`typeid`");
RootObject o = parseTypeOrAssignExp();
check(TOK.rightParenthesis);
e = new AST.TypeidExp(loc, o);
break;
}
case TOK.traits:
{
/* __traits(identifier, args...)
*/
Identifier ident;
AST.Objects* args = null;
nextToken();
check(TOK.leftParenthesis);
if (token.value != TOK.identifier)
{
error("`__traits(identifier, args...)` expected");
goto Lerr;
}
ident = token.ident;
nextToken();
if (token.value == TOK.comma)
args = parseTemplateArgumentList(); // __traits(identifier, args...)
else
check(TOK.rightParenthesis); // __traits(identifier)
e = new AST.TraitsExp(loc, ident, args);
break;
}
case TOK.is_:
{
AST.Type targ;
Identifier ident = null;
AST.Type tspec = null;
TOK tok = TOK.reserved;
TOK tok2 = TOK.reserved;
AST.TemplateParameters* tpl = null;
nextToken();
if (token.value == TOK.leftParenthesis)
{
nextToken();
if (token.value == TOK.identifier && peekNext() == TOK.leftParenthesis)
{
error(loc, "unexpected `(` after `%s`, inside `is` expression. Try enclosing the contents of `is` with a `typeof` expression", token.toChars());
nextToken();
Token* tempTok = peekPastParen(&token);
memcpy(&token, tempTok, Token.sizeof);
goto Lerr;
}
targ = parseType(&ident);
if (token.value == TOK.colon || token.value == TOK.equal)
{
tok = token.value;
nextToken();
if (tok == TOK.equal && (token.value == TOK.struct_ || token.value == TOK.union_
|| token.value == TOK.class_ || token.value == TOK.super_ || token.value == TOK.enum_
|| token.value == TOK.interface_ || token.value == TOK.package_ || token.value == TOK.module_
|| token.value == TOK.argumentTypes || token.value == TOK.parameters
|| token.value == TOK.const_ && peekNext() == TOK.rightParenthesis
|| token.value == TOK.immutable_ && peekNext() == TOK.rightParenthesis
|| token.value == TOK.shared_ && peekNext() == TOK.rightParenthesis
|| token.value == TOK.inout_ && peekNext() == TOK.rightParenthesis || token.value == TOK.function_
|| token.value == TOK.delegate_ || token.value == TOK.return_
|| (token.value == TOK.vector && peekNext() == TOK.rightParenthesis)))
{
tok2 = token.value;
nextToken();
}
else
{
tspec = parseType();
}
}
if (tspec)
{
if (token.value == TOK.comma)
tpl = parseTemplateParameterList(1);
else
{
tpl = new AST.TemplateParameters();
check(TOK.rightParenthesis);
}
}
else
check(TOK.rightParenthesis);
}
else
{
error("`type identifier : specialization` expected following `is`");
goto Lerr;
}
e = new AST.IsExp(loc, targ, ident, tok, tspec, tok2, tpl);
break;
}
case TOK.assert_:
{
// https://dlang.org/spec/expression.html#assert_expressions
AST.Expression msg = null;
nextToken();
check(TOK.leftParenthesis, "`assert`");
e = parseAssignExp();
if (token.value == TOK.comma)
{
nextToken();
if (token.value != TOK.rightParenthesis)
{
msg = parseAssignExp();
if (token.value == TOK.comma)
nextToken();
}
}
check(TOK.rightParenthesis);
e = new AST.AssertExp(loc, e, msg);
break;
}
case TOK.mixin_:
{
// https://dlang.org/spec/expression.html#mixin_expressions
nextToken();
if (token.value != TOK.leftParenthesis)
error("found `%s` when expecting `%s` following %s", token.toChars(), Token.toChars(TOK.leftParenthesis), "`mixin`".ptr);
auto exps = parseArguments();
e = new AST.MixinExp(loc, exps);
break;
}
case TOK.import_:
{
nextToken();
check(TOK.leftParenthesis, "`import`");
e = parseAssignExp();
check(TOK.rightParenthesis);
e = new AST.ImportExp(loc, e);
break;
}
case TOK.new_:
e = parseNewExp(null);
break;
case TOK.ref_:
{
if (peekNext() == TOK.leftParenthesis)
{
Token* tk = peekPastParen(peek(&token));
if (skipAttributes(tk, &tk) && (tk.value == TOK.goesTo || tk.value == TOK.leftCurly))
{
// ref (arguments) => expression
// ref (arguments) { statements... }
goto case_delegate;
}
}
nextToken();
error("found `%s` when expecting function literal following `ref`", token.toChars());
goto Lerr;
}
case TOK.leftParenthesis:
{
Token* tk = peekPastParen(&token);
if (skipAttributes(tk, &tk) && (tk.value == TOK.goesTo || tk.value == TOK.leftCurly))
{
// (arguments) => expression
// (arguments) { statements... }
goto case_delegate;
}
// ( expression )
nextToken();
e = parseExpression();
e.parens = 1;
check(loc, TOK.rightParenthesis);
break;
}
case TOK.leftBracket:
{
/* Parse array literals and associative array literals:
* [ value, value, value ... ]
* [ key:value, key:value, key:value ... ]
*/
auto values = new AST.Expressions();
AST.Expressions* keys = null;
nextToken();
while (token.value != TOK.rightBracket && token.value != TOK.endOfFile)
{
e = parseAssignExp();
if (token.value == TOK.colon && (keys || values.dim == 0))
{
nextToken();
if (!keys)
keys = new AST.Expressions();
keys.push(e);
e = parseAssignExp();
}
else if (keys)
{
error("`key:value` expected for associative array literal");
keys = null;
}
values.push(e);
if (token.value == TOK.rightBracket)
break;
check(TOK.comma);
}
check(loc, TOK.rightBracket);
if (keys)
e = new AST.AssocArrayLiteralExp(loc, keys, values);
else
e = new AST.ArrayLiteralExp(loc, null, values);
break;
}
case TOK.leftCurly:
case TOK.function_:
case TOK.delegate_:
case_delegate:
{
AST.Dsymbol s = parseFunctionLiteral();
e = new AST.FuncExp(loc, s);
break;
}
default:
error("expression expected, not `%s`", token.toChars());
Lerr:
// Anything for e, as long as it's not NULL
e = new AST.IntegerExp(loc, 0, AST.Type.tint32);
nextToken();
break;
}
return e;
}
private AST.Expression parseUnaryExp()
{
AST.Expression e;
const loc = token.loc;
switch (token.value)
{
case TOK.and:
nextToken();
e = parseUnaryExp();
e = new AST.AddrExp(loc, e);
break;
case TOK.plusPlus:
nextToken();
e = parseUnaryExp();
//e = new AddAssignExp(loc, e, new IntegerExp(loc, 1, Type::tint32));
e = new AST.PreExp(TOK.prePlusPlus, loc, e);
break;
case TOK.minusMinus:
nextToken();
e = parseUnaryExp();
//e = new MinAssignExp(loc, e, new IntegerExp(loc, 1, Type::tint32));
e = new AST.PreExp(TOK.preMinusMinus, loc, e);
break;
case TOK.mul:
nextToken();
e = parseUnaryExp();
e = new AST.PtrExp(loc, e);
break;
case TOK.min:
nextToken();
e = parseUnaryExp();
e = new AST.NegExp(loc, e);
break;
case TOK.add:
nextToken();
e = parseUnaryExp();
e = new AST.UAddExp(loc, e);
break;
case TOK.not:
nextToken();
e = parseUnaryExp();
e = new AST.NotExp(loc, e);
break;
case TOK.tilde:
nextToken();
e = parseUnaryExp();
e = new AST.ComExp(loc, e);
break;
case TOK.delete_:
nextToken();
e = parseUnaryExp();
e = new AST.DeleteExp(loc, e, false);
break;
case TOK.cast_: // cast(type) expression
{
nextToken();
check(TOK.leftParenthesis);
/* Look for cast(), cast(const), cast(immutable),
* cast(shared), cast(shared const), cast(wild), cast(shared wild)
*/
ubyte m = 0;
while (1)
{
switch (token.value)
{
case TOK.const_:
if (peekNext() == TOK.leftParenthesis)
break; // const as type constructor
m |= AST.MODFlags.const_; // const as storage class
nextToken();
continue;
case TOK.immutable_:
if (peekNext() == TOK.leftParenthesis)
break;
m |= AST.MODFlags.immutable_;
nextToken();
continue;
case TOK.shared_:
if (peekNext() == TOK.leftParenthesis)
break;
m |= AST.MODFlags.shared_;
nextToken();
continue;
case TOK.inout_:
if (peekNext() == TOK.leftParenthesis)
break;
m |= AST.MODFlags.wild;
nextToken();
continue;
default:
break;
}
break;
}
if (token.value == TOK.rightParenthesis)
{
nextToken();
e = parseUnaryExp();
e = new AST.CastExp(loc, e, m);
}
else
{
AST.Type t = parseType(); // cast( type )
t = t.addMod(m); // cast( const type )
check(TOK.rightParenthesis);
e = parseUnaryExp();
e = new AST.CastExp(loc, e, t);
}
break;
}
case TOK.inout_:
case TOK.shared_:
case TOK.const_:
case TOK.immutable_: // immutable(type)(arguments) / immutable(type).init
{
StorageClass stc = parseTypeCtor();
AST.Type t = parseBasicType();
t = t.addSTC(stc);
if (stc == 0 && token.value == TOK.dot)
{
nextToken();
if (token.value != TOK.identifier)
{
error("identifier expected following `(type)`.");
return null;
}
e = new AST.DotIdExp(loc, new AST.TypeExp(loc, t), token.ident);
nextToken();
e = parsePostExp(e);
}
else
{
e = new AST.TypeExp(loc, t);
if (token.value != TOK.leftParenthesis)
{
error("`(arguments)` expected following `%s`", t.toChars());
return e;
}
e = new AST.CallExp(loc, e, parseArguments());
}
break;
}
case TOK.leftParenthesis:
{
auto tk = peek(&token);
static if (CCASTSYNTAX)
{
// If cast
if (isDeclaration(tk, NeedDeclaratorId.no, TOK.rightParenthesis, &tk))
{
tk = peek(tk); // skip over right parenthesis
switch (tk.value)
{
case TOK.not:
tk = peek(tk);
if (tk.value == TOK.is_ || tk.value == TOK.in_) // !is or !in
break;
goto case;
case TOK.dot:
case TOK.plusPlus:
case TOK.minusMinus:
case TOK.delete_:
case TOK.new_:
case TOK.leftParenthesis:
case TOK.identifier:
case TOK.this_:
case TOK.super_:
case TOK.int32Literal:
case TOK.uns32Literal:
case TOK.int64Literal:
case TOK.uns64Literal:
case TOK.int128Literal:
case TOK.uns128Literal:
case TOK.float32Literal:
case TOK.float64Literal:
case TOK.float80Literal:
case TOK.imaginary32Literal:
case TOK.imaginary64Literal:
case TOK.imaginary80Literal:
case TOK.null_:
case TOK.true_:
case TOK.false_:
case TOK.charLiteral:
case TOK.wcharLiteral:
case TOK.dcharLiteral:
case TOK.string_:
version (none)
{
case TOK.tilde:
case TOK.and:
case TOK.mul:
case TOK.min:
case TOK.add:
}
case TOK.function_:
case TOK.delegate_:
case TOK.typeof_:
case TOK.traits:
case TOK.vector:
case TOK.file:
case TOK.fileFullPath:
case TOK.line:
case TOK.moduleString:
case TOK.functionString:
case TOK.prettyFunction:
case TOK.wchar_:
case TOK.dchar_:
case TOK.bool_:
case TOK.char_:
case TOK.int8:
case TOK.uns8:
case TOK.int16:
case TOK.uns16:
case TOK.int32:
case TOK.uns32:
case TOK.int64:
case TOK.uns64:
case TOK.int128:
case TOK.uns128:
case TOK.float32:
case TOK.float64:
case TOK.float80:
case TOK.imaginary32:
case TOK.imaginary64:
case TOK.imaginary80:
case TOK.complex32:
case TOK.complex64:
case TOK.complex80:
case TOK.void_:
{
// (type) una_exp
nextToken();
auto t = parseType();
check(TOK.rightParenthesis);
// if .identifier
// or .identifier!( ... )
if (token.value == TOK.dot)
{
if (peekNext() != TOK.identifier && peekNext() != TOK.new_)
{
error("identifier or new keyword expected following `(...)`.");
return null;
}
e = new AST.TypeExp(loc, t);
e.parens = true;
e = parsePostExp(e);
}
else
{
e = parseUnaryExp();
e = new AST.CastExp(loc, e, t);
error("C style cast illegal, use `%s`", e.toChars());
}
return e;
}
default:
break;
}
}
}
e = parsePrimaryExp();
e = parsePostExp(e);
break;
}
default:
e = parsePrimaryExp();
e = parsePostExp(e);
break;
}
assert(e);
// ^^ is right associative and has higher precedence than the unary operators
while (token.value == TOK.pow)
{
nextToken();
AST.Expression e2 = parseUnaryExp();
e = new AST.PowExp(loc, e, e2);
}
return e;
}
private AST.Expression parsePostExp(AST.Expression e)
{
while (1)
{
const loc = token.loc;
switch (token.value)
{
case TOK.dot:
nextToken();
if (token.value == TOK.identifier)
{
Identifier id = token.ident;
nextToken();
if (token.value == TOK.not && peekNext() != TOK.is_ && peekNext() != TOK.in_)
{
AST.Objects* tiargs = parseTemplateArguments();
e = new AST.DotTemplateInstanceExp(loc, e, id, tiargs);
}
else
e = new AST.DotIdExp(loc, e, id);
continue;
}
if (token.value == TOK.new_)
{
e = parseNewExp(e);
continue;
}
error("identifier or `new` expected following `.`, not `%s`", token.toChars());
break;
case TOK.plusPlus:
e = new AST.PostExp(TOK.plusPlus, loc, e);
break;
case TOK.minusMinus:
e = new AST.PostExp(TOK.minusMinus, loc, e);
break;
case TOK.leftParenthesis:
e = new AST.CallExp(loc, e, parseArguments());
continue;
case TOK.leftBracket:
{
// array dereferences:
// array[index]
// array[]
// array[lwr .. upr]
AST.Expression index;
AST.Expression upr;
auto arguments = new AST.Expressions();
inBrackets++;
nextToken();
while (token.value != TOK.rightBracket && token.value != TOK.endOfFile)
{
index = parseAssignExp();
if (token.value == TOK.slice)
{
// array[..., lwr..upr, ...]
nextToken();
upr = parseAssignExp();
arguments.push(new AST.IntervalExp(loc, index, upr));
}
else
arguments.push(index);
if (token.value == TOK.rightBracket)
break;
check(TOK.comma);
}
check(TOK.rightBracket);
inBrackets--;
e = new AST.ArrayExp(loc, e, arguments);
continue;
}
default:
return e;
}
nextToken();
}
}
private AST.Expression parseMulExp()
{
const loc = token.loc;
auto e = parseUnaryExp();
while (1)
{
switch (token.value)
{
case TOK.mul:
nextToken();
auto e2 = parseUnaryExp();
e = new AST.MulExp(loc, e, e2);
continue;
case TOK.div:
nextToken();
auto e2 = parseUnaryExp();
e = new AST.DivExp(loc, e, e2);
continue;
case TOK.mod:
nextToken();
auto e2 = parseUnaryExp();
e = new AST.ModExp(loc, e, e2);
continue;
default:
break;
}
break;
}
return e;
}
private AST.Expression parseAddExp()
{
const loc = token.loc;
auto e = parseMulExp();
while (1)
{
switch (token.value)
{
case TOK.add:
nextToken();
auto e2 = parseMulExp();
e = new AST.AddExp(loc, e, e2);
continue;
case TOK.min:
nextToken();
auto e2 = parseMulExp();
e = new AST.MinExp(loc, e, e2);
continue;
case TOK.tilde:
nextToken();
auto e2 = parseMulExp();
e = new AST.CatExp(loc, e, e2);
continue;
default:
break;
}
break;
}
return e;
}
private AST.Expression parseShiftExp()
{
const loc = token.loc;
auto e = parseAddExp();
while (1)
{
switch (token.value)
{
case TOK.leftShift:
nextToken();
auto e2 = parseAddExp();
e = new AST.ShlExp(loc, e, e2);
continue;
case TOK.rightShift:
nextToken();
auto e2 = parseAddExp();
e = new AST.ShrExp(loc, e, e2);
continue;
case TOK.unsignedRightShift:
nextToken();
auto e2 = parseAddExp();
e = new AST.UshrExp(loc, e, e2);
continue;
default:
break;
}
break;
}
return e;
}
private AST.Expression parseCmpExp()
{
const loc = token.loc;
auto e = parseShiftExp();
TOK op = token.value;
switch (op)
{
case TOK.equal:
case TOK.notEqual:
nextToken();
auto e2 = parseShiftExp();
e = new AST.EqualExp(op, loc, e, e2);
break;
case TOK.is_:
op = TOK.identity;
goto L1;
case TOK.not:
{
// Attempt to identify '!is'
const tv = peekNext();
if (tv == TOK.in_)
{
nextToken();
nextToken();
auto e2 = parseShiftExp();
e = new AST.InExp(loc, e, e2);
e = new AST.NotExp(loc, e);
break;
}
if (tv != TOK.is_)
break;
nextToken();
op = TOK.notIdentity;
goto L1;
}
L1:
nextToken();
auto e2 = parseShiftExp();
e = new AST.IdentityExp(op, loc, e, e2);
break;
case TOK.lessThan:
case TOK.lessOrEqual:
case TOK.greaterThan:
case TOK.greaterOrEqual:
nextToken();
auto e2 = parseShiftExp();
e = new AST.CmpExp(op, loc, e, e2);
break;
case TOK.in_:
nextToken();
auto e2 = parseShiftExp();
e = new AST.InExp(loc, e, e2);
break;
default:
break;
}
return e;
}
private AST.Expression parseAndExp()
{
Loc loc = token.loc;
auto e = parseCmpExp();
while (token.value == TOK.and)
{
checkParens(TOK.and, e);
nextToken();
auto e2 = parseCmpExp();
checkParens(TOK.and, e2);
e = new AST.AndExp(loc, e, e2);
loc = token.loc;
}
return e;
}
private AST.Expression parseXorExp()
{
const loc = token.loc;
auto e = parseAndExp();
while (token.value == TOK.xor)
{
checkParens(TOK.xor, e);
nextToken();
auto e2 = parseAndExp();
checkParens(TOK.xor, e2);
e = new AST.XorExp(loc, e, e2);
}
return e;
}
private AST.Expression parseOrExp()
{
const loc = token.loc;
auto e = parseXorExp();
while (token.value == TOK.or)
{
checkParens(TOK.or, e);
nextToken();
auto e2 = parseXorExp();
checkParens(TOK.or, e2);
e = new AST.OrExp(loc, e, e2);
}
return e;
}
private AST.Expression parseAndAndExp()
{
const loc = token.loc;
auto e = parseOrExp();
while (token.value == TOK.andAnd)
{
nextToken();
auto e2 = parseOrExp();
e = new AST.LogicalExp(loc, TOK.andAnd, e, e2);
}
return e;
}
private AST.Expression parseOrOrExp()
{
const loc = token.loc;
auto e = parseAndAndExp();
while (token.value == TOK.orOr)
{
nextToken();
auto e2 = parseAndAndExp();
e = new AST.LogicalExp(loc, TOK.orOr, e, e2);
}
return e;
}
private AST.Expression parseCondExp()
{
const loc = token.loc;
auto e = parseOrOrExp();
if (token.value == TOK.question)
{
nextToken();
auto e1 = parseExpression();
check(TOK.colon);
auto e2 = parseCondExp();
e = new AST.CondExp(loc, e, e1, e2);
}
return e;
}
AST.Expression parseAssignExp()
{
AST.Expression e;
e = parseCondExp();
if (e is null)
return e;
// require parens for e.g. `t ? a = 1 : b = 2`
if (e.op == TOK.question && !e.parens && precedence[token.value] == PREC.assign)
dmd.errors.error(e.loc, "`%s` must be surrounded by parentheses when next to operator `%s`",
e.toChars(), Token.toChars(token.value));
const loc = token.loc;
switch (token.value)
{
case TOK.assign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.AssignExp(loc, e, e2);
break;
case TOK.addAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.AddAssignExp(loc, e, e2);
break;
case TOK.minAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.MinAssignExp(loc, e, e2);
break;
case TOK.mulAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.MulAssignExp(loc, e, e2);
break;
case TOK.divAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.DivAssignExp(loc, e, e2);
break;
case TOK.modAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.ModAssignExp(loc, e, e2);
break;
case TOK.powAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.PowAssignExp(loc, e, e2);
break;
case TOK.andAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.AndAssignExp(loc, e, e2);
break;
case TOK.orAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.OrAssignExp(loc, e, e2);
break;
case TOK.xorAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.XorAssignExp(loc, e, e2);
break;
case TOK.leftShiftAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.ShlAssignExp(loc, e, e2);
break;
case TOK.rightShiftAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.ShrAssignExp(loc, e, e2);
break;
case TOK.unsignedRightShiftAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.UshrAssignExp(loc, e, e2);
break;
case TOK.concatenateAssign:
nextToken();
auto e2 = parseAssignExp();
e = new AST.CatAssignExp(loc, e, e2);
break;
default:
break;
}
return e;
}
/*************************
* Collect argument list.
* Assume current token is ',', '$(LPAREN)' or '['.
*/
private AST.Expressions* parseArguments()
{
// function call
AST.Expressions* arguments;
arguments = new AST.Expressions();
const endtok = token.value == TOK.leftBracket ? TOK.rightBracket : TOK.rightParenthesis;
nextToken();
while (token.value != endtok && token.value != TOK.endOfFile)
{
auto arg = parseAssignExp();
arguments.push(arg);
if (token.value != TOK.comma)
break;
nextToken(); //comma
}
check(endtok);
return arguments;
}
/*******************************************
*/
private AST.Expression parseNewExp(AST.Expression thisexp)
{
const loc = token.loc;
nextToken();
AST.Expressions* newargs = null;
AST.Expressions* arguments = null;
if (token.value == TOK.leftParenthesis)
{
newargs = parseArguments();
}
// An anonymous nested class starts with "class"
if (token.value == TOK.class_)
{
nextToken();
if (token.value == TOK.leftParenthesis)
arguments = parseArguments();
AST.BaseClasses* baseclasses = null;
if (token.value != TOK.leftCurly)
baseclasses = parseBaseClasses();
Identifier id = null;
AST.Dsymbols* members = null;
if (token.value != TOK.leftCurly)
{
error("`{ members }` expected for anonymous class");
}
else
{
nextToken();
members = parseDeclDefs(0);
if (token.value != TOK.rightCurly)
error("class member expected");
nextToken();
}
auto cd = new AST.ClassDeclaration(loc, id, baseclasses, members, false);
auto e = new AST.NewAnonClassExp(loc, thisexp, newargs, cd, arguments);
return e;
}
const stc = parseTypeCtor();
auto t = parseBasicType(true);
t = parseTypeSuffixes(t);
t = t.addSTC(stc);
if (t.ty == AST.Taarray)
{
AST.TypeAArray taa = cast(AST.TypeAArray)t;
AST.Type index = taa.index;
auto edim = AST.typeToExpression(index);
if (!edim)
{
error("cannot create a `%s` with `new`", t.toChars);
return new AST.NullExp(loc);
}
t = new AST.TypeSArray(taa.next, edim);
}
else if (token.value == TOK.leftParenthesis && t.ty != AST.Tsarray)
{
arguments = parseArguments();
}
auto e = new AST.NewExp(loc, thisexp, newargs, t, arguments);
return e;
}
/**********************************************
*/
private void addComment(AST.Dsymbol s, const(char)* blockComment)
{
if (s !is null)
this.addComment(s, blockComment.toDString());
}
private void addComment(AST.Dsymbol s, const(char)[] blockComment)
{
if (s !is null)
{
s.addComment(combineComments(blockComment, token.lineComment, true));
token.lineComment = null;
}
}
/**********************************************
* Recognize builtin @ attributes
* Params:
* ident = identifier
* Returns:
* storage class for attribute, 0 if not
*/
static StorageClass isBuiltinAtAttribute(Identifier ident)
{
return (ident == Id.property) ? AST.STC.property :
(ident == Id.nogc) ? AST.STC.nogc :
(ident == Id.safe) ? AST.STC.safe :
(ident == Id.trusted) ? AST.STC.trusted :
(ident == Id.system) ? AST.STC.system :
(ident == Id.live) ? AST.STC.live :
(ident == Id.future) ? AST.STC.future :
(ident == Id.disable) ? AST.STC.disable :
0;
}
enum StorageClass atAttrGroup =
AST.STC.property |
AST.STC.nogc |
AST.STC.safe |
AST.STC.trusted |
AST.STC.system |
AST.STC.live |
/*AST.STC.future |*/ // probably should be included
AST.STC.disable;
}
enum PREC : int
{
zero,
expr,
assign,
cond,
oror,
andand,
or,
xor,
and,
equal,
rel,
shift,
add,
mul,
pow,
unary,
primary,
}
|
D
|
const int VALUE_SWORDBLADE = 10;
const int VALUE_SWORDBLADEHOT = 10;
const int VALUE_SWORDRAWHOT = 10;
const int VALUE_SWORDRAW = 10;
const int VALUE_BRUSH = 3;
const int VALUE_FLASK = 3;
const int VALUE_STOMPER = 3;
const int VALUE_PAN = 20;
const int VALUE_SAW = 20;
const int VALUE_BROOM = 10;
const int VALUE_RAKE = 10;
const int VALUE_HAMMER = 10;
const int VALUE_SCOOP = 3;
const int VALUE_NUGGET = 200;
const int VALUE_JOINT = 30;
const int VALUE_ALARMHORN = 10;
const int VALUE_LUTE = 10;
const int VALUE_GOLD = 1;
const int VALUE_RUNEBLANK = 100;
const int VALUE_SULFUR = 20;
const int VALUE_QUARTZ = 20;
const int VALUE_PITCH = 10;
const int VALUE_ROCKCRYSTAL = 30;
const int VALUE_AQUAMARINE = 100;
const int VALUE_HOLYWATER = 20;
const int VALUE_COAL = 15;
const int VALUE_DARKPEARL = 1000;
const int VALUE_ITMI_APFELTABAK = 10;
const int VALUE_ITMI_PILZTABAK = 10;
const int VALUE_ITMI_SUMPFTABAK = 10;
const int VALUE_ITMI_DOPPELTABAK = 10;
const int VALUE_ITMI_HONIGTABAK = 10;
const int VALUE_SILVERRING = 120;
const int VALUE_SILVERNECKLACE = 200;
const int VALUE_SILVERCANDLEHOLDER = 50;
const int VALUE_SILVERPLATE = 100;
const int VALUE_SILVERCUP = 100;
const int VALUE_SILVERCHALICE = 250;
const int VALUE_GOLDPLATE = 200;
const int VALUE_GOLDRING = 250;
const int VALUE_GOLDNECKLACE = 300;
const int VALUE_GOLDCANDLEHOLDER = 120;
const int VALUE_GOLDCUP = 350;
const int VALUE_BLOODCUP = 200;
const int VALUE_GOLDCHALICE = 500;
const int VALUE_GOLDCHEST = 750;
const int VALUE_JEWELERYCHEST = 1000;
const int VALUE_INNOSSTATUE = 100;
const int VALUE_SEXTANT = 1500;
instance ITMI_STOMPER(C_ITEM)
{
name = "Давилка";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_STOMPER;
visual = "ItMi_Stomper.3DS";
material = MAT_WOOD;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_RUNEBLANK(C_ITEM)
{
name = "Рунный камень";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_RUNEBLANK;
visual = "ItMi_RuneBlank.3DS";
material = MAT_STONE;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_PLIERS(C_ITEM)
{
name = "Щипцы";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_RUNEBLANK;
visual = "ItMi_Pliers.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_FLASK(C_ITEM)
{
name = "Мензурка";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_FLASK;
visual = "ItMi_Flask.3ds";
material = MAT_GLAS;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_HAMMER(C_ITEM)
{
name = "Молоток";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_HAMMER;
visual = "ItMi_Hammer.3DS";
material = MAT_WOOD;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_SCOOP(C_ITEM)
{
name = "Ложка";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SCOOP;
visual = "ItMi_Scoop.3DS";
material = MAT_WOOD;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_PAN(C_ITEM)
{
name = "Сковорода";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_PAN;
visual = "ItMi_Pan.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_PANFULL(C_ITEM)
{
name = "Сковорода";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_PAN;
visual = "ItMi_PanFull.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_SAW(C_ITEM)
{
name = "Пила";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SAW;
visual = "ItMi_Saw.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMISWORDRAW(C_ITEM)
{
name = "Сырая сталь";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SWORDRAW;
visual = "ItMiSwordraw.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMISWORDRAWHOT(C_ITEM)
{
name = "Раскаленная сталь";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SWORDRAWHOT;
visual = "ItMiSwordrawhot.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMISWORDBLADEHOT(C_ITEM)
{
name = "Раскаленный клинок";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SWORDBLADEHOT;
visual = "ItMiSwordbladehot.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMISWORDBLADE(C_ITEM)
{
name = "Клинок";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SWORDBLADE;
visual = "ItMiSwordblade.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_RAKE(C_ITEM)
{
name = "Тяпка";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_RAKE;
visual = "ItMi_Rake.3DS";
material = MAT_WOOD;
scemename = "RAKE";
on_state[0] = use_rake;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
func void use_rake()
{
};
instance ITMI_BROOM(C_ITEM)
{
name = "Метла";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_BROOM;
visual = "ItMi_Broom.3DS";
material = MAT_WOOD;
scemename = "BROOM";
on_state[0] = use_broom;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
func void use_broom()
{
if(Npc_IsPlayer(self) && (Wld_GetPlayerPortalGuild() == GIL_NOV) && (MIS_PARLANFEGEN == LOG_RUNNING))
{
b_say(self,self,"$NOSWEEPING");
Print(PRINT_NOSWEEPING);
};
};
instance ITMI_LUTE(C_ITEM)
{
name = "Лютня";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_LUTE;
visual = "ItMi_Lute.3DS";
material = MAT_WOOD;
scemename = "LUTE";
on_state[0] = use_lute;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
func void use_lute()
{
};
instance ITMI_BRUSH(C_ITEM)
{
name = "Щетка";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_BRUSH;
visual = "ItMi_Brush.3ds";
material = MAT_WOOD;
scemename = "BRUSH";
on_state[0] = use_brush;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
func void use_brush()
{
};
instance ITMI_JOINT(C_ITEM)
{
name = "Косяк из болотной травы";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_JOINT;
visual = "ItMi_Joint.3ds";
material = MAT_LEATHER;
scemename = "JOINT";
on_state[0] = use_joint;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = 200;
};
func void use_joint()
{
if(Npc_IsPlayer(self))
{
Wld_PlayEffect("SLOW_TIME",self,self,0,0,0,FALSE);
};
};
instance ITMI_PACKET(C_ITEM)
{
name = "Пакет";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = 0;
visual = "ItMi_Packet.3ds";
scemename = "MAPSEALED";
material = MAT_LEATHER;
description = name;
};
func void usepacket()
{
};
instance ITMI_POCKET(C_ITEM)
{
name = NAME_BEUTEL;
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = 10;
visual = "ItMi_Pocket.3ds";
scemename = "MAPSEALED";
material = MAT_LEATHER;
on_state[0] = usepocket;
description = name;
text[2] = "Небольшой мешочек,";
text[3] = "не очень тяжелый.";
text[5] = NAME_VALUE;
count[5] = value;
};
func void usepocket()
{
CreateInvItems(hero,itmi_gold,10);
Print(PRINT_FOUNDGOLD10);
Snd_Play("Geldbeutel");
};
instance ITMI_NUGGET(C_ITEM)
{
name = "Кусок руды";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_NUGGET;
visual = "ItMi_Nugget.3ds";
material = MAT_STONE;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = INVCAM_ENTF_MISC2_STANDARD;
};
instance ITMI_GOLD(C_ITEM)
{
name = "Золото";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_GOLD;
visual = "ItMi_Gold.3DS";
material = MAT_STONE;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = INVCAM_ENTF_MISC2_STANDARD;
};
instance ITMI_OLDCOIN(C_ITEM)
{
name = "Старая монета";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI | ITEM_MISSION;
value = 0;
visual = "ItMi_OldCoin.3DS";
material = MAT_METAL;
description = name;
inv_zbias = INVCAM_ENTF_MISC2_STANDARD;
};
instance ITMI_GOLDCANDLEHOLDER(C_ITEM)
{
name = "Золотой подсвечник";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_GOLDCANDLEHOLDER;
visual = "ItMi_GoldCandleHolder.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_GOLDNECKLACE(C_ITEM)
{
name = "Золотое ожерелье";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI | ITEM_AMULET;
value = VALUE_GOLDNECKLACE;
visual = "ItMi_GoldNecklace_Chain.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = 190;
};
instance ITMI_SILVERRING(C_ITEM)
{
name = "Серебряное кольцо";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI | ITEM_RING;
value = VALUE_SILVERRING;
visual = "ItMi_SilverRing.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = INVCAM_ENTF_RING_STANDARD;
inv_rotz = INVCAM_Z_RING_STANDARD;
inv_rotx = INVCAM_X_RING_STANDARD;
};
instance ITMI_SILVERCUP(C_ITEM)
{
name = "Серебряный кубок";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SILVERCUP;
visual = "ItMi_SilverCup.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_SILVERPLATE(C_ITEM)
{
name = "Серебряная тарелка";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SILVERPLATE;
visual = "ItMi_SilverPlate.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_GOLDPLATE(C_ITEM)
{
name = "Золотая тарелка";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_GOLDPLATE;
visual = "ItMi_GoldPlate.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_GOLDCUP(C_ITEM)
{
name = "Золотой кубок";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_GOLDCUP;
visual = "ItMi_GoldCup.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_BLOODCUP_MIS(C_ITEM)
{
name = "Кровавый кубок";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI | ITEM_MISSION;
value = VALUE_BLOODCUP;
visual = "ItMi_BloodCup.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_GOLDRING(C_ITEM)
{
name = "Золотое кольцо";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI | ITEM_RING;
value = VALUE_GOLDRING;
visual = "ItMi_GoldRing.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = INVCAM_ENTF_RING_STANDARD;
inv_rotz = INVCAM_Z_RING_STANDARD;
inv_rotx = INVCAM_X_RING_STANDARD;
};
instance ITMI_SILVERCHALICE(C_ITEM)
{
name = "Серебряная чаша";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SILVERCHALICE;
visual = "ItMi_SilverChalice.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_JEWELERYCHEST(C_ITEM)
{
name = "Шкатулка с драгоценностями";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_JEWELERYCHEST;
visual = "ItMi_JeweleryChest.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_GOLDCHALICE(C_ITEM)
{
name = "Золотая чаша";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_GOLDCHALICE;
visual = "ItMi_GoldChalice.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_GOLDCHEST(C_ITEM)
{
name = "Шкатулка";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_GOLDCHEST;
visual = "ItMi_GoldChest.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_INNOSSTATUE(C_ITEM)
{
name = "Статуя Инноса";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_INNOSSTATUE;
visual = "ItMi_InnosStatue.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_SEXTANT(C_ITEM)
{
name = "Секстант";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SEXTANT;
visual = "ItMi_Sextant.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_SILVERCANDLEHOLDER(C_ITEM)
{
name = "Серебряный подсвечник";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SILVERCANDLEHOLDER;
visual = "ItMi_SilverCandleHolder.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_SILVERNECKLACE(C_ITEM)
{
name = "Серебряное ожерелье";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI | ITEM_AMULET;
value = VALUE_SILVERNECKLACE;
visual = "ItMi_SilverNecklace_Chain.3DS";
material = MAT_METAL;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = 190;
};
instance ITMI_SULFUR(C_ITEM)
{
name = "Сера";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_SULFUR;
visual = "ItMi_Sulfur.3DS";
material = MAT_WOOD;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = INVCAM_ENTF_MISC2_STANDARD;
};
instance ITMI_QUARTZ(C_ITEM)
{
name = "Ледяной кварц";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_QUARTZ;
visual = "ItMi_Quartz.3ds";
material = MAT_STONE;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = 300;
};
instance ITMI_PITCH(C_ITEM)
{
name = "Смола";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_PITCH;
visual = "ItMi_Pitch.3DS";
material = MAT_GLAS;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_ROCKCRYSTAL(C_ITEM)
{
name = "Горный хрусталь";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_ROCKCRYSTAL;
visual = "ItMi_Rockcrystal.3ds";
material = MAT_STONE;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_AQUAMARINE(C_ITEM)
{
name = "Аквамарин";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_AQUAMARINE;
visual = "ItMi_Aquamarine.3ds";
material = MAT_STONE;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = INVCAM_ENTF_MISC_STANDARD;
};
instance ITMI_HOLYWATER(C_ITEM)
{
name = "Святая вода";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_HOLYWATER;
visual = "ItMi_HolyWater.3ds";
material = MAT_GLAS;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
};
instance ITMI_COAL(C_ITEM)
{
name = "Уголь";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_COAL;
visual = "ItMi_Coal.3ds";
material = MAT_STONE;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = INVCAM_ENTF_MISC_STANDARD;
};
instance ITMI_DARKPEARL(C_ITEM)
{
name = "Черная жемчужина";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = VALUE_DARKPEARL;
visual = "ItMi_DarkPearl.3ds";
material = MAT_STONE;
description = name;
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = INVCAM_ENTF_MISC_STANDARD;
};
instance ITMI_APFELTABAK(C_ITEM)
{
name = "Яблочный табак";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = value_itmi_apfeltabak;
visual = "ItMi_FoodPocket.3ds";
material = MAT_LEATHER;
description = name;
text[2] = "Кисет с яблочным табаком.";
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = 190;
};
instance ITMI_PILZTABAK(C_ITEM)
{
name = "Грибной табак";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = value_itmi_pilztabak;
visual = "ItMi_FoodPocket.3ds";
material = MAT_LEATHER;
description = name;
text[2] = "Темный яблочно-грибной табак";
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = 190;
};
instance ITMI_DOPPELTABAK(C_ITEM)
{
name = "Двойное яблоко";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = value_itmi_doppeltabak;
visual = "ItMi_FoodPocket.3ds";
material = MAT_LEATHER;
description = name;
text[2] = "На вкус похоже на яблоко...";
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = 190;
};
instance ITMI_HONIGTABAK(C_ITEM)
{
name = "Медовый табак";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = value_itmi_honigtabak;
visual = "ItMi_FoodPocket.3ds";
material = MAT_LEATHER;
description = name;
text[2] = "Сладкий яблочный табак";
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = 190;
};
instance ITMI_SUMPFTABAK(C_ITEM)
{
name = "Травяной табак";
mainflag = ITEM_KAT_NONE;
flags = ITEM_MULTI;
value = value_itmi_sumpftabak;
visual = "ItMi_FoodPocket.3ds";
material = MAT_LEATHER;
description = name;
text[2] = "Смесь из болотной травы";
text[5] = NAME_VALUE;
count[5] = value;
inv_zbias = 190;
};
|
D
|
/Users/dimdew/CLionProjects/talent_plan_kv/simple_kv/target/debug/build/syn-d3171b95e5b052e5/build_script_build-d3171b95e5b052e5: /Users/dimdew/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.14/build.rs
/Users/dimdew/CLionProjects/talent_plan_kv/simple_kv/target/debug/build/syn-d3171b95e5b052e5/build_script_build-d3171b95e5b052e5.d: /Users/dimdew/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.14/build.rs
/Users/dimdew/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.14/build.rs:
|
D
|
module dquick.renderer3D.d3d10.shader;
import dquick.renderer3D.d3d10.util;
import dquick.utils.resourceManager;
import dquick.utils.utils;
import std.string;
import std.stdio;
import std.file;
import core.runtime;
import dquick.buildSettings;
static if (renderer == RendererMode.D3D10)
final class Shader : IResource
{
mixin ResourceBase;
public:
this()
{
}
~this()
{
// debug destructorAssert(mVertexShader == mBadId, "Shader.release method wasn't called.", mTrace);
}
/// Take a filePath of which correspond to the fragment and vertex shaders files without extention (extentions are "frag" and "vert")
/// Shader will be compiled and linked
void load(string filePath, Variant[] options)
{
debug mTrace = defaultTraceHandler(null);
release();
if (options == null)
{
mVertexShaderSource = cast(string)read(filePath ~ ".vert");
mFragmentShaderSource = cast(string)read(filePath ~ ".frag");
/* if (mVertexShaderSource.length == 0 || mFragmentShaderSource.length == 0)
throw new Exception(format("Can't find shader files : %s or %s", filePath ~ ".vert", filePath ~ ".frag"));*/
}
else
{
assert(options.length == 2);
assert(options[0].type() == typeid(string));
assert(options[1].type() == typeid(string));
mVertexShaderSource = options[0].get!string;
mFragmentShaderSource = options[1].get!string;
}
compileAndLink();
mWeight = 0;
mFilePath = filePath;
}
/* GLuint getProgram()
{
return mShaderProgram;
}*/
void release()
{
/* if (mVertexShader != mBadId)
{
checkgl!glDeleteShader(mVertexShader);
mVertexShader = mBadId;
}
if (mFragmentShader != mBadId)
{
checkgl!glDeleteShader(mFragmentShader);
mFragmentShader = mBadId;
}
if (mShaderProgram != mBadId)
{
checkgl!glDeleteProgram(mShaderProgram);
mShaderProgram = mBadId;
}*/
}
private:
/* uint loadAndCompileShader(GLenum type, string source)
{
GLint length;
length = cast(GLint)source.length;
GLuint shader = checkgl!glCreateShader(type);
auto ssp = source.ptr;
checkgl!glShaderSource(shader, 1, &ssp, &length);
checkgl!glCompileShader(shader);
GLint status;
checkgl!glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
if (status == GL_FALSE)
{
GLint logLength;
checkgl!glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &logLength);
if (logLength > 0)
{
ubyte[] log;
log.length = logLength;
checkgl!glGetShaderInfoLog(shader, logLength, &logLength, cast(GLchar*)log.ptr);
writefln("\n%s", cast(string)log);
}
throw new Exception(format("Failed to compile shader: %s", filePath));
}
return shader;
}
*/
void compileAndLink()
{
/* scope(failure) release();
mShaderProgram = checkgl!glCreateProgram();
mVertexShader = loadAndCompileShader(GL_VERTEX_SHADER, mVertexShaderSource);
if (mVertexShader == 0)
{
throw new Exception("Error while compiling vertex shader");
}
mFragmentShader = loadAndCompileShader(GL_FRAGMENT_SHADER, mFragmentShaderSource);
if (mFragmentShader == 0)
{
throw new Exception("Error while compiling fragment shader");
}
checkgl!glAttachShader(mShaderProgram, mVertexShader);
checkgl!glAttachShader(mShaderProgram, mFragmentShader);
linkProgram();*/
}
void linkProgram()
{
/* checkgl!glLinkProgram(mShaderProgram);
GLint status;
checkgl!glGetProgramiv(mShaderProgram, GL_LINK_STATUS, &status);
if (status == GL_FALSE)
{
debug // Retrieve the log
{
//checkgl!glValidateProgram(mShaderProgram);
GLint logLength;
checkgl!glGetProgramiv(mShaderProgram, GL_INFO_LOG_LENGTH, &logLength);
if (logLength > 0)
{
GLchar[] log = new char[](logLength);
glGetProgramInfoLog(mShaderProgram, logLength, &logLength, log.ptr);
if (logLength > 0) // It seems GL_INFO_LOG_LENGTH can return 1 instead of 0
writeln("Shader log :\n" ~ log);
}
}
throw new Exception("Failed to link program");
}*/
}
/* static const GLuint mBadId = 0;
GLuint mFragmentShader = mBadId;
GLuint mVertexShader = mBadId;
GLuint mShaderProgram = mBadId;*/
string mFragmentShaderSource;
string mVertexShaderSource;
debug Throwable.TraceInfo mTrace;
};
|
D
|
/**
* Implementation of support routines for synchronized blocks.
*
* Copyright: Copyright Digital Mars 2000 - 2011.
* License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
* Authors: Walter Bright, Sean Kelly
* Source: $(DRUNTIMESRC rt/_critical_.d)
*/
/* Copyright Digital Mars 2000 - 2011.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
module rt.critical_;
nothrow:
import rt.monitor_, core.atomic;
extern (C) void _d_critical_init()
{
initMutex(cast(Mutex*)&gcs.mtx);
head = &gcs;
}
extern (C) void _d_critical_term()
{
// This function is only ever called by the runtime shutdown code
// and therefore is single threaded so the following cast is fine.
auto h = cast()head;
for (auto p = h; p; p = p.next)
destroyMutex(cast(Mutex*)&p.mtx);
}
extern (C) void _d_criticalenter(D_CRITICAL_SECTION* cs)
{
assert(cs !is null);
ensureMutex(cast(shared(D_CRITICAL_SECTION*)) cs);
lockMutex(&cs.mtx);
}
extern (C) void _d_criticalenter2(D_CRITICAL_SECTION** pcs)
{
import ldc.intrinsics : llvm_expect;
if (llvm_expect(atomicLoad!(MemoryOrder.acq)(*cast(shared) pcs) is null, false))
{
lockMutex(cast(Mutex*)&gcs.mtx);
if (atomicLoad!(MemoryOrder.raw)(*cast(shared) pcs) is null)
{
auto cs = new shared D_CRITICAL_SECTION;
initMutex(cast(Mutex*)&cs.mtx);
atomicStore!(MemoryOrder.rel)(*cast(shared) pcs, cs);
}
unlockMutex(cast(Mutex*)&gcs.mtx);
}
lockMutex(&(*pcs).mtx);
}
extern (C) void _d_criticalexit(D_CRITICAL_SECTION* cs)
{
assert(cs !is null);
unlockMutex(&cs.mtx);
}
private:
shared D_CRITICAL_SECTION* head;
shared D_CRITICAL_SECTION gcs;
struct D_CRITICAL_SECTION
{
D_CRITICAL_SECTION* next;
Mutex mtx;
}
void ensureMutex(shared(D_CRITICAL_SECTION)* cs)
{
if (atomicLoad!(MemoryOrder.acq)(cs.next) is null)
{
lockMutex(cast(Mutex*)&gcs.mtx);
if (atomicLoad!(MemoryOrder.raw)(cs.next) is null)
{
initMutex(cast(Mutex*)&cs.mtx);
auto ohead = head;
head = cs;
atomicStore!(MemoryOrder.rel)(cs.next, ohead);
}
unlockMutex(cast(Mutex*)&gcs.mtx);
}
}
|
D
|
// Copyright Ferdinand Majerech 2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
///Dynamic array struct that never moves its contents in memory.
module containers.segmentedvector;
import core.stdc.string;
import std.algorithm;
import std.range;
import std.traits;
import memory.memory;
import containers.fixedarray;
import containers.vector;
/**
* Dynamic array with manually managed memory that never moves its contents in memory.
*
* Pointers to elements of a SegmentedVector are safe, unlike Vector which can
* move its contents on reallocation.
*
* To simplify its implementation, SegmentedVector is not copyable at the moment.
* This could be changed if needed, however.
*/
struct SegmentedVector(T, long segmentSize = 1024)
if(segmentSize > 0)
{
private:
Vector!(FixedArray!T) segments_;
//segmentSize means we need to allocate a new segment (which we do need at start).
uint usedInLastSegment_ = segmentSize;
@disable this(T[]);
@disable this(SegmentedVector);
@disable this(this);
@disable void opAssign(T[]);
@disable void opAssign(SegmentedVector);
@disable hash_t toHash;
public:
/**
* Foreach over values.
*
* Foreach will iterate over all elements in linear order from start to end.
*/
int opApply(int delegate(ref T) dg)
{
int result = 0;
const s = segments_.length;
if(s > 1) foreach(ref seg; segments_[0 .. s - 1]) foreach(ref elem; seg)
{
result = dg(elem);
if(result){break;}
}
if(s > 0) foreach(ref elem; segments_.back[0 .. usedInLastSegment_])
{
result = dg(elem);
if(result){break;}
}
return result;
}
/**
* Foreach over indices and values.
*
* Foreach will iterate over all elements in linear order from start to end.
*/
int opApply(int delegate(size_t, ref T) dg)
{
int result = 0;
const s = segments_.length;
size_t i = 0;
if(s > 1) foreach(ref seg; segments_[0 .. s - 1]) foreach(ref elem; seg)
{
result = dg(i, elem);
if(result){break;}
++i;
}
if(s > 0) foreach(ref elem; segments_.back[0 .. usedInLastSegment_])
{
result = dg(i, elem);
if(result){break;}
++i;
}
return result;
}
///Append an element to the vector. (operator ~=)
void opCatAssign(U : T)(U element)
if(isImplicitlyConvertible!(T, U))
in
{
assert(usedInLastSegment_ <= segmentSize,
"More items than segmentSize used in the last segment");
}
body
{
if(usedInLastSegment_ == segmentSize)
{
segments_ ~= FixedArray!T(segmentSize);
usedInLastSegment_ = 0;
}
segments_.back[usedInLastSegment_] = element;
++usedInLastSegment_;
}
/**
* Get element at the specified index.
*
* Params: index = Index of the element to get. Must be within bounds.
*
* Returns: Element at the specified index.
*/
auto ref inout(T) opIndex(const size_t index) inout pure nothrow
in{assert(index < length, "Vector index out of bounds");}
body
{
return segments_[index / segmentSize][index % segmentSize];
}
/**
* Set element at the specified index.
*
* Params: index = Index of the element to set. Must be within bounds.
*/
void opIndexAssign(T value, const size_t index)
in{assert(index < length, "Vector index out of bounds");}
body
{
segments_[index / segmentSize][index % segmentSize] = value;
}
///Access the first element of the vector.
ref inout(T) front() inout pure nothrow {return this[0];}
///Access the last element of the vector.
ref inout(T) back() inout pure nothrow {return this[this.length - 1];}
///Remove the last element of the vector.
void popBack() {length = length - 1;}
///Get number of elements in the vector.
@property size_t length() const pure nothrow
{
const result = segmentSize * (cast(long)segments_.length - 1) + usedInLastSegment_;
assert(result >= 0, "SegmentedVector returned length is less than 0");
return cast(size_t)result;
}
///Is the vector empty?
@property bool empty() const pure nothrow {return length == 0;}
/**
* Change length of the vector.
*
* If the length will be lower than current length, trailing elements will
* be erased. If higher, the vector will be expanded. Values of the extra
* elements after expansion are NOT defined.
*
* Params: elements = length to set.
*/
@property void length(const size_t elements)
{
if(elements > length)
{
auto elementsLeft = elements - length;
const lastSegmentFree = segmentSize - usedInLastSegment_;
const addedToLastSegment = min(elementsLeft, lastSegmentFree);
usedInLastSegment_ += addedToLastSegment;
elementsLeft -= addedToLastSegment;
while(elementsLeft > 0)
{
segments_ ~= FixedArray!T(segmentSize);
usedInLastSegment_ = cast(uint)min(elementsLeft, segmentSize);
elementsLeft -= usedInLastSegment_;
}
}
else if(elements < length)
{
auto elementsLeft = length - elements;
const removedFromLastSegment = min(elementsLeft, usedInLastSegment_);
const oldLastSegmentUsed = usedInLastSegment_;
usedInLastSegment_ -= removedFromLastSegment;
elementsLeft -= removedFromLastSegment;
//Destroy removed elements.
foreach(ref elem; segments_.back[usedInLastSegment_ .. oldLastSegmentUsed])
{
clear(elem);
}
while(elementsLeft > 0)
{
//Destroys elements automatically.
segments_.length = segments_.length - 1;
usedInLastSegment_ = cast(uint)max(0, segmentSize - cast(long)elementsLeft);
elementsLeft -= (segmentSize - usedInLastSegment_);
}
}
}
}
import util.unittests;
///Unittest for SegmentedVector.
void unittestSegmentedVector()
{
SegmentedVector!(uint, 3) vector;
vector ~= 1;
vector ~= 2;
vector ~= 3;
vector ~= 4;
assert(vector.length == 4);
assert(vector[0] == 1);
uint i = 1;
foreach(elem; vector)
{
assert(i == elem);
i++;
}
vector.length = 58;
assert(vector.length == 58);
vector.length = 2;
assert(vector.length == 2);
}
mixin registerTest!(unittestSegmentedVector, "SegmentedVector general");
|
D
|
/Users/kimhyewon/Documents/Server/tennis/build/tennis.build/Debug/Essentials.build/Objects-normal/x86_64/ByteStream.o : /Users/kimhyewon/Documents/Server/tennis/Packages/Crypto-1.0.1/Sources/Essentials/ByteStream.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Crypto-1.0.1/Sources/Essentials/Helpers.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule
/Users/kimhyewon/Documents/Server/tennis/build/tennis.build/Debug/Essentials.build/Objects-normal/x86_64/ByteStream~partial.swiftmodule : /Users/kimhyewon/Documents/Server/tennis/Packages/Crypto-1.0.1/Sources/Essentials/ByteStream.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Crypto-1.0.1/Sources/Essentials/Helpers.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule
/Users/kimhyewon/Documents/Server/tennis/build/tennis.build/Debug/Essentials.build/Objects-normal/x86_64/ByteStream~partial.swiftdoc : /Users/kimhyewon/Documents/Server/tennis/Packages/Crypto-1.0.1/Sources/Essentials/ByteStream.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Crypto-1.0.1/Sources/Essentials/Helpers.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule
|
D
|
program array_assign();
var a, b: array [12..4] of integer;
begin
end.
|
D
|
/**
* depinjection's first major revision is too heavy (too much overhead).
* This aims to be a light-weight reimplementation.
*/
module pattern.depinjection.subbuilders;
private {
import pattern.depinjection.circular;
import pattern.depinjection.exception;
import pattern.depinjection.property;
import pattern.depinjection.stack;
import pattern.depinjection.build;
import pattern.depinjection.build_utils;
import pattern.depinjection.lifecycle;
import pattern.depinjection.lifecycles;
}
interface ISingleBuilder {
void build (Builder builder, void* fill);
string toString();
}
class LifecycleBuilder : ISingleBuilder {
void[] instance;
ISingleBuilder subbuilder;
size_t size;
ILifecycle cycle;
ulong iteration;
this (ISingleBuilder sub, TypeInfo type, ILifecycle cycle) {
this.subbuilder = sub;
this.size = type.tsize();
this.cycle = cycle;
}
void build (Builder builder, void* fill) {
if (instance == null || !cycle.current(iteration)) {
instance = new void[size];
subbuilder.build (builder, instance.ptr);
}
fill[0..size] = instance[0..$];
}
override string toString ()
{
return "Lifecycle(" ~ (cast(Object) subbuilder).toString ~ ", Lifecycle: " ~ (cast(Object)cycle).toString ~ ")";
}
}
class ConstantBuilder : ISingleBuilder {
void[] instance;
this (void[] instance) {
this.instance = instance;
}
void build (Builder builder, void* fill) {
fill[0..instance.length] = instance[0..$];
}
override string toString() {
return "Constant";
}
}
class CtorBuilder (T) : ISingleBuilder {
static assert (is (T == class), "CtorBuilder cannot be associated with a type that is not a class. This indicates a bug in depinjection.");
void build (Builder parent, void* fill) {
parent.circular.push (typeid(T));
auto object = get (parent);
parent.circular.endCtor (typeid(T));
static if (is (typeof(T.inject) == function)) {
mixin (`object.inject(` ~ get_deps_impl!(T, 0, "inject") ~ `);`);
}
fill[0..object.sizeof] = (cast(void*) &object)[0 .. object.sizeof];
auto arr = fill[0..object.sizeof];
parent.intercept (arr, typeid(T));
}
import std.traits;
T get (Builder parent) {
mixin (get_deps!(T) ());
}
override string toString () {
return "Constructor(" ~ T.stringof ~ ")";
}
}
class ContextAwareBuilder {
ISingleBuilder regular;
ISingleBuilder[TypeInfo] specialized;
void build (Builder parent, TypeInfo self, void* fill) {
auto type = parent.stack.buildfor;
auto ptr = type in specialized;
if (ptr)
return (*ptr).build (parent, fill);
else if (regular)
return regular.build (parent, fill);
else
throw new BindingException (
"You asked me to build a `" ~ self.toString ~ "', which has been registered for some types that you want to build. However, there is no registered way for me to build it by default, and the available specializations do not match the current type being built, which is `" ~ type.toString ~ "'.");
}
void add (ISingleBuilder builder, TypeInfo context) {
if (context) {
specialized[context] = builder;
} else {
regular = builder;
}
}
override string toString () {
if (regular) return regular.toString;
else return "specialized ContextAwareBuilder";
}
}
|
D
|
module windows.fileseverresourcemanager;
public import system;
public import windows.automation;
public import windows.com;
extern(Windows):
enum FsrmQuotaFlags
{
FsrmQuotaFlags_Enforce = 256,
FsrmQuotaFlags_Disable = 512,
FsrmQuotaFlags_StatusIncomplete = 65536,
FsrmQuotaFlags_StatusRebuilding = 131072,
}
enum FsrmFileScreenFlags
{
FsrmFileScreenFlags_Enforce = 1,
}
enum FsrmCollectionState
{
FsrmCollectionState_Fetching = 1,
FsrmCollectionState_Committing = 2,
FsrmCollectionState_Complete = 3,
FsrmCollectionState_Cancelled = 4,
}
enum FsrmEnumOptions
{
FsrmEnumOptions_None = 0,
FsrmEnumOptions_Asynchronous = 1,
FsrmEnumOptions_CheckRecycleBin = 2,
FsrmEnumOptions_IncludeClusterNodes = 4,
FsrmEnumOptions_IncludeDeprecatedObjects = 8,
}
enum FsrmCommitOptions
{
FsrmCommitOptions_None = 0,
FsrmCommitOptions_Asynchronous = 1,
}
enum FsrmTemplateApplyOptions
{
FsrmTemplateApplyOptions_ApplyToDerivedMatching = 1,
FsrmTemplateApplyOptions_ApplyToDerivedAll = 2,
}
enum FsrmActionType
{
FsrmActionType_Unknown = 0,
FsrmActionType_EventLog = 1,
FsrmActionType_Email = 2,
FsrmActionType_Command = 3,
FsrmActionType_Report = 4,
}
enum FsrmEventType
{
FsrmEventType_Unknown = 0,
FsrmEventType_Information = 1,
FsrmEventType_Warning = 2,
FsrmEventType_Error = 3,
}
enum FsrmAccountType
{
FsrmAccountType_Unknown = 0,
FsrmAccountType_NetworkService = 1,
FsrmAccountType_LocalService = 2,
FsrmAccountType_LocalSystem = 3,
FsrmAccountType_InProc = 4,
FsrmAccountType_External = 5,
FsrmAccountType_Automatic = 500,
}
enum FsrmReportType
{
FsrmReportType_Unknown = 0,
FsrmReportType_LargeFiles = 1,
FsrmReportType_FilesByType = 2,
FsrmReportType_LeastRecentlyAccessed = 3,
FsrmReportType_MostRecentlyAccessed = 4,
FsrmReportType_QuotaUsage = 5,
FsrmReportType_FilesByOwner = 6,
FsrmReportType_ExportReport = 7,
FsrmReportType_DuplicateFiles = 8,
FsrmReportType_FileScreenAudit = 9,
FsrmReportType_FilesByProperty = 10,
FsrmReportType_AutomaticClassification = 11,
FsrmReportType_Expiration = 12,
FsrmReportType_FoldersByProperty = 13,
}
enum FsrmReportFormat
{
FsrmReportFormat_Unknown = 0,
FsrmReportFormat_DHtml = 1,
FsrmReportFormat_Html = 2,
FsrmReportFormat_Txt = 3,
FsrmReportFormat_Csv = 4,
FsrmReportFormat_Xml = 5,
}
enum FsrmReportRunningStatus
{
FsrmReportRunningStatus_Unknown = 0,
FsrmReportRunningStatus_NotRunning = 1,
FsrmReportRunningStatus_Queued = 2,
FsrmReportRunningStatus_Running = 3,
}
enum FsrmReportGenerationContext
{
FsrmReportGenerationContext_Undefined = 1,
FsrmReportGenerationContext_ScheduledReport = 2,
FsrmReportGenerationContext_InteractiveReport = 3,
FsrmReportGenerationContext_IncidentReport = 4,
}
enum FsrmReportFilter
{
FsrmReportFilter_MinSize = 1,
FsrmReportFilter_MinAgeDays = 2,
FsrmReportFilter_MaxAgeDays = 3,
FsrmReportFilter_MinQuotaUsage = 4,
FsrmReportFilter_FileGroups = 5,
FsrmReportFilter_Owners = 6,
FsrmReportFilter_NamePattern = 7,
FsrmReportFilter_Property = 8,
}
enum FsrmReportLimit
{
FsrmReportLimit_MaxFiles = 1,
FsrmReportLimit_MaxFileGroups = 2,
FsrmReportLimit_MaxOwners = 3,
FsrmReportLimit_MaxFilesPerFileGroup = 4,
FsrmReportLimit_MaxFilesPerOwner = 5,
FsrmReportLimit_MaxFilesPerDuplGroup = 6,
FsrmReportLimit_MaxDuplicateGroups = 7,
FsrmReportLimit_MaxQuotas = 8,
FsrmReportLimit_MaxFileScreenEvents = 9,
FsrmReportLimit_MaxPropertyValues = 10,
FsrmReportLimit_MaxFilesPerPropertyValue = 11,
FsrmReportLimit_MaxFolders = 12,
}
enum FsrmPropertyDefinitionType
{
FsrmPropertyDefinitionType_Unknown = 0,
FsrmPropertyDefinitionType_OrderedList = 1,
FsrmPropertyDefinitionType_MultiChoiceList = 2,
FsrmPropertyDefinitionType_SingleChoiceList = 3,
FsrmPropertyDefinitionType_String = 4,
FsrmPropertyDefinitionType_MultiString = 5,
FsrmPropertyDefinitionType_Int = 6,
FsrmPropertyDefinitionType_Bool = 7,
FsrmPropertyDefinitionType_Date = 8,
}
enum FsrmPropertyDefinitionFlags
{
FsrmPropertyDefinitionFlags_Global = 1,
FsrmPropertyDefinitionFlags_Deprecated = 2,
FsrmPropertyDefinitionFlags_Secure = 4,
}
enum FsrmPropertyDefinitionAppliesTo
{
FsrmPropertyDefinitionAppliesTo_Files = 1,
FsrmPropertyDefinitionAppliesTo_Folders = 2,
}
enum FsrmRuleType
{
FsrmRuleType_Unknown = 0,
FsrmRuleType_Classification = 1,
FsrmRuleType_Generic = 2,
}
enum FsrmRuleFlags
{
FsrmRuleFlags_Disabled = 256,
FsrmRuleFlags_ClearAutomaticallyClassifiedProperty = 1024,
FsrmRuleFlags_ClearManuallyClassifiedProperty = 2048,
FsrmRuleFlags_Invalid = 4096,
}
enum FsrmClassificationLoggingFlags
{
FsrmClassificationLoggingFlags_None = 0,
FsrmClassificationLoggingFlags_ClassificationsInLogFile = 1,
FsrmClassificationLoggingFlags_ErrorsInLogFile = 2,
FsrmClassificationLoggingFlags_ClassificationsInSystemLog = 4,
FsrmClassificationLoggingFlags_ErrorsInSystemLog = 8,
}
enum FsrmExecutionOption
{
FsrmExecutionOption_Unknown = 0,
FsrmExecutionOption_EvaluateUnset = 1,
FsrmExecutionOption_ReEvaluate_ConsiderExistingValue = 2,
FsrmExecutionOption_ReEvaluate_IgnoreExistingValue = 3,
}
enum FsrmStorageModuleCaps
{
FsrmStorageModuleCaps_Unknown = 0,
FsrmStorageModuleCaps_CanGet = 1,
FsrmStorageModuleCaps_CanSet = 2,
FsrmStorageModuleCaps_CanHandleDirectories = 4,
FsrmStorageModuleCaps_CanHandleFiles = 8,
}
enum FsrmStorageModuleType
{
FsrmStorageModuleType_Unknown = 0,
FsrmStorageModuleType_Cache = 1,
FsrmStorageModuleType_InFile = 2,
FsrmStorageModuleType_Database = 3,
FsrmStorageModuleType_System = 100,
}
enum FsrmPropertyBagFlags
{
FsrmPropertyBagFlags_UpdatedByClassifier = 1,
FsrmPropertyBagFlags_FailedLoadingProperties = 2,
FsrmPropertyBagFlags_FailedSavingProperties = 4,
FsrmPropertyBagFlags_FailedClassifyingProperties = 8,
}
enum FsrmPropertyBagField
{
FsrmPropertyBagField_AccessVolume = 0,
FsrmPropertyBagField_VolumeGuidName = 1,
}
enum FsrmPropertyFlags
{
FsrmPropertyFlags_None = 0,
FsrmPropertyFlags_Orphaned = 1,
FsrmPropertyFlags_RetrievedFromCache = 2,
FsrmPropertyFlags_RetrievedFromStorage = 4,
FsrmPropertyFlags_SetByClassifier = 8,
FsrmPropertyFlags_Deleted = 16,
FsrmPropertyFlags_Reclassified = 32,
FsrmPropertyFlags_AggregationFailed = 64,
FsrmPropertyFlags_Existing = 128,
FsrmPropertyFlags_FailedLoadingProperties = 256,
FsrmPropertyFlags_FailedClassifyingProperties = 512,
FsrmPropertyFlags_FailedSavingProperties = 1024,
FsrmPropertyFlags_Secure = 2048,
FsrmPropertyFlags_PolicyDerived = 4096,
FsrmPropertyFlags_Inherited = 8192,
FsrmPropertyFlags_Manual = 16384,
FsrmPropertyFlags_ExplicitValueDeleted = 32768,
FsrmPropertyFlags_PropertyDeletedFromClear = 65536,
FsrmPropertyFlags_PropertySourceMask = 14,
FsrmPropertyFlags_PersistentMask = 20480,
}
enum FsrmPipelineModuleType
{
FsrmPipelineModuleType_Unknown = 0,
FsrmPipelineModuleType_Storage = 1,
FsrmPipelineModuleType_Classifier = 2,
}
enum FsrmGetFilePropertyOptions
{
FsrmGetFilePropertyOptions_None = 0,
FsrmGetFilePropertyOptions_NoRuleEvaluation = 1,
FsrmGetFilePropertyOptions_Persistent = 2,
FsrmGetFilePropertyOptions_FailOnPersistErrors = 4,
FsrmGetFilePropertyOptions_SkipOrphaned = 8,
}
enum FsrmFileManagementType
{
FsrmFileManagementType_Unknown = 0,
FsrmFileManagementType_Expiration = 1,
FsrmFileManagementType_Custom = 2,
FsrmFileManagementType_Rms = 3,
}
enum FsrmFileManagementLoggingFlags
{
FsrmFileManagementLoggingFlags_None = 0,
FsrmFileManagementLoggingFlags_Error = 1,
FsrmFileManagementLoggingFlags_Information = 2,
FsrmFileManagementLoggingFlags_Audit = 4,
}
enum FsrmPropertyConditionType
{
FsrmPropertyConditionType_Unknown = 0,
FsrmPropertyConditionType_Equal = 1,
FsrmPropertyConditionType_NotEqual = 2,
FsrmPropertyConditionType_GreaterThan = 3,
FsrmPropertyConditionType_LessThan = 4,
FsrmPropertyConditionType_Contain = 5,
FsrmPropertyConditionType_Exist = 6,
FsrmPropertyConditionType_NotExist = 7,
FsrmPropertyConditionType_StartWith = 8,
FsrmPropertyConditionType_EndWith = 9,
FsrmPropertyConditionType_ContainedIn = 10,
FsrmPropertyConditionType_PrefixOf = 11,
FsrmPropertyConditionType_SuffixOf = 12,
FsrmPropertyConditionType_MatchesPattern = 13,
}
enum FsrmFileStreamingMode
{
FsrmFileStreamingMode_Unknown = 0,
FsrmFileStreamingMode_Read = 1,
FsrmFileStreamingMode_Write = 2,
}
enum FsrmFileStreamingInterfaceType
{
FsrmFileStreamingInterfaceType_Unknown = 0,
FsrmFileStreamingInterfaceType_ILockBytes = 1,
FsrmFileStreamingInterfaceType_IStream = 2,
}
enum FsrmFileConditionType
{
FsrmFileConditionType_Unknown = 0,
FsrmFileConditionType_Property = 1,
}
enum FsrmFileSystemPropertyId
{
FsrmFileSystemPropertyId_Undefined = 0,
FsrmFileSystemPropertyId_FileName = 1,
FsrmFileSystemPropertyId_DateCreated = 2,
FsrmFileSystemPropertyId_DateLastAccessed = 3,
FsrmFileSystemPropertyId_DateLastModified = 4,
FsrmFileSystemPropertyId_DateNow = 5,
}
enum FsrmPropertyValueType
{
FsrmPropertyValueType_Undefined = 0,
FsrmPropertyValueType_Literal = 1,
FsrmPropertyValueType_DateOffset = 2,
}
enum AdrClientDisplayFlags
{
AdrClientDisplayFlags_AllowEmailRequests = 1,
AdrClientDisplayFlags_ShowDeviceTroubleshooting = 2,
}
enum AdrEmailFlags
{
AdrEmailFlags_PutDataOwnerOnToLine = 1,
AdrEmailFlags_PutAdminOnToLine = 2,
AdrEmailFlags_IncludeDeviceClaims = 4,
AdrEmailFlags_IncludeUserInfo = 8,
AdrEmailFlags_GenerateEventLog = 16,
}
enum AdrClientErrorType
{
AdrClientErrorType_Unknown = 0,
AdrClientErrorType_AccessDenied = 1,
AdrClientErrorType_FileNotFound = 2,
}
enum AdrClientFlags
{
AdrClientFlags_None = 0,
AdrClientFlags_FailForLocalPaths = 1,
AdrClientFlags_FailIfNotSupportedByServer = 2,
AdrClientFlags_FailIfNotDomainJoined = 4,
}
const GUID IID_IFsrmObject = {0x22BCEF93, 0x4A3F, 0x4183, [0x89, 0xF9, 0x2F, 0x8B, 0x8A, 0x62, 0x8A, 0xEE]};
@GUID(0x22BCEF93, 0x4A3F, 0x4183, [0x89, 0xF9, 0x2F, 0x8B, 0x8A, 0x62, 0x8A, 0xEE]);
interface IFsrmObject : IDispatch
{
HRESULT get_Id(Guid* id);
HRESULT get_Description(BSTR* description);
HRESULT put_Description(BSTR description);
HRESULT Delete();
HRESULT Commit();
}
const GUID IID_IFsrmCollection = {0xF76FBF3B, 0x8DDD, 0x4B42, [0xB0, 0x5A, 0xCB, 0x1C, 0x3F, 0xF1, 0xFE, 0xE8]};
@GUID(0xF76FBF3B, 0x8DDD, 0x4B42, [0xB0, 0x5A, 0xCB, 0x1C, 0x3F, 0xF1, 0xFE, 0xE8]);
interface IFsrmCollection : IDispatch
{
HRESULT get__NewEnum(IUnknown* unknown);
HRESULT get_Item(int index, VARIANT* item);
HRESULT get_Count(int* count);
HRESULT get_State(FsrmCollectionState* state);
HRESULT Cancel();
HRESULT WaitForCompletion(int waitSeconds, short* completed);
HRESULT GetById(Guid id, VARIANT* entry);
}
const GUID IID_IFsrmMutableCollection = {0x1BB617B8, 0x3886, 0x49DC, [0xAF, 0x82, 0xA6, 0xC9, 0x0F, 0xA3, 0x5D, 0xDA]};
@GUID(0x1BB617B8, 0x3886, 0x49DC, [0xAF, 0x82, 0xA6, 0xC9, 0x0F, 0xA3, 0x5D, 0xDA]);
interface IFsrmMutableCollection : IFsrmCollection
{
HRESULT Add(VARIANT item);
HRESULT Remove(int index);
HRESULT RemoveById(Guid id);
HRESULT Clone(IFsrmMutableCollection* collection);
}
const GUID IID_IFsrmCommittableCollection = {0x96DEB3B5, 0x8B91, 0x4A2A, [0x9D, 0x93, 0x80, 0xA3, 0x5D, 0x8A, 0xA8, 0x47]};
@GUID(0x96DEB3B5, 0x8B91, 0x4A2A, [0x9D, 0x93, 0x80, 0xA3, 0x5D, 0x8A, 0xA8, 0x47]);
interface IFsrmCommittableCollection : IFsrmMutableCollection
{
HRESULT Commit(FsrmCommitOptions options, IFsrmCollection* results);
}
const GUID IID_IFsrmAction = {0x6CD6408A, 0xAE60, 0x463B, [0x9E, 0xF1, 0xE1, 0x17, 0x53, 0x4D, 0x69, 0xDC]};
@GUID(0x6CD6408A, 0xAE60, 0x463B, [0x9E, 0xF1, 0xE1, 0x17, 0x53, 0x4D, 0x69, 0xDC]);
interface IFsrmAction : IDispatch
{
HRESULT get_Id(Guid* id);
HRESULT get_ActionType(FsrmActionType* actionType);
HRESULT get_RunLimitInterval(int* minutes);
HRESULT put_RunLimitInterval(int minutes);
HRESULT Delete();
}
const GUID IID_IFsrmActionEmail = {0xD646567D, 0x26AE, 0x4CAA, [0x9F, 0x84, 0x4E, 0x0A, 0xAD, 0x20, 0x7F, 0xCA]};
@GUID(0xD646567D, 0x26AE, 0x4CAA, [0x9F, 0x84, 0x4E, 0x0A, 0xAD, 0x20, 0x7F, 0xCA]);
interface IFsrmActionEmail : IFsrmAction
{
HRESULT get_MailFrom(BSTR* mailFrom);
HRESULT put_MailFrom(BSTR mailFrom);
HRESULT get_MailReplyTo(BSTR* mailReplyTo);
HRESULT put_MailReplyTo(BSTR mailReplyTo);
HRESULT get_MailTo(BSTR* mailTo);
HRESULT put_MailTo(BSTR mailTo);
HRESULT get_MailCc(BSTR* mailCc);
HRESULT put_MailCc(BSTR mailCc);
HRESULT get_MailBcc(BSTR* mailBcc);
HRESULT put_MailBcc(BSTR mailBcc);
HRESULT get_MailSubject(BSTR* mailSubject);
HRESULT put_MailSubject(BSTR mailSubject);
HRESULT get_MessageText(BSTR* messageText);
HRESULT put_MessageText(BSTR messageText);
}
const GUID IID_IFsrmActionEmail2 = {0x8276702F, 0x2532, 0x4839, [0x89, 0xBF, 0x48, 0x72, 0x60, 0x9A, 0x2E, 0xA4]};
@GUID(0x8276702F, 0x2532, 0x4839, [0x89, 0xBF, 0x48, 0x72, 0x60, 0x9A, 0x2E, 0xA4]);
interface IFsrmActionEmail2 : IFsrmActionEmail
{
HRESULT get_AttachmentFileListSize(int* attachmentFileListSize);
HRESULT put_AttachmentFileListSize(int attachmentFileListSize);
}
const GUID IID_IFsrmActionReport = {0x2DBE63C4, 0xB340, 0x48A0, [0xA5, 0xB0, 0x15, 0x8E, 0x07, 0xFC, 0x56, 0x7E]};
@GUID(0x2DBE63C4, 0xB340, 0x48A0, [0xA5, 0xB0, 0x15, 0x8E, 0x07, 0xFC, 0x56, 0x7E]);
interface IFsrmActionReport : IFsrmAction
{
HRESULT get_ReportTypes(SAFEARRAY** reportTypes);
HRESULT put_ReportTypes(SAFEARRAY* reportTypes);
HRESULT get_MailTo(BSTR* mailTo);
HRESULT put_MailTo(BSTR mailTo);
}
const GUID IID_IFsrmActionEventLog = {0x4C8F96C3, 0x5D94, 0x4F37, [0xA4, 0xF4, 0xF5, 0x6A, 0xB4, 0x63, 0x54, 0x6F]};
@GUID(0x4C8F96C3, 0x5D94, 0x4F37, [0xA4, 0xF4, 0xF5, 0x6A, 0xB4, 0x63, 0x54, 0x6F]);
interface IFsrmActionEventLog : IFsrmAction
{
HRESULT get_EventType(FsrmEventType* eventType);
HRESULT put_EventType(FsrmEventType eventType);
HRESULT get_MessageText(BSTR* messageText);
HRESULT put_MessageText(BSTR messageText);
}
const GUID IID_IFsrmActionCommand = {0x12937789, 0xE247, 0x4917, [0x9C, 0x20, 0xF3, 0xEE, 0x9C, 0x7E, 0xE7, 0x83]};
@GUID(0x12937789, 0xE247, 0x4917, [0x9C, 0x20, 0xF3, 0xEE, 0x9C, 0x7E, 0xE7, 0x83]);
interface IFsrmActionCommand : IFsrmAction
{
HRESULT get_ExecutablePath(BSTR* executablePath);
HRESULT put_ExecutablePath(BSTR executablePath);
HRESULT get_Arguments(BSTR* arguments);
HRESULT put_Arguments(BSTR arguments);
HRESULT get_Account(FsrmAccountType* account);
HRESULT put_Account(FsrmAccountType account);
HRESULT get_WorkingDirectory(BSTR* workingDirectory);
HRESULT put_WorkingDirectory(BSTR workingDirectory);
HRESULT get_MonitorCommand(short* monitorCommand);
HRESULT put_MonitorCommand(short monitorCommand);
HRESULT get_KillTimeOut(int* minutes);
HRESULT put_KillTimeOut(int minutes);
HRESULT get_LogResult(short* logResults);
HRESULT put_LogResult(short logResults);
}
const GUID IID_IFsrmSetting = {0xF411D4FD, 0x14BE, 0x4260, [0x8C, 0x40, 0x03, 0xB7, 0xC9, 0x5E, 0x60, 0x8A]};
@GUID(0xF411D4FD, 0x14BE, 0x4260, [0x8C, 0x40, 0x03, 0xB7, 0xC9, 0x5E, 0x60, 0x8A]);
interface IFsrmSetting : IDispatch
{
HRESULT get_SmtpServer(BSTR* smtpServer);
HRESULT put_SmtpServer(BSTR smtpServer);
HRESULT get_MailFrom(BSTR* mailFrom);
HRESULT put_MailFrom(BSTR mailFrom);
HRESULT get_AdminEmail(BSTR* adminEmail);
HRESULT put_AdminEmail(BSTR adminEmail);
HRESULT get_DisableCommandLine(short* disableCommandLine);
HRESULT put_DisableCommandLine(short disableCommandLine);
HRESULT get_EnableScreeningAudit(short* enableScreeningAudit);
HRESULT put_EnableScreeningAudit(short enableScreeningAudit);
HRESULT EmailTest(BSTR mailTo);
HRESULT SetActionRunLimitInterval(FsrmActionType actionType, int delayTimeMinutes);
HRESULT GetActionRunLimitInterval(FsrmActionType actionType, int* delayTimeMinutes);
}
const GUID IID_IFsrmPathMapper = {0x6F4DBFFF, 0x6920, 0x4821, [0xA6, 0xC3, 0xB7, 0xE9, 0x4C, 0x1F, 0xD6, 0x0C]};
@GUID(0x6F4DBFFF, 0x6920, 0x4821, [0xA6, 0xC3, 0xB7, 0xE9, 0x4C, 0x1F, 0xD6, 0x0C]);
interface IFsrmPathMapper : IDispatch
{
HRESULT GetSharePathsForLocalPath(BSTR localPath, SAFEARRAY** sharePaths);
}
const GUID IID_IFsrmExportImport = {0xEFCB0AB1, 0x16C4, 0x4A79, [0x81, 0x2C, 0x72, 0x56, 0x14, 0xC3, 0x30, 0x6B]};
@GUID(0xEFCB0AB1, 0x16C4, 0x4A79, [0x81, 0x2C, 0x72, 0x56, 0x14, 0xC3, 0x30, 0x6B]);
interface IFsrmExportImport : IDispatch
{
HRESULT ExportFileGroups(BSTR filePath, VARIANT* fileGroupNamesSafeArray, BSTR remoteHost);
HRESULT ImportFileGroups(BSTR filePath, VARIANT* fileGroupNamesSafeArray, BSTR remoteHost, IFsrmCommittableCollection* fileGroups);
HRESULT ExportFileScreenTemplates(BSTR filePath, VARIANT* templateNamesSafeArray, BSTR remoteHost);
HRESULT ImportFileScreenTemplates(BSTR filePath, VARIANT* templateNamesSafeArray, BSTR remoteHost, IFsrmCommittableCollection* templates);
HRESULT ExportQuotaTemplates(BSTR filePath, VARIANT* templateNamesSafeArray, BSTR remoteHost);
HRESULT ImportQuotaTemplates(BSTR filePath, VARIANT* templateNamesSafeArray, BSTR remoteHost, IFsrmCommittableCollection* templates);
}
const GUID IID_IFsrmDerivedObjectsResult = {0x39322A2D, 0x38EE, 0x4D0D, [0x80, 0x95, 0x42, 0x1A, 0x80, 0x84, 0x9A, 0x82]};
@GUID(0x39322A2D, 0x38EE, 0x4D0D, [0x80, 0x95, 0x42, 0x1A, 0x80, 0x84, 0x9A, 0x82]);
interface IFsrmDerivedObjectsResult : IDispatch
{
HRESULT get_DerivedObjects(IFsrmCollection* derivedObjects);
HRESULT get_Results(IFsrmCollection* results);
}
const GUID IID_IFsrmAccessDeniedRemediationClient = {0x40002314, 0x590B, 0x45A5, [0x8E, 0x1B, 0x8C, 0x05, 0xDA, 0x52, 0x7E, 0x52]};
@GUID(0x40002314, 0x590B, 0x45A5, [0x8E, 0x1B, 0x8C, 0x05, 0xDA, 0x52, 0x7E, 0x52]);
interface IFsrmAccessDeniedRemediationClient : IDispatch
{
HRESULT Show(uint parentWnd, BSTR accessPath, AdrClientErrorType errorType, int flags, BSTR windowTitle, BSTR windowMessage, int* result);
}
const GUID CLSID_FsrmSetting = {0xF556D708, 0x6D4D, 0x4594, [0x9C, 0x61, 0x7D, 0xBB, 0x0D, 0xAE, 0x2A, 0x46]};
@GUID(0xF556D708, 0x6D4D, 0x4594, [0x9C, 0x61, 0x7D, 0xBB, 0x0D, 0xAE, 0x2A, 0x46]);
struct FsrmSetting;
const GUID CLSID_FsrmPathMapper = {0xF3BE42BD, 0x8AC2, 0x409E, [0xBB, 0xD8, 0xFA, 0xF9, 0xB6, 0xB4, 0x1F, 0xEB]};
@GUID(0xF3BE42BD, 0x8AC2, 0x409E, [0xBB, 0xD8, 0xFA, 0xF9, 0xB6, 0xB4, 0x1F, 0xEB]);
struct FsrmPathMapper;
const GUID CLSID_FsrmExportImport = {0x1482DC37, 0xFAE9, 0x4787, [0x90, 0x25, 0x8C, 0xE4, 0xE0, 0x24, 0xAB, 0x56]};
@GUID(0x1482DC37, 0xFAE9, 0x4787, [0x90, 0x25, 0x8C, 0xE4, 0xE0, 0x24, 0xAB, 0x56]);
struct FsrmExportImport;
const GUID CLSID_FsrmQuotaManager = {0x90DCAB7F, 0x347C, 0x4BFC, [0xB5, 0x43, 0x54, 0x03, 0x26, 0x30, 0x5F, 0xBE]};
@GUID(0x90DCAB7F, 0x347C, 0x4BFC, [0xB5, 0x43, 0x54, 0x03, 0x26, 0x30, 0x5F, 0xBE]);
struct FsrmQuotaManager;
const GUID CLSID_FsrmQuotaTemplateManager = {0x97D3D443, 0x251C, 0x4337, [0x81, 0xE7, 0xB3, 0x2E, 0x8F, 0x4E, 0xE6, 0x5E]};
@GUID(0x97D3D443, 0x251C, 0x4337, [0x81, 0xE7, 0xB3, 0x2E, 0x8F, 0x4E, 0xE6, 0x5E]);
struct FsrmQuotaTemplateManager;
const GUID CLSID_FsrmFileGroupManager = {0x8F1363F6, 0x656F, 0x4496, [0x92, 0x26, 0x13, 0xAE, 0xCB, 0xD7, 0x71, 0x8F]};
@GUID(0x8F1363F6, 0x656F, 0x4496, [0x92, 0x26, 0x13, 0xAE, 0xCB, 0xD7, 0x71, 0x8F]);
struct FsrmFileGroupManager;
const GUID CLSID_FsrmFileScreenManager = {0x95941183, 0xDB53, 0x4C5F, [0xB3, 0x7B, 0x7D, 0x09, 0x21, 0xCF, 0x9D, 0xC7]};
@GUID(0x95941183, 0xDB53, 0x4C5F, [0xB3, 0x7B, 0x7D, 0x09, 0x21, 0xCF, 0x9D, 0xC7]);
struct FsrmFileScreenManager;
const GUID CLSID_FsrmFileScreenTemplateManager = {0x243111DF, 0xE474, 0x46AA, [0xA0, 0x54, 0xEA, 0xA3, 0x3E, 0xDC, 0x29, 0x2A]};
@GUID(0x243111DF, 0xE474, 0x46AA, [0xA0, 0x54, 0xEA, 0xA3, 0x3E, 0xDC, 0x29, 0x2A]);
struct FsrmFileScreenTemplateManager;
const GUID CLSID_FsrmReportManager = {0x0058EF37, 0xAA66, 0x4C48, [0xBD, 0x5B, 0x2F, 0xCE, 0x43, 0x2A, 0xB0, 0xC8]};
@GUID(0x0058EF37, 0xAA66, 0x4C48, [0xBD, 0x5B, 0x2F, 0xCE, 0x43, 0x2A, 0xB0, 0xC8]);
struct FsrmReportManager;
const GUID CLSID_FsrmReportScheduler = {0xEA25F1B8, 0x1B8D, 0x4290, [0x8E, 0xE8, 0xE1, 0x7C, 0x12, 0xC2, 0xFE, 0x20]};
@GUID(0xEA25F1B8, 0x1B8D, 0x4290, [0x8E, 0xE8, 0xE1, 0x7C, 0x12, 0xC2, 0xFE, 0x20]);
struct FsrmReportScheduler;
const GUID CLSID_FsrmFileManagementJobManager = {0xEB18F9B2, 0x4C3A, 0x4321, [0xB2, 0x03, 0x20, 0x51, 0x20, 0xCF, 0xF6, 0x14]};
@GUID(0xEB18F9B2, 0x4C3A, 0x4321, [0xB2, 0x03, 0x20, 0x51, 0x20, 0xCF, 0xF6, 0x14]);
struct FsrmFileManagementJobManager;
const GUID CLSID_FsrmClassificationManager = {0xB15C0E47, 0xC391, 0x45B9, [0x95, 0xC8, 0xEB, 0x59, 0x6C, 0x85, 0x3F, 0x3A]};
@GUID(0xB15C0E47, 0xC391, 0x45B9, [0x95, 0xC8, 0xEB, 0x59, 0x6C, 0x85, 0x3F, 0x3A]);
struct FsrmClassificationManager;
const GUID CLSID_FsrmPipelineModuleConnector = {0xC7643375, 0x1EB5, 0x44DE, [0xA0, 0x62, 0x62, 0x35, 0x47, 0xD9, 0x33, 0xBC]};
@GUID(0xC7643375, 0x1EB5, 0x44DE, [0xA0, 0x62, 0x62, 0x35, 0x47, 0xD9, 0x33, 0xBC]);
struct FsrmPipelineModuleConnector;
const GUID CLSID_AdSyncTask = {0x2AE64751, 0xB728, 0x4D6B, [0x97, 0xA0, 0xB2, 0xDA, 0x2E, 0x7D, 0x2A, 0x3B]};
@GUID(0x2AE64751, 0xB728, 0x4D6B, [0x97, 0xA0, 0xB2, 0xDA, 0x2E, 0x7D, 0x2A, 0x3B]);
struct AdSyncTask;
const GUID CLSID_FsrmAccessDeniedRemediationClient = {0x100B4FC8, 0x74C1, 0x470F, [0xB1, 0xB7, 0xDD, 0x7B, 0x6B, 0xAE, 0x79, 0xBD]};
@GUID(0x100B4FC8, 0x74C1, 0x470F, [0xB1, 0xB7, 0xDD, 0x7B, 0x6B, 0xAE, 0x79, 0xBD]);
struct FsrmAccessDeniedRemediationClient;
const GUID IID_IFsrmQuotaBase = {0x1568A795, 0x3924, 0x4118, [0xB7, 0x4B, 0x68, 0xD8, 0xF0, 0xFA, 0x5D, 0xAF]};
@GUID(0x1568A795, 0x3924, 0x4118, [0xB7, 0x4B, 0x68, 0xD8, 0xF0, 0xFA, 0x5D, 0xAF]);
interface IFsrmQuotaBase : IFsrmObject
{
HRESULT get_QuotaLimit(VARIANT* quotaLimit);
HRESULT put_QuotaLimit(VARIANT quotaLimit);
HRESULT get_QuotaFlags(int* quotaFlags);
HRESULT put_QuotaFlags(int quotaFlags);
HRESULT get_Thresholds(SAFEARRAY** thresholds);
HRESULT AddThreshold(int threshold);
HRESULT DeleteThreshold(int threshold);
HRESULT ModifyThreshold(int threshold, int newThreshold);
HRESULT CreateThresholdAction(int threshold, FsrmActionType actionType, IFsrmAction* action);
HRESULT EnumThresholdActions(int threshold, IFsrmCollection* actions);
}
const GUID IID_IFsrmQuotaObject = {0x42DC3511, 0x61D5, 0x48AE, [0xB6, 0xDC, 0x59, 0xFC, 0x00, 0xC0, 0xA8, 0xD6]};
@GUID(0x42DC3511, 0x61D5, 0x48AE, [0xB6, 0xDC, 0x59, 0xFC, 0x00, 0xC0, 0xA8, 0xD6]);
interface IFsrmQuotaObject : IFsrmQuotaBase
{
HRESULT get_Path(BSTR* path);
HRESULT get_UserSid(BSTR* userSid);
HRESULT get_UserAccount(BSTR* userAccount);
HRESULT get_SourceTemplateName(BSTR* quotaTemplateName);
HRESULT get_MatchesSourceTemplate(short* matches);
HRESULT ApplyTemplate(BSTR quotaTemplateName);
}
const GUID IID_IFsrmQuota = {0x377F739D, 0x9647, 0x4B8E, [0x97, 0xD2, 0x5F, 0xFC, 0xE6, 0xD7, 0x59, 0xCD]};
@GUID(0x377F739D, 0x9647, 0x4B8E, [0x97, 0xD2, 0x5F, 0xFC, 0xE6, 0xD7, 0x59, 0xCD]);
interface IFsrmQuota : IFsrmQuotaObject
{
HRESULT get_QuotaUsed(VARIANT* used);
HRESULT get_QuotaPeakUsage(VARIANT* peakUsage);
HRESULT get_QuotaPeakUsageTime(double* peakUsageDateTime);
HRESULT ResetPeakUsage();
HRESULT RefreshUsageProperties();
}
const GUID IID_IFsrmAutoApplyQuota = {0xF82E5729, 0x6ABA, 0x4740, [0xBF, 0xC7, 0xC7, 0xF5, 0x8F, 0x75, 0xFB, 0x7B]};
@GUID(0xF82E5729, 0x6ABA, 0x4740, [0xBF, 0xC7, 0xC7, 0xF5, 0x8F, 0x75, 0xFB, 0x7B]);
interface IFsrmAutoApplyQuota : IFsrmQuotaObject
{
HRESULT get_ExcludeFolders(SAFEARRAY** folders);
HRESULT put_ExcludeFolders(SAFEARRAY* folders);
HRESULT CommitAndUpdateDerived(FsrmCommitOptions commitOptions, FsrmTemplateApplyOptions applyOptions, IFsrmDerivedObjectsResult* derivedObjectsResult);
}
const GUID IID_IFsrmQuotaManager = {0x8BB68C7D, 0x19D8, 0x4FFB, [0x80, 0x9E, 0xBE, 0x4F, 0xC1, 0x73, 0x40, 0x14]};
@GUID(0x8BB68C7D, 0x19D8, 0x4FFB, [0x80, 0x9E, 0xBE, 0x4F, 0xC1, 0x73, 0x40, 0x14]);
interface IFsrmQuotaManager : IDispatch
{
HRESULT get_ActionVariables(SAFEARRAY** variables);
HRESULT get_ActionVariableDescriptions(SAFEARRAY** descriptions);
HRESULT CreateQuota(BSTR path, IFsrmQuota* quota);
HRESULT CreateAutoApplyQuota(BSTR quotaTemplateName, BSTR path, IFsrmAutoApplyQuota* quota);
HRESULT GetQuota(BSTR path, IFsrmQuota* quota);
HRESULT GetAutoApplyQuota(BSTR path, IFsrmAutoApplyQuota* quota);
HRESULT GetRestrictiveQuota(BSTR path, IFsrmQuota* quota);
HRESULT EnumQuotas(BSTR path, FsrmEnumOptions options, IFsrmCommittableCollection* quotas);
HRESULT EnumAutoApplyQuotas(BSTR path, FsrmEnumOptions options, IFsrmCommittableCollection* quotas);
HRESULT EnumEffectiveQuotas(BSTR path, FsrmEnumOptions options, IFsrmCommittableCollection* quotas);
HRESULT Scan(BSTR strPath);
HRESULT CreateQuotaCollection(IFsrmCommittableCollection* collection);
}
const GUID IID_IFsrmQuotaManagerEx = {0x4846CB01, 0xD430, 0x494F, [0xAB, 0xB4, 0xB1, 0x05, 0x49, 0x99, 0xFB, 0x09]};
@GUID(0x4846CB01, 0xD430, 0x494F, [0xAB, 0xB4, 0xB1, 0x05, 0x49, 0x99, 0xFB, 0x09]);
interface IFsrmQuotaManagerEx : IFsrmQuotaManager
{
HRESULT IsAffectedByQuota(BSTR path, FsrmEnumOptions options, short* affected);
}
const GUID IID_IFsrmQuotaTemplate = {0xA2EFAB31, 0x295E, 0x46BB, [0xB9, 0x76, 0xE8, 0x6D, 0x58, 0xB5, 0x2E, 0x8B]};
@GUID(0xA2EFAB31, 0x295E, 0x46BB, [0xB9, 0x76, 0xE8, 0x6D, 0x58, 0xB5, 0x2E, 0x8B]);
interface IFsrmQuotaTemplate : IFsrmQuotaBase
{
HRESULT get_Name(BSTR* name);
HRESULT put_Name(BSTR name);
HRESULT CopyTemplate(BSTR quotaTemplateName);
HRESULT CommitAndUpdateDerived(FsrmCommitOptions commitOptions, FsrmTemplateApplyOptions applyOptions, IFsrmDerivedObjectsResult* derivedObjectsResult);
}
const GUID IID_IFsrmQuotaTemplateImported = {0x9A2BF113, 0xA329, 0x44CC, [0x80, 0x9A, 0x5C, 0x00, 0xFC, 0xE8, 0xDA, 0x40]};
@GUID(0x9A2BF113, 0xA329, 0x44CC, [0x80, 0x9A, 0x5C, 0x00, 0xFC, 0xE8, 0xDA, 0x40]);
interface IFsrmQuotaTemplateImported : IFsrmQuotaTemplate
{
HRESULT get_OverwriteOnCommit(short* overwrite);
HRESULT put_OverwriteOnCommit(short overwrite);
}
const GUID IID_IFsrmQuotaTemplateManager = {0x4173AC41, 0x172D, 0x4D52, [0x96, 0x3C, 0xFD, 0xC7, 0xE4, 0x15, 0xF7, 0x17]};
@GUID(0x4173AC41, 0x172D, 0x4D52, [0x96, 0x3C, 0xFD, 0xC7, 0xE4, 0x15, 0xF7, 0x17]);
interface IFsrmQuotaTemplateManager : IDispatch
{
HRESULT CreateTemplate(IFsrmQuotaTemplate* quotaTemplate);
HRESULT GetTemplate(BSTR name, IFsrmQuotaTemplate* quotaTemplate);
HRESULT EnumTemplates(FsrmEnumOptions options, IFsrmCommittableCollection* quotaTemplates);
HRESULT ExportTemplates(VARIANT* quotaTemplateNamesArray, BSTR* serializedQuotaTemplates);
HRESULT ImportTemplates(BSTR serializedQuotaTemplates, VARIANT* quotaTemplateNamesArray, IFsrmCommittableCollection* quotaTemplates);
}
const GUID IID_IFsrmFileGroup = {0x8DD04909, 0x0E34, 0x4D55, [0xAF, 0xAA, 0x89, 0xE1, 0xF1, 0xA1, 0xBB, 0xB9]};
@GUID(0x8DD04909, 0x0E34, 0x4D55, [0xAF, 0xAA, 0x89, 0xE1, 0xF1, 0xA1, 0xBB, 0xB9]);
interface IFsrmFileGroup : IFsrmObject
{
HRESULT get_Name(BSTR* name);
HRESULT put_Name(BSTR name);
HRESULT get_Members(IFsrmMutableCollection* members);
HRESULT put_Members(IFsrmMutableCollection members);
HRESULT get_NonMembers(IFsrmMutableCollection* nonMembers);
HRESULT put_NonMembers(IFsrmMutableCollection nonMembers);
}
const GUID IID_IFsrmFileGroupImported = {0xAD55F10B, 0x5F11, 0x4BE7, [0x94, 0xEF, 0xD9, 0xEE, 0x2E, 0x47, 0x0D, 0xED]};
@GUID(0xAD55F10B, 0x5F11, 0x4BE7, [0x94, 0xEF, 0xD9, 0xEE, 0x2E, 0x47, 0x0D, 0xED]);
interface IFsrmFileGroupImported : IFsrmFileGroup
{
HRESULT get_OverwriteOnCommit(short* overwrite);
HRESULT put_OverwriteOnCommit(short overwrite);
}
const GUID IID_IFsrmFileGroupManager = {0x426677D5, 0x018C, 0x485C, [0x8A, 0x51, 0x20, 0xB8, 0x6D, 0x00, 0xBD, 0xC4]};
@GUID(0x426677D5, 0x018C, 0x485C, [0x8A, 0x51, 0x20, 0xB8, 0x6D, 0x00, 0xBD, 0xC4]);
interface IFsrmFileGroupManager : IDispatch
{
HRESULT CreateFileGroup(IFsrmFileGroup* fileGroup);
HRESULT GetFileGroup(BSTR name, IFsrmFileGroup* fileGroup);
HRESULT EnumFileGroups(FsrmEnumOptions options, IFsrmCommittableCollection* fileGroups);
HRESULT ExportFileGroups(VARIANT* fileGroupNamesArray, BSTR* serializedFileGroups);
HRESULT ImportFileGroups(BSTR serializedFileGroups, VARIANT* fileGroupNamesArray, IFsrmCommittableCollection* fileGroups);
}
const GUID IID_IFsrmFileScreenBase = {0xF3637E80, 0x5B22, 0x4A2B, [0xA6, 0x37, 0xBB, 0xB6, 0x42, 0xB4, 0x1C, 0xFC]};
@GUID(0xF3637E80, 0x5B22, 0x4A2B, [0xA6, 0x37, 0xBB, 0xB6, 0x42, 0xB4, 0x1C, 0xFC]);
interface IFsrmFileScreenBase : IFsrmObject
{
HRESULT get_BlockedFileGroups(IFsrmMutableCollection* blockList);
HRESULT put_BlockedFileGroups(IFsrmMutableCollection blockList);
HRESULT get_FileScreenFlags(int* fileScreenFlags);
HRESULT put_FileScreenFlags(int fileScreenFlags);
HRESULT CreateAction(FsrmActionType actionType, IFsrmAction* action);
HRESULT EnumActions(IFsrmCollection* actions);
}
const GUID IID_IFsrmFileScreen = {0x5F6325D3, 0xCE88, 0x4733, [0x84, 0xC1, 0x2D, 0x6A, 0xEF, 0xC5, 0xEA, 0x07]};
@GUID(0x5F6325D3, 0xCE88, 0x4733, [0x84, 0xC1, 0x2D, 0x6A, 0xEF, 0xC5, 0xEA, 0x07]);
interface IFsrmFileScreen : IFsrmFileScreenBase
{
HRESULT get_Path(BSTR* path);
HRESULT get_SourceTemplateName(BSTR* fileScreenTemplateName);
HRESULT get_MatchesSourceTemplate(short* matches);
HRESULT get_UserSid(BSTR* userSid);
HRESULT get_UserAccount(BSTR* userAccount);
HRESULT ApplyTemplate(BSTR fileScreenTemplateName);
}
const GUID IID_IFsrmFileScreenException = {0xBEE7CE02, 0xDF77, 0x4515, [0x93, 0x89, 0x78, 0xF0, 0x1C, 0x5A, 0xFC, 0x1A]};
@GUID(0xBEE7CE02, 0xDF77, 0x4515, [0x93, 0x89, 0x78, 0xF0, 0x1C, 0x5A, 0xFC, 0x1A]);
interface IFsrmFileScreenException : IFsrmObject
{
HRESULT get_Path(BSTR* path);
HRESULT get_AllowedFileGroups(IFsrmMutableCollection* allowList);
HRESULT put_AllowedFileGroups(IFsrmMutableCollection allowList);
}
const GUID IID_IFsrmFileScreenManager = {0xFF4FA04E, 0x5A94, 0x4BDA, [0xA3, 0xA0, 0xD5, 0xB4, 0xD3, 0xC5, 0x2E, 0xBA]};
@GUID(0xFF4FA04E, 0x5A94, 0x4BDA, [0xA3, 0xA0, 0xD5, 0xB4, 0xD3, 0xC5, 0x2E, 0xBA]);
interface IFsrmFileScreenManager : IDispatch
{
HRESULT get_ActionVariables(SAFEARRAY** variables);
HRESULT get_ActionVariableDescriptions(SAFEARRAY** descriptions);
HRESULT CreateFileScreen(BSTR path, IFsrmFileScreen* fileScreen);
HRESULT GetFileScreen(BSTR path, IFsrmFileScreen* fileScreen);
HRESULT EnumFileScreens(BSTR path, FsrmEnumOptions options, IFsrmCommittableCollection* fileScreens);
HRESULT CreateFileScreenException(BSTR path, IFsrmFileScreenException* fileScreenException);
HRESULT GetFileScreenException(BSTR path, IFsrmFileScreenException* fileScreenException);
HRESULT EnumFileScreenExceptions(BSTR path, FsrmEnumOptions options, IFsrmCommittableCollection* fileScreenExceptions);
HRESULT CreateFileScreenCollection(IFsrmCommittableCollection* collection);
}
const GUID IID_IFsrmFileScreenTemplate = {0x205BEBF8, 0xDD93, 0x452A, [0x95, 0xA6, 0x32, 0xB5, 0x66, 0xB3, 0x58, 0x28]};
@GUID(0x205BEBF8, 0xDD93, 0x452A, [0x95, 0xA6, 0x32, 0xB5, 0x66, 0xB3, 0x58, 0x28]);
interface IFsrmFileScreenTemplate : IFsrmFileScreenBase
{
HRESULT get_Name(BSTR* name);
HRESULT put_Name(BSTR name);
HRESULT CopyTemplate(BSTR fileScreenTemplateName);
HRESULT CommitAndUpdateDerived(FsrmCommitOptions commitOptions, FsrmTemplateApplyOptions applyOptions, IFsrmDerivedObjectsResult* derivedObjectsResult);
}
const GUID IID_IFsrmFileScreenTemplateImported = {0xE1010359, 0x3E5D, 0x4ECD, [0x9F, 0xE4, 0xEF, 0x48, 0x62, 0x2F, 0xDF, 0x30]};
@GUID(0xE1010359, 0x3E5D, 0x4ECD, [0x9F, 0xE4, 0xEF, 0x48, 0x62, 0x2F, 0xDF, 0x30]);
interface IFsrmFileScreenTemplateImported : IFsrmFileScreenTemplate
{
HRESULT get_OverwriteOnCommit(short* overwrite);
HRESULT put_OverwriteOnCommit(short overwrite);
}
const GUID IID_IFsrmFileScreenTemplateManager = {0xCFE36CBA, 0x1949, 0x4E74, [0xA1, 0x4F, 0xF1, 0xD5, 0x80, 0xCE, 0xAF, 0x13]};
@GUID(0xCFE36CBA, 0x1949, 0x4E74, [0xA1, 0x4F, 0xF1, 0xD5, 0x80, 0xCE, 0xAF, 0x13]);
interface IFsrmFileScreenTemplateManager : IDispatch
{
HRESULT CreateTemplate(IFsrmFileScreenTemplate* fileScreenTemplate);
HRESULT GetTemplate(BSTR name, IFsrmFileScreenTemplate* fileScreenTemplate);
HRESULT EnumTemplates(FsrmEnumOptions options, IFsrmCommittableCollection* fileScreenTemplates);
HRESULT ExportTemplates(VARIANT* fileScreenTemplateNamesArray, BSTR* serializedFileScreenTemplates);
HRESULT ImportTemplates(BSTR serializedFileScreenTemplates, VARIANT* fileScreenTemplateNamesArray, IFsrmCommittableCollection* fileScreenTemplates);
}
const GUID IID_IFsrmReportManager = {0x27B899FE, 0x6FFA, 0x4481, [0xA1, 0x84, 0xD3, 0xDA, 0xAD, 0xE8, 0xA0, 0x2B]};
@GUID(0x27B899FE, 0x6FFA, 0x4481, [0xA1, 0x84, 0xD3, 0xDA, 0xAD, 0xE8, 0xA0, 0x2B]);
interface IFsrmReportManager : IDispatch
{
HRESULT EnumReportJobs(FsrmEnumOptions options, IFsrmCollection* reportJobs);
HRESULT CreateReportJob(IFsrmReportJob* reportJob);
HRESULT GetReportJob(BSTR taskName, IFsrmReportJob* reportJob);
HRESULT GetOutputDirectory(FsrmReportGenerationContext context, BSTR* path);
HRESULT SetOutputDirectory(FsrmReportGenerationContext context, BSTR path);
HRESULT IsFilterValidForReportType(FsrmReportType reportType, FsrmReportFilter filter, short* valid);
HRESULT GetDefaultFilter(FsrmReportType reportType, FsrmReportFilter filter, VARIANT* filterValue);
HRESULT SetDefaultFilter(FsrmReportType reportType, FsrmReportFilter filter, VARIANT filterValue);
HRESULT GetReportSizeLimit(FsrmReportLimit limit, VARIANT* limitValue);
HRESULT SetReportSizeLimit(FsrmReportLimit limit, VARIANT limitValue);
}
const GUID IID_IFsrmReportJob = {0x38E87280, 0x715C, 0x4C7D, [0xA2, 0x80, 0xEA, 0x16, 0x51, 0xA1, 0x9F, 0xEF]};
@GUID(0x38E87280, 0x715C, 0x4C7D, [0xA2, 0x80, 0xEA, 0x16, 0x51, 0xA1, 0x9F, 0xEF]);
interface IFsrmReportJob : IFsrmObject
{
HRESULT get_Task(BSTR* taskName);
HRESULT put_Task(BSTR taskName);
HRESULT get_NamespaceRoots(SAFEARRAY** namespaceRoots);
HRESULT put_NamespaceRoots(SAFEARRAY* namespaceRoots);
HRESULT get_Formats(SAFEARRAY** formats);
HRESULT put_Formats(SAFEARRAY* formats);
HRESULT get_MailTo(BSTR* mailTo);
HRESULT put_MailTo(BSTR mailTo);
HRESULT get_RunningStatus(FsrmReportRunningStatus* runningStatus);
HRESULT get_LastRun(double* lastRun);
HRESULT get_LastError(BSTR* lastError);
HRESULT get_LastGeneratedInDirectory(BSTR* path);
HRESULT EnumReports(IFsrmCollection* reports);
HRESULT CreateReport(FsrmReportType reportType, IFsrmReport* report);
HRESULT Run(FsrmReportGenerationContext context);
HRESULT WaitForCompletion(int waitSeconds, short* completed);
HRESULT Cancel();
}
const GUID IID_IFsrmReport = {0xD8CC81D9, 0x46B8, 0x4FA4, [0xBF, 0xA5, 0x4A, 0xA9, 0xDE, 0xC9, 0xB6, 0x38]};
@GUID(0xD8CC81D9, 0x46B8, 0x4FA4, [0xBF, 0xA5, 0x4A, 0xA9, 0xDE, 0xC9, 0xB6, 0x38]);
interface IFsrmReport : IDispatch
{
HRESULT get_Type(FsrmReportType* reportType);
HRESULT get_Name(BSTR* name);
HRESULT put_Name(BSTR name);
HRESULT get_Description(BSTR* description);
HRESULT put_Description(BSTR description);
HRESULT get_LastGeneratedFileNamePrefix(BSTR* prefix);
HRESULT GetFilter(FsrmReportFilter filter, VARIANT* filterValue);
HRESULT SetFilter(FsrmReportFilter filter, VARIANT filterValue);
HRESULT Delete();
}
const GUID IID_IFsrmReportScheduler = {0x6879CAF9, 0x6617, 0x4484, [0x87, 0x19, 0x71, 0xC3, 0xD8, 0x64, 0x5F, 0x94]};
@GUID(0x6879CAF9, 0x6617, 0x4484, [0x87, 0x19, 0x71, 0xC3, 0xD8, 0x64, 0x5F, 0x94]);
interface IFsrmReportScheduler : IDispatch
{
HRESULT VerifyNamespaces(VARIANT* namespacesSafeArray);
HRESULT CreateScheduleTask(BSTR taskName, VARIANT* namespacesSafeArray, BSTR serializedTask);
HRESULT ModifyScheduleTask(BSTR taskName, VARIANT* namespacesSafeArray, BSTR serializedTask);
HRESULT DeleteScheduleTask(BSTR taskName);
}
const GUID IID_IFsrmFileManagementJobManager = {0xEE321ECB, 0xD95E, 0x48E9, [0x90, 0x7C, 0xC7, 0x68, 0x5A, 0x01, 0x32, 0x35]};
@GUID(0xEE321ECB, 0xD95E, 0x48E9, [0x90, 0x7C, 0xC7, 0x68, 0x5A, 0x01, 0x32, 0x35]);
interface IFsrmFileManagementJobManager : IDispatch
{
HRESULT get_ActionVariables(SAFEARRAY** variables);
HRESULT get_ActionVariableDescriptions(SAFEARRAY** descriptions);
HRESULT EnumFileManagementJobs(FsrmEnumOptions options, IFsrmCollection* fileManagementJobs);
HRESULT CreateFileManagementJob(IFsrmFileManagementJob* fileManagementJob);
HRESULT GetFileManagementJob(BSTR name, IFsrmFileManagementJob* fileManagementJob);
}
const GUID IID_IFsrmFileManagementJob = {0x0770687E, 0x9F36, 0x4D6F, [0x87, 0x78, 0x59, 0x9D, 0x18, 0x84, 0x61, 0xC9]};
@GUID(0x0770687E, 0x9F36, 0x4D6F, [0x87, 0x78, 0x59, 0x9D, 0x18, 0x84, 0x61, 0xC9]);
interface IFsrmFileManagementJob : IFsrmObject
{
HRESULT get_Name(BSTR* name);
HRESULT put_Name(BSTR name);
HRESULT get_NamespaceRoots(SAFEARRAY** namespaceRoots);
HRESULT put_NamespaceRoots(SAFEARRAY* namespaceRoots);
HRESULT get_Enabled(short* enabled);
HRESULT put_Enabled(short enabled);
HRESULT get_OperationType(FsrmFileManagementType* operationType);
HRESULT put_OperationType(FsrmFileManagementType operationType);
HRESULT get_ExpirationDirectory(BSTR* expirationDirectory);
HRESULT put_ExpirationDirectory(BSTR expirationDirectory);
HRESULT get_CustomAction(IFsrmActionCommand* action);
HRESULT get_Notifications(SAFEARRAY** notifications);
HRESULT get_Logging(int* loggingFlags);
HRESULT put_Logging(int loggingFlags);
HRESULT get_ReportEnabled(short* reportEnabled);
HRESULT put_ReportEnabled(short reportEnabled);
HRESULT get_Formats(SAFEARRAY** formats);
HRESULT put_Formats(SAFEARRAY* formats);
HRESULT get_MailTo(BSTR* mailTo);
HRESULT put_MailTo(BSTR mailTo);
HRESULT get_DaysSinceFileCreated(int* daysSinceCreation);
HRESULT put_DaysSinceFileCreated(int daysSinceCreation);
HRESULT get_DaysSinceFileLastAccessed(int* daysSinceAccess);
HRESULT put_DaysSinceFileLastAccessed(int daysSinceAccess);
HRESULT get_DaysSinceFileLastModified(int* daysSinceModify);
HRESULT put_DaysSinceFileLastModified(int daysSinceModify);
HRESULT get_PropertyConditions(IFsrmCollection* propertyConditions);
HRESULT get_FromDate(double* fromDate);
HRESULT put_FromDate(double fromDate);
HRESULT get_Task(BSTR* taskName);
HRESULT put_Task(BSTR taskName);
HRESULT get_Parameters(SAFEARRAY** parameters);
HRESULT put_Parameters(SAFEARRAY* parameters);
HRESULT get_RunningStatus(FsrmReportRunningStatus* runningStatus);
HRESULT get_LastError(BSTR* lastError);
HRESULT get_LastReportPathWithoutExtension(BSTR* path);
HRESULT get_LastRun(double* lastRun);
HRESULT get_FileNamePattern(BSTR* fileNamePattern);
HRESULT put_FileNamePattern(BSTR fileNamePattern);
HRESULT Run(FsrmReportGenerationContext context);
HRESULT WaitForCompletion(int waitSeconds, short* completed);
HRESULT Cancel();
HRESULT AddNotification(int days);
HRESULT DeleteNotification(int days);
HRESULT ModifyNotification(int days, int newDays);
HRESULT CreateNotificationAction(int days, FsrmActionType actionType, IFsrmAction* action);
HRESULT EnumNotificationActions(int days, IFsrmCollection* actions);
HRESULT CreatePropertyCondition(BSTR name, IFsrmPropertyCondition* propertyCondition);
HRESULT CreateCustomAction(IFsrmActionCommand* customAction);
}
const GUID IID_IFsrmPropertyCondition = {0x326AF66F, 0x2AC0, 0x4F68, [0xBF, 0x8C, 0x47, 0x59, 0xF0, 0x54, 0xFA, 0x29]};
@GUID(0x326AF66F, 0x2AC0, 0x4F68, [0xBF, 0x8C, 0x47, 0x59, 0xF0, 0x54, 0xFA, 0x29]);
interface IFsrmPropertyCondition : IDispatch
{
HRESULT get_Name(BSTR* name);
HRESULT put_Name(BSTR name);
HRESULT get_Type(FsrmPropertyConditionType* type);
HRESULT put_Type(FsrmPropertyConditionType type);
HRESULT get_Value(BSTR* value);
HRESULT put_Value(BSTR value);
HRESULT Delete();
}
const GUID IID_IFsrmFileCondition = {0x70684FFC, 0x691A, 0x4A1A, [0xB9, 0x22, 0x97, 0x75, 0x2E, 0x13, 0x8C, 0xC1]};
@GUID(0x70684FFC, 0x691A, 0x4A1A, [0xB9, 0x22, 0x97, 0x75, 0x2E, 0x13, 0x8C, 0xC1]);
interface IFsrmFileCondition : IDispatch
{
HRESULT get_Type(FsrmFileConditionType* pVal);
HRESULT Delete();
}
const GUID IID_IFsrmFileConditionProperty = {0x81926775, 0xB981, 0x4479, [0x98, 0x8F, 0xDA, 0x17, 0x1D, 0x62, 0x73, 0x60]};
@GUID(0x81926775, 0xB981, 0x4479, [0x98, 0x8F, 0xDA, 0x17, 0x1D, 0x62, 0x73, 0x60]);
interface IFsrmFileConditionProperty : IFsrmFileCondition
{
HRESULT get_PropertyName(BSTR* pVal);
HRESULT put_PropertyName(BSTR newVal);
HRESULT get_PropertyId(FsrmFileSystemPropertyId* pVal);
HRESULT put_PropertyId(FsrmFileSystemPropertyId newVal);
HRESULT get_Operator(FsrmPropertyConditionType* pVal);
HRESULT put_Operator(FsrmPropertyConditionType newVal);
HRESULT get_ValueType(FsrmPropertyValueType* pVal);
HRESULT put_ValueType(FsrmPropertyValueType newVal);
HRESULT get_Value(VARIANT* pVal);
HRESULT put_Value(VARIANT newVal);
}
const GUID IID_IFsrmPropertyDefinition = {0xEDE0150F, 0xE9A3, 0x419C, [0x87, 0x7C, 0x01, 0xFE, 0x5D, 0x24, 0xC5, 0xD3]};
@GUID(0xEDE0150F, 0xE9A3, 0x419C, [0x87, 0x7C, 0x01, 0xFE, 0x5D, 0x24, 0xC5, 0xD3]);
interface IFsrmPropertyDefinition : IFsrmObject
{
HRESULT get_Name(BSTR* name);
HRESULT put_Name(BSTR name);
HRESULT get_Type(FsrmPropertyDefinitionType* type);
HRESULT put_Type(FsrmPropertyDefinitionType type);
HRESULT get_PossibleValues(SAFEARRAY** possibleValues);
HRESULT put_PossibleValues(SAFEARRAY* possibleValues);
HRESULT get_ValueDescriptions(SAFEARRAY** valueDescriptions);
HRESULT put_ValueDescriptions(SAFEARRAY* valueDescriptions);
HRESULT get_Parameters(SAFEARRAY** parameters);
HRESULT put_Parameters(SAFEARRAY* parameters);
}
const GUID IID_IFsrmPropertyDefinition2 = {0x47782152, 0xD16C, 0x4229, [0xB4, 0xE1, 0x0D, 0xDF, 0xE3, 0x08, 0xB9, 0xF6]};
@GUID(0x47782152, 0xD16C, 0x4229, [0xB4, 0xE1, 0x0D, 0xDF, 0xE3, 0x08, 0xB9, 0xF6]);
interface IFsrmPropertyDefinition2 : IFsrmPropertyDefinition
{
HRESULT get_PropertyDefinitionFlags(int* propertyDefinitionFlags);
HRESULT get_DisplayName(BSTR* name);
HRESULT put_DisplayName(BSTR name);
HRESULT get_AppliesTo(int* appliesTo);
HRESULT get_ValueDefinitions(IFsrmCollection* valueDefinitions);
}
const GUID IID_IFsrmPropertyDefinitionValue = {0xE946D148, 0xBD67, 0x4178, [0x8E, 0x22, 0x1C, 0x44, 0x92, 0x5E, 0xD7, 0x10]};
@GUID(0xE946D148, 0xBD67, 0x4178, [0x8E, 0x22, 0x1C, 0x44, 0x92, 0x5E, 0xD7, 0x10]);
interface IFsrmPropertyDefinitionValue : IDispatch
{
HRESULT get_Name(BSTR* name);
HRESULT get_DisplayName(BSTR* displayName);
HRESULT get_Description(BSTR* description);
HRESULT get_UniqueID(BSTR* uniqueID);
}
const GUID IID_IFsrmProperty = {0x4A73FEE4, 0x4102, 0x4FCC, [0x9F, 0xFB, 0x38, 0x61, 0x4F, 0x9E, 0xE7, 0x68]};
@GUID(0x4A73FEE4, 0x4102, 0x4FCC, [0x9F, 0xFB, 0x38, 0x61, 0x4F, 0x9E, 0xE7, 0x68]);
interface IFsrmProperty : IDispatch
{
HRESULT get_Name(BSTR* name);
HRESULT get_Value(BSTR* value);
HRESULT get_Sources(SAFEARRAY** sources);
HRESULT get_PropertyFlags(int* flags);
}
const GUID IID_IFsrmRule = {0xCB0DF960, 0x16F5, 0x4495, [0x90, 0x79, 0x3F, 0x93, 0x60, 0xD8, 0x31, 0xDF]};
@GUID(0xCB0DF960, 0x16F5, 0x4495, [0x90, 0x79, 0x3F, 0x93, 0x60, 0xD8, 0x31, 0xDF]);
interface IFsrmRule : IFsrmObject
{
HRESULT get_Name(BSTR* name);
HRESULT put_Name(BSTR name);
HRESULT get_RuleType(FsrmRuleType* ruleType);
HRESULT get_ModuleDefinitionName(BSTR* moduleDefinitionName);
HRESULT put_ModuleDefinitionName(BSTR moduleDefinitionName);
HRESULT get_NamespaceRoots(SAFEARRAY** namespaceRoots);
HRESULT put_NamespaceRoots(SAFEARRAY* namespaceRoots);
HRESULT get_RuleFlags(int* ruleFlags);
HRESULT put_RuleFlags(int ruleFlags);
HRESULT get_Parameters(SAFEARRAY** parameters);
HRESULT put_Parameters(SAFEARRAY* parameters);
HRESULT get_LastModified(VARIANT* lastModified);
}
const GUID IID_IFsrmClassificationRule = {0xAFC052C2, 0x5315, 0x45AB, [0x84, 0x1B, 0xC6, 0xDB, 0x0E, 0x12, 0x01, 0x48]};
@GUID(0xAFC052C2, 0x5315, 0x45AB, [0x84, 0x1B, 0xC6, 0xDB, 0x0E, 0x12, 0x01, 0x48]);
interface IFsrmClassificationRule : IFsrmRule
{
HRESULT get_ExecutionOption(FsrmExecutionOption* executionOption);
HRESULT put_ExecutionOption(FsrmExecutionOption executionOption);
HRESULT get_PropertyAffected(BSTR* property);
HRESULT put_PropertyAffected(BSTR property);
HRESULT get_Value(BSTR* value);
HRESULT put_Value(BSTR value);
}
const GUID IID_IFsrmPipelineModuleDefinition = {0x515C1277, 0x2C81, 0x440E, [0x8F, 0xCF, 0x36, 0x79, 0x21, 0xED, 0x4F, 0x59]};
@GUID(0x515C1277, 0x2C81, 0x440E, [0x8F, 0xCF, 0x36, 0x79, 0x21, 0xED, 0x4F, 0x59]);
interface IFsrmPipelineModuleDefinition : IFsrmObject
{
HRESULT get_ModuleClsid(BSTR* moduleClsid);
HRESULT put_ModuleClsid(BSTR moduleClsid);
HRESULT get_Name(BSTR* name);
HRESULT put_Name(BSTR name);
HRESULT get_Company(BSTR* company);
HRESULT put_Company(BSTR company);
HRESULT get_Version(BSTR* version);
HRESULT put_Version(BSTR version);
HRESULT get_ModuleType(FsrmPipelineModuleType* moduleType);
HRESULT get_Enabled(short* enabled);
HRESULT put_Enabled(short enabled);
HRESULT get_NeedsFileContent(short* needsFileContent);
HRESULT put_NeedsFileContent(short needsFileContent);
HRESULT get_Account(FsrmAccountType* retrievalAccount);
HRESULT put_Account(FsrmAccountType retrievalAccount);
HRESULT get_SupportedExtensions(SAFEARRAY** supportedExtensions);
HRESULT put_SupportedExtensions(SAFEARRAY* supportedExtensions);
HRESULT get_Parameters(SAFEARRAY** parameters);
HRESULT put_Parameters(SAFEARRAY* parameters);
}
const GUID IID_IFsrmClassifierModuleDefinition = {0xBB36EA26, 0x6318, 0x4B8C, [0x85, 0x92, 0xF7, 0x2D, 0xD6, 0x02, 0xE7, 0xA5]};
@GUID(0xBB36EA26, 0x6318, 0x4B8C, [0x85, 0x92, 0xF7, 0x2D, 0xD6, 0x02, 0xE7, 0xA5]);
interface IFsrmClassifierModuleDefinition : IFsrmPipelineModuleDefinition
{
HRESULT get_PropertiesAffected(SAFEARRAY** propertiesAffected);
HRESULT put_PropertiesAffected(SAFEARRAY* propertiesAffected);
HRESULT get_PropertiesUsed(SAFEARRAY** propertiesUsed);
HRESULT put_PropertiesUsed(SAFEARRAY* propertiesUsed);
HRESULT get_NeedsExplicitValue(short* needsExplicitValue);
HRESULT put_NeedsExplicitValue(short needsExplicitValue);
}
const GUID IID_IFsrmStorageModuleDefinition = {0x15A81350, 0x497D, 0x4ABA, [0x80, 0xE9, 0xD4, 0xDB, 0xCC, 0x55, 0x21, 0xFE]};
@GUID(0x15A81350, 0x497D, 0x4ABA, [0x80, 0xE9, 0xD4, 0xDB, 0xCC, 0x55, 0x21, 0xFE]);
interface IFsrmStorageModuleDefinition : IFsrmPipelineModuleDefinition
{
HRESULT get_Capabilities(FsrmStorageModuleCaps* capabilities);
HRESULT put_Capabilities(FsrmStorageModuleCaps capabilities);
HRESULT get_StorageType(FsrmStorageModuleType* storageType);
HRESULT put_StorageType(FsrmStorageModuleType storageType);
HRESULT get_UpdatesFileContent(short* updatesFileContent);
HRESULT put_UpdatesFileContent(short updatesFileContent);
}
const GUID IID_IFsrmClassificationManager = {0xD2DC89DA, 0xEE91, 0x48A0, [0x85, 0xD8, 0xCC, 0x72, 0xA5, 0x6F, 0x7D, 0x04]};
@GUID(0xD2DC89DA, 0xEE91, 0x48A0, [0x85, 0xD8, 0xCC, 0x72, 0xA5, 0x6F, 0x7D, 0x04]);
interface IFsrmClassificationManager : IDispatch
{
HRESULT get_ClassificationReportFormats(SAFEARRAY** formats);
HRESULT put_ClassificationReportFormats(SAFEARRAY* formats);
HRESULT get_Logging(int* logging);
HRESULT put_Logging(int logging);
HRESULT get_ClassificationReportMailTo(BSTR* mailTo);
HRESULT put_ClassificationReportMailTo(BSTR mailTo);
HRESULT get_ClassificationReportEnabled(short* reportEnabled);
HRESULT put_ClassificationReportEnabled(short reportEnabled);
HRESULT get_ClassificationLastReportPathWithoutExtension(BSTR* lastReportPath);
HRESULT get_ClassificationLastError(BSTR* lastError);
HRESULT get_ClassificationRunningStatus(FsrmReportRunningStatus* runningStatus);
HRESULT EnumPropertyDefinitions(FsrmEnumOptions options, IFsrmCollection* propertyDefinitions);
HRESULT CreatePropertyDefinition(IFsrmPropertyDefinition* propertyDefinition);
HRESULT GetPropertyDefinition(BSTR propertyName, IFsrmPropertyDefinition* propertyDefinition);
HRESULT EnumRules(FsrmRuleType ruleType, FsrmEnumOptions options, IFsrmCollection* Rules);
HRESULT CreateRule(FsrmRuleType ruleType, IFsrmRule* Rule);
HRESULT GetRule(BSTR ruleName, FsrmRuleType ruleType, IFsrmRule* Rule);
HRESULT EnumModuleDefinitions(FsrmPipelineModuleType moduleType, FsrmEnumOptions options, IFsrmCollection* moduleDefinitions);
HRESULT CreateModuleDefinition(FsrmPipelineModuleType moduleType, IFsrmPipelineModuleDefinition* moduleDefinition);
HRESULT GetModuleDefinition(BSTR moduleName, FsrmPipelineModuleType moduleType, IFsrmPipelineModuleDefinition* moduleDefinition);
HRESULT RunClassification(FsrmReportGenerationContext context, BSTR reserved);
HRESULT WaitForClassificationCompletion(int waitSeconds, short* completed);
HRESULT CancelClassification();
HRESULT EnumFileProperties(BSTR filePath, FsrmGetFilePropertyOptions options, IFsrmCollection* fileProperties);
HRESULT GetFileProperty(BSTR filePath, BSTR propertyName, FsrmGetFilePropertyOptions options, IFsrmProperty* property);
HRESULT SetFileProperty(BSTR filePath, BSTR propertyName, BSTR propertyValue);
HRESULT ClearFileProperty(BSTR filePath, BSTR property);
}
const GUID IID_IFsrmClassificationManager2 = {0x0004C1C9, 0x127E, 0x4765, [0xBA, 0x07, 0x6A, 0x31, 0x47, 0xBC, 0xA1, 0x12]};
@GUID(0x0004C1C9, 0x127E, 0x4765, [0xBA, 0x07, 0x6A, 0x31, 0x47, 0xBC, 0xA1, 0x12]);
interface IFsrmClassificationManager2 : IFsrmClassificationManager
{
HRESULT ClassifyFiles(SAFEARRAY* filePaths, SAFEARRAY* propertyNames, SAFEARRAY* propertyValues, FsrmGetFilePropertyOptions options);
}
const GUID IID_IFsrmPropertyBag = {0x774589D1, 0xD300, 0x4F7A, [0x9A, 0x24, 0xF7, 0xB7, 0x66, 0x80, 0x02, 0x50]};
@GUID(0x774589D1, 0xD300, 0x4F7A, [0x9A, 0x24, 0xF7, 0xB7, 0x66, 0x80, 0x02, 0x50]);
interface IFsrmPropertyBag : IDispatch
{
HRESULT get_Name(BSTR* name);
HRESULT get_RelativePath(BSTR* path);
HRESULT get_VolumeName(BSTR* volumeName);
HRESULT get_RelativeNamespaceRoot(BSTR* relativeNamespaceRoot);
HRESULT get_VolumeIndex(uint* volumeId);
HRESULT get_FileId(VARIANT* fileId);
HRESULT get_ParentDirectoryId(VARIANT* parentDirectoryId);
HRESULT get_Size(VARIANT* size);
HRESULT get_SizeAllocated(VARIANT* sizeAllocated);
HRESULT get_CreationTime(VARIANT* creationTime);
HRESULT get_LastAccessTime(VARIANT* lastAccessTime);
HRESULT get_LastModificationTime(VARIANT* lastModificationTime);
HRESULT get_Attributes(uint* attributes);
HRESULT get_OwnerSid(BSTR* ownerSid);
HRESULT get_FilePropertyNames(SAFEARRAY** filePropertyNames);
HRESULT get_Messages(SAFEARRAY** messages);
HRESULT get_PropertyBagFlags(uint* flags);
HRESULT GetFileProperty(BSTR name, IFsrmProperty* fileProperty);
HRESULT SetFileProperty(BSTR name, BSTR value);
HRESULT AddMessage(BSTR message);
HRESULT GetFileStreamInterface(FsrmFileStreamingMode accessMode, FsrmFileStreamingInterfaceType interfaceType, VARIANT* pStreamInterface);
}
const GUID IID_IFsrmPropertyBag2 = {0x0E46BDBD, 0x2402, 0x4FED, [0x9C, 0x30, 0x92, 0x66, 0xE6, 0xEB, 0x2C, 0xC9]};
@GUID(0x0E46BDBD, 0x2402, 0x4FED, [0x9C, 0x30, 0x92, 0x66, 0xE6, 0xEB, 0x2C, 0xC9]);
interface IFsrmPropertyBag2 : IFsrmPropertyBag
{
HRESULT GetFieldValue(FsrmPropertyBagField field, VARIANT* value);
HRESULT GetUntrustedInFileProperties(IFsrmCollection* props);
}
const GUID IID_IFsrmPipelineModuleImplementation = {0xB7907906, 0x2B02, 0x4CB5, [0x84, 0xA9, 0xFD, 0xF5, 0x46, 0x13, 0xD6, 0xCD]};
@GUID(0xB7907906, 0x2B02, 0x4CB5, [0x84, 0xA9, 0xFD, 0xF5, 0x46, 0x13, 0xD6, 0xCD]);
interface IFsrmPipelineModuleImplementation : IDispatch
{
HRESULT OnLoad(IFsrmPipelineModuleDefinition moduleDefinition, IFsrmPipelineModuleConnector* moduleConnector);
HRESULT OnUnload();
}
const GUID IID_IFsrmClassifierModuleImplementation = {0x4C968FC6, 0x6EDB, 0x4051, [0x9C, 0x18, 0x73, 0xB7, 0x29, 0x1A, 0xE1, 0x06]};
@GUID(0x4C968FC6, 0x6EDB, 0x4051, [0x9C, 0x18, 0x73, 0xB7, 0x29, 0x1A, 0xE1, 0x06]);
interface IFsrmClassifierModuleImplementation : IFsrmPipelineModuleImplementation
{
HRESULT get_LastModified(VARIANT* lastModified);
HRESULT UseRulesAndDefinitions(IFsrmCollection rules, IFsrmCollection propertyDefinitions);
HRESULT OnBeginFile(IFsrmPropertyBag propertyBag, SAFEARRAY* arrayRuleIds);
HRESULT DoesPropertyValueApply(BSTR property, BSTR value, short* applyValue, Guid idRule, Guid idPropDef);
HRESULT GetPropertyValueToApply(BSTR property, BSTR* value, Guid idRule, Guid idPropDef);
HRESULT OnEndFile();
}
const GUID IID_IFsrmStorageModuleImplementation = {0x0AF4A0DA, 0x895A, 0x4E50, [0x87, 0x12, 0xA9, 0x67, 0x24, 0xBC, 0xEC, 0x64]};
@GUID(0x0AF4A0DA, 0x895A, 0x4E50, [0x87, 0x12, 0xA9, 0x67, 0x24, 0xBC, 0xEC, 0x64]);
interface IFsrmStorageModuleImplementation : IFsrmPipelineModuleImplementation
{
HRESULT UseDefinitions(IFsrmCollection propertyDefinitions);
HRESULT LoadProperties(IFsrmPropertyBag propertyBag);
HRESULT SaveProperties(IFsrmPropertyBag propertyBag);
}
const GUID IID_IFsrmPipelineModuleConnector = {0xC16014F3, 0x9AA1, 0x46B3, [0xB0, 0xA7, 0xAB, 0x14, 0x6E, 0xB2, 0x05, 0xF2]};
@GUID(0xC16014F3, 0x9AA1, 0x46B3, [0xB0, 0xA7, 0xAB, 0x14, 0x6E, 0xB2, 0x05, 0xF2]);
interface IFsrmPipelineModuleConnector : IDispatch
{
HRESULT get_ModuleImplementation(IFsrmPipelineModuleImplementation* pipelineModuleImplementation);
HRESULT get_ModuleName(BSTR* userName);
HRESULT get_HostingUserAccount(BSTR* userAccount);
HRESULT get_HostingProcessPid(int* pid);
HRESULT Bind(IFsrmPipelineModuleDefinition moduleDefinition, IFsrmPipelineModuleImplementation moduleImplementation);
}
const GUID IID_DIFsrmClassificationEvents = {0x26942DB0, 0xDABF, 0x41D8, [0xBB, 0xDD, 0xB1, 0x29, 0xA9, 0xF7, 0x04, 0x24]};
@GUID(0x26942DB0, 0xDABF, 0x41D8, [0xBB, 0xDD, 0xB1, 0x29, 0xA9, 0xF7, 0x04, 0x24]);
interface DIFsrmClassificationEvents : IDispatch
{
}
|
D
|
/*******************************************************************************
Class which tracks the hash range associated with a set of nodes, with
methods to update and query this information. The update method hooks into
the client's ConnectionSet and adds new connections, as required.
The order in which the node hash range info is updated is also tracked,
allowing queries to determine, in the case of a hash range overlap, which is
the new and which the old node covering this hash range. This information is
required during DHT redistributions, when nodes may have overlapping hash
ranges.
Copyright:
Copyright (c) 2017 sociomantic labs GmbH. All rights reserved.
License:
Boost Software License Version 1.0. See LICENSE.txt for details.
*******************************************************************************/
module dhtproto.client.internal.NodeHashRanges;
import ocean.meta.types.Qualifiers;
import ocean.util.container.VoidBufferAsArrayOf;
/// ditto
public final class NodeHashRanges : NodeHashRangesBase
{
import swarm.neo.client.ConnectionSet;
import swarm.neo.client.RequestOnConn;
import swarm.neo.client.RequestHandlers : UseNodeDg;
import swarm.neo.AddrPort;
/// Set of connections to nodes (one per node)
private ConnectionSet connections;
/// Alias for a delegate which receives info about a new node hash-range.
private alias void delegate ( AddrPort addr, hash_t min, hash_t max )
NewNodeNotifier;
/// Delegate called when info about a new node hash-range is available.
private NewNodeNotifier new_node_dg;
/***************************************************************************
Constructor.
Params:
connections = ConnectionSet of the client; to be updated by
updateNodeHashRange(), when applicable
new_node_dg = delegate called when info about a new node hash-range
is available
***************************************************************************/
public this ( ConnectionSet connections, scope NewNodeNotifier new_node_dg )
{
this.connections = connections;
this.new_node_dg = new_node_dg;
}
/***************************************************************************
Helper encapsulating the node-selection logic required by requests that
get a single record from the DHT. Namely:
During a data redistribution, more than one node may be responsible
for a given key. In this case, the node that was most recently
reported as being responsible for the key is queried first, followed
by others (in order) until the record is located, an error occurs,
or no node has the record.
TODO: test the logic for retrying the request on other nodes which
previously covered the hash. This will require a full neo implementation
of the Redistribute request. See
https://github.com/sociomantic-tsunami/dhtnode/issues/21
Params:
h = hash to query
node_hash_ranges = buffer to receive hash range information of
nodes which cover the specified hash
use_node = delegate to call to gain access to a request-on-conn to
communicate with the selected node
get = delegate to communicate with the selected node (over the
request-on-conn provided by use_node). Should return true if the
get succeeded or false to try the next node
***************************************************************************/
public void getFromNode ( hash_t h,
VoidBufferAsArrayOf!(NodeHashRange) node_hash_ranges, UseNodeDg use_node,
scope bool delegate ( RequestOnConn.EventDispatcher ) get )
{
auto nodes = this.getNodesForHash(h, node_hash_ranges);
if ( nodes.length == 0 )
return;
foreach ( node_hash_range; nodes.array() )
{
bool try_next_node;
scope conn_dg =
( RequestOnConn.EventDispatcher conn )
{
try_next_node = get(conn);
};
use_node(node_hash_range.addr, conn_dg);
// If we got the record or an error occurred, don't try more nodes
if ( !try_next_node )
break;
}
}
/***************************************************************************
Helper encapsulating the node-selection logic required by requests that
remove a single record from the DHT. Namely:
During a data redistribution, more than one node may be responsible
for a given key. In this case, the node that was least recently
reported as being responsible for the key is queried first, followed
by others (in order) until the record is either removed from or does
not exist on all nodes, or an error occurs. The reason for removing
from the *least* recently responsible nodes first is to avoid
getting into inconsistent states if an error occurs while removing.
(If an error occurred when removing the record from the most
recently responsible node first, subsequent read requests would
fetch the removed record from older nodes, and the old value could
be forwarded from an older node, undoing the removal.)
TODO: test the logic for retrying the request on other nodes which
previously covered the hash. This will require a full neo implementation
of the Redistribute request. See
https://github.com/sociomantic-tsunami/dhtnode/issues/21
Params:
h = hash to query
node_hash_ranges = buffer to receive hash range information of
nodes which cover the specified hash
use_node = delegate to call to gain access to a request-on-conn to
communicate with the selected node
remove = delegate to communicate with the selected node (over the
request-on-conn provided by use_node). Should return true if the
removal succeeded or false on error
***************************************************************************/
public void removeFromNodes ( hash_t h,
VoidBufferAsArrayOf!(NodeHashRange) node_hash_ranges, UseNodeDg use_node,
scope bool delegate ( RequestOnConn.EventDispatcher ) remove )
{
auto nodes = this.getNodesForHash(h, node_hash_ranges);
if ( nodes.length == 0 )
return;
foreach_reverse ( node_hash_range; nodes.array() )
{
bool continue_to_next_node;
scope conn_dg =
( RequestOnConn.EventDispatcher conn )
{
continue_to_next_node = remove(conn);
};
use_node(node_hash_range.addr, conn_dg);
// If an error occurred, don't try more nodes
if ( !continue_to_next_node )
break;
}
}
/***************************************************************************
Helper encapsulating the node-selection logic required by requests that
put a single record to the DHT. Namely:
During a data redistribution, more than one node may be responsible
for a given key. In this case, the record is written to the node
that was most recently reported as being responsible for the key.
Params:
h = hash to query
node_hash_ranges = buffer to receive hash range information of
nodes which cover the specified hash
use_node = delegate to call to gain access to a request-on-conn to
communicate with the selected node
put = delegate to communicate with the selected node (over the
request-on-conn provided by use_node)
***************************************************************************/
public void putToNode ( hash_t h,
VoidBufferAsArrayOf!(NodeHashRange) node_hash_ranges, UseNodeDg use_node,
scope void delegate ( RequestOnConn.EventDispatcher ) put )
{
auto nodes = this.getNodesForHash(h, node_hash_ranges);
if ( nodes.length == 0 )
return;
scope conn_dg =
( RequestOnConn.EventDispatcher conn )
{
put(conn);
};
use_node(nodes.array()[0].addr, conn_dg);
}
/***************************************************************************
Adds a new node to the node hash range set and the ConnectionSet.
Params:
addr = address & port of new node
min = minimum hash of new node
max = maximum hash of new node
***************************************************************************/
override protected void newNode ( AddrPort addr, hash_t min, hash_t max )
{
super.newNode(addr, min, max);
// Also add the new connection to the ConnectionSet, if it's new.
if ( this.connections.get(addr) is null )
this.connections.start(addr);
if ( this.new_node_dg !is null )
{
this.new_node_dg(addr, min, max);
}
}
}
/*******************************************************************************
Struct containing information about the hash range of a single node.
*******************************************************************************/
public struct NodeHashRange
{
import ocean.math.Range;
import swarm.neo.AddrPort;
/// Convenience alias for a range of hash_t.
public alias Range!(hash_t) HashRange;
/// Address & port of node.
public AddrPort addr;
/// Range of hashes covered by node (hash_range.is_empty() may be true).
public HashRange hash_range;
/// Ordering integer. Higher numbers were updated more recently.
public ulong order;
}
/*******************************************************************************
Base class for NodeHashRanges, without a dependence on the ConnectionSet.
Purely exists for the sake of unittesting.
*******************************************************************************/
private class NodeHashRangesBase
{
import swarm.neo.AddrPort;
import swarm.neo.client.ConnectionSet;
import swarm.util.Hash : isWithinNodeResponsibility;
import ocean.core.array.Mutation : sort;
import ocean.core.Verify;
/// Value of the next created NodeHashRange's order field.
private static ulong order_counter;
/// Convenience alias for the comparison type of AddrPort.
private alias typeof(AddrPort.init.cmp_id()) Addr;
/// Map of IP address -> node hash range.
private NodeHashRange[Addr] node_hash_ranges;
/***************************************************************************
Returns:
the number of nodes about which hash-range info is known
***************************************************************************/
public size_t length ( )
{
return this.node_hash_ranges.length;
}
/***************************************************************************
Adds or modifies the hash range associated with the specified node. If
the node is not already in the set, it is added and also added to the
client's ConnectionSet (this.connections).
Params:
addr = address & port of node
min = miniumum hash which the node is responsible for
max = maxiumum hash which the node is responsible for
***************************************************************************/
public void updateNodeHashRange ( AddrPort addr, hash_t min, hash_t max )
{
// Update an existing node.
if ( auto nhr = addr.cmp_id in this.node_hash_ranges )
{
verify(nhr.addr == addr);
nhr.hash_range = NodeHashRange.HashRange(min, max);
nhr.order = order_counter++;
}
// Or add a new node.
else
this.newNode(addr, min, max);
}
/***************************************************************************
Gets the list of nodes (along with hash range and ordering information)
which cover the specified hash, sorted (descending) by the values of
their `order` fields. (This means that the node most recently reported
as covering the specified hash will appear first in the list.)
Params:
h = hash to query
node_hash_ranges = buffer to receive hash range information of
nodes which cover the specified hash
Returns:
hash range information of nodes which cover the specified hash (a
slice of node_hash_ranges)
***************************************************************************/
public VoidBufferAsArrayOf!(NodeHashRange) getNodesForHash ( hash_t h,
VoidBufferAsArrayOf!(NodeHashRange) node_hash_ranges )
{
node_hash_ranges.length = 0;
foreach ( nhr; this.node_hash_ranges )
{
if ( isWithinNodeResponsibility(h,
nhr.hash_range.min, nhr.hash_range.max) )
{
node_hash_ranges ~= nhr;
}
}
bool sortPred ( NodeHashRange e1, NodeHashRange e2 )
{
verify(e1.order != e2.order);
return e1.order > e2.order;
}
node_hash_ranges.array().sort(&sortPred);
return node_hash_ranges;
}
/***************************************************************************
Adds a new node to the set. (This method is protected as derived classes
may wish to add extra behaviour when adding a new node.)
Params:
addr = address & port of new node
min = minimum hash of new node
max = maximum hash of new node
***************************************************************************/
protected void newNode ( AddrPort addr, hash_t min, hash_t max )
{
this.node_hash_ranges[addr.cmp_id] = NodeHashRange(
addr, NodeHashRange.HashRange(min, max), order_counter++);
}
}
version ( unittest )
{
import ocean.core.Test;
import Integer = ocean.text.convert.Integer_tango;
import swarm.neo.AddrPort;
import ocean.core.BitManip : bitswap;
alias NodeHashRange.HashRange HR;
void checkTestCase ( VoidBufferAsArrayOf!(NodeHashRange) r1,
NodeHashRange[] r2, long line_num = __LINE__ )
{
auto t = new NamedTest(idup("Test at line " ~ Integer.toString(line_num)));
t.test!("==")(r1.length, r2.length);
foreach ( i, e; r1.array() )
{
t.test!("==")(e.addr, r2[i].addr);
t.test!("==")(e.hash_range.min, r2[i].hash_range.min);
t.test!("==")(e.hash_range.max, r2[i].hash_range.max);
t.test!("==")(e.order, r2[i].order);
}
}
}
// Tests for hash range overlaps and gaps
unittest
{
auto addr1 = AddrPort(1, 1);
auto addr2 = AddrPort(2, 2);
void[] backing;
auto ranges = VoidBufferAsArrayOf!(NodeHashRange)(&backing);
auto hr = new NodeHashRangesBase;
// Initially empty
hr.getNodesForHash(0, ranges);
checkTestCase(ranges, []);
// One node covering the whole range
hr.updateNodeHashRange(addr1, hash_t.min, hash_t.max);
hr.getNodesForHash(0, ranges);
checkTestCase(ranges,
[NodeHashRange(addr1, HR(hash_t.min, hash_t.max), 0)]);
// A second node covering half the range (overlap)
hr.updateNodeHashRange(addr2, 0x8000000000000000, hash_t.max);
hr.getNodesForHash(0, ranges);
checkTestCase(ranges,
[NodeHashRange(addr1, HR(hash_t.min, hash_t.max), 0)]);
hr.getNodesForHash(hash_t.max, ranges);
checkTestCase(ranges,
[NodeHashRange(addr2, HR(0x8000000000000000, hash_t.max), 1),
NodeHashRange(addr1, HR(hash_t.min, hash_t.max), 0)]);
// Change the range of the first node to cover the other half of the range
hr.updateNodeHashRange(addr1, hash_t.min, 0x7fffffffffffffff);
hr.getNodesForHash(0, ranges);
checkTestCase(ranges,
[NodeHashRange(addr1, HR(hash_t.min, 0x7fffffffffffffff), 2)]);
hr.getNodesForHash(hash_t.max, ranges);
checkTestCase(ranges,
[NodeHashRange(addr2, HR(0x8000000000000000, hash_t.max), 1)]);
// Change the range of the second node to create a gap
// (Note that bitswap is used to mimic the internal behaviour of
// isWithinNodeResponsibility, used in getNodesForHash.)
hr.updateNodeHashRange(addr2, 0x9000000000000000, hash_t.max);
hr.getNodesForHash(bitswap(0x8000000000000000), ranges);
checkTestCase(ranges, []);
hr.getNodesForHash(hash_t.max, ranges);
checkTestCase(ranges,
[NodeHashRange(addr2, HR(0x9000000000000000, hash_t.max), 3)]);
}
// Tests for hash range ordering
unittest
{
// Reset ordering counter, as it was modified in other unittests
NodeHashRangesBase.order_counter = 0;
auto addr1 = AddrPort(1, 1);
auto addr2 = AddrPort(2, 2);
auto addr3 = AddrPort(3, 3);
auto range = HR(hash_t.min, hash_t.max);
void[] backing;
auto ranges = VoidBufferAsArrayOf!(NodeHashRange)(&backing);
auto hr = new NodeHashRangesBase;
// Initially empty
hr.getNodesForHash(0, ranges);
checkTestCase(ranges, []);
// One node
hr.updateNodeHashRange(addr1, range.min, range.max);
hr.getNodesForHash(0, ranges);
checkTestCase(ranges,
[NodeHashRange(addr1, range, 0)]);
// Add a second node
hr.updateNodeHashRange(addr2, range.min, range.max);
hr.getNodesForHash(0, ranges);
checkTestCase(ranges,
[NodeHashRange(addr2, range, 1),
NodeHashRange(addr1, range, 0)]);
// Add a third node
hr.updateNodeHashRange(addr3, range.min, range.max);
hr.getNodesForHash(0, ranges);
checkTestCase(ranges,
[NodeHashRange(addr3, range, 2),
NodeHashRange(addr2, range, 1),
NodeHashRange(addr1, range, 0)]);
// Modify the first node
hr.updateNodeHashRange(addr1, range.min, range.max);
hr.getNodesForHash(0, ranges);
checkTestCase(ranges,
[NodeHashRange(addr1, range, 3),
NodeHashRange(addr3, range, 2),
NodeHashRange(addr2, range, 1)]);
// Modify the third node
hr.updateNodeHashRange(addr3, range.min, range.max);
hr.getNodesForHash(0, ranges);
checkTestCase(ranges,
[NodeHashRange(addr3, range, 4),
NodeHashRange(addr1, range, 3),
NodeHashRange(addr2, range, 1)]);
}
|
D
|
const int SPL_COST_Firestorm = 200;
const int STEP_Firestorm = 50;
const int SPL_Damage_Firestorm = 75;
const int SPL_PYRO_DAMAGE_PER_SEC = 20;
instance Spell_Pyrokinesis(C_Spell_Proto)
{
time_per_mana = 30;
damage_per_level = SPL_Damage_Firestorm;
damagetype = DAM_MAGIC;
canTurnDuringInvest = TRUE;
};
func int Spell_Logic_Pyrokinesis(var int manaInvested)
{
if(self.attribute[ATR_MANA] < STEP_Firestorm)
{
return SPL_DONTINVEST;
};
if(manaInvested <= (STEP_Firestorm * 1))
{
self.aivar[AIV_SpellLevel] = 1;
return SPL_STATUS_CANINVEST_NO_MANADEC;
}
else if((manaInvested > (STEP_Firestorm * 1)) && (self.aivar[AIV_SpellLevel] <= 1))
{
Npc_ChangeAttribute(self,ATR_MANA,-STEP_Firestorm);
self.aivar[AIV_SpellLevel] = 2;
return SPL_NEXTLEVEL;
}
else if((manaInvested > (STEP_Firestorm * 2)) && (self.aivar[AIV_SpellLevel] <= 2))
{
Npc_ChangeAttribute(self,ATR_MANA,-STEP_Firestorm);
self.aivar[AIV_SpellLevel] = 3;
return SPL_NEXTLEVEL;
}
else if((manaInvested > (STEP_Firestorm * 3)) && (self.aivar[AIV_SpellLevel] <= 3))
{
Npc_ChangeAttribute(self,ATR_MANA,-STEP_Firestorm);
self.aivar[AIV_SpellLevel] = 4;
return SPL_NEXTLEVEL;
}
else if((manaInvested > (STEP_Firestorm * 3)) && (self.aivar[AIV_SpellLevel] == 4))
{
return SPL_DONTINVEST;
};
return SPL_STATUS_CANINVEST_NO_MANADEC;
};
func void Spell_Cast_Pyrokinesis(var int spellLevel)
{
Npc_ChangeAttribute(self,ATR_MANA,-STEP_Firestorm);
self.aivar[AIV_SelectSpell] += 1;
};
|
D
|
class GartenObject {
var int inst;
var int row;
var int column;
var int time;
};
const int MAX_GARTEN = 36; //Wir definieren diese Konstante, um unser System leicher anpassen zu können, z.B. bei vielen Monstern. Außerdem ist das schöner.
var int GartenArray[MAX_GARTEN];
var int nextGartenIndex;
instance GartenObject@(GartenObject);
FUNC INT GartenFeldIstFrei(var int m, var int n)
{
if (m < 0)
|| (m >= 6)
|| (n < 0)
|| (n >= 6)
{
return FALSE;
};
if (MEM_ReadStatArr(GartenArray, m*6+n) == 0)
{
return TRUE;
};
return FALSE;
};
func void AddToGartenArray(var int itm, var int m, var int n) {
var int hndl; hndl = new(GartenObject@);
MEM_WriteStatArr(GartenArray, m*6+n, hndl); // GartenArray[nextGartenIndex] = hndl;
nextGartenIndex += 1; // Beim nächsten Mal in den nächsten Index schreiben
var GartenObject myGartenObject; myGartenObject = get(hndl);
myGartenObject.inst = itm;
myGartenObject.row = m;
myGartenObject.column = n;
myGartenObject.time = 0;
};
func void RemoveGartenObject(var int hndl) {
if (nextGartenIndex == 0) { // Das Array ist leer.
return;
};
delete(hndl); // Hier erledigen wir den PM-Teil unseres Destruktors, alles weitere macht PM dann selber. Unter anderem wird versucht, Garten_Object_Delete() aufzurufen, allerdings gibt es diese Funktion nicht (sie ist optional)
var int i; i = 0; // Das mag verwirren, aber ich baue bloß eine Schleife in Daedalus. Mit dem neuen Ikarus-Release geht das auch wesentlich schöner.
var int pos; pos = MEM_StackPos.position; // Stellt euch einfach vor, das hier wäre eine While(1)-Schleife. Zur Übersicht habe ich eingerückt.
var int h; h = MEM_ReadStatArr(GartenArray, i); // h = GartenArray;
if (h == hndl) { // Wir haben unsere Referenz gefunden
MEM_WriteStatArr(GartenArray, i, 0); // Alte Referenz mit der letzten Referenz überschreiben
nextGartenIndex -= 1; // Unseren Zähler dekrementieren
return; // Mehr wollen wir nicht machen.
};
i += 1;
if (i >= nextGartenIndex) { // Wenn i größer oder gleich dem nextGartenIndex ist, haben wir das Array komplett durchlaufen.
return;
};
MEM_StackPos.position = pos;
};
FUNC VOID FillGarten(var int inst, var int m, var int n)
{
if (GartenFeldIstFrei(m-1, n-1))
{
AddToGartenArray(inst, m-1, n-1);
};
if (GartenFeldIstFrei(m-1, n))
{
AddToGartenArray(inst, m-1, n);
};
if (GartenFeldIstFrei(m-1, n+1))
{
AddToGartenArray(inst, m-1, n+1);
};
if (GartenFeldIstFrei(m+1, n-1))
{
AddToGartenArray(inst, m+1, n-1);
};
if (GartenFeldIstFrei(m+1, n))
{
AddToGartenArray(inst, m+1, n);
};
if (GartenFeldIstFrei(m+1, n+1))
{
AddToGartenArray(inst, m+1, n+1);
};
if (GartenFeldIstFrei(m-1, n-1))
{
AddToGartenArray(inst, m, n-1);
};
if (GartenFeldIstFrei(m-1, n-1))
{
AddToGartenArray(inst, m, n+1);
};
};
FUNC INT GetGartenObjectTime(var int itm)
{
return 0;
};
func void ActualizeGarten() {
if (nextGartenIndex == 0) { // Das Array ist leer.
return;
};
var int i; i = 0; // Das mag verwirren, aber ich baue bloß eine Schleife in Daedalus. Mit dem neuen Ikarus-Release geht das auch wesentlich schöner.
var int pos; pos = MEM_StackPos.position; // Stellt euch einfach vor, das hier wäre eine While(1)-Schleife. Zur Übersicht habe ich eingerückt.
var int hndl; hndl = MEM_ReadStatArr(GartenArray, i); // hndl = GartenArray;
var GartenObject myGartenObject; myGartenObject = get(hndl);
//Jetzt haben wir unser Objekt!
myGartenObject.time += 1;
if (myGartenObject.time >= GetGartenObjectTime(myGartenObject.inst))
{
FillGarten(myGartenObject.inst, myGartenObject.row, myGartenObject.column);
myGartenObject.time = 0;
};
i += 1; // Falls ich ein Objekt gelöscht habe, muss ich den selben Index nochmal lesen.
if (i >= nextGartenIndex) { // Wenn i größer oder gleich dem nextGartenIndex ist, haben wir das Array komplett durchlaufen.
return;
};
MEM_StackPos.position = pos;
};
const string GartenObject_Struct = "int int int int";
|
D
|
/*
TEST_OUTPUT:
---
fail_compilation/fail10964.d(28): Error: 'fail10964.S.__postblit' is not nothrow
fail_compilation/fail10964.d(29): Error: 'fail10964.S.__postblit' is not nothrow
fail_compilation/fail10964.d(30): Error: 'fail10964.S.__postblit' is not nothrow
fail_compilation/fail10964.d(33): Error: 'fail10964.S.__postblit' is not nothrow
fail_compilation/fail10964.d(34): Error: 'fail10964.S.__postblit' is not nothrow
fail_compilation/fail10964.d(35): Error: 'fail10964.S.__postblit' is not nothrow
fail_compilation/fail10964.d(22): Error: function 'fail10964.foo' is nothrow yet may throw
---
*/
struct S
{
this(this)
{
throw new Exception("BOOM!");
}
}
void foo() nothrow
{
S ss;
S[1] sa;
// TOKassign
ss = ss;
sa = ss;
sa = sa;
// TOKconstruct
S ss2 = ss;
S[1] sa2 = ss;
S[1] sa3 = sa;
}
|
D
|
// cpu.d -- Architecture "Cpu" selector
// This module will select the Cpu namespace for the currently selected target architecture
module kernel.arch.cpu;
import kernel.arch.select;
mixin(PublicArchImport!("cpu"));
|
D
|
module sm.parser;
import std.outbuffer;
import pey.common;
import sm.spec;
import sm.lexer;
class ParserException : Exception {
private static string fmt =
"[c%d-%d r%d c%d]: %s";
Token token;
this(string msg, Token token) {
this.token = token;
super(format(fmt, token.beg, token.end, token.row, token.col, msg));
}
}
struct Argument {
dstring ident;
int value;
this(int value) {
ident = new dchar[0];
this.value = value;
}
this(dstring ident) {
this.ident = ident;
}
}
struct Instruction {
Token token;
OpCode op;
Argument[3] args;
dstring label;
int data;
}
class Parser {
Lexer lexer;
Token token;
bool empty;
int regStack = 15;
int regTarget = 14;
int[dstring] aliases;
Instruction[8] instBuf;
Instruction[] instAux;
this(Lexer lexer) {
this.lexer = lexer;
reset();
}
private void next() {
if(empty) return;
empty = !lexer.parseToken(token);
}
private void expect(TokenType type) {
if(token.type != type)
throw exception(format("Expected %s, got %s.", type, token.type));
}
Exception exception(string msg) {
return new ParserException(msg, token);
}
void reset() {
empty = false;
next();
}
private int getRegister(int def = -1, bool gotoNext = true) {
int reg;
if(token.type == TokenType.Register) {
reg = token.imm;
} else if(token.type == TokenType.Identifier) {
int* ptr = (token.ident in aliases);
if(ptr == null) {
if(def != -1) return def;
throw exception(format("Expected a register, got %s.", token.type));
}
reg = *ptr;
} else {
if(def != -1) return def;
throw exception(format("Expected a register, got %s.", token.type));
}
if(gotoNext)
next();
return reg;
}
bool parseInstruction(ref Instruction inst) {
if(instAux.length > 0) {
inst = instAux[0];
instAux = instAux[1..$];
return true;
}
while(!empty) {
if(token.type == TokenType.Identifier) {
inst.token = token;
inst.op = OpCode.Label;
inst.label = token.ident;
next();
expect(TokenType.Colon);
next();
return true;
}
if(token.type == TokenType.Immediate) {
inst.token = token;
inst.op = OpCode.Data;
inst.data = token.imm;
next();
return true;
}
if(token.type != TokenType.Op)
throw exception("Expected an Op, Identifier, or Data.");
switch(token.op) {
case OpCode.Noop:
inst.token = token;
inst.op = token.op;
next();
return true;
case OpCode.Add: .. case OpCode.ConditionalAdd:
inst.token = token;
inst.op = token.op;
next();
// dest
inst.args[0] = Argument(getRegister());
// left / condition
inst.args[1] = Argument(getRegister());
// right / value
inst.args[2] = Argument(getRegister());
return true;
case OpCode.LoadMemory:
case OpCode.StoreMemory:
case OpCode.Branch:
case OpCode.BitNot:
case OpCode.Negate:
case OpCode.LogicNot:
case OpCode.PopCount:
case OpCode.BitReverse:
inst.token = token;
inst.op = token.op;
next();
// dest / condition
inst.args[0] = Argument(getRegister());
// other
inst.args[1] = Argument(getRegister());
return true;
case OpCode.ShortJump:
inst.token = token;
next();
int regAddress = getRegister(-2, false);
// jmp LABEL (unconditional, implicit target)
if(regAddress == -2) {
expect(TokenType.Identifier);
inst.op = OpCode.Immediate;
inst.args[0] = Argument(regTarget);
inst.args[1] = Argument(token.ident);
next();
instBuf[0].op = OpCode.Jump;
instBuf[0].token = inst.token;
instBuf[0].args[0] = Argument(regStack);
instBuf[0].args[1] = Argument(regTarget);
instAux = instBuf[0..1];
return true;
}
next();
// jmp REG (unconditional)
inst.op = OpCode.Jump;
inst.args[0] = Argument(regStack);
// address
inst.args[1] = Argument(regAddress);
return true;
case OpCode.Jump:
inst.token = token;
next();
int regCondition = getRegister();
int regAddress = getRegister(-2, false);
// jmp REG LABEL (implicit target)
if(regAddress == -2) {
expect(TokenType.Identifier);
inst.op = OpCode.Immediate;
inst.args[0] = Argument(regTarget);
inst.args[1] = Argument(token.ident);
next();
instBuf[0].op = OpCode.Jump;
instBuf[0].token = inst.token;
instBuf[0].args[0] = Argument(regCondition);
instBuf[0].args[1] = Argument(regTarget);
instAux = instBuf[0..1];
return true;
}
next();
// jmp REG REG
inst.op = OpCode.Jump;
inst.args[0] = Argument(regCondition);
// address
inst.args[1] = Argument(regAddress);
return true;
case OpCode.Move:
inst.token = token;
inst.op = OpCode.ConditionalMove;
next();
// dest
inst.args[0] = Argument(getRegister());
// condition
inst.args[1] = Argument(regStack);
// source
inst.args[2] = Argument(getRegister());
return true;
// Implicit stack ops
case OpCode.Call:
case OpCode.Pop:
case OpCode.Push:
inst.token = token;
inst.op = token.op;
next();
// dest
inst.args[0] = Argument(getRegister());
// right / value
inst.args[1] = Argument(getRegister(regStack));
return true;
case OpCode.Return:
inst.token = token;
inst.op = token.op;
next();
// stack pointer
inst.args[1] = Argument(getRegister(regStack));
return true;
case OpCode.ShortCall:
inst.token = token;
inst.op = OpCode.Immediate;
next();
// address
expect(TokenType.Identifier);
inst.args[0] = Argument(regTarget);
inst.args[1] = Argument(token.ident);
next();
instBuf[0].op = OpCode.Call;
instBuf[0].token = token;
instBuf[0].args[0] = Argument(regTarget);
instBuf[0].args[1] = Argument(regStack);
instAux = instBuf[0..1];
return true;
case OpCode.ImmediateLow:
case OpCode.ImmediateHigh:
case OpCode.Immediate:
inst.token = token;
inst.op = token.op;
next();
// dest
inst.args[0] = Argument(getRegister());
// immediate
if(token.type == TokenType.Immediate) {
inst.args[1] = Argument(token.imm);
} else if(token.type == TokenType.Identifier) {
inst.args[1] = Argument(token.ident);
} else {
exception(format(
"Expected immediate or identifier, got %s.",
token.type));
}
next();
return true;
case OpCode.Alias:
next();
// name
expect(TokenType.Identifier);
dstring ident = token.ident;
next();
// value
expect(TokenType.Register);
aliases[ident] = token.imm;
next();
break;
case OpCode.Offset:
inst.token = token;
inst.op = token.op;
next();
// address
expect(TokenType.Immediate);
inst.data = token.imm;
next();
return true;
case OpCode.Stack:
next();
// register
expect(TokenType.Register);
regStack = token.imm;
next();
break;
case OpCode.Target:
next();
// register
expect(TokenType.Register);
regTarget = token.imm;
next();
break;
default:
throw exception(format("Unrecognized Opcode: %s", token.op));
}
}
return false;
}
}
|
D
|
/**
Differentiable power function module.
*/
module diffengine.pow;
import std.math : mathLog = log, mathPow = pow;
import std.traits : isNumeric;
import diffengine.differentiable :
Differentiable,
DiffContext,
EvalContext;
import diffengine.mul : mul;
import diffengine.div : div;
import diffengine.add_sub : add;
import diffengine.log : log;
@safe:
/**
Differentiable square class.
Params:
R = result type.
*/
private final class Square(R) : Differentiable!R
{
this(const(Differentiable!R) x) const @nogc nothrow pure scope
in (x)
{
this.x_ = x;
}
override R opCall() const @nogc nothrow pure return scope
{
auto x = x_();
return x * x;
}
override R evaluate(scope EvalContext!R context) const nothrow pure
{
auto x = context.evaluate(x_);
return x * x;
}
const(Differentiable!R) differentiate(scope DiffContext!R context) const nothrow pure return scope
{
auto xDiff = context.diff(x_);
return context.mul(context.mul(context.two, x_), xDiff);
}
private:
const(Differentiable!R) x_;
}
const(Square!R) square(R)(const(Differentiable!R) x) nothrow pure
{
return new const(Square!R)(x);
}
nothrow pure unittest
{
import std.math : isClose;
import diffengine.differentiable : diffContext;
import diffengine.parameter : param;
auto p = param(3.0);
auto p2 = p.square();
assert(p2().isClose(9.0));
auto p2d = p2.differentiate(p.diffContext);
assert(p2d().isClose(6.0));
auto p2dd = p2d.differentiate(p.diffContext);
assert(p2dd().isClose(2.0));
}
nothrow pure unittest
{
import std.math : isClose;
import diffengine.differentiable : evalContext;
import diffengine.parameter : param;
auto p = param(3.0);
auto p2 = p.square();
auto context = evalContext!double();
assert(context.evaluate(p2).isClose(9.0));
assert(context.callCount == 2);
assert(context.evaluateCount == 2);
assert(context.cacheHitCount == 0);
assert(context.evaluate(p2).isClose(9.0));
assert(context.callCount == 3);
assert(context.evaluateCount == 2);
assert(context.cacheHitCount == 1);
}
/**
Square for numeric.
Params:
x = value
Returns:
squared value.
*/
T square(T)(T x) @nogc nothrow pure if(isNumeric!T)
{
return x ^^ T(2);
}
///
@nogc nothrow pure unittest
{
import std.math : isClose;
assert(square(4.0).isClose(16.0));
}
/**
Differentiable power class.
Params:
R = result type.
*/
final class Power(R) : Differentiable!R
{
this(const(Differentiable!R) lhs, const(Differentiable!R) rhs) const @nogc nothrow pure scope
in (lhs && rhs)
{
this.lhs_ = lhs;
this.rhs_ = rhs;
}
override R opCall() const @nogc nothrow pure return scope
{
return mathPow(lhs_(), rhs_());
}
override R evaluate(scope EvalContext!R context) const nothrow pure
{
return mathPow(context.evaluate(lhs_), context.evaluate(rhs_));
}
const(Differentiable!R) differentiate(scope DiffContext!R context) const nothrow pure return scope
in (false)
{
auto lhsDiff = context.diff(lhs_);
auto rhsDiff = context.diff(rhs_);
auto ld = context.mul(lhsDiff, context.div(rhs_, lhs_));
auto rd = context.mul(rhsDiff, log(lhs_));
return context.mul(this, context.add(ld, rd));
}
private:
const(Differentiable!R) lhs_;
const(Differentiable!R) rhs_;
}
const(Power!R) pow(R)(const(Differentiable!R) lhs, const(Differentiable!R) rhs) nothrow pure
{
return new const(Power!R)(lhs, rhs);
}
nothrow pure unittest
{
import std.math : isClose;
import diffengine.differentiable : diffContext;
import diffengine.parameter : param;
auto p1 = param(2.0);
auto p2 = param(3.0);
auto m = p1.pow(p2);
assert(m().isClose(8.0));
auto p1d = m.differentiate(p1.diffContext);
assert(p1d().isClose(12.0));
auto p2d = m.differentiate(p2.diffContext);
assert(p2d().isClose(8.0 * mathLog(2.0)));
}
nothrow pure unittest
{
import std.math : isClose;
import diffengine.differentiable : evalContext;
import diffengine.parameter : param;
auto p1 = param(2.0);
auto p2 = param(3.0);
auto m = p1.pow(p2);
auto context = evalContext!double();
assert(context.evaluate(m).isClose(8.0));
assert(context.callCount == 3);
assert(context.evaluateCount == 3);
assert(context.cacheHitCount == 0);
assert(context.evaluate(m).isClose(8.0));
assert(context.callCount == 4);
assert(context.evaluateCount == 3);
assert(context.cacheHitCount == 1);
}
/**
Power for numeric.
Params:
lhs = lhs value
rhs = rhs value
Returns:
powered value.
*/
T pow(T)(T lhs, T rhs) @nogc nothrow pure if(isNumeric!T)
{
return mathPow(lhs, rhs);
}
///
@nogc nothrow pure unittest
{
import std.math : isClose;
assert(pow(4.0, 2.0).isClose(16.0));
}
|
D
|
/Users/haruna/Documents/iOSdev/flix_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Response.o : /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/MultipartFormData.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Timeline.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Alamofire.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Response.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/TaskDelegate.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/SessionDelegate.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ParameterEncoding.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Validation.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ResponseSerialization.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/SessionManager.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/AFError.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Notifications.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Result.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Request.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/haruna/Documents/iOSdev/flix_1/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/haruna/Documents/iOSdev/flix_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/haruna/Documents/iOSdev/flix_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Response~partial.swiftmodule : /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/MultipartFormData.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Timeline.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Alamofire.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Response.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/TaskDelegate.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/SessionDelegate.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ParameterEncoding.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Validation.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ResponseSerialization.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/SessionManager.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/AFError.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Notifications.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Result.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Request.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/haruna/Documents/iOSdev/flix_1/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/haruna/Documents/iOSdev/flix_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/haruna/Documents/iOSdev/flix_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Response~partial.swiftdoc : /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/MultipartFormData.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Timeline.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Alamofire.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Response.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/TaskDelegate.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/SessionDelegate.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ParameterEncoding.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Validation.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ResponseSerialization.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/SessionManager.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/AFError.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Notifications.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Result.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Request.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/haruna/Documents/iOSdev/flix_1/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/haruna/Documents/iOSdev/flix_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/haruna/Documents/iOSdev/flix_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Response~partial.swiftsourceinfo : /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/MultipartFormData.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Timeline.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Alamofire.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Response.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/TaskDelegate.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/SessionDelegate.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ParameterEncoding.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Validation.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ResponseSerialization.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/SessionManager.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/AFError.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Notifications.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Result.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/Request.swift /Users/haruna/Documents/iOSdev/flix_1/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/haruna/Documents/iOSdev/flix_1/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/haruna/Documents/iOSdev/flix_1/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/*
* Problem 50
*
* 15 August 2003
*
*
* The prime 41, can be written as the sum of six consecutive primes:
*
* 41 = 2 + 3 + 5 + 7 + 11 + 13
*
* This is the longest sum of consecutive primes that adds to a prime
* below one-hundred.
*
* The longest sum of consecutive primes below one-thousand that adds
* to a prime, contains 21 terms, and is equal to 953.
*
* Which prime, below one-million, can be written as the sum of the
* most consecutive primes?
*
* 997651
*/
import std.array;
import std.stdio;
import euler.sieve;
enum limit = 1_000_000;
uint[] primesUpTo(AutoSieve!uint sieve, uint limit) {
auto result = appender!(uint[])();
uint p = 2;
while (p < limit) {
result.put(p);
p = sieve.nextPrime(p);
}
return result.data;
}
void main() {
AutoSieve!uint sieve;
auto values = primesUpTo(sieve, limit);
uint largest = 0;
uint largestLen = 0;
for (auto as = values; as.length > 0; as = as[1..$]) {
auto a = as[0];
auto sum = a;
auto len = 1;
foreach (b; as[1..$]) {
sum += b;
len++;
if (sum >= limit)
break;
if (len > largestLen && sieve.isPrime(sum)) {
largest = sum;
largestLen = len;
}
}
}
writeln(largest);
}
|
D
|
/afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/obj/x86_64-slc6-gcc49-opt/HZZCutCommon/obj/ParticleVar.o /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/obj/x86_64-slc6-gcc49-opt/HZZCutCommon/obj/ParticleVar.d : /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/HZZCutCommon/Root/ParticleVar.cxx /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/HZZCutCommon/HZZCutCommon/ParticleVar.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/HZZCutCommon/HZZCutCommon/ParticleBase.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TString.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/Riosfwd.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMathBase.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/Rtypes.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/RtypesCore.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/RConfig.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/RVersion.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/DllImport.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/Rtypeinfo.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/snprintf.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/strlcpy.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TGenericClassInfo.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TSchemaHelper.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/RStringView.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/RConfigure.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/RWrap_libcpp_string_view.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/libcpp_string_view.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TLorentzVector.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMath.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TError.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TVector3.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TVector2.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TObject.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TStorage.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TVersionCheck.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TBuffer.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMatrix.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMatrixF.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMatrixT.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMatrixTBase.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TNamed.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMatrixFBasefwd.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMatrixDBasefwd.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TVectorFfwd.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TVectorDfwd.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMatrixTUtils.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMatrixFfwd.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMatrixFUtils.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMatrixFUtilsfwd.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TRotation.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/HZZCutCommon/HZZCutCommon/EventContainer.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TChain.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TTree.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TBranch.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TObjArray.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TSeqCollection.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TCollection.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TIterator.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TAttFill.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TDataType.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TDictionary.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/ESTLType.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TAttLine.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TAttMarker.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TArrayD.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TArray.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TArrayI.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TClass.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TObjString.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/ThreadLocalStorage.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TVirtualTreePlayer.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TTree.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TFile.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TDirectoryFile.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TDirectory.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TList.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TDatime.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TUUID.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TMap.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/THashTable.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TUrl.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TTreeFormula.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/v5/TFormula.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TBits.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TLeaf.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/Init.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/tools/TReturnCode.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/TEvent.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/Rtypes.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODEventFormat/EventFormat.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODEventFormat/versions/EventFormat_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODEventFormat/EventFormatElement.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCore/CLASS_DEF.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCore/ClassID_traits.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/IAuxStoreHolder.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccessInterfaces/TVirtualEvent.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccessInterfaces/TVirtualEvent.icc /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TError.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/TEvent.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/ClassName.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/ClassName.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/error.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/tools/ReturnCheck.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/tools/Message.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODEventInfo/EventInfo.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODEventInfo/versions/EventInfo_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/AuxElement.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/IAuxElement.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/IConstAuxStore.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/AuxTypes.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/CxxUtils/unordered_set.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/CxxUtils/hashtable.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/remove_const.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/user.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/select_compiler_config.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/compiler/gcc.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/select_stdlib_config.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/stdlib/libstdcpp3.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/select_platform_config.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/platform/linux.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/posix_features.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/suffix.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/detail/workaround.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/IAuxStore.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthLinks/DataLink.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthLinks/DataLinkBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthLinks/tools/selection_ns.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/RVersion.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/RootMetaSelection.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthLinks/DataLink.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccessInterfaces/TActiveEvent.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/AuxTypeRegistry.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/IAuxTypeVector.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/IAuxTypeVectorFactory.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/AuxTypeVector.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/IAuxSetOption.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/AuxDataTraits.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/PackedContainer.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/PackedParameters.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/AuxDataOption.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/AuxDataOption.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/PackedParameters.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/CxxUtils/override.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/PackedContainer.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/AuxTypeVector.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/AuxTypeVectorFactory.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/AuxTypeVectorFactory.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/threading.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/threading.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/AuxTypeRegistry.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/AuxVectorData.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/likely.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/assume.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/AuxVectorData.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/exceptions.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/CxxUtils/noreturn.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/AuxElement.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/DataVector.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/OwnershipPolicy.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/IndexTrackingPolicy.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/AuxVectorBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/ATHCONTAINERS_ASSERT.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/AuxStore_traits.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/AuxVectorBase.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/DVLNoBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/DVLInfo.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/ClassID.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/DVLInfo.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/DVLCast.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/DVLIterator.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/ElementProxy.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/ElementProxy.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/iterator_adaptor.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/static_assert.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/detail/iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/iterator_categories.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/detail/config_def.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/eval_if.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/if.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/value_wknd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/static_cast.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/workaround.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/integral.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/msvc.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/eti.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/na_spec.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/lambda_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/void_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/adl_barrier.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/adl.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/intel.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/gcc.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/na.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/bool.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/bool_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/integral_c_tag.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/static_constant.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/na_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/ctps.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/lambda.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/ttp.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/int.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/int_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/nttp_decl.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/nttp.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/integral_wrapper.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/cat.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/config/config.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/lambda_arity_param.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/template_arity_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/arity.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/dtp.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessor/params.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/preprocessor.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/comma_if.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/punctuation/comma_if.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/control/if.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/control/iif.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/logical/bool.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/facilities/empty.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/punctuation/comma.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/repeat.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/repetition/repeat.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/debug/error.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/detail/auto_rec.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/tuple/eat.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/inc.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/arithmetic/inc.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessor/enum.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/limits/arity.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/logical/and.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/logical/bitand.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/identity.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/facilities/identity.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/empty.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/arithmetic/add.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/arithmetic/dec.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/control/while.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/list/fold_left.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/list/detail/fold_left.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/control/expr_iif.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/list/adt.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/detail/is_binary.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/detail/check.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/logical/compl.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/list/fold_right.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/list/detail/fold_right.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/list/reverse.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/control/detail/while.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/tuple/elem.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/facilities/expand.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/facilities/overload.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/variadic/size.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/tuple/rem.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/tuple/detail/is_single_return.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/variadic/elem.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/arithmetic/sub.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/overload_resolution.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/lambda_support.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/identity.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/placeholders.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/arg.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/arg_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/na_assert.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/assert.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/not.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/nested_type_wknd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/yes_no.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/arrays.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/gpu.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/pp_counter.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/arity_spec.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/arg_typedef.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/use_preprocessed.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/include_preprocessed.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/compiler.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/stringize.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_convertible.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/intrinsics.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/detail/config.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/version.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/integral_constant.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/detail/yes_no_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_array.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_arithmetic.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_integral.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_floating_point.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_void.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_abstract.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/add_lvalue_reference.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/add_reference.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/add_rvalue_reference.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_reference.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_lvalue_reference.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_rvalue_reference.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_function.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/detail/is_function_ptr_helper.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/declval.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/detail/config_undef.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/iterator_facade.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/interoperable.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/or.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/or.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/iterator_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/detail/facade_iterator_category.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/and.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/and.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_same.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_const.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/detail/indirect_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_pointer.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_class.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_volatile.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_member_function_pointer.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/remove_cv.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_member_pointer.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/remove_reference.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/remove_pointer.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/detail/enable_if.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/utility/addressof.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/core/addressof.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/add_const.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/add_pointer.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_pod.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_scalar.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_enum.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/always.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessor/default_params.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/apply.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/apply_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/apply_wrap.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/has_apply.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/has_xxx.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/type_wrapper.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/has_xxx.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/msvc_typename.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/array/elem.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/array/data.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/array/size.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/repetition/enum_params.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/repetition/enum_trailing_params.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/has_apply.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/msvc_never_true.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/lambda.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/bind.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/bind_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/bind.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/next.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/next_prior.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/common_name_wknd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/protect.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/full_lambda.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/quote.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/void.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/has_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/config/bcc.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/template_arity.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/DVL_iter_swap.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/DVL_algorithms.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/DVL_algorithms.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/IsMostDerivedFlag.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/add_cv.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/add_volatile.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/aligned_storage.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/alignment_of.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/type_with_alignment.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/conditional.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/common_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/decay.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/remove_bounds.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/remove_extent.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/detail/mp_defer.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/copy_cv.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/extent.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/floating_point_promotion.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/function_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_bit_and.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/detail/has_binary_operator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_base_of.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_base_and_derived.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_fundamental.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_bit_and_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_bit_or.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_bit_or_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_bit_xor.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_bit_xor_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_complement.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/detail/has_prefix_operator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_dereference.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_divides.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_divides_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_equal_to.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_greater.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_greater_equal.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_left_shift.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_left_shift_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_less.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_less_equal.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_logical_and.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_logical_not.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_logical_or.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_minus.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_minus_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_modulus.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_modulus_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_multiplies.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_multiplies_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_negate.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_new_operator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_not_equal_to.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_nothrow_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_assignable.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_nothrow_constructor.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_default_constructible.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_nothrow_copy.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_copy_constructible.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_constructible.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_destructible.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_nothrow_destructor.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_trivial_destructor.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_plus.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_plus_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_post_decrement.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/detail/has_postfix_operator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_post_increment.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_pre_decrement.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_pre_increment.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_right_shift.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_right_shift_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_trivial_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_trivial_constructor.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_trivial_copy.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_trivial_move_assign.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_trivial_move_constructor.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_unary_minus.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_unary_plus.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/has_virtual_destructor.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_complex.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_compound.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_copy_assignable.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/noncopyable.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/core/noncopyable.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_empty.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_final.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_float.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_member_object_pointer.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_nothrow_move_assignable.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/utility/enable_if.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/core/enable_if.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_nothrow_move_constructible.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_object.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_polymorphic.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_signed.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_stateless.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_union.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_unsigned.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/is_virtual_base_of.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/make_signed.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/make_unsigned.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/rank.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/remove_all_extents.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/remove_volatile.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/type_identity.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/integral_promotion.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/promote.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/DataVector.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/tools/CompareAndPrint.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthLinks/ElementLink.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthLinks/ElementLinkBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthLinks/tools/TypeTools.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthLinks/ElementLink.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCore/BaseInfo.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/TStore.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/ConstDataVector.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/ConstDataVector.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/transform_iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/utility/result_of.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/iteration/iterate.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/slot/slot.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/slot/detail/def.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/repetition/enum_binary_params.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/repetition/enum_shifted_params.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/facilities/intercept.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/utility/declval.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/iteration/detail/iter/forward1.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/slot/detail/shared.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/utility/detail/result_of_iterate.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/TStore.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainers/normalizedTypeinfoName.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/tools/TDestructorRegistry.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/tools/TDestructorRegistry.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/tools/TDestructor.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/tools/TDestructor.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/tools/TCDVHolderT.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/tools/THolder.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODRootAccess/tools/TCDVHolderT.icc /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TClass.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCore/ShallowCopy.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/CxxUtils/make_unique.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCore/ShallowAuxContainer.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AthContainersInterfaces/IAuxStoreIO.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCore/AuxSelection.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCore/ShallowAuxInfo.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCutFlow/CutBookkeeper.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCutFlow/versions/CutBookkeeper_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCutFlow/CutBookkeeperContainer.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCutFlow/versions/CutBookkeeperContainer_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCutFlow/versions/CutBookkeeper_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AsgTools/ToolHandle.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AsgTools/AsgToolsConf.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AsgTools/StatusCode.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AsgTools/Check.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AsgTools/MsgStreamMacros.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AsgTools/MsgLevel.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AsgTools/ToolHandle.icc /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AsgTools/ToolStore.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AsgTools/IAsgTool.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/AsgTools/AsgToolMacros.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/PATInterfaces/SystematicRegistry.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/PATInterfaces/Global.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/PATInterfaces/SystematicSet.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/PATInterfaces/SystematicCode.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/PATInterfaces/SystematicVariation.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/PATInterfaces/SystematicsUtil.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/HZZCutCommon/HZZCutCommon/EnumDefCommon.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/HZZCutCommon/HZZCutCommon/log.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/HZZCutCommon/HZZCutCommon/OutputTree.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/config.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/user.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/language.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/language/stdc.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/version_number.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/make.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/detail/test.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/language/stdcpp.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/language/objc.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/alpha.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/arm.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/blackfin.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/convex.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/ia64.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/m68k.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/mips.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/parisc.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/ppc.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/pyramid.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/rs6k.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/sparc.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/superh.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/sys370.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/sys390.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/x86.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/x86/32.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/x86/64.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/architecture/z.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/borland.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/clang.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/comeau.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/compaq.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/diab.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/digitalmars.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/dignus.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/edg.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/ekopath.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/gcc_xml.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/gcc.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/detail/comp_detected.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/greenhills.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/hp_acc.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/iar.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/ibm.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/intel.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/kai.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/llvm.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/metaware.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/metrowerks.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/microtec.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/mpw.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/palm.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/pgi.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/sgi_mipspro.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/sunpro.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/tendra.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/visualc.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/compiler/watcom.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/c.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/c/_prefix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/detail/_cassert.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/c/gnu.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/c/uc.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/c/vms.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/c/zos.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/_prefix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/detail/_exception.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/cxx.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/dinkumware.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/libcomo.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/modena.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/msl.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/roguewave.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/sgi.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/stdcpp3.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/stlport.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/library/std/vacpp.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/aix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/amigaos.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/android.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/beos.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/bsd.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/macos.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/ios.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/bsd/bsdi.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/bsd/dragonfly.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/bsd/free.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/bsd/open.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/bsd/net.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/cygwin.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/haiku.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/hpux.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/irix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/linux.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/detail/os_detected.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/os400.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/qnxnto.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/solaris.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/unix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/vms.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/os/windows.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/other.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/other/endian.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/platform.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/platform/mingw.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/platform/windows_desktop.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/platform/windows_store.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/platform/windows_phone.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/platform/windows_runtime.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/hardware.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/hardware/simd.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/hardware/simd/x86.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/hardware/simd/x86/versions.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/hardware/simd/x86_amd.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/hardware/simd/x86_amd/versions.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/hardware/simd/arm.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/hardware/simd/arm/versions.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/hardware/simd/ppc.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/hardware/simd/ppc/versions.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/predef/version.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/config/cwchar.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/auto_link.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_workaround.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/limits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/assert.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/cstdint.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/throw_exception.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/scoped_ptr.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/scoped_ptr.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/checked_delete.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/core/checked_delete.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/sp_nullptr_t.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/operator_bool.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/scoped_array.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/scoped_array.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/shared_ptr.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/shared_ptr.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/no_tr1/memory.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/shared_count.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/bad_weak_ptr.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/sp_counted_base.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/sp_has_sync.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/detail/sp_typeinfo.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/core/typeinfo.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/core/demangle.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/sp_counted_impl.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/sp_convertible.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/spinlock_pool.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/spinlock.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/spinlock_sync.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/smart_ptr/detail/yield_k.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/regex_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/syntax_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/error_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_traits_defaults.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/cpp_regex_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/integer.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/integer_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/integer_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/pattern_except.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/pending/static_mutex.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/primary_transform.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/pending/object_cache.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/c_regex_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/match_flags.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_raw_buffer.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/char_regex_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/states.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regbase.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/iterator_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/basic_regex.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/functional/hash.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/functional/hash/hash.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/functional/hash/hash_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/functional/hash/detail/hash_float.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/functional/hash/detail/float_functions.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/config/no_tr1/cmath.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/functional/hash/detail/limits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/integer/static_log2.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/functional/hash/extensions.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/detail/container_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/repetition/repeat_from_to.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/basic_regex_creator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/basic_regex_parser.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/sub_match.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_format.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/ref.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/core/ref.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/match_results.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/protected_call.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/perl_matcher.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/iterator_category.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/perl_matcher_non_recursive.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/perl_matcher_common.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/instances.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_match.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_search.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_token_iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_grep.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_replace.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_merge.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/regex/v4/regex_split.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/replace.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/config.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/iterator_range_core.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/functions.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/begin.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/config.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/range_fwd.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/mutable_iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/detail/extract_optional_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/detail/msvc_has_iterator_workaround.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/const_iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/end.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/detail/implementation_help.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/detail/common.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/detail/sfinae.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/size.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/size_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/difference_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/has_range_iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/concepts.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/concept_check.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/concept/assert.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/concept/detail/general.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/concept/detail/backward_compatibility.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/concept/detail/has_constraints.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/type_traits/conversion_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/concept/usage.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/concept/detail/concept_def.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/seq/for_each_i.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/repetition/for.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/repetition/detail/for.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/seq/seq.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/seq/elem.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/seq/size.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/seq/detail/is_empty.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/seq/enum.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/concept/detail/concept_undef.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/iterator_concepts.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/value_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/detail/misc_concept.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/detail/has_member_size.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/utility.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/utility/base_from_member.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/utility/binary.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/control/deduce_d.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/seq/cat.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/seq/fold_left.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/seq/transform.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/arithmetic/mod.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/arithmetic/detail/div_base.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/comparison/less_equal.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/preprocessor/logical/not.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/utility/identity_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/next_prior.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/distance.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/empty.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/rbegin.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/reverse_iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/iterator/reverse_iterator.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/rend.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/algorithm/equal.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/detail/safe_bool.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/find_format.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/as_literal.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/iterator_range.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/iterator_range_io.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/range/detail/str_types.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/concept.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/detail/find_format.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/detail/find_format_store.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/detail/replace_storage.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/sequence_traits.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/yes_no_type.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/detail/sequence.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/mpl/logical.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/detail/find_format_all.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/finder.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/constants.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/detail/finder.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/compare.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/formatter.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/detail/formatter.hpp /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/boost/algorithm/string/detail/util.hpp /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TH1F.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TH1.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TAxis.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TAttAxis.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TArrayC.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TArrayS.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TArrayF.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/Foption.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.04.16-x86_64-slc6-gcc49-opt/include/TFitResultPtr.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/HZZUtils/ITheoryVariation.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODBase/IParticle.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODBase/ObjectType.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTruth/TruthParticle.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTruth/versions/TruthParticle_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODBase/ObjectType.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTruth/TruthVertexContainerFwd.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTruth/TruthVertexFwd.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODMuon/Muon.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODMuon/versions/Muon_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODPrimitives/IsolationCorrection.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODPrimitives/IsolationType.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODPrimitives/IsolationFlavour.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTracking/TrackingPrimitives.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/EventPrimitives/EventPrimitives.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/Core /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/DisableStupidWarnings.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/Macros.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/MKL_support.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/Constants.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/ForwardDeclarations.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/Meta.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/StaticAssert.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/XprHelper.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/Memory.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/NumTraits.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/MathFunctions.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/GenericPacketMath.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/arch/SSE/PacketMath.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/arch/SSE/MathFunctions.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/arch/SSE/Complex.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/arch/Default/Settings.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Functors.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/DenseCoeffsBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/DenseBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/../plugins/BlockMethods.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/MatrixBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/../plugins/CommonCwiseUnaryOps.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/../plugins/CommonCwiseBinaryOps.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/../plugins/MatrixCwiseUnaryOps.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/../plugins/MatrixCwiseBinaryOps.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/EventPrimitives/AmgMatrixPlugin.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/EigenBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Assign.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/BlasUtil.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/DenseStorage.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/NestByValue.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/ForceAlignedAccess.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/ReturnByValue.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/NoAlias.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/PlainObjectBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Matrix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/EventPrimitives/SymmetricMatrixHelpers.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Array.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/CwiseBinaryOp.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/CwiseUnaryOp.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/CwiseNullaryOp.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/CwiseUnaryView.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/SelfCwiseBinaryOp.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Dot.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/StableNorm.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/MapBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Stride.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Map.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Block.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/VectorBlock.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Ref.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Transpose.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/DiagonalMatrix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Diagonal.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/DiagonalProduct.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/PermutationMatrix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Transpositions.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Redux.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Visitor.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Fuzzy.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/IO.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Swap.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/CommaInitializer.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Flagged.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/ProductBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/GeneralProduct.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/TriangularMatrix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/SelfAdjointView.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/GeneralBlockPanelKernel.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/Parallelizer.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/CoeffBasedProduct.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/GeneralMatrixVector.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/GeneralMatrixMatrix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/SolveTriangular.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/SelfadjointMatrixVector.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/SelfadjointMatrixMatrix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/SelfadjointProduct.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/SelfadjointRank2Update.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/TriangularMatrixVector.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/TriangularMatrixMatrix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/TriangularSolverMatrix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/products/TriangularSolverVector.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/BandMatrix.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/CoreIterators.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/BooleanRedux.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Select.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/VectorwiseOp.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Random.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Replicate.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/Reverse.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/ArrayBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/../plugins/ArrayCwiseUnaryOps.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/../plugins/ArrayCwiseBinaryOps.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/ArrayWrapper.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/GlobalFunctions.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Core/util/ReenableStupidWarnings.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/Dense /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/Core /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/LU /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/misc/Solve.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/misc/Kernel.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/misc/Image.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/LU/FullPivLU.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/LU/PartialPivLU.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/LU/Determinant.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/LU/Inverse.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/LU/arch/Inverse_SSE.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/Cholesky /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Cholesky/LLT.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Cholesky/LDLT.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/QR /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/Jacobi /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Jacobi/Jacobi.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/Householder /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Householder/Householder.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Householder/HouseholderSequence.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Householder/BlockHouseholder.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/QR/HouseholderQR.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/QR/FullPivHouseholderQR.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/QR/ColPivHouseholderQR.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/SVD /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/SVD/JacobiSVD.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/SVD/UpperBidiagonalization.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/Geometry /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/OrthoMethods.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/EulerAngles.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/Homogeneous.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/RotationBase.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/Rotation2D.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/Quaternion.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/AngleAxis.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/Transform.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/EventPrimitives/AmgTransformPlugin.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/Translation.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/Scaling.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/Hyperplane.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/ParametrizedLine.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/AlignedBox.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/Umeyama.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Geometry/arch/Geometry_SSE.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/Eigenvalues /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/Tridiagonalization.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/RealSchur.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/./HessenbergDecomposition.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/EigenSolver.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/./RealSchur.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/./Tridiagonalization.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/HessenbergDecomposition.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/ComplexSchur.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/ComplexEigenSolver.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/./ComplexSchur.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/RealQZ.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/./RealQZ.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTracking/TrackParticleContainer.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTracking/TrackParticle.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTracking/versions/TrackParticle_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTracking/VertexContainerFwd.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTracking/VertexFwd.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTracking/versions/TrackParticleContainer_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTracking/versions/TrackParticle_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTracking/TrackParticleContainerFwd.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODBase/IParticleContainer.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODTracking/TrackParticleFwd.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCaloEvent/CaloClusterContainer.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCaloEvent/CaloCluster.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCaloEvent/versions/CaloCluster_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/CaloGeoHelpers/CaloSampling.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/CaloGeoHelpers/CaloSampling.def /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCaloEvent/CaloClusterBadChannelData.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCaloEvent/versions/CaloClusterBadChannelData_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODCaloEvent/versions/CaloClusterContainer_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODMuon/MuonSegmentContainer.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODMuon/MuonSegment.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODMuon/versions/MuonSegment_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/MuonIdHelpers/MuonStationIndex.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODMuon/versions/MuonSegmentContainer_v1.h /afs/cern.ch/work/m/mmittal/private/MyAnalysisCode/RootCoreBin/include/xAODMuon/versions/MuonSegment_v1.h
|
D
|
instance KDW_1401_Addon_Cronos_NW(Npc_Default)
{
name[0] = "Кронос";
guild = GIL_KDW;
id = 1401;
voice = 4;
flags = NPC_FLAG_IMMORTAL;
npcType = NPCTYPE_MAIN;
aivar[AIV_MagicUser] = MAGIC_ALWAYS;
aivar[AIV_IgnoresFakeGuild] = TRUE;
aivar[AIV_IgnoresArmor] = TRUE;
aivar[AIV_NPCIsTrader] = TRUE;
aivar[AIV_Teeth] = 1;
B_SetAttributesToChapter(self,5);
attribute[ATR_STRENGTH] = 1;
attribute[ATR_DEXTERITY] = 1;
fight_tactic = FAI_HUMAN_STRONG;
B_SetNpcVisual(self,MALE,"Hum_Head_Thief",Face_P_NormalBart_Cronos,BodyTex_P,ITAR_KDW_L_Addon);
Mdl_SetModelFatness(self,0);
Mdl_ApplyOverlayMds(self,"Humans_Mage.mds");
B_GiveNpcTalents(self);
B_SetFightSkills(self,80);
daily_routine = Rtn_PreStart_1401;
};
func void Rtn_PreStart_1401()
{
TA_Smalltalk(8,0,20,0,"PORTAL");
TA_Smalltalk(20,0,8,0,"PORTAL");
};
func void Rtn_Start_1401()
{
TA_Study_WP(8,0,20,0,"NW_TROLLAREA_PORTALTEMPEL_STUDY_02");
TA_Study_WP(20,0,8,0,"NW_TROLLAREA_PORTALTEMPEL_STUDY_02");
};
func void Rtn_Ringritual_1401()
{
TA_Circle(8,0,20,0,"NW_TROLLAREA_PORTALTEMPEL_RITUAL_03");
TA_Circle(20,0,8,0,"NW_TROLLAREA_PORTALTEMPEL_RITUAL_03");
};
func void Rtn_PreRingritual_1401()
{
TA_Study_WP(8,0,20,0,"NW_TROLLAREA_PORTALTEMPEL_RITUAL_03");
TA_Study_WP(20,0,8,0,"NW_TROLLAREA_PORTALTEMPEL_RITUAL_03");
};
func void Rtn_OpenPortal_1401()
{
TA_Study_WP(8,0,20,0,"NW_TROLLAREA_PORTAL_KDWWAIT_02");
TA_Study_WP(20,0,8,0,"NW_TROLLAREA_PORTAL_KDWWAIT_02");
};
func void Rtn_TOT_1401()
{
TA_Sleep(8,0,20,0,"TOT");
TA_Sleep(20,0,8,0,"TOT");
};
|
D
|
/Users/ashizawaken/Documents/kuro-ra/target/debug/build/parking_lot_core-ede39e6adcc4b8db/build_script_build-ede39e6adcc4b8db: /Users/ashizawaken/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.3.1/build.rs
/Users/ashizawaken/Documents/kuro-ra/target/debug/build/parking_lot_core-ede39e6adcc4b8db/build_script_build-ede39e6adcc4b8db.d: /Users/ashizawaken/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.3.1/build.rs
/Users/ashizawaken/.cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.3.1/build.rs:
|
D
|
module UnrealScript.UTGame.UTInventoryManager;
import ScriptClasses;
import UnrealScript.Helpers;
import UnrealScript.UTGame.UTWeapon;
import UnrealScript.Engine.Weapon;
import UnrealScript.Engine.Inventory;
import UnrealScript.Engine.InventoryManager;
import UnrealScript.Engine.HUD;
extern(C++) interface UTInventoryManager : InventoryManager
{
public extern(D):
private static __gshared ScriptClass mStaticClass;
@property final static ScriptClass StaticClass() { mixin(MGSCC("Class UTGame.UTInventoryManager")); }
private static __gshared UTInventoryManager mDefaultProperties;
@property final static UTInventoryManager DefaultProperties() { mixin(MGDPC("UTInventoryManager", "UTInventoryManager UTGame.Default__UTInventoryManager")); }
static struct Functions
{
private static __gshared
{
ScriptFunction mNeedsAmmo;
ScriptFunction mClientSyncWeapon;
ScriptFunction mOwnerEvent;
ScriptFunction mGetWeaponList;
ScriptFunction mSwitchWeapon;
ScriptFunction mAdjustWeapon;
ScriptFunction mPrevWeapon;
ScriptFunction mNextWeapon;
ScriptFunction mAllAmmo;
ScriptFunction mSetCurrentWeapon;
ScriptFunction mClientSetCurrentWeapon;
ScriptFunction mServerSetCurrentWeapon;
ScriptFunction mSetPendingWeapon;
ScriptFunction mClientWeaponSet;
ScriptFunction mCreateInventory;
ScriptFunction mProcessRetrySwitch;
ScriptFunction mRetrySwitchTo;
ScriptFunction mCheckSwitchTo;
ScriptFunction mAddInventory;
ScriptFunction mDiscardInventory;
ScriptFunction mRemoveFromInventory;
ScriptFunction mAddAmmoToWeapon;
ScriptFunction mHasInventoryOfClass;
ScriptFunction mChangedWeapon;
ScriptFunction mSwitchToPreviousWeapon;
ScriptFunction mDrawHUD;
ScriptFunction mSwitchToBestWeapon;
}
public @property static final
{
ScriptFunction NeedsAmmo() { mixin(MGF("mNeedsAmmo", "Function UTGame.UTInventoryManager.NeedsAmmo")); }
ScriptFunction ClientSyncWeapon() { mixin(MGF("mClientSyncWeapon", "Function UTGame.UTInventoryManager.ClientSyncWeapon")); }
ScriptFunction OwnerEvent() { mixin(MGF("mOwnerEvent", "Function UTGame.UTInventoryManager.OwnerEvent")); }
ScriptFunction GetWeaponList() { mixin(MGF("mGetWeaponList", "Function UTGame.UTInventoryManager.GetWeaponList")); }
ScriptFunction SwitchWeapon() { mixin(MGF("mSwitchWeapon", "Function UTGame.UTInventoryManager.SwitchWeapon")); }
ScriptFunction AdjustWeapon() { mixin(MGF("mAdjustWeapon", "Function UTGame.UTInventoryManager.AdjustWeapon")); }
ScriptFunction PrevWeapon() { mixin(MGF("mPrevWeapon", "Function UTGame.UTInventoryManager.PrevWeapon")); }
ScriptFunction NextWeapon() { mixin(MGF("mNextWeapon", "Function UTGame.UTInventoryManager.NextWeapon")); }
ScriptFunction AllAmmo() { mixin(MGF("mAllAmmo", "Function UTGame.UTInventoryManager.AllAmmo")); }
ScriptFunction SetCurrentWeapon() { mixin(MGF("mSetCurrentWeapon", "Function UTGame.UTInventoryManager.SetCurrentWeapon")); }
ScriptFunction ClientSetCurrentWeapon() { mixin(MGF("mClientSetCurrentWeapon", "Function UTGame.UTInventoryManager.ClientSetCurrentWeapon")); }
ScriptFunction ServerSetCurrentWeapon() { mixin(MGF("mServerSetCurrentWeapon", "Function UTGame.UTInventoryManager.ServerSetCurrentWeapon")); }
ScriptFunction SetPendingWeapon() { mixin(MGF("mSetPendingWeapon", "Function UTGame.UTInventoryManager.SetPendingWeapon")); }
ScriptFunction ClientWeaponSet() { mixin(MGF("mClientWeaponSet", "Function UTGame.UTInventoryManager.ClientWeaponSet")); }
ScriptFunction CreateInventory() { mixin(MGF("mCreateInventory", "Function UTGame.UTInventoryManager.CreateInventory")); }
ScriptFunction ProcessRetrySwitch() { mixin(MGF("mProcessRetrySwitch", "Function UTGame.UTInventoryManager.ProcessRetrySwitch")); }
ScriptFunction RetrySwitchTo() { mixin(MGF("mRetrySwitchTo", "Function UTGame.UTInventoryManager.RetrySwitchTo")); }
ScriptFunction CheckSwitchTo() { mixin(MGF("mCheckSwitchTo", "Function UTGame.UTInventoryManager.CheckSwitchTo")); }
ScriptFunction AddInventory() { mixin(MGF("mAddInventory", "Function UTGame.UTInventoryManager.AddInventory")); }
ScriptFunction DiscardInventory() { mixin(MGF("mDiscardInventory", "Function UTGame.UTInventoryManager.DiscardInventory")); }
ScriptFunction RemoveFromInventory() { mixin(MGF("mRemoveFromInventory", "Function UTGame.UTInventoryManager.RemoveFromInventory")); }
ScriptFunction AddAmmoToWeapon() { mixin(MGF("mAddAmmoToWeapon", "Function UTGame.UTInventoryManager.AddAmmoToWeapon")); }
ScriptFunction HasInventoryOfClass() { mixin(MGF("mHasInventoryOfClass", "Function UTGame.UTInventoryManager.HasInventoryOfClass")); }
ScriptFunction ChangedWeapon() { mixin(MGF("mChangedWeapon", "Function UTGame.UTInventoryManager.ChangedWeapon")); }
ScriptFunction SwitchToPreviousWeapon() { mixin(MGF("mSwitchToPreviousWeapon", "Function UTGame.UTInventoryManager.SwitchToPreviousWeapon")); }
ScriptFunction DrawHUD() { mixin(MGF("mDrawHUD", "Function UTGame.UTInventoryManager.DrawHUD")); }
ScriptFunction SwitchToBestWeapon() { mixin(MGF("mSwitchToBestWeapon", "Function UTGame.UTInventoryManager.SwitchToBestWeapon")); }
}
}
struct AmmoStore
{
private ubyte __buffer__[8];
public extern(D):
private static __gshared ScriptStruct mStaticClass;
@property final static ScriptStruct StaticClass() { mixin(MGSCS("ScriptStruct UTGame.UTInventoryManager.AmmoStore")); }
@property final auto ref
{
ScriptClass WeaponClass() { mixin(MGPS("ScriptClass", 4)); }
int Amount() { mixin(MGPS("int", 0)); }
}
}
@property final
{
auto ref
{
ScriptArray!(UTInventoryManager.AmmoStore) AmmoStorage() { mixin(MGPC("ScriptArray!(UTInventoryManager.AmmoStore)", 508)); }
float LastAdjustWeaponTime() { mixin(MGPC("float", 528)); }
UTWeapon PendingSwitchWeapon() { mixin(MGPC("UTWeapon", 524)); }
Weapon PreviousWeapon() { mixin(MGPC("Weapon", 520)); }
}
bool bInfiniteAmmo() { mixin(MGBPC(504, 0x1)); }
bool bInfiniteAmmo(bool val) { mixin(MSBPC(504, 0x1)); }
}
final:
bool NeedsAmmo(ScriptClass TestWeapon)
{
ubyte params[8];
params[] = 0;
*cast(ScriptClass*)params.ptr = TestWeapon;
(cast(ScriptObject)this).ProcessEvent(Functions.NeedsAmmo, params.ptr, cast(void*)0);
return *cast(bool*)¶ms[4];
}
void ClientSyncWeapon(Weapon NewWeapon)
{
ubyte params[4];
params[] = 0;
*cast(Weapon*)params.ptr = NewWeapon;
(cast(ScriptObject)this).ProcessEvent(Functions.ClientSyncWeapon, params.ptr, cast(void*)0);
}
void OwnerEvent(ScriptName EventName)
{
ubyte params[8];
params[] = 0;
*cast(ScriptName*)params.ptr = EventName;
(cast(ScriptObject)this).ProcessEvent(Functions.OwnerEvent, params.ptr, cast(void*)0);
}
void GetWeaponList(ref ScriptArray!(UTWeapon) WeaponList, bool* bFilter = null, int* GroupFilter = null, bool* bNoEmpty = null)
{
ubyte params[24];
params[] = 0;
*cast(ScriptArray!(UTWeapon)*)params.ptr = WeaponList;
if (bFilter !is null)
*cast(bool*)¶ms[12] = *bFilter;
if (GroupFilter !is null)
*cast(int*)¶ms[16] = *GroupFilter;
if (bNoEmpty !is null)
*cast(bool*)¶ms[20] = *bNoEmpty;
(cast(ScriptObject)this).ProcessEvent(Functions.GetWeaponList, params.ptr, cast(void*)0);
WeaponList = *cast(ScriptArray!(UTWeapon)*)params.ptr;
}
void SwitchWeapon(ubyte NewGroup)
{
ubyte params[1];
params[] = 0;
params[0] = NewGroup;
(cast(ScriptObject)this).ProcessEvent(Functions.SwitchWeapon, params.ptr, cast(void*)0);
}
void AdjustWeapon(int NewOffset)
{
ubyte params[4];
params[] = 0;
*cast(int*)params.ptr = NewOffset;
(cast(ScriptObject)this).ProcessEvent(Functions.AdjustWeapon, params.ptr, cast(void*)0);
}
void PrevWeapon()
{
(cast(ScriptObject)this).ProcessEvent(Functions.PrevWeapon, cast(void*)0, cast(void*)0);
}
void NextWeapon()
{
(cast(ScriptObject)this).ProcessEvent(Functions.NextWeapon, cast(void*)0, cast(void*)0);
}
void AllAmmo(bool* bAmmoForSuperWeapons = null)
{
ubyte params[4];
params[] = 0;
if (bAmmoForSuperWeapons !is null)
*cast(bool*)params.ptr = *bAmmoForSuperWeapons;
(cast(ScriptObject)this).ProcessEvent(Functions.AllAmmo, params.ptr, cast(void*)0);
}
void SetCurrentWeapon(Weapon DesiredWeapon)
{
ubyte params[4];
params[] = 0;
*cast(Weapon*)params.ptr = DesiredWeapon;
(cast(ScriptObject)this).ProcessEvent(Functions.SetCurrentWeapon, params.ptr, cast(void*)0);
}
void ClientSetCurrentWeapon(Weapon DesiredWeapon)
{
ubyte params[4];
params[] = 0;
*cast(Weapon*)params.ptr = DesiredWeapon;
(cast(ScriptObject)this).ProcessEvent(Functions.ClientSetCurrentWeapon, params.ptr, cast(void*)0);
}
void ServerSetCurrentWeapon(Weapon DesiredWeapon)
{
ubyte params[4];
params[] = 0;
*cast(Weapon*)params.ptr = DesiredWeapon;
(cast(ScriptObject)this).ProcessEvent(Functions.ServerSetCurrentWeapon, params.ptr, cast(void*)0);
}
void SetPendingWeapon(Weapon DesiredWeapon)
{
ubyte params[4];
params[] = 0;
*cast(Weapon*)params.ptr = DesiredWeapon;
(cast(ScriptObject)this).ProcessEvent(Functions.SetPendingWeapon, params.ptr, cast(void*)0);
}
void ClientWeaponSet(Weapon NewWeapon, bool bOptionalSet, bool* bDoNotActivate = null)
{
ubyte params[12];
params[] = 0;
*cast(Weapon*)params.ptr = NewWeapon;
*cast(bool*)¶ms[4] = bOptionalSet;
if (bDoNotActivate !is null)
*cast(bool*)¶ms[8] = *bDoNotActivate;
(cast(ScriptObject)this).ProcessEvent(Functions.ClientWeaponSet, params.ptr, cast(void*)0);
}
Inventory CreateInventory(ScriptClass NewInventoryItemClass, bool* bDoNotActivate = null)
{
ubyte params[12];
params[] = 0;
*cast(ScriptClass*)params.ptr = NewInventoryItemClass;
if (bDoNotActivate !is null)
*cast(bool*)¶ms[4] = *bDoNotActivate;
(cast(ScriptObject)this).ProcessEvent(Functions.CreateInventory, params.ptr, cast(void*)0);
return *cast(Inventory*)¶ms[8];
}
void ProcessRetrySwitch()
{
(cast(ScriptObject)this).ProcessEvent(Functions.ProcessRetrySwitch, cast(void*)0, cast(void*)0);
}
void RetrySwitchTo(UTWeapon NewWeapon)
{
ubyte params[4];
params[] = 0;
*cast(UTWeapon*)params.ptr = NewWeapon;
(cast(ScriptObject)this).ProcessEvent(Functions.RetrySwitchTo, params.ptr, cast(void*)0);
}
void CheckSwitchTo(UTWeapon NewWeapon)
{
ubyte params[4];
params[] = 0;
*cast(UTWeapon*)params.ptr = NewWeapon;
(cast(ScriptObject)this).ProcessEvent(Functions.CheckSwitchTo, params.ptr, cast(void*)0);
}
bool AddInventory(Inventory pNewItem, bool* bDoNotActivate = null)
{
ubyte params[12];
params[] = 0;
*cast(Inventory*)params.ptr = pNewItem;
if (bDoNotActivate !is null)
*cast(bool*)¶ms[4] = *bDoNotActivate;
(cast(ScriptObject)this).ProcessEvent(Functions.AddInventory, params.ptr, cast(void*)0);
return *cast(bool*)¶ms[8];
}
void DiscardInventory()
{
(cast(ScriptObject)this).ProcessEvent(Functions.DiscardInventory, cast(void*)0, cast(void*)0);
}
void RemoveFromInventory(Inventory ItemToRemove)
{
ubyte params[4];
params[] = 0;
*cast(Inventory*)params.ptr = ItemToRemove;
(cast(ScriptObject)this).ProcessEvent(Functions.RemoveFromInventory, params.ptr, cast(void*)0);
}
void AddAmmoToWeapon(int AmountToAdd, ScriptClass WeaponClassToAddTo)
{
ubyte params[8];
params[] = 0;
*cast(int*)params.ptr = AmountToAdd;
*cast(ScriptClass*)¶ms[4] = WeaponClassToAddTo;
(cast(ScriptObject)this).ProcessEvent(Functions.AddAmmoToWeapon, params.ptr, cast(void*)0);
}
Inventory HasInventoryOfClass(ScriptClass InvClass)
{
ubyte params[8];
params[] = 0;
*cast(ScriptClass*)params.ptr = InvClass;
(cast(ScriptObject)this).ProcessEvent(Functions.HasInventoryOfClass, params.ptr, cast(void*)0);
return *cast(Inventory*)¶ms[4];
}
void ChangedWeapon()
{
(cast(ScriptObject)this).ProcessEvent(Functions.ChangedWeapon, cast(void*)0, cast(void*)0);
}
void SwitchToPreviousWeapon()
{
(cast(ScriptObject)this).ProcessEvent(Functions.SwitchToPreviousWeapon, cast(void*)0, cast(void*)0);
}
void DrawHUD(HUD H)
{
ubyte params[4];
params[] = 0;
*cast(HUD*)params.ptr = H;
(cast(ScriptObject)this).ProcessEvent(Functions.DrawHUD, params.ptr, cast(void*)0);
}
void SwitchToBestWeapon(bool* bForceADifferentWeapon = null)
{
ubyte params[4];
params[] = 0;
if (bForceADifferentWeapon !is null)
*cast(bool*)params.ptr = *bForceADifferentWeapon;
(cast(ScriptObject)this).ProcessEvent(Functions.SwitchToBestWeapon, params.ptr, cast(void*)0);
}
}
|
D
|
prototype Mst_Default_Zombie(C_Npc)
{
name[0] = "Zombie";
guild = GIL_ZOMBIE;
aivar[AIV_IMPORTANT] = ID_ZOMBIE;
level = 15;
attribute[ATR_STRENGTH] = 85;
attribute[ATR_DEXTERITY] = 85;
attribute[ATR_HITPOINTS_MAX] = 180;
attribute[ATR_HITPOINTS] = 180;
attribute[ATR_MANA_MAX] = 0;
attribute[ATR_MANA] = 0;
protection[PROT_BLUNT] = 60;
protection[PROT_EDGE] = 60;
protection[PROT_POINT] = 100;
protection[PROT_FIRE] = 60;
protection[PROT_FLY] = 60;
protection[PROT_MAGIC] = 60;
damagetype = DAM_EDGE;
fight_tactic = FAI_ZOMBIE;
senses = SENSE_HEAR | SENSE_SEE | SENSE_SMELL;
senses_range = 3000;
aivar[AIV_FINDABLE] = HUNTER;
aivar[AIV_PCISSTRONGER] = 2000;
aivar[AIV_BEENATTACKED] = 1500;
aivar[AIV_HIGHWAYMEN] = 1500;
aivar[AIV_HAS_ERPRESSED] = 0;
aivar[AIV_BEGGAR] = 10;
aivar[AIV_OBSERVEINTRUDER] = FALSE;
start_aistate = ZS_MM_AllScheduler;
aivar[AIV_HASBEENDEFEATEDINPORTALROOM] = OnlyRoutine;
};
func void Set_Zombie_Visuals()
{
Mdl_SetVisual(self,"Zombie.mds");
Mdl_SetVisualBody(self,"Zom_Body",0,0,"Zom_Head",0,3,-1);
};
func void Set_Zombie2_Visuals()
{
Mdl_SetVisual(self,"Zombie.mds");
Mdl_SetVisualBody(self,"Zom_Body",0,0,"Zom_Head",1,3,-1);
};
func void Set_Zombie3_Visuals()
{
Mdl_SetVisual(self,"Zombie.mds");
Mdl_SetVisualBody(self,"Zom_Body",0,1,"Zom_Head",0,3,-1);
};
func void Set_Zombie4_Visuals()
{
Mdl_SetVisual(self,"Zombie.mds");
Mdl_SetVisualBody(self,"Zom_Body",0,1,"Zom_Head",1,3,-1);
};
instance Zombie(Mst_Default_Zombie)
{
Set_Zombie_Visuals();
Npc_SetToFistMode(self);
};
instance Zombie2(Mst_Default_Zombie)
{
Set_Zombie2_Visuals();
Npc_SetToFistMode(self);
};
instance Zombie3(Mst_Default_Zombie)
{
Set_Zombie3_Visuals();
Npc_SetToFistMode(self);
};
instance Zombie4(Mst_Default_Zombie)
{
Set_Zombie4_Visuals();
Npc_SetToFistMode(self);
};
instance ZombieTheKeeper(Mst_Default_Zombie)
{
name[0] = "The Guardian";
level = 100;
id = MID_THEKEEPER;
Set_Zombie4_Visuals();
Npc_SetToFistMode(self);
protection[PROT_BLUNT] = 150;
protection[PROT_EDGE] = 150;
protection[PROT_FIRE] = 9999;
senses_range = 1000;
aivar[AIV_FINDABLE] = HUNTER;
aivar[AIV_PCISSTRONGER] = 1000;
aivar[AIV_BEENATTACKED] = 1000;
aivar[AIV_HIGHWAYMEN] = 1000;
aivar[AIV_HAS_ERPRESSED] = 0;
aivar[AIV_BEGGAR] = 10;
aivar[AIV_OBSERVEINTRUDER] = FALSE;
Mdl_SetVisual(self,"Zombie.mds");
Mdl_SetVisualBody(self,"Zom_Body",0,0,"Zom_Head",1,3,non_armor_i);
CreateInvItem(self,ItMi_OrcTalisman);
CreateInvItem(self,ItKe_Focus5);
CreateInvItem(self,non_armor_i);
};
|
D
|
module mylib.primitives;
import std.math;
import std.conv;
import std.stdio;
import mylib.vector2d;
public:
/// ポジション
/// x軸とy軸を持ったやつ
interface Position{
@property const pure abstract double x();
@property const pure abstract double y();
@property const pure abstract Vector2d pos();
}
/// Mixin用
template PositionReadTemplate(){
private Vector2d _pos;
public{
@property const pure override double x(){return this.pos.x;}
@property const pure override double y(){return this.pos.y;}
@property const pure override Vector2d pos(){return this._pos;}
}
}
/// Mixin用
template PositionReadWriteTemplate(){
private Vector2d _pos;
public{
@property const pure override double x(){return this.pos.x;}
@property const pure override double y(){return this.pos.y;}
@property const pure override Vector2d pos(){return this._pos;}
@property void pos(in Vector2d val){this._pos = val;}
@property void x(in double val){_pos.x = val;}
@property void y(in double val){_pos.y = val;}
}
}
/// 長方形
/// 上下左右の位置を返すような図形
interface Rectangle{
@property const pure abstract double left(); /// 左
@property const pure abstract double right(); /// 右
@property const pure abstract double top(); /// 上
@property const pure abstract double bottom(); /// 下
@property const pure abstract double width(); /// 幅(right - left)
@property const pure abstract double height(); /// 高さ(bottom - top)
@property const pure abstract double cx(); /// 中心x座標((left + right)/2)
@property const pure abstract double cy(); /// 中心y座標((top + bottom)/2)
@property const pure abstract Vector2d top_left(); /// 左上
@property const pure abstract Vector2d center_left(); /// 中央左
@property const pure abstract Vector2d bottom_left(); /// 左下
@property const pure abstract Vector2d top_right(); /// 右上
@property const pure abstract Vector2d center_right(); /// 中央右
@property const pure abstract Vector2d bottom_right(); /// 右下
@property const pure abstract Vector2d top_center(); /// 中央上
@property const pure abstract Vector2d center(); /// 中央
@property const pure abstract Vector2d bottom_center(); /// 中央下
}
///
template RectangleRBTemplate(){
@property const pure override double right() {return this.left+this.width;}
@property const pure override double bottom(){return this.top+this.height;}
}
template RectangleWHTemplate(){
@property const pure override double width()
out(res){
assert(res>=0);
}body{
return this.right - this.left;
}
@property const pure override double height()
out(res){
assert(res>=0);
}body{
return this.bottom - this.top;
}
}
///
template RectangleCxCyByLTWHTemplate(){
@property const pure override double cx() {return this.left+this.width/2;}
@property const pure override double cy() {return this.top+this.height/2;}
}
///
template RectangleCxCyByLRTBTemplate(){
@property const pure override double cx() {return (this.left+this.right)/2;}
@property const pure override double cy() {return (this.top+this.bottom)/2;}
}
///
template RectangleVectorTemplate(){
/// 左上
@property const pure override Vector2d top_left() {return vecpos(this.left, this.top );}
/// 左
@property const pure override Vector2d center_left() {return vecpos(this.left, this.cy );}
/// 左下
@property const pure override Vector2d bottom_left() {return vecpos(this.left, this.bottom);}
/// 上
@property const pure override Vector2d top_center() {return vecpos(this.cx, this.top );}
/// 中心
@property const pure override Vector2d center() {return vecpos(this.cx, this.cy );}
/// 下
@property const pure override Vector2d bottom_center(){return vecpos(this.cx, this.bottom);}
/// 右上
@property const pure override Vector2d top_right() {return vecpos(this.right, this.top );}
/// 右
@property const pure override Vector2d center_right() {return vecpos(this.right, this.cy );}
/// 右下
@property const pure override Vector2d bottom_right() {return vecpos(this.right, this.bottom);}
}
template RectangleVectorTemplate2(){
@property const pure override Vector2d top_left() {return vecpos(this.left, this.top );}
@property const pure override Vector2d center_left() {return vecpos(this.left, this.cy );}
@property const pure override Vector2d bottom_left() {return vecpos(this.left, this.bottom);}
@property const pure override Vector2d top_right() {return vecpos(this.right, this.top );}
@property const pure override Vector2d center_right() {return vecpos(this.right, this.cy );}
@property const pure override Vector2d bottom_right() {return vecpos(this.right, this.bottom);}
@property const pure override Vector2d top_center() {return vecpos(this.cx, this.top );}
@property const pure override Vector2d bottom_center(){return vecpos(this.cx, this.bottom);}
}
/// 円
/// 中心座標と半径
interface Circle : Rectangle{
@property const pure abstract Vector2d center();
@property const pure abstract int radius();
}
/// 円
/// 中心座標と内側の半径と外側の半径
/// 四角形なんかで使う
/// innerRadius = outerRadius で普通の円
interface DoubleCircle : Rectangle{
@property const pure abstract Vector2d center(); /// 中心
@property const pure abstract double innerRadius(); /// 内側の円の半径
@property const pure abstract double outerRadius(); /// 外側の円の半径
}
/// 方向を持ったもの
interface Direction{
@property const pure abstract double dir(); /// 方向 ラジアン
}
|
D
|
the metal or paper medium of exchange that is presently used
general acceptance or use
the property of belonging to the present time
|
D
|
/Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/Layouts/ClassTypeDescriptor.swift.o : /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/Metadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/TupleMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ProtocolMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/EnumMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/FuntionMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ClassMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/StructMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Kind.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ValueWitnessTable.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfoConvertible.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/MetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/NominalMetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/MetadataLayoutType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Case.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/DefaultValue.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Union.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/FunctionInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/PropertyInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TargetTypeGenericContextDescriptorHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolTypeContainer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ExistentialContainter.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativePointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativeVectorPointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Vector.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FieldDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/String+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/Pointer+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Pointers.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/GettersSetters.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Errors.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/RetainCounts.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TupleMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FunctionMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/Factory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/CRuntime.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP2.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_Vapor3.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHPACK.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/GraphQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CJWTKitBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FCM.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/BSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FineJSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWT.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOExtrasZlib.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Backtrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CBacktrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolConformance.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombine.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolType.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKittenCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketInfrastructure.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ApodiniDatabase.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtobufferCoding.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Casting.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineDispatch.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Apodini.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKitBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKitten.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTPCompression.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineFoundation.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SwifCron.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_MongoKittenCrypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CURLParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RichJSONParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CMultipartParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMySQLDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQLiteDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMongoDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentPostgresDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTVapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AssociatedTypeRequirementsVisitor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOExtras.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Jobs.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Metrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CoreMetrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTransportServices.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTestUtils.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Yams.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_NIO1APIShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Notifications.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COpenCombineHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ValuePointers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNSwift.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenAPIKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWTKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ConsoleKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RoutingKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MultipartKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncHTTPClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/DNSClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTFluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CContext.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Meow.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/Layouts/ClassTypeDescriptor~partial.swiftmodule : /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/Metadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/TupleMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ProtocolMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/EnumMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/FuntionMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ClassMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/StructMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Kind.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ValueWitnessTable.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfoConvertible.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/MetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/NominalMetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/MetadataLayoutType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Case.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/DefaultValue.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Union.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/FunctionInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/PropertyInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TargetTypeGenericContextDescriptorHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolTypeContainer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ExistentialContainter.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativePointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativeVectorPointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Vector.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FieldDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/String+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/Pointer+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Pointers.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/GettersSetters.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Errors.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/RetainCounts.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TupleMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FunctionMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/Factory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/CRuntime.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP2.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_Vapor3.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHPACK.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/GraphQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CJWTKitBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FCM.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/BSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FineJSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWT.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOExtrasZlib.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Backtrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CBacktrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolConformance.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombine.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolType.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKittenCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketInfrastructure.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ApodiniDatabase.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtobufferCoding.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Casting.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineDispatch.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Apodini.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKitBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKitten.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTPCompression.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineFoundation.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SwifCron.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_MongoKittenCrypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CURLParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RichJSONParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CMultipartParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMySQLDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQLiteDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMongoDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentPostgresDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTVapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AssociatedTypeRequirementsVisitor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOExtras.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Jobs.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Metrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CoreMetrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTransportServices.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTestUtils.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Yams.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_NIO1APIShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Notifications.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COpenCombineHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ValuePointers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNSwift.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenAPIKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWTKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ConsoleKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RoutingKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MultipartKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncHTTPClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/DNSClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTFluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CContext.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Meow.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/Layouts/ClassTypeDescriptor~partial.swiftdoc : /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/Metadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/TupleMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ProtocolMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/EnumMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/FuntionMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ClassMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/StructMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Kind.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ValueWitnessTable.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfoConvertible.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/MetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/NominalMetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/MetadataLayoutType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Case.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/DefaultValue.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Union.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/FunctionInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/PropertyInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TargetTypeGenericContextDescriptorHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolTypeContainer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ExistentialContainter.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativePointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativeVectorPointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Vector.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FieldDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/String+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/Pointer+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Pointers.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/GettersSetters.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Errors.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/RetainCounts.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TupleMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FunctionMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/Factory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/CRuntime.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP2.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_Vapor3.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHPACK.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/GraphQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CJWTKitBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FCM.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/BSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FineJSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWT.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOExtrasZlib.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Backtrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CBacktrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolConformance.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombine.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolType.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKittenCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketInfrastructure.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ApodiniDatabase.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtobufferCoding.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Casting.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineDispatch.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Apodini.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKitBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKitten.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTPCompression.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineFoundation.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SwifCron.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_MongoKittenCrypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CURLParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RichJSONParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CMultipartParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMySQLDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQLiteDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMongoDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentPostgresDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTVapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AssociatedTypeRequirementsVisitor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOExtras.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Jobs.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Metrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CoreMetrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTransportServices.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTestUtils.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Yams.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_NIO1APIShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Notifications.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COpenCombineHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ValuePointers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNSwift.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenAPIKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWTKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ConsoleKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RoutingKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MultipartKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncHTTPClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/DNSClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTFluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CContext.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Meow.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/Layouts/ClassTypeDescriptor~partial.swiftsourceinfo : /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/Metadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/TupleMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ProtocolMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/EnumMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/FuntionMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ClassMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/StructMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Kind.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ValueWitnessTable.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfoConvertible.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/MetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/NominalMetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/MetadataLayoutType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Case.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/DefaultValue.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Union.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/FunctionInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/PropertyInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TargetTypeGenericContextDescriptorHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolTypeContainer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ExistentialContainter.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativePointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativeVectorPointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Vector.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FieldDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/String+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/Pointer+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Pointers.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/GettersSetters.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Errors.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/RetainCounts.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TupleMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FunctionMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/Factory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/CRuntime.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP2.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_Vapor3.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHPACK.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/GraphQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CJWTKitBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FCM.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/BSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FineJSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWT.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOExtrasZlib.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Backtrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CBacktrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolConformance.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombine.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolType.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKittenCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketInfrastructure.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ApodiniDatabase.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtobufferCoding.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Casting.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineDispatch.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Apodini.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKitBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKitten.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTPCompression.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineFoundation.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SwifCron.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_MongoKittenCrypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CURLParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RichJSONParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CMultipartParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMySQLDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQLiteDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMongoDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentPostgresDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTVapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AssociatedTypeRequirementsVisitor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOExtras.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Jobs.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Metrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CoreMetrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTransportServices.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTestUtils.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Yams.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_NIO1APIShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Notifications.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COpenCombineHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ValuePointers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNSwift.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenAPIKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWTKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ConsoleKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RoutingKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MultipartKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncHTTPClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/DNSClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTFluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CContext.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Meow.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/DerivedData/Samples/Build/Intermediates.noindex/Samples.build/Debug-iphoneos/Samples.build/Objects-normal/arm64/TwoSums.o : /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LRU.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/ProjectionArea.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/MoveZerosToEnd.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/BinaryTree.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/AppDelegate.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/DecodedString.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/BinarySearch.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/Fibonacci.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/CapGemini.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/HexaDecimal.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/ZeroSum.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/Configuration.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/ConfigurationManager.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/TimerViewController.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/DefaultViewController.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/NavigateToTimer.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/ReachableNodes.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/Protocols.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/TwoSums.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/Boats.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/Theory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Samples-Bridging-Header.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/DerivedData/Samples/Build/Intermediates.noindex/Samples.build/Debug-iphoneos/Samples.build/Objects-normal/arm64/TwoSums~partial.swiftmodule : /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LRU.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/ProjectionArea.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/MoveZerosToEnd.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/BinaryTree.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/AppDelegate.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/DecodedString.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/BinarySearch.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/Fibonacci.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/CapGemini.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/HexaDecimal.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/ZeroSum.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/Configuration.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/ConfigurationManager.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/TimerViewController.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/DefaultViewController.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/NavigateToTimer.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/ReachableNodes.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/Protocols.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/TwoSums.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/Boats.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/Theory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Samples-Bridging-Header.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/DerivedData/Samples/Build/Intermediates.noindex/Samples.build/Debug-iphoneos/Samples.build/Objects-normal/arm64/TwoSums~partial.swiftdoc : /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LRU.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/ProjectionArea.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/MoveZerosToEnd.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/BinaryTree.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/AppDelegate.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/DecodedString.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/BinarySearch.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/Fibonacci.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/CapGemini.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/HexaDecimal.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/ZeroSum.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/Configuration.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/ConfigurationManager.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/TimerViewController.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/DefaultViewController.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/KVO/NavigateToTimer.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/ReachableNodes.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/Protocols.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/TwoSums.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/LeetCode/Boats.swift /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Examples/Theory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Users/kushalashok/Documents/Kushal/Personal/Interviews/XcodePractice/Swift/Samples/Samples-Bridging-Header.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/Random.build/OSRandom.swift.o : /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/RandomProtocol.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/Array+Random.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/OSRandom.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/URandom.swift /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIO.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/COperatingSystem.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIOConcurrencyHelpers.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/share/swift/usr/lib/swift/linux/x86_64/glibc.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOSHA1.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CCryptoOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOZlib.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIODarwin.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOHTTPParser.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOAtomics.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOLinux.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio-zlib-support/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio-ssl-support/module.modulemap
/home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/Random.build/OSRandom~partial.swiftmodule : /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/RandomProtocol.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/Array+Random.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/OSRandom.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/URandom.swift /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIO.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/COperatingSystem.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIOConcurrencyHelpers.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/share/swift/usr/lib/swift/linux/x86_64/glibc.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOSHA1.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CCryptoOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOZlib.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIODarwin.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOHTTPParser.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOAtomics.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOLinux.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio-zlib-support/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio-ssl-support/module.modulemap
/home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/Random.build/OSRandom~partial.swiftdoc : /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/RandomProtocol.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/Array+Random.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/OSRandom.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/crypto/Sources/Random/URandom.swift /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIO.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/COperatingSystem.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIOConcurrencyHelpers.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/share/swift/usr/lib/swift/linux/x86_64/glibc.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOSHA1.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CCryptoOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOZlib.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIODarwin.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOHTTPParser.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOAtomics.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOLinux.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio-zlib-support/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio-ssl-support/module.modulemap
|
D
|
/**
Automatic REST interface and client code generation facilities.
Copyright: © 2012-2013 RejectedSoftware e.K.
License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file.
Authors: Sönke Ludwig, Михаил Страшун
*/
module vibe.web.rest;
public import vibe.internal.meta.funcattr : before, after;
public import vibe.web.common;
import vibe.core.log;
import vibe.http.router : URLRouter;
import vibe.http.common : HTTPMethod;
import vibe.http.server : HTTPServerRequestDelegate;
import std.algorithm : startsWith, endsWith;
/**
Registers a REST interface and connects it the the given instance.
Each method is mapped to the corresponing HTTP verb. Property methods are mapped to GET/PUT and
all other methods are mapped according to their prefix verb. If the method has no known prefix,
POST is used. The following table lists the mappings from prefix verb to HTTP verb:
<table>
<tr><th>Prefix</th><th>HTTP verb</th></tr>
<tr><td>get</td><td>GET</td></tr>
<tr><td>query</td><td>GET</td></tr>
<tr><td>set</td><td>PUT</td></tr>
<tr><td>put</td><td>PUT</td></tr>
<tr><td>update</td><td>PATCH</td></tr>
<tr><td>patch</td><td>PATCH</td></tr>
<tr><td>add</td><td>POST</td></tr>
<tr><td>create</td><td>POST</td></tr>
<tr><td>post</td><td>POST</td></tr>
</table>
If a method has its first parameter named 'id', it will be mapped to ':id/method' and
'id' is expected to be part of the URL instead of a JSON request. Parameters with default
values will be optional in the corresponding JSON request.
Any interface that you return from a getter will be made available with the base url and its name appended.
See_Also:
RestInterfaceClient class for a seamless way to access such a generated API
*/
void registerRestInterface(TImpl)(URLRouter router, TImpl instance, string url_prefix,
MethodStyle style = MethodStyle.lowerUnderscored)
{
import vibe.internal.meta.traits : baseInterface;
import std.traits : MemberFunctionsTuple, ParameterIdentifierTuple,
ParameterTypeTuple, ReturnType;
void addRoute(HTTPMethod httpVerb, string url, HTTPServerRequestDelegate handler, string[] params)
{
import std.algorithm : filter, startsWith;
import std.array : array;
router.match(httpVerb, url, handler);
logDiagnostic(
"REST route: %s %s %s",
httpVerb,
url,
params.filter!(p => !p.startsWith("_") && p != "id")().array()
);
}
alias I = baseInterface!TImpl;
foreach (method; __traits(allMembers, I)) {
foreach (overload; MemberFunctionsTuple!(I, method)) {
enum meta = extractHTTPMethodAndName!overload();
static if (meta.hadPathUDA) {
string url = meta.url;
}
else {
static if (__traits(identifier, overload) == "index") {
pragma(msg, "Processing interface " ~ T.stringof ~
": please use @path(\"/\") to define '/' path" ~
" instead of 'index' method. Special behavior will be removed" ~
" in the next release.");
}
string url = adjustMethodStyle(meta.url, style);
}
alias RT = ReturnType!overload;
static if (is(RT == interface)) {
// nested API
static assert(
ParameterTypeTuple!overload.length == 0,
"Interfaces may only be returned from parameter-less functions!"
);
registerRestInterface!RT(
router,
__traits(getMember, instance, method)(),
concatURL(url_prefix, url, true)
);
} else {
// normal handler
auto handler = jsonMethodHandler!(I, method, overload)(instance);
string[] params = [ ParameterIdentifierTuple!overload ];
// legacy special case for :id, left for backwards-compatibility reasons
if (params.length && params[0] == "id") {
auto combined_url = concatURL(
concatURL(url_prefix, ":id", true),
url);
addRoute(meta.method, combined_url, handler, params);
} else {
addRoute(meta.method, concatURL(url_prefix, url), handler, params);
}
}
}
}
}
/// ditto
void registerRestInterface(TImpl)(URLRouter router, TImpl instance, MethodStyle style = MethodStyle.lowerUnderscored)
{
// this shorter overload tries to deduce root path automatically
import vibe.internal.meta.uda : findFirstUDA;
import vibe.internal.meta.traits : baseInterface;
alias I = baseInterface!TImpl;
enum uda = findFirstUDA!(RootPath, I);
static if (!uda.found)
registerRestInterface!I(router, instance, "/", style);
else
{
static if (uda.value.data == "")
{
auto path = "/" ~ adjustMethodStyle(I.stringof, style);
registerRestInterface!I(router, instance, path, style);
}
else
{
registerRestInterface!I(
router,
instance,
concatURL("/", uda.value.data),
style
);
}
}
}
/**
This is a very limited example of REST interface features. Please refer to
the "rest" project in the "examples" folder for a full overview.
All details related to HTTP are inferred from the interface declaration.
*/
unittest
{
interface IMyAPI
{
// GET /api/greeting
@property string greeting();
// PUT /api/greeting
@property void greeting(string text);
// POST /api/users
@path("/users")
void addNewUser(string name);
// GET /api/users
@property string[] users();
// GET /api/:id/name
string getName(int id);
// GET /some_custom_json
Json getSomeCustomJson();
}
// vibe.d takes care of all JSON encoding/decoding
// and actual API implementation can work directly
// with native types
class API : IMyAPI
{
private {
string m_greeting;
string[] m_users;
}
@property string greeting() { return m_greeting; }
@property void greeting(string text) { m_greeting = text; }
void addNewUser(string name) { m_users ~= name; }
@property string[] users() { return m_users; }
string getName(int id) { return m_users[id]; }
Json getSomeCustomJson()
{
Json ret = Json.emptyObject;
ret["somefield"] = "Hello, World!";
return ret;
}
}
// actual usage, this is usually done in app.d module
// constructor
void static_this()
{
import vibe.http.server, vibe.http.router;
auto router = new URLRouter();
registerRestInterface(router, new API());
listenHTTP(new HTTPServerSettings(), router);
}
}
/**
Implements the given interface by forwarding all public methods to a REST server.
The server must talk the same protocol as registerRestInterface() generates. Be sure to set
the matching method style for this. The RestInterfaceClient class will derive from the
interface that is passed as a template argument. It can be used as a drop-in replacement
of the real implementation of the API this way.
*/
class RestInterfaceClient(I) : I
{
//pragma(msg, "imports for "~I.stringof~":");
//pragma(msg, generateModuleImports!(I)());
mixin(generateModuleImports!I());
import vibe.inet.url : URL, PathEntry;
import vibe.http.client : HTTPClientRequest;
alias RequestFilter = void delegate(HTTPClientRequest req);
private {
URL m_baseURL;
MethodStyle m_methodStyle;
RequestFilter m_requestFilter;
}
/**
Creates a new REST implementation of I
*/
this (string base_url, MethodStyle style = MethodStyle.lowerUnderscored)
{
import vibe.internal.meta.uda : findFirstUDA;
URL url;
enum uda = findFirstUDA!(RootPath, I);
static if (!uda.found) {
url = URL.parse(base_url);
}
else
{
static if (uda.value.data == "") {
url = URL.parse(
concatURL(base_url, adjustMethodStyle(I.stringof, style), true)
);
}
else {
url = URL.parse(
concatURL(base_url, uda.value.data, true)
);
}
}
this(url, style);
}
/// ditto
this(URL base_url, MethodStyle style = MethodStyle.lowerUnderscored)
{
m_baseURL = base_url;
m_methodStyle = style;
mixin (generateRestInterfaceSubInterfaceInstances!I());
}
/**
An optional request filter that allows to modify each request before it is made.
*/
@property RequestFilter requestFilter()
{
return m_requestFilter;
}
/// ditto
@property void requestFilter(RequestFilter v) {
m_requestFilter = v;
mixin (generateRestInterfaceSubInterfaceRequestFilter!I());
}
//pragma(msg, "subinterfaces:");
//pragma(msg, generateRestInterfaceSubInterfaces!(I)());
mixin (generateRestInterfaceSubInterfaces!I());
//pragma(msg, "restinterface:");
//pragma(msg, generateRestInterfaceMethods!(I)());
mixin (generateRestInterfaceMethods!I());
protected {
import vibe.data.json : Json;
import vibe.textfilter.urlencode;
Json request(string verb, string name, Json params, bool[string] param_is_json) const
{
import vibe.http.client : HTTPClientRequest, HTTPClientResponse,
requestHTTP;
import vibe.http.common : HTTPStatusException, HTTPStatus,
httpMethodFromString, httpStatusText;
import vibe.inet.url : Path;
import std.array : appender;
URL url = m_baseURL;
if (name.length) url ~= Path(name);
if ((verb == "GET" || verb == "HEAD") && params.length > 0) {
auto query = appender!string();
bool first = true;
foreach (string pname, p; params) {
if (!first) {
query.put('&');
}
else {
first = false;
}
filterURLEncode(query, pname);
query.put('=');
filterURLEncode(query, param_is_json[pname] ? p.toString() : toRestString(p));
}
url.queryString = query.data();
}
Json ret;
auto reqdg = (scope HTTPClientRequest req) {
req.method = httpMethodFromString(verb);
if (m_requestFilter) {
m_requestFilter(req);
}
if (verb != "GET" && verb != "HEAD") {
req.writeJsonBody(params);
}
};
auto resdg = (scope HTTPClientResponse res) {
ret = res.readJson();
logDebug(
"REST call: %s %s -> %d, %s",
verb,
url.toString(),
res.statusCode,
ret.toString()
);
if (res.statusCode != HTTPStatus.OK)
throw new RestException(res.statusCode, ret);
};
requestHTTP(url, reqdg, resdg);
return ret;
}
}
}
///
unittest
{
interface IMyApi
{
// GET /status
string getStatus();
// GET /greeting
@property string greeting();
// PUT /greeting
@property void greeting(string text);
// POST /new_user
void addNewUser(string name);
// GET /users
@property string[] users();
// GET /:id/name
string getName(int id);
Json getSomeCustomJson();
}
void application()
{
auto api = new RestInterfaceClient!IMyApi("http://127.0.0.1/api/");
logInfo("Status: %s", api.getStatus());
api.greeting = "Hello, World!";
logInfo("Greeting message: %s", api.greeting);
api.addNewUser("Peter");
api.addNewUser("Igor");
logInfo("Users: %s", api.users);
}
}
/// private
private HTTPServerRequestDelegate jsonMethodHandler(T, string method, alias Func)(T inst)
{
import std.traits : ParameterTypeTuple, ReturnType,
ParameterDefaultValueTuple, ParameterIdentifierTuple;
import std.string : format;
import std.algorithm : startsWith;
import std.exception : enforce;
import vibe.http.server : HTTPServerRequest, HTTPServerResponse;
import vibe.http.common : HTTPStatusException, HTTPStatus;
import vibe.utils.string : sanitizeUTF8;
import vibe.internal.meta.funcattr : IsAttributedParameter;
alias PT = ParameterTypeTuple!Func;
alias RT = ReturnType!Func;
alias ParamDefaults = ParameterDefaultValueTuple!Func;
enum ParamNames = [ ParameterIdentifierTuple!Func ];
void handler(HTTPServerRequest req, HTTPServerResponse res)
{
PT params;
foreach (i, P; PT) {
static assert (
ParamNames[i].length,
format(
"Parameter %s of %s has no name",
i.stringof,
method
)
);
// will be re-written by UDA function anyway
static if (!IsAttributedParameter!(Func, ParamNames[i])) {
static if (i == 0 && ParamNames[i] == "id") {
// legacy special case for :id, backwards-compatibility
logDebug("id %s", req.params["id"]);
params[i] = fromRestString!P(req.params["id"]);
} else static if (ParamNames[i].startsWith("_")) {
// URL parameter
static if (ParamNames[i] != "_dummy") {
enforce(
ParamNames[i][1 .. $] in req.params,
format("req.param[%s] was not set!", ParamNames[i][1 .. $])
);
logDebug("param %s %s", ParamNames[i], req.params[ParamNames[i][1 .. $]]);
params[i] = fromRestString!P(req.params[ParamNames[i][1 .. $]]);
}
} else {
// normal parameter
alias DefVal = ParamDefaults[i];
if (req.method == HTTPMethod.GET) {
logDebug("query %s of %s" ,ParamNames[i], req.query);
static if (is (DefVal == void)) {
enforce(
ParamNames[i] in req.query,
format("Missing query parameter '%s'", ParamNames[i])
);
} else {
if (ParamNames[i] !in req.query) {
params[i] = DefVal;
continue;
}
}
params[i] = fromRestString!P(req.query[ParamNames[i]]);
} else {
logDebug("%s %s", method, ParamNames[i]);
enforce(
req.contentType == "application/json",
"The Content-Type header needs to be set to application/json."
);
enforce(
req.json.type != Json.Type.Undefined,
"The request body does not contain a valid JSON value."
);
enforce(
req.json.type == Json.Type.Object,
"The request body must contain a JSON object with an entry for each parameter."
);
static if (is(DefVal == void)) {
enforce(
req.json[ParamNames[i]].type != Json.Type.Undefined,
format("Missing parameter %s", ParamNames[i])
);
} else {
if (req.json[ParamNames[i]].type == Json.Type.Undefined) {
params[i] = DefVal;
continue;
}
}
params[i] = deserializeJson!P(req.json[ParamNames[i]]);
}
}
}
}
try {
import vibe.internal.meta.funcattr;
auto handler = createAttributedFunction!Func(req, res);
static if (is(RT == void)) {
handler(&__traits(getMember, inst, method), params);
res.writeJsonBody(Json.emptyObject);
} else {
auto ret = handler(&__traits(getMember, inst, method), params);
res.writeJsonBody(ret);
}
} catch (HTTPStatusException e) {
res.writeJsonBody([ "statusMessage": e.msg ], e.status);
} catch (Exception e) {
// TODO: better error description!
res.writeJsonBody(
[ "statusMessage": e.msg, "statusDebugMessage": sanitizeUTF8(cast(ubyte[])e.toString()) ],
HTTPStatus.internalServerError
);
}
}
return &handler;
}
/// private
private string generateRestInterfaceSubInterfaces(I)()
{
if (!__ctfe)
assert(false);
import std.traits : MemberFunctionsTuple, FunctionTypeOf,
ReturnType, ParameterTypeTuple, fullyQualifiedName;
import std.algorithm : canFind;
import std.string : format;
string ret;
string[] tps; // list of already processed interface types
foreach (method; __traits(allMembers, I)) {
foreach (overload; MemberFunctionsTuple!(I, method)) {
alias FT = FunctionTypeOf!overload;
alias PTT = ParameterTypeTuple!FT;
alias RT = ReturnType!FT;
static if (is(RT == interface)) {
static assert (
PTT.length == 0,
"Interface getters may not have parameters."
);
if (!tps.canFind(RT.stringof)) {
tps ~= RT.stringof;
string implname = RT.stringof ~ "Impl";
ret ~= format(
q{
alias RestInterfaceClient!(%s) %s;
},
fullyQualifiedName!RT,
implname
);
ret ~= format(
q{
private %s m_%s;
},
implname,
implname
);
ret ~= "\n";
}
}
}
}
return ret;
}
/// private
private string generateRestInterfaceSubInterfaceInstances(I)()
{
if (!__ctfe)
assert(false);
import std.traits : MemberFunctionsTuple, FunctionTypeOf,
ReturnType, ParameterTypeTuple;
import std.string : format;
import std.algorithm : canFind;
string ret;
string[] tps; // list of of already processed interface types
foreach (method; __traits(allMembers, I)) {
foreach (overload; MemberFunctionsTuple!(I, method)) {
alias FT = FunctionTypeOf!overload;
alias PTT = ParameterTypeTuple!FT;
alias RT = ReturnType!FT;
static if (is(RT == interface)) {
static assert (
PTT.length == 0,
"Interface getters may not have parameters."
);
if (!tps.canFind(RT.stringof)) {
tps ~= RT.stringof;
string implname = RT.stringof ~ "Impl";
enum meta = extractHTTPMethodAndName!overload();
ret ~= format(
q{
if (%s)
m_%s = new %s(m_baseURL.toString() ~ PathEntry("%s").toString() ~ "/", m_methodStyle);
else
m_%s = new %s(m_baseURL.toString() ~ adjustMethodStyle(PathEntry("%s").toString() ~ "/", m_methodStyle), m_methodStyle);
},
meta.hadPathUDA,
implname, implname, meta.url,
implname, implname, meta.url
);
ret ~= "\n";
}
}
}
}
return ret;
}
/// private
private string generateRestInterfaceSubInterfaceRequestFilter(I)()
{
if (!__ctfe)
assert(false);
import std.traits : MemberFunctionsTuple, FunctionTypeOf,
ReturnType, ParameterTypeTuple;
import std.string : format;
import std.algorithm : canFind;
string ret;
string[] tps; // list of already processed interface types
foreach (method; __traits(allMembers, I)) {
foreach (overload; MemberFunctionsTuple!(I, method)) {
alias FT = FunctionTypeOf!overload;
alias PTT = ParameterTypeTuple!FT;
alias RT = ReturnType!FT;
static if (is(RT == interface)) {
static assert (
PTT.length == 0,
"Interface getters may not have parameters."
);
if (!tps.canFind(RT.stringof)) {
tps ~= RT.stringof;
string implname = RT.stringof ~ "Impl";
ret ~= format(
q{
m_%s.requestFilter = m_requestFilter;
},
implname
);
ret ~= "\n";
}
}
}
}
return ret;
}
/// private
private string generateRestInterfaceMethods(I)()
{
if (!__ctfe)
assert(false);
import std.traits : MemberFunctionsTuple, FunctionTypeOf,
ReturnType, ParameterTypeTuple, ParameterIdentifierTuple;
import std.string : format;
import std.algorithm : canFind, startsWith;
import std.array : split;
import vibe.internal.meta.codegen : cloneFunction;
import vibe.internal.meta.funcattr : IsAttributedParameter;
import vibe.http.server : httpMethodString;
string ret;
foreach (method; __traits(allMembers, I)) {
foreach (overload; MemberFunctionsTuple!(I, method)) {
alias FT = FunctionTypeOf!overload;
alias RT = ReturnType!FT;
alias PTT = ParameterTypeTuple!overload;
alias ParamNames = ParameterIdentifierTuple!overload;
enum meta = extractHTTPMethodAndName!overload();
// NB: block formatting is coded in dependency order, not in 1-to-1 code flow order
static if (is(RT == interface)) {
ret ~= format(
q{
override %s {
return m_%sImpl;
}
},
cloneFunction!overload,
RT.stringof
);
} else {
string param_handling_str;
string url_prefix = `""`;
// Block 2
foreach (i, PT; PTT){
static assert (
ParamNames[i].length,
format(
"Parameter %s of %s has no name.",
i,
method
)
);
// legacy :id special case, left for backwards-compatibility reasons
static if (i == 0 && ParamNames[0] == "id") {
static if (is(PT == Json))
url_prefix = q{urlEncode(id.toString())~"/"};
else
url_prefix = q{urlEncode(toRestString(serializeToJson(id)))~"/"};
}
else static if (
!ParamNames[i].startsWith("_") &&
!IsAttributedParameter!(overload, ParamNames[i])
) {
// underscore parameters are sourced from the HTTPServerRequest.params map or from url itself
param_handling_str ~= format(
q{
jparams__["%s"] = serializeToJson(%s);
jparamsj__["%s"] = %s;
},
ParamNames[i],
ParamNames[i],
ParamNames[i],
is(PT == Json) ? "true" : "false"
);
}
}
// Block 3
string request_str;
static if (!meta.hadPathUDA) {
request_str = format(
q{
url__ = %s ~ adjustMethodStyle(url__, m_methodStyle);
},
url_prefix
);
} else {
auto parts = meta.url.split("/");
request_str ~= `url__ = ""`;
foreach (i, p; parts) {
if (i > 0) {
request_str ~= `~ "/"`;
}
bool match = false;
if (p.startsWith(":")) {
foreach (pn; ParamNames) {
if (pn.startsWith("_") && p[1 .. $] == pn[1 .. $]) {
request_str ~= format(
q{ ~ urlEncode(toRestString(serializeToJson(%s)))},
pn
);
match = true;
break;
}
}
}
if (!match) {
request_str ~= `~ "` ~ p ~ `"`;
}
}
request_str ~= ";\n";
}
request_str ~= format(
q{
auto jret__ = request("%s", url__ , jparams__, jparamsj__);
},
httpMethodString(meta.method)
);
static if (!is(ReturnType!overload == void)) {
request_str ~= q{
typeof(return) ret__;
deserializeJson(ret__, jret__);
return ret__;
};
}
// Block 1
ret ~= format(
q{
override %s {
Json jparams__ = Json.emptyObject;
bool[string] jparamsj__;
string url__ = "%s";
%s
%s
}
},
cloneFunction!overload,
meta.url,
param_handling_str,
request_str
);
}
}
}
return ret;
}
private {
import vibe.data.json;
import std.conv : to;
string toRestString(Json value)
{
switch( value.type ){
default: return value.toString();
case Json.Type.Bool: return value.get!bool ? "true" : "false";
case Json.Type.Int: return to!string(value.get!long);
case Json.Type.Float: return to!string(value.get!double);
case Json.Type.String: return value.get!string;
}
}
T fromRestString(T)(string value)
{
static if( is(T == bool) ) return value == "true";
else static if( is(T : int) ) return to!T(value);
else static if( is(T : double) ) return to!T(value); // FIXME: formattedWrite(dst, "%.16g", json.get!double);
else static if( is(T : string) ) return value;
else static if( __traits(compiles, T.fromString("hello")) ) return T.fromString(value);
else return deserializeJson!T(parseJson(value));
}
}
private string generateModuleImports(I)()
{
if( !__ctfe )
assert(false);
import vibe.internal.meta.codegen : getRequiredImports;
import std.algorithm : map;
import std.array : join;
auto modules = getRequiredImports!I();
return join(map!(a => "static import " ~ a ~ ";")(modules), "\n");
}
version(unittest)
{
private struct Aggregate { }
private interface Interface
{
Aggregate[] foo();
}
}
unittest
{
enum imports = generateModuleImports!Interface;
static assert(imports == "static import vibe.web.rest;");
}
|
D
|
the act of grafting something onto something else
cause to grow together parts from different plants
place the organ of a donor into the body of a recipient
|
D
|
CMakeFiles/starcraft.dir/src/Viking.c.obj: \
E:\CodeAcademy\StrypesProjects\StarCraftComplete\StarCraft_Complete_CMake\src\Viking.c \
E:/CodeAcademy/StrypesProjects/StarCraftComplete/StarCraft_Complete_CMake/include/Viking.h \
E:/CodeAcademy/StrypesProjects/StarCraftComplete/StarCraft_Complete_CMake/include/List.h \
E:/CodeAcademy/StrypesProjects/StarCraftComplete/StarCraft_Complete_CMake/include/Ship.h \
E:/CodeAcademy/StrypesProjects/StarCraftComplete/StarCraft_Complete_CMake/include/Abilities.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/stdio.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/crtdefs.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/_mingw.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/_mingw_secapi.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/vadefs.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/sdks/_mingw_directx.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/sdks/_mingw_ddk.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/_mingw_print_push.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/_mingw_off_t.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/swprintf.inl \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/_mingw_print_pop.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/stdlib.h \
C:/PROGRA~1/MINGW-~1/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed/limits.h \
C:/PROGRA~1/MINGW-~1/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed/syslimits.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/limits.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/sec_api/stdlib_s.h \
C:/PROGRA~1/MINGW-~1/mingw64/x86_64-w64-mingw32/include/malloc.h \
E:/CodeAcademy/StrypesProjects/StarCraftComplete/StarCraft_Complete_CMake/include/Defines.h
|
D
|
/**
* Semantic analysis of expressions.
*
* Specification: ($LINK2 https://dlang.org/spec/expression.html, Expressions)
*
* Copyright: Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/expressionsem.d, _expressionsem.d)
* Documentation: https://dlang.org/phobos/dmd_expressionsem.html
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/expressionsem.d
*/
module dmd.expressionsem;
import core.stdc.stdio;
import dmd.access;
import dmd.aggregate;
import dmd.aliasthis;
import dmd.arrayop;
import dmd.arraytypes;
import dmd.attrib;
import dmd.astcodegen;
import dmd.astenums;
import dmd.canthrow;
import dmd.chkformat;
import dmd.ctorflow;
import dmd.dscope;
import dmd.dsymbol;
import dmd.declaration;
import dmd.dclass;
import dmd.dcast;
import dmd.delegatize;
import dmd.denum;
import dmd.dimport;
import dmd.dinterpret;
import dmd.dmangle;
import dmd.dmodule;
import dmd.dstruct;
import dmd.dsymbolsem;
import dmd.dtemplate;
import dmd.errors;
import dmd.escape;
import dmd.expression;
import dmd.file_manager;
import dmd.func;
import dmd.globals;
import dmd.hdrgen;
import dmd.id;
import dmd.identifier;
import dmd.imphint;
import dmd.importc;
import dmd.init;
import dmd.initsem;
import dmd.inline;
import dmd.intrange;
import dmd.location;
import dmd.mtype;
import dmd.mustuse;
import dmd.nspace;
import dmd.opover;
import dmd.optimize;
import dmd.parse;
import dmd.printast;
import dmd.root.array;
import dmd.root.ctfloat;
import dmd.root.filename;
import dmd.common.outbuffer;
import dmd.root.rootobject;
import dmd.root.string;
import dmd.root.utf;
import dmd.semantic2;
import dmd.semantic3;
import dmd.sideeffect;
import dmd.safe;
import dmd.target;
import dmd.tokens;
import dmd.traits;
import dmd.typesem;
import dmd.typinf;
import dmd.utils;
import dmd.visitor;
enum LOGSEMANTIC = false;
/********************************************************
* Perform semantic analysis and CTFE on expressions to produce
* a string.
* Params:
* buf = append generated string to buffer
* sc = context
* exps = array of Expressions
* Returns:
* true on error
*/
bool expressionsToString(ref OutBuffer buf, Scope* sc, Expressions* exps)
{
if (!exps)
return false;
foreach (ex; *exps)
{
if (!ex)
continue;
auto sc2 = sc.startCTFE();
sc2.tinst = null;
sc2.minst = null; // prevents emission of any instantiated templates to object file
auto e2 = ex.expressionSemantic(sc2);
auto e3 = resolveProperties(sc2, e2);
sc2.endCTFE();
// allowed to contain types as well as expressions
auto e4 = ctfeInterpretForPragmaMsg(e3);
if (!e4 || e4.op == EXP.error)
return true;
// expand tuple
if (auto te = e4.isTupleExp())
{
if (expressionsToString(buf, sc, te.exps))
return true;
continue;
}
// char literals exp `.toStringExp` return `null` but we cant override it
// because in most contexts we don't want the conversion to succeed.
IntegerExp ie = e4.isIntegerExp();
const ty = (ie && ie.type) ? ie.type.ty : Terror;
if (ty.isSomeChar)
{
auto tsa = new TypeSArray(ie.type, IntegerExp.literal!1);
e4 = new ArrayLiteralExp(ex.loc, tsa, ie);
}
if (StringExp se = e4.toStringExp())
buf.writestring(se.toUTF8(sc).peekString());
else
buf.writestring(e4.toString());
}
return false;
}
/***********************************************************
* Resolve `exp` as a compile-time known string.
* Params:
* sc = scope
* exp = Expression which expected as a string
* s = What the string is expected for, will be used in error diagnostic.
* Returns:
* String literal, or `null` if error happens.
*/
StringExp semanticString(Scope *sc, Expression exp, const char* s)
{
sc = sc.startCTFE();
exp = exp.expressionSemantic(sc);
exp = resolveProperties(sc, exp);
sc = sc.endCTFE();
if (exp.op == EXP.error)
return null;
auto e = exp;
if (exp.type.isString())
{
e = e.ctfeInterpret();
if (e.op == EXP.error)
return null;
}
auto se = e.toStringExp();
if (!se)
{
exp.error("`string` expected for %s, not `(%s)` of type `%s`",
s, exp.toChars(), exp.type.toChars());
return null;
}
return se;
}
private Expression extractOpDollarSideEffect(Scope* sc, UnaExp ue)
{
Expression e0;
Expression e1 = Expression.extractLast(ue.e1, e0);
// https://issues.dlang.org/show_bug.cgi?id=12585
// Extract the side effect part if ue.e1 is comma.
if ((sc.flags & SCOPE.ctfe) ? hasSideEffect(e1) : !isTrivialExp(e1)) // match logic in extractSideEffect()
{
/* Even if opDollar is needed, 'e1' should be evaluate only once. So
* Rewrite:
* e1.opIndex( ... use of $ ... )
* e1.opSlice( ... use of $ ... )
* as:
* (ref __dop = e1, __dop).opIndex( ... __dop.opDollar ...)
* (ref __dop = e1, __dop).opSlice( ... __dop.opDollar ...)
*/
e1 = extractSideEffect(sc, "__dop", e0, e1, false);
assert(e1.isVarExp());
e1.isVarExp().var.storage_class |= STC.exptemp; // lifetime limited to expression
}
ue.e1 = e1;
return e0;
}
/**************************************
* Runs semantic on ae.arguments. Declares temporary variables
* if '$' was used.
*/
Expression resolveOpDollar(Scope* sc, ArrayExp ae, Expression* pe0)
{
assert(!ae.lengthVar);
*pe0 = null;
AggregateDeclaration ad = isAggregate(ae.e1.type);
Dsymbol slice = search_function(ad, Id.slice);
//printf("slice = %s %s\n", slice.kind(), slice.toChars());
foreach (i, e; *ae.arguments)
{
if (i == 0)
*pe0 = extractOpDollarSideEffect(sc, ae);
if (e.op == EXP.interval && !(slice && slice.isTemplateDeclaration()))
{
Lfallback:
if (ae.arguments.length == 1)
return null;
ae.error("multi-dimensional slicing requires template `opSlice`");
return ErrorExp.get();
}
//printf("[%d] e = %s\n", i, e.toChars());
// Create scope for '$' variable for this dimension
auto sym = new ArrayScopeSymbol(sc, ae);
sym.parent = sc.scopesym;
sc = sc.push(sym);
ae.lengthVar = null; // Create it only if required
ae.currentDimension = i; // Dimension for $, if required
e = e.expressionSemantic(sc);
e = resolveProperties(sc, e);
if (ae.lengthVar && sc.func)
{
// If $ was used, declare it now
Expression de = new DeclarationExp(ae.loc, ae.lengthVar);
de = de.expressionSemantic(sc);
*pe0 = Expression.combine(*pe0, de);
}
sc = sc.pop();
if (auto ie = e.isIntervalExp())
{
auto tiargs = new Objects();
Expression edim = new IntegerExp(ae.loc, i, Type.tsize_t);
edim = edim.expressionSemantic(sc);
tiargs.push(edim);
auto fargs = new Expressions(2);
(*fargs)[0] = ie.lwr;
(*fargs)[1] = ie.upr;
uint xerrors = global.startGagging();
sc = sc.push();
FuncDeclaration fslice = resolveFuncCall(ae.loc, sc, slice, tiargs, ae.e1.type, ArgumentList(fargs), FuncResolveFlag.quiet);
sc = sc.pop();
global.endGagging(xerrors);
if (!fslice)
goto Lfallback;
e = new DotTemplateInstanceExp(ae.loc, ae.e1, slice.ident, tiargs);
e = new CallExp(ae.loc, e, fargs);
e = e.expressionSemantic(sc);
}
if (!e.type)
{
ae.error("`%s` has no value", e.toChars());
e = ErrorExp.get();
}
if (e.op == EXP.error)
return e;
(*ae.arguments)[i] = e;
}
return ae;
}
/**************************************
* Runs semantic on se.lwr and se.upr. Declares a temporary variable
* if '$' was used.
* Returns:
* ae, or ErrorExp if errors occurred
*/
Expression resolveOpDollar(Scope* sc, ArrayExp ae, IntervalExp ie, Expression* pe0)
{
//assert(!ae.lengthVar);
if (!ie)
return ae;
VarDeclaration lengthVar = ae.lengthVar;
bool errors = false;
// create scope for '$'
auto sym = new ArrayScopeSymbol(sc, ae);
sym.parent = sc.scopesym;
sc = sc.push(sym);
Expression sem(Expression e)
{
e = e.expressionSemantic(sc);
e = resolveProperties(sc, e);
if (!e.type)
{
ae.error("`%s` has no value", e.toChars());
errors = true;
}
return e;
}
ie.lwr = sem(ie.lwr);
ie.upr = sem(ie.upr);
if (ie.lwr.isErrorExp() || ie.upr.isErrorExp())
errors = true;
if (lengthVar != ae.lengthVar && sc.func)
{
// If $ was used, declare it now
Expression de = new DeclarationExp(ae.loc, ae.lengthVar);
de = de.expressionSemantic(sc);
*pe0 = Expression.combine(*pe0, de);
}
sc = sc.pop();
return errors ? ErrorExp.get() : ae;
}
/******************************
* Perform semantic() on an array of Expressions.
*/
extern(D) bool arrayExpressionSemantic(
Expression[] exps, Scope* sc, bool preserveErrors = false)
{
bool err = false;
foreach (ref e; exps)
{
if (e is null) continue;
auto e2 = e.expressionSemantic(sc);
if (e2.op == EXP.error)
err = true;
if (preserveErrors || e2.op != EXP.error)
e = e2;
}
return err;
}
/*
Checks if `exp` contains a direct access to a `noreturn`
variable. If that is the case, an `assert(0)` expression
is generated and returned. This function should be called
only after semantic analysis has been performed on `exp`.
Params:
exp = expression that is checked
Returns:
An `assert(0)` expression if `exp` contains a `noreturn`
variable access, `exp` otherwise.
*/
Expression checkNoreturnVarAccess(Expression exp)
{
assert(exp.type);
Expression result = exp;
if (exp.type.isTypeNoreturn() && !exp.isAssertExp() &&
!exp.isThrowExp() && !exp.isCallExp())
{
auto msg = new StringExp(exp.loc, "Accessed expression of type `noreturn`");
msg.type = Type.tstring;
result = new AssertExp(exp.loc, IntegerExp.literal!0, msg);
result.type = exp.type;
}
return result;
}
/******************************
* Find symbol in accordance with the UFCS name look up rule
*/
private Expression searchUFCS(Scope* sc, UnaExp ue, Identifier ident)
{
//printf("searchUFCS(ident = %s)\n", ident.toChars());
Loc loc = ue.loc;
// TODO: merge with Scope.search.searchScopes()
Dsymbol searchScopes(int flags)
{
Dsymbol s = null;
for (Scope* scx = sc; scx; scx = scx.enclosing)
{
if (!scx.scopesym)
continue;
if (scx.scopesym.isModule())
flags |= SearchUnqualifiedModule; // tell Module.search() that SearchLocalsOnly is to be obeyed
s = scx.scopesym.search(loc, ident, flags);
if (s)
{
// overload set contains only module scope symbols.
if (s.isOverloadSet())
break;
// selective/renamed imports also be picked up
if (AliasDeclaration ad = s.isAliasDeclaration())
{
if (ad._import)
break;
}
// See only module scope symbols for UFCS target.
Dsymbol p = s.toParent2();
if (p && p.isModule())
break;
}
s = null;
// Stop when we hit a module, but keep going if that is not just under the global scope
if (scx.scopesym.isModule() && !(scx.enclosing && !scx.enclosing.enclosing))
break;
}
return s;
}
int flags = 0;
Dsymbol s;
if (sc.flags & SCOPE.ignoresymbolvisibility)
flags |= IgnoreSymbolVisibility;
// First look in local scopes
s = searchScopes(flags | SearchLocalsOnly);
if (!s)
{
// Second look in imported modules
s = searchScopes(flags | SearchImportsOnly);
}
if (!s)
return ue.e1.type.getProperty(sc, loc, ident, 0, ue.e1);
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
TemplateDeclaration td = getFuncTemplateDecl(f);
if (td)
{
if (td.overroot)
td = td.overroot;
s = td;
}
}
if (auto dti = ue.isDotTemplateInstanceExp())
{
// https://issues.dlang.org/show_bug.cgi?id=23968
// Typically, deprecated alias declarations are caught
// when `TemplateInstance.findTempDecl` is called,
// however, in this case the tempdecl field is updated
// therefore `findTempDecl` will return immediately
// and not get the chance to issue the deprecation.
if (s.isAliasDeclaration())
s.checkDeprecated(ue.loc, sc);
auto ti = new TemplateInstance(loc, s.ident, dti.ti.tiargs);
if (!ti.updateTempDecl(sc, s))
return ErrorExp.get();
return new ScopeExp(loc, ti);
}
else
{
//printf("-searchUFCS() %s\n", s.toChars());
return new DsymbolExp(loc, s);
}
}
/******************************
* Pull out callable entity with UFCS.
*/
private Expression resolveUFCS(Scope* sc, CallExp ce)
{
Loc loc = ce.loc;
Expression eleft;
Expression e;
if (auto die = ce.e1.isDotIdExp())
{
Identifier ident = die.ident;
Expression ex = die.dotIdSemanticPropX(sc);
if (ex != die)
{
ce.e1 = ex;
return null;
}
eleft = die.e1;
Type t = eleft.type.toBasetype();
if (t.ty == Tarray || t.ty == Tsarray || t.ty == Tnull || (t.isTypeBasic() && t.ty != Tvoid))
{
/* Built-in types and arrays have no callable properties, so do shortcut.
* It is necessary in: e.init()
*/
}
else if (t.ty == Taarray)
{
if (ident == Id.remove)
{
/* Transform:
* aa.remove(arg) into delete aa[arg]
*/
if (!ce.arguments || ce.arguments.length != 1)
{
ce.error("expected key as argument to `aa.remove()`");
return ErrorExp.get();
}
if (!eleft.type.isMutable())
{
ce.error("cannot remove key from `%s` associative array `%s`", MODtoChars(t.mod), eleft.toChars());
return ErrorExp.get();
}
Expression key = (*ce.arguments)[0];
key = key.expressionSemantic(sc);
key = resolveProperties(sc, key);
TypeAArray taa = t.isTypeAArray();
key = key.implicitCastTo(sc, taa.index);
if (key.checkValue() || key.checkSharedAccess(sc))
return ErrorExp.get();
semanticTypeInfo(sc, taa.index);
return new RemoveExp(loc, eleft, key);
}
}
else
{
if (Expression ey = die.dotIdSemanticProp(sc, 1))
{
if (ey.op == EXP.error)
return ey;
ce.e1 = ey;
if (isDotOpDispatch(ey))
{
// even opDispatch and UFCS must have valid arguments,
// so now that we've seen indication of a problem,
// check them for issues.
Expressions* originalArguments = Expression.arraySyntaxCopy(ce.arguments);
uint errors = global.startGagging();
e = ce.expressionSemantic(sc);
if (!global.endGagging(errors))
return e;
if (arrayExpressionSemantic(originalArguments.peekSlice(), sc))
return ErrorExp.get();
/* fall down to UFCS */
}
else
return null;
}
}
/* https://issues.dlang.org/show_bug.cgi?id=13953
*
* If a struct has an alias this to an associative array
* and remove is used on a struct instance, we have to
* check first if there is a remove function that can be called
* on the struct. If not we must check the alias this.
*
* struct A
* {
* string[string] a;
* alias a this;
* }
*
* void fun()
* {
* A s;
* s.remove("foo");
* }
*/
const errors = global.startGagging();
e = searchUFCS(sc, die, ident);
// if there were any errors and the identifier was remove
if (global.endGagging(errors))
{
if (ident == Id.remove)
{
// check alias this
Expression alias_e = resolveAliasThis(sc, die.e1, 1);
if (alias_e && alias_e != die.e1)
{
die.e1 = alias_e;
CallExp ce2 = ce.syntaxCopy();
ce2.e1 = die;
e = ce2.isCallExp().trySemantic(sc);
if (e)
return e;
}
}
// if alias this did not work out, print the initial errors
searchUFCS(sc, die, ident);
}
}
else if (auto dti = ce.e1.isDotTemplateInstanceExp())
{
if (Expression ey = dti.dotTemplateSemanticProp(sc, DotExpFlag.gag))
{
ce.e1 = ey;
return null;
}
eleft = dti.e1;
e = searchUFCS(sc, dti, dti.ti.name);
}
else
return null;
// Rewrite
ce.e1 = e;
if (!ce.arguments)
ce.arguments = new Expressions();
ce.arguments.shift(eleft);
if (!ce.names)
ce.names = new Identifiers();
ce.names.shift(null);
ce.isUfcsRewrite = true;
return null;
}
/******************************
* Pull out property with UFCS.
*/
private Expression resolveUFCSProperties(Scope* sc, Expression e1, Expression e2 = null)
{
Loc loc = e1.loc;
Expression eleft;
Expression e;
if (auto die = e1.isDotIdExp())
{
eleft = die.e1;
e = searchUFCS(sc, die, die.ident);
}
else if (auto dti = e1.isDotTemplateInstanceExp())
{
eleft = dti.e1;
e = searchUFCS(sc, dti, dti.ti.name);
}
else
return null;
if (e is null)
return null;
// Rewrite
if (e2)
{
// run semantic without gagging
e2 = e2.expressionSemantic(sc);
/* f(e1) = e2
*/
Expression ex = e.copy();
auto a1 = new Expressions(1);
(*a1)[0] = eleft;
ex = new CallExp(loc, ex, a1);
auto e1PassSemantic = ex.trySemantic(sc);
/* f(e1, e2)
*/
auto a2 = new Expressions(2);
(*a2)[0] = eleft;
(*a2)[1] = e2;
e = new CallExp(loc, e, a2);
e = e.trySemantic(sc);
if (!e1PassSemantic && !e)
{
/* https://issues.dlang.org/show_bug.cgi?id=20448
*
* If both versions have failed to pass semantic,
* f(e1) = e2 gets priority in error printing
* because f might be a templated function that
* failed to instantiate and we have to print
* the instantiation errors.
*/
return e1.expressionSemantic(sc);
}
else if (ex && !e)
{
ex = new AssignExp(loc, ex, e2);
return ex.expressionSemantic(sc);
}
else
{
// strict setter prints errors if fails
e = e.expressionSemantic(sc);
}
return e;
}
else
{
/* f(e1)
*/
auto arguments = new Expressions(1);
(*arguments)[0] = eleft;
e = new CallExp(loc, e, arguments);
// https://issues.dlang.org/show_bug.cgi?id=24017
if (sc.flags & SCOPE.debug_)
e.isCallExp().inDebugStatement = true;
e = e.expressionSemantic(sc);
return e;
}
}
/******************************
* If e1 is a property function (template), resolve it.
*/
Expression resolvePropertiesOnly(Scope* sc, Expression e1)
{
//printf("e1 = %s %s\n", Token.toChars(e1.op), e1.toChars());
Expression handleOverloadSet(OverloadSet os)
{
assert(os);
foreach (s; os.a)
{
auto fd = s.isFuncDeclaration();
auto td = s.isTemplateDeclaration();
if (fd)
{
if (fd.type.isTypeFunction().isproperty)
return resolveProperties(sc, e1);
}
else if (td && td.onemember && (fd = td.onemember.isFuncDeclaration()) !is null)
{
if (fd.type.isTypeFunction().isproperty ||
(fd.storage_class2 & STC.property) ||
(td._scope.stc & STC.property))
return resolveProperties(sc, e1);
}
}
return e1;
}
Expression handleTemplateDecl(TemplateDeclaration td)
{
assert(td);
if (td.onemember)
{
if (auto fd = td.onemember.isFuncDeclaration())
{
if (fd.type.isTypeFunction().isproperty ||
(fd.storage_class2 & STC.property) ||
(td._scope.stc & STC.property))
return resolveProperties(sc, e1);
}
}
return e1;
}
Expression handleFuncDecl(FuncDeclaration fd)
{
assert(fd);
if (fd.type.isTypeFunction().isproperty)
return resolveProperties(sc, e1);
return e1;
}
if (auto de = e1.isDotExp())
{
if (auto os = de.e2.isOverExp())
return handleOverloadSet(os.vars);
}
else if (auto oe = e1.isOverExp())
return handleOverloadSet(oe.vars);
else if (auto dti = e1.isDotTemplateInstanceExp())
{
if (dti.ti.tempdecl)
if (auto td = dti.ti.tempdecl.isTemplateDeclaration())
return handleTemplateDecl(td);
}
else if (auto dte = e1.isDotTemplateExp())
return handleTemplateDecl(dte.td);
else if (auto se = e1.isScopeExp())
{
Dsymbol s = se.sds;
TemplateInstance ti = s.isTemplateInstance();
if (ti && !ti.semanticRun && ti.tempdecl)
if (auto td = ti.tempdecl.isTemplateDeclaration())
return handleTemplateDecl(td);
}
else if (auto et = e1.isTemplateExp())
return handleTemplateDecl(et.td);
else if (e1.isDotVarExp() && e1.type.isTypeFunction())
{
DotVarExp dve = e1.isDotVarExp();
return handleFuncDecl(dve.var.isFuncDeclaration());
}
else if (e1.isVarExp() && e1.type && e1.type.isTypeFunction() && (sc.intypeof || !e1.isVarExp().var.needThis()))
return handleFuncDecl(e1.isVarExp().var.isFuncDeclaration());
return e1;
}
/****************************************
* Turn symbol `s` into the expression it represents.
*
* Params:
* s = symbol to resolve
* loc = location of use of `s`
* sc = context
* hasOverloads = applies if `s` represents a function.
* true means it's overloaded and will be resolved later,
* false means it's the exact function symbol.
* Returns:
* `s` turned into an expression, `ErrorExp` if an error occurred
*/
Expression symbolToExp(Dsymbol s, const ref Loc loc, Scope *sc, bool hasOverloads)
{
static if (LOGSEMANTIC)
{
printf("DsymbolExp::resolve(%s %s)\n", s.kind(), s.toChars());
}
Lagain:
Expression e;
//printf("DsymbolExp:: %p '%s' is a symbol\n", this, toChars());
//printf("s = '%s', s.kind = '%s'\n", s.toChars(), s.kind());
Dsymbol olds = s;
Declaration d = s.isDeclaration();
if (d && (d.storage_class & STC.templateparameter))
{
s = s.toAlias();
}
else
{
// functions are checked after overloading
// templates are checked after matching constraints
if (!s.isFuncDeclaration() && !s.isTemplateDeclaration())
{
s.checkDeprecated(loc, sc);
if (d)
d.checkDisabled(loc, sc);
}
// https://issues.dlang.org/show_bug.cgi?id=12023
// if 's' is a tuple variable, the tuple is returned.
s = s.toAlias();
//printf("s = '%s', s.kind = '%s', s.needThis() = %p\n", s.toChars(), s.kind(), s.needThis());
if (s != olds && !s.isFuncDeclaration() && !s.isTemplateDeclaration())
{
s.checkDeprecated(loc, sc);
if (d)
d.checkDisabled(loc, sc);
}
if (auto sd = s.isDeclaration())
{
if (sd.isSystem())
{
if (sc.setUnsafePreview(global.params.systemVariables, false, loc,
"cannot access `@system` variable `%s` in @safe code", sd))
{
return ErrorExp.get();
}
}
}
}
if (auto em = s.isEnumMember())
{
return em.getVarExp(loc, sc);
}
if (auto v = s.isVarDeclaration())
{
//printf("Identifier '%s' is a variable, type '%s'\n", s.toChars(), v.type.toChars());
if (sc.intypeof == 1 && !v.inuse)
v.dsymbolSemantic(sc);
if (!v.type || // during variable type inference
!v.type.deco && v.inuse) // during variable type semantic
{
if (v.inuse) // variable type depends on the variable itself
error(loc, "circular reference to %s `%s`", v.kind(), v.toPrettyChars());
else // variable type cannot be determined
error(loc, "forward reference to %s `%s`", v.kind(), v.toPrettyChars());
return ErrorExp.get();
}
if (v.type.ty == Terror)
return ErrorExp.get();
if ((v.storage_class & STC.manifest) && v._init)
{
if (v.inuse)
{
error(loc, "circular initialization of %s `%s`", v.kind(), v.toPrettyChars());
return ErrorExp.get();
}
e = v.expandInitializer(loc);
v.inuse++;
e = e.expressionSemantic(sc);
v.inuse--;
return e;
}
// We need to run semantics to correctly set 'STC.field' if it is a member variable
// that could be forward referenced. This is needed for 'v.needThis()' to work
if (v.isThis())
v.dsymbolSemantic(sc);
// Change the ancestor lambdas to delegate before hasThis(sc) call.
if (v.checkNestedReference(sc, loc))
return ErrorExp.get();
if (v.needThis() && hasThis(sc))
e = new DotVarExp(loc, new ThisExp(loc), v);
else
e = new VarExp(loc, v);
e = e.expressionSemantic(sc);
return e;
}
if (auto fld = s.isFuncLiteralDeclaration())
{
//printf("'%s' is a function literal\n", fld.toChars());
e = new FuncExp(loc, fld);
return e.expressionSemantic(sc);
}
if (auto f = s.isFuncDeclaration())
{
f = f.toAliasFunc();
if (!f.functionSemantic())
return ErrorExp.get();
if (!hasOverloads && f.checkForwardRef(loc))
return ErrorExp.get();
auto fd = s.isFuncDeclaration();
fd.type = f.type;
return new VarExp(loc, fd, hasOverloads);
}
if (OverDeclaration od = s.isOverDeclaration())
{
e = new VarExp(loc, od, true);
e.type = Type.tvoid;
return e;
}
if (OverloadSet o = s.isOverloadSet())
{
//printf("'%s' is an overload set\n", o.toChars());
return new OverExp(loc, o);
}
if (Import imp = s.isImport())
{
if (!imp.pkg)
{
.error(loc, "forward reference of import `%s`", imp.toChars());
return ErrorExp.get();
}
auto ie = new ScopeExp(loc, imp.pkg);
return ie.expressionSemantic(sc);
}
if (Package pkg = s.isPackage())
{
auto ie = new ScopeExp(loc, pkg);
return ie.expressionSemantic(sc);
}
if (Module mod = s.isModule())
{
auto ie = new ScopeExp(loc, mod);
return ie.expressionSemantic(sc);
}
if (Nspace ns = s.isNspace())
{
auto ie = new ScopeExp(loc, ns);
return ie.expressionSemantic(sc);
}
if (Type t = s.getType())
{
return (new TypeExp(loc, t)).expressionSemantic(sc);
}
if (TupleDeclaration tup = s.isTupleDeclaration())
{
if (tup.needThis() && hasThis(sc))
e = new DotVarExp(loc, new ThisExp(loc), tup);
else
e = new TupleExp(loc, tup);
e = e.expressionSemantic(sc);
return e;
}
if (TemplateInstance ti = s.isTemplateInstance())
{
ti.dsymbolSemantic(sc);
if (!ti.inst || ti.errors)
return ErrorExp.get();
s = ti.toAlias();
if (!s.isTemplateInstance())
goto Lagain;
e = new ScopeExp(loc, ti);
e = e.expressionSemantic(sc);
return e;
}
if (TemplateDeclaration td = s.isTemplateDeclaration())
{
Dsymbol p = td.toParentLocal();
FuncDeclaration fdthis = hasThis(sc);
AggregateDeclaration ad = p ? p.isAggregateDeclaration() : null;
if (fdthis && ad && fdthis.isMemberLocal() == ad && (td._scope.stc & STC.static_) == 0)
{
e = new DotTemplateExp(loc, new ThisExp(loc), td);
}
else
e = new TemplateExp(loc, td);
e = e.expressionSemantic(sc);
return e;
}
.error(loc, "%s `%s` is not a variable", s.kind(), s.toChars());
return ErrorExp.get();
}
/*************************************************************
* Given var, get the
* right `this` pointer if var is in an outer class, but our
* existing `this` pointer is in an inner class.
* Params:
* loc = location to use for error messages
* sc = context
* ad = struct or class we need the correct `this` for
* e1 = existing `this`
* var = the specific member of ad we're accessing
* flag = if true, return `null` instead of throwing an error
* Returns:
* Expression representing the `this` for the var
*/
private Expression getRightThis(const ref Loc loc, Scope* sc, AggregateDeclaration ad, Expression e1, Dsymbol var, int flag = 0)
{
//printf("\ngetRightThis(e1 = %s, ad = %s, var = %s)\n", e1.toChars(), ad.toChars(), var.toChars());
L1:
Type t = e1.type.toBasetype();
//printf("e1.type = %s, var.type = %s\n", e1.type.toChars(), var.type.toChars());
if (e1.op == EXP.objcClassReference)
{
// We already have an Objective-C class reference, just use that as 'this'.
return e1;
}
else if (ad && ad.isClassDeclaration && ad.isClassDeclaration.classKind == ClassKind.objc &&
var.isFuncDeclaration && var.isFuncDeclaration.isStatic &&
var.isFuncDeclaration.objc.selector)
{
return new ObjcClassReferenceExp(e1.loc, ad.isClassDeclaration());
}
/* Access of a member which is a template parameter in dual-scope scenario
* class A { inc(alias m)() { ++m; } } // `m` needs `this` of `B`
* class B {int m; inc() { new A().inc!m(); } }
*/
if (e1.op == EXP.this_)
{
FuncDeclaration f = hasThis(sc);
if (f && f.hasDualContext())
{
if (f.followInstantiationContext(ad))
{
e1 = new VarExp(loc, f.vthis);
e1 = new PtrExp(loc, e1);
e1 = new IndexExp(loc, e1, IntegerExp.literal!1);
e1 = getThisSkipNestedFuncs(loc, sc, f.toParent2(), ad, e1, t, var);
if (e1.op == EXP.error)
return e1;
goto L1;
}
}
}
/* If e1 is not the 'this' pointer for ad
*/
if (ad &&
!(t.isTypePointer() && t.nextOf().isTypeStruct() && t.nextOf().isTypeStruct().sym == ad) &&
!(t.isTypeStruct() && t.isTypeStruct().sym == ad))
{
ClassDeclaration cd = ad.isClassDeclaration();
ClassDeclaration tcd = t.isClassHandle();
/* e1 is the right this if ad is a base class of e1
*/
if (!cd || !tcd || !(tcd == cd || cd.isBaseOf(tcd, null)))
{
/* Only classes can be inner classes with an 'outer'
* member pointing to the enclosing class instance
*/
if (tcd && tcd.isNested())
{
/* e1 is the 'this' pointer for an inner class: tcd.
* Rewrite it as the 'this' pointer for the outer class.
*/
auto vthis = tcd.followInstantiationContext(ad) ? tcd.vthis2 : tcd.vthis;
e1 = new DotVarExp(loc, e1, vthis);
e1.type = vthis.type;
e1.type = e1.type.addMod(t.mod);
// Do not call ensureStaticLinkTo()
//e1 = e1.semantic(sc);
// Skip up over nested functions, and get the enclosing
// class type.
e1 = getThisSkipNestedFuncs(loc, sc, tcd.toParentP(ad), ad, e1, t, var);
if (e1.op == EXP.error)
return e1;
goto L1;
}
/* Can't find a path from e1 to ad
*/
if (flag)
return null;
e1.error("`this` for `%s` needs to be type `%s` not type `%s`", var.toChars(), ad.toChars(), t.toChars());
return ErrorExp.get();
}
}
return e1;
}
/*
* Check whether `outerFunc` and `calledFunc` have the same `this`.
* If `calledFunc` is the member of a base class of the class that contains
* `outerFunc` we consider that they have the same this.
*
* This function is used to test whether `this` needs to be prepended to
* a function call or function symbol. For example:
*
* struct X
* {
* void gun() {}
* }
* struct A
* {
* void fun() {}
* void sun()
* {
* fun();
* X.gun(); // error
* }
* }
*
* When `fun` is called, `outerfunc` = `sun` and `calledFunc = `fun`.
* `sun` is a member of `A` and `fun` is also a member of `A`, therefore
* `this` can be prepended to `fun`. When `gun` is called (it will result
* in an error, but that is not relevant here), which is a member of `X`,
* no `this` is needed because the outer function does not have the same
* `this` as `gun`.
*
* Returns:
* `true` if outerFunc and calledFunc may use the same `this` pointer.
* `false` otherwise.
*/
private bool haveSameThis(FuncDeclaration outerFunc, FuncDeclaration calledFunc)
{
// https://issues.dlang.org/show_bug.cgi?id=24013
// traits(getOverloads) inserts an alias to select the overload.
// When searching for the right this we need to use the aliased
// overload/function, not the alias.
outerFunc = outerFunc.toAliasFunc();
calledFunc = calledFunc.toAliasFunc();
auto thisAd = outerFunc.isMemberLocal();
if (!thisAd)
return false;
auto requiredAd = calledFunc.isMemberLocal();
if (!requiredAd)
return false;
if (thisAd == requiredAd)
return true;
// outerfunc is the member of a base class that contains calledFunc,
// then we consider that they have the same this.
auto cd = requiredAd.isClassDeclaration();
if (!cd)
return false;
if (cd.isBaseOf2(thisAd.isClassDeclaration()))
return true;
// if outerfunc is the member of a nested aggregate, then let
// getRightThis take care of this.
if (thisAd.isNested())
return true;
return false;
}
/***************************************
* Pull out any properties.
*/
private Expression resolvePropertiesX(Scope* sc, Expression e1, Expression e2 = null, BinExp saveAtts = null)
{
//printf("resolvePropertiesX, e1 = %s %s, e2 = %s\n", EXPtoString(e1.op).ptr, e1.toChars(), e2 ? e2.toChars() : null);
Loc loc = e1.loc;
OverloadSet os;
Dsymbol s;
Objects* tiargs;
Type tthis;
if (auto de = e1.isDotExp())
{
if (auto oe = de.e2.isOverExp())
{
tiargs = null;
tthis = de.e1.type;
os = oe.vars;
goto Los;
}
}
else if (e1.isOverExp())
{
tiargs = null;
tthis = null;
os = e1.isOverExp().vars;
Los:
assert(os);
FuncDeclaration fd = null;
if (e2)
{
e2 = e2.expressionSemantic(sc);
if (e2.op == EXP.error)
return ErrorExp.get();
e2 = resolveProperties(sc, e2);
Expressions* a = new Expressions();
a.push(e2);
for (size_t i = 0; i < os.a.length; i++)
{
if (FuncDeclaration f = resolveFuncCall(loc, sc, os.a[i], tiargs, tthis, ArgumentList(a), FuncResolveFlag.quiet))
{
if (f.errors)
return ErrorExp.get();
fd = f;
assert(fd.type.ty == Tfunction);
}
}
if (fd)
{
Expression e = new CallExp(loc, e1, e2);
return e.expressionSemantic(sc);
}
}
{
for (size_t i = 0; i < os.a.length; i++)
{
if (FuncDeclaration f = resolveFuncCall(loc, sc, os.a[i], tiargs, tthis, ArgumentList(), FuncResolveFlag.quiet))
{
if (f.errors)
return ErrorExp.get();
fd = f;
assert(fd.type.ty == Tfunction);
auto tf = fd.type.isTypeFunction();
if (!tf.isref && e2)
{
error(loc, "%s is not an lvalue", e1.toChars());
return ErrorExp.get();
}
}
}
if (fd)
{
Expression e = new CallExp(loc, e1);
if (e2)
{
e = new AssignExp(loc, e, e2);
if (saveAtts)
{
(cast(BinExp)e).att1 = saveAtts.att1;
(cast(BinExp)e).att2 = saveAtts.att2;
}
}
return e.expressionSemantic(sc);
}
}
if (e2)
goto Leprop;
}
else if (auto dti = e1.isDotTemplateInstanceExp())
{
if (!dti.findTempDecl(sc))
goto Leprop;
if (!dti.ti.semanticTiargs(sc))
goto Leprop;
tiargs = dti.ti.tiargs;
tthis = dti.e1.type;
if ((os = dti.ti.tempdecl.isOverloadSet()) !is null)
goto Los;
if ((s = dti.ti.tempdecl) !is null)
goto Lfd;
}
else if (auto dte = e1.isDotTemplateExp())
{
s = dte.td;
tiargs = null;
tthis = dte.e1.type;
goto Lfd;
}
else if (auto se = e1.isScopeExp())
{
s = se.sds;
TemplateInstance ti = s.isTemplateInstance();
if (ti && !ti.semanticRun && ti.tempdecl)
{
//assert(ti.needsTypeInference(sc));
if (!ti.semanticTiargs(sc))
goto Leprop;
tiargs = ti.tiargs;
tthis = null;
if ((os = ti.tempdecl.isOverloadSet()) !is null)
goto Los;
if ((s = ti.tempdecl) !is null)
goto Lfd;
}
}
else if (auto te = e1.isTemplateExp())
{
s = te.td;
tiargs = null;
tthis = null;
goto Lfd;
}
else if (e1.isDotVarExp() && e1.type && (e1.type.toBasetype().isTypeFunction() || e1.isDotVarExp().var.isOverDeclaration()))
{
DotVarExp dve = e1.isDotVarExp();
s = dve.var;
tiargs = null;
tthis = dve.e1.type;
goto Lfd;
}
else if (sc && sc.flags & SCOPE.Cfile && e1.isVarExp() && !e2)
{
// ImportC: do not implicitly call function if no ( ) are present
}
else if (e1.isVarExp() && e1.type && (e1.type.toBasetype().isTypeFunction() || e1.isVarExp().var.isOverDeclaration()))
{
s = e1.isVarExp().var;
tiargs = null;
tthis = null;
Lfd:
assert(s);
if (e2)
{
e2 = e2.expressionSemantic(sc);
if (e2.op == EXP.error)
return ErrorExp.get();
e2 = resolveProperties(sc, e2);
Expressions* a = new Expressions();
a.push(e2);
FuncDeclaration fd = resolveFuncCall(loc, sc, s, tiargs, tthis, ArgumentList(a), FuncResolveFlag.quiet);
if (fd && fd.type)
{
if (fd.errors)
return ErrorExp.get();
assert(fd.type.ty == Tfunction);
Expression e = new CallExp(loc, e1, e2);
return e.expressionSemantic(sc);
}
}
{
FuncDeclaration fd = resolveFuncCall(loc, sc, s, tiargs, tthis, ArgumentList(), FuncResolveFlag.quiet);
if (fd && fd.type)
{
if (fd.errors)
return ErrorExp.get();
TypeFunction tf = fd.type.isTypeFunction();
if (!e2 || tf.isref)
{
Expression e = new CallExp(loc, e1);
if (e2)
{
e = new AssignExp(loc, e, e2);
if (saveAtts)
{
(cast(BinExp)e).att1 = saveAtts.att1;
(cast(BinExp)e).att2 = saveAtts.att2;
}
}
return e.expressionSemantic(sc);
}
}
}
if (FuncDeclaration fd = s.isFuncDeclaration())
{
// Keep better diagnostic message for invalid property usage of functions
assert(fd.type.ty == Tfunction);
Expression e = new CallExp(loc, e1, e2);
return e.expressionSemantic(sc);
}
if (e2)
goto Leprop;
}
if (auto ve = e1.isVarExp())
{
if (auto v = ve.var.isVarDeclaration())
{
if (ve.checkPurity(sc, v))
return ErrorExp.get();
}
}
if (e2)
return null;
if (e1.type && !e1.isTypeExp()) // function type is not a property
{
/* Look for e1 being a lazy parameter; rewrite as delegate call
* only if the symbol wasn't already treated as a delegate
*/
auto ve = e1.isVarExp();
if (ve && ve.var.storage_class & STC.lazy_ && !ve.delegateWasExtracted)
{
Expression e = new CallExp(loc, e1);
return e.expressionSemantic(sc);
}
else if (e1.isDotVarExp())
{
// Check for reading overlapped pointer field in @safe code.
if (checkUnsafeAccess(sc, e1, true, true))
return ErrorExp.get();
}
else if (auto ce = e1.isCallExp())
{
// Check for reading overlapped pointer field in @safe code.
if (checkUnsafeAccess(sc, ce.e1, true, true))
return ErrorExp.get();
}
}
if (!e1.type)
{
error(loc, "cannot resolve type for %s", e1.toChars());
e1 = ErrorExp.get();
}
return e1;
Leprop:
error(loc, "not a property %s", e1.toChars());
return ErrorExp.get();
}
extern (C++) Expression resolveProperties(Scope* sc, Expression e)
{
//printf("resolveProperties(%s)\n", e.toChars());
e = resolvePropertiesX(sc, e);
if (e.checkRightThis(sc))
return ErrorExp.get();
return e;
}
/****************************************
* The common type is determined by applying ?: to each pair.
* Output:
* exps[] properties resolved, implicitly cast to common type, rewritten in place
* Returns:
* The common type, or `null` if an error has occured
*/
private Type arrayExpressionToCommonType(Scope* sc, ref Expressions exps)
{
/* Still have a problem with:
* ubyte[][] = [ cast(ubyte[])"hello", [1]];
* which works if the array literal is initialized top down with the ubyte[][]
* type, but fails with this function doing bottom up typing.
*/
//printf("arrayExpressionToCommonType()\n");
scope IntegerExp integerexp = IntegerExp.literal!0;
scope CondExp condexp = new CondExp(Loc.initial, integerexp, null, null);
Type t0 = null;
Expression e0 = null;
bool foundType;
for (size_t i = 0; i < exps.length; i++)
{
Expression e = exps[i];
if (!e)
continue;
e = resolveProperties(sc, e);
if (!e.type)
{
e.error("`%s` has no value", e.toChars());
t0 = Type.terror;
continue;
}
if (e.op == EXP.type)
{
foundType = true; // do not break immediately, there might be more errors
e.checkValue(); // report an error "type T has no value"
t0 = Type.terror;
continue;
}
if (e.type.ty == Tvoid)
{
// void expressions do not concur to the determination of the common
// type.
continue;
}
if (checkNonAssignmentArrayOp(e))
{
t0 = Type.terror;
continue;
}
e = doCopyOrMove(sc, e);
if (!foundType && t0 && !t0.equals(e.type))
{
/* This applies ?: to merge the types. It's backwards;
* ?: should call this function to merge types.
*/
condexp.type = null;
condexp.e1 = e0;
condexp.e2 = e;
condexp.loc = e.loc;
Expression ex = condexp.expressionSemantic(sc);
if (ex.op == EXP.error)
e = ex;
else
{
// Convert to common type
exps[i] = condexp.e1.castTo(sc, condexp.type);
e = condexp.e2.castTo(sc, condexp.type);
}
}
e0 = e;
t0 = e.type;
if (e.op != EXP.error)
exps[i] = e;
}
// [] is typed as void[]
if (!t0)
return Type.tvoid;
// It's an error, don't do the cast
if (t0.ty == Terror)
return null;
for (size_t i = 0; i < exps.length; i++)
{
Expression e = exps[i];
if (!e)
continue;
e = e.implicitCastTo(sc, t0);
if (e.op == EXP.error)
{
/* https://issues.dlang.org/show_bug.cgi?id=13024
* a workaround for the bug in typeMerge -
* it should paint e1 and e2 by deduced common type,
* but doesn't in this particular case.
*/
return null;
}
exps[i] = e;
}
return t0;
}
private Expression opAssignToOp(const ref Loc loc, EXP op, Expression e1, Expression e2)
{
Expression e;
switch (op)
{
case EXP.addAssign:
e = new AddExp(loc, e1, e2);
break;
case EXP.minAssign:
e = new MinExp(loc, e1, e2);
break;
case EXP.mulAssign:
e = new MulExp(loc, e1, e2);
break;
case EXP.divAssign:
e = new DivExp(loc, e1, e2);
break;
case EXP.modAssign:
e = new ModExp(loc, e1, e2);
break;
case EXP.andAssign:
e = new AndExp(loc, e1, e2);
break;
case EXP.orAssign:
e = new OrExp(loc, e1, e2);
break;
case EXP.xorAssign:
e = new XorExp(loc, e1, e2);
break;
case EXP.leftShiftAssign:
e = new ShlExp(loc, e1, e2);
break;
case EXP.rightShiftAssign:
e = new ShrExp(loc, e1, e2);
break;
case EXP.unsignedRightShiftAssign:
e = new UshrExp(loc, e1, e2);
break;
default:
assert(0);
}
return e;
}
/*********************
* Rewrite:
* array.length op= e2
*/
private Expression rewriteOpAssign(BinExp exp)
{
ArrayLengthExp ale = exp.e1.isArrayLengthExp();
if (ale.e1.isVarExp())
{
// array.length = array.length op e2
Expression e = opAssignToOp(exp.loc, exp.op, ale, exp.e2);
e = new AssignExp(exp.loc, ale.syntaxCopy(), e);
return e;
}
else
{
// (ref tmp = array;), tmp.length = tmp.length op e2
auto tmp = copyToTemp(STC.ref_, "__arraylength", ale.e1);
Expression e1 = new ArrayLengthExp(ale.loc, new VarExp(ale.loc, tmp));
Expression elvalue = e1.syntaxCopy();
Expression e = opAssignToOp(exp.loc, exp.op, e1, exp.e2);
e = new AssignExp(exp.loc, elvalue, e);
e = new CommaExp(exp.loc, new DeclarationExp(ale.loc, tmp), e);
return e;
}
}
/****************************************
* Preprocess arguments to function.
*
* Tuples in argumentList get expanded, properties resolved, rewritten in place
*
* Params:
* sc = scope
* argumentList = arguments to function
* reportErrors = whether or not to report errors here. Some callers are not
* checking actual function params, so they'll do their own error reporting
* Returns:
* `true` when a semantic error occurred
*/
private bool preFunctionParameters(Scope* sc, ArgumentList argumentList, const bool reportErrors = true)
{
Expressions* exps = argumentList.arguments;
bool err = false;
if (exps)
{
expandTuples(exps, argumentList.names);
for (size_t i = 0; i < exps.length; i++)
{
Expression arg = (*exps)[i];
arg = resolveProperties(sc, arg);
arg = arg.arrayFuncConv(sc);
if (arg.op == EXP.type)
{
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
arg = resolveAliasThis(sc, arg);
if (arg.op == EXP.type)
{
if (reportErrors)
{
arg.error("cannot pass type `%s` as a function argument", arg.toChars());
arg = ErrorExp.get();
}
err = true;
}
}
else if (arg.type.toBasetype().ty == Tfunction)
{
if (reportErrors)
{
arg.error("cannot pass function `%s` as a function argument", arg.toChars());
arg = ErrorExp.get();
}
err = true;
}
else if (checkNonAssignmentArrayOp(arg))
{
arg = ErrorExp.get();
err = true;
}
(*exps)[i] = arg;
}
}
return err;
}
/********************************************
* Issue an error if default construction is disabled for type t.
* Default construction is required for arrays and 'out' parameters.
* Returns:
* true an error was issued
*/
private bool checkDefCtor(Loc loc, Type t)
{
if (auto ts = t.baseElemOf().isTypeStruct())
{
StructDeclaration sd = ts.sym;
if (sd.noDefaultCtor)
{
sd.error(loc, "default construction is disabled");
return true;
}
}
return false;
}
/****************************************
* Now that we know the exact type of the function we're calling,
* the arguments[] need to be adjusted:
* 1. implicitly convert argument to the corresponding parameter type
* 2. add default arguments for any missing arguments
* 3. do default promotions on arguments corresponding to ...
* 4. add hidden _arguments[] argument
* 5. call copy constructor for struct value arguments
* Params:
* loc = location of function call
* sc = context
* tf = type of the function
* ethis = `this` argument, `null` if none or not known
* tthis = type of `this` argument, `null` if no `this` argument
* argumentsList = array of actual arguments to function call
* fd = the function being called, `null` if called indirectly
* prettype = set to return type of function
* peprefix = set to expression to execute before `arguments[]` are evaluated, `null` if none
* Returns:
* true errors happened
*/
private bool functionParameters(const ref Loc loc, Scope* sc,
TypeFunction tf, Expression ethis, Type tthis, ArgumentList argumentList, FuncDeclaration fd,
Type* prettype, Expression* peprefix)
{
Expressions* arguments = argumentList.arguments;
//printf("functionParameters() %s\n", fd ? fd.toChars() : "");
assert(arguments);
assert(fd || tf.next);
const size_t nparams = tf.parameterList.length;
const olderrors = global.errors;
bool err = false;
Expression eprefix = null;
*peprefix = null;
if (argumentList.names)
{
const(char)* msg = null;
auto resolvedArgs = tf.resolveNamedArgs(argumentList, &msg);
if (!resolvedArgs)
{
// while errors are usually already caught by `tf.callMatch`,
// this can happen when calling `typeof(freefunc)`
if (msg)
error(loc, "%s", msg);
return true;
}
// note: the argument list should be mutated with named arguments / default arguments,
// so we can't simply change the pointer like `arguments = resolvedArgs;`
arguments.setDim(0);
arguments.pushSlice((*resolvedArgs)[]);
}
size_t nargs = arguments ? arguments.length : 0;
if (nargs > nparams && tf.parameterList.varargs == VarArg.none)
{
error(loc, "expected %llu arguments, not %llu for non-variadic function type `%s`", cast(ulong)nparams, cast(ulong)nargs, tf.toChars());
return true;
}
// If inferring return type, and semantic3() needs to be run if not already run
if (!tf.next && fd.inferRetType)
{
fd.functionSemantic();
}
else if (fd && fd.parent)
{
TemplateInstance ti = fd.parent.isTemplateInstance();
if (ti && ti.tempdecl)
{
fd.functionSemantic3();
}
}
/* If calling a pragma(inline, true) function,
* set flag to later scan for inlines.
*/
if (fd && fd.inlining == PINLINE.always)
{
if (sc._module)
sc._module.hasAlwaysInlines = true;
if (sc.func)
sc.func.hasAlwaysInlines = true;
}
const isCtorCall = fd && fd.needThis() && fd.isCtorDeclaration();
const size_t n = (nargs > nparams) ? nargs : nparams; // n = max(nargs, nparams)
/* If the function return type has wildcards in it, we'll need to figure out the actual type
* based on the actual argument types.
* Start with the `this` argument, later on merge into wildmatch the mod bits of the rest
* of the arguments.
*/
MOD wildmatch = (tthis && !isCtorCall) ? tthis.Type.deduceWild(tf, false) : 0;
bool done = false;
foreach (const i; 0 .. n)
{
Expression arg = (i < nargs) ? (*arguments)[i] : null;
if (i < nparams)
{
bool errorArgs()
{
error(loc, "expected %llu function arguments, not %llu", cast(ulong)nparams, cast(ulong)nargs);
return true;
}
Parameter p = tf.parameterList[i];
if (!arg)
{
if (!p.defaultArg)
{
if (tf.parameterList.varargs == VarArg.typesafe && i + 1 == nparams)
goto L2;
return errorArgs();
}
arg = p.defaultArg;
if (!arg.type)
arg = arg.expressionSemantic(sc);
arg = inlineCopy(arg, sc);
// __FILE__, __LINE__, __MODULE__, __FUNCTION__, and __PRETTY_FUNCTION__
arg = arg.resolveLoc(loc, sc);
if (i >= nargs)
{
arguments.push(arg);
nargs++;
}
else
(*arguments)[i] = arg;
}
else
{
if (isDefaultInitOp(arg.op))
{
arg = arg.resolveLoc(loc, sc);
(*arguments)[i] = arg;
}
}
if (tf.parameterList.varargs == VarArg.typesafe && i + 1 == nparams) // https://dlang.org/spec/function.html#variadic
{
//printf("\t\tvarargs == 2, p.type = '%s'\n", p.type.toChars());
{
MATCH m;
if ((m = arg.implicitConvTo(p.type)) > MATCH.nomatch)
{
if (p.type.nextOf() && arg.implicitConvTo(p.type.nextOf()) >= m)
goto L2;
else if (nargs != nparams)
return errorArgs();
goto L1;
}
}
L2:
Type tb = p.type.toBasetype();
switch (tb.ty)
{
case Tsarray:
case Tarray:
{
/* Create a static array variable v of type arg.type:
* T[dim] __arrayArg = [ arguments[i], ..., arguments[nargs-1] ];
*
* The array literal in the initializer of the hidden variable
* is now optimized.
* https://issues.dlang.org/show_bug.cgi?id=2356
*/
Type tbn = (cast(TypeArray)tb).next; // array element type
Type tret = p.isLazyArray();
auto elements = new Expressions(nargs - i);
foreach (u; 0 .. elements.length)
{
Expression a = (*arguments)[i + u];
if (tret && a.implicitConvTo(tret))
{
// p is a lazy array of delegates, tret is return type of the delegates
a = a.implicitCastTo(sc, tret)
.optimize(WANTvalue)
.toDelegate(tret, sc);
}
else
a = a.implicitCastTo(sc, tbn);
a = a.addDtorHook(sc);
(*elements)[u] = a;
}
// https://issues.dlang.org/show_bug.cgi?id=14395
// Convert to a static array literal, or its slice.
arg = new ArrayLiteralExp(loc, tbn.sarrayOf(nargs - i), elements);
if (tb.ty == Tarray)
{
arg = new SliceExp(loc, arg, null, null);
arg.type = p.type;
}
break;
}
case Tclass:
{
/* Set arg to be:
* new Tclass(arg0, arg1, ..., argn)
*/
auto args = new Expressions(nargs - i);
foreach (u; i .. nargs)
(*args)[u - i] = (*arguments)[u];
arg = new NewExp(loc, null, p.type, args);
break;
}
default:
if (!arg)
{
error(loc, "not enough arguments");
return true;
}
break;
}
arg = arg.expressionSemantic(sc);
//printf("\targ = '%s'\n", arg.toChars());
arguments.setDim(i + 1);
(*arguments)[i] = arg;
nargs = i + 1;
done = true;
}
L1:
if (!(p.isLazy() && p.type.ty == Tvoid))
{
if (ubyte wm = arg.type.deduceWild(p.type, p.isReference()))
{
wildmatch = wildmatch ? MODmerge(wildmatch, wm) : wm;
//printf("[%d] p = %s, a = %s, wm = %d, wildmatch = %d\n", i, p.type.toChars(), arg.type.toChars(), wm, wildmatch);
}
}
}
if (done)
break;
}
if ((wildmatch == MODFlags.mutable || wildmatch == MODFlags.immutable_) &&
tf.next && tf.next.hasWild() &&
(tf.isref || !tf.next.implicitConvTo(tf.next.immutableOf())))
{
bool errorInout(MOD wildmatch)
{
const(char)* s = wildmatch == MODFlags.mutable ? "mutable" : MODtoChars(wildmatch);
error(loc, "modify `inout` to `%s` is not allowed inside `inout` function", s);
return true;
}
if (fd)
{
/* If the called function may return the reference to
* outer inout data, it should be rejected.
*
* void foo(ref inout(int) x) {
* ref inout(int) bar(inout(int)) { return x; }
* struct S {
* ref inout(int) bar() inout { return x; }
* ref inout(int) baz(alias a)() inout { return x; }
* }
* bar(int.init) = 1; // bad!
* S().bar() = 1; // bad!
* }
* void test() {
* int a;
* auto s = foo(a);
* s.baz!a() = 1; // bad!
* }
*
*/
bool checkEnclosingWild(Dsymbol s)
{
bool checkWild(Dsymbol s)
{
if (!s)
return false;
if (auto ad = s.isAggregateDeclaration())
{
if (ad.isNested())
return checkEnclosingWild(s);
}
else if (auto ff = s.isFuncDeclaration())
{
if (ff.type.isTypeFunction().iswild)
return errorInout(wildmatch);
if (ff.isNested() || ff.isThis())
return checkEnclosingWild(s);
}
return false;
}
Dsymbol ctx0 = s.toParent2();
Dsymbol ctx1 = s.toParentLocal();
if (checkWild(ctx0))
return true;
if (ctx0 != ctx1)
return checkWild(ctx1);
return false;
}
if ((fd.isThis() || fd.isNested()) && checkEnclosingWild(fd))
return true;
}
else if (tf.isWild())
return errorInout(wildmatch);
}
Expression firstArg = null;
final switch (returnParamDest(tf, tthis))
{
case ReturnParamDest.returnVal:
break;
case ReturnParamDest.firstArg:
firstArg = nargs > 0 ? (*arguments)[0] : null;
break;
case ReturnParamDest.this_:
firstArg = ethis;
break;
}
assert(nargs >= nparams);
foreach (const i, arg; (*arguments)[0 .. nargs])
{
assert(arg);
if (i < nparams)
{
Parameter p = tf.parameterList[i];
Type targ = arg.type; // keep original type for isCopyable() because alias this
// resolution may hide an uncopyable type
if (!(p.isLazy() && p.type.ty == Tvoid))
{
Type tprm = p.type.hasWild()
? p.type.substWildTo(wildmatch)
: p.type;
const hasCopyCtor = arg.type.isTypeStruct() && arg.type.isTypeStruct().sym.hasCopyCtor;
const typesMatch = arg.type.mutableOf().unSharedOf().equals(tprm.mutableOf().unSharedOf());
if (!((hasCopyCtor && typesMatch) || tprm.equals(arg.type)))
{
//printf("arg.type = %s, p.type = %s\n", arg.type.toChars(), p.type.toChars());
arg = arg.implicitCastTo(sc, tprm);
arg = arg.optimize(WANTvalue, p.isReference());
}
}
// Support passing rvalue to `in` parameters
if ((p.storageClass & (STC.in_ | STC.ref_)) == (STC.in_ | STC.ref_))
{
if (!arg.isLvalue())
{
auto v = copyToTemp(STC.exptemp, "__rvalue", arg);
Expression ev = new DeclarationExp(arg.loc, v);
ev = new CommaExp(arg.loc, ev, new VarExp(arg.loc, v));
arg = ev.expressionSemantic(sc);
}
arg = arg.toLvalue(sc, arg);
// Look for mutable misaligned pointer, etc., in @safe mode
err |= checkUnsafeAccess(sc, arg, false, true);
}
else if (p.storageClass & STC.ref_)
{
if (global.params.rvalueRefParam == FeatureState.enabled &&
!arg.isLvalue() &&
targ.isCopyable())
{ /* allow rvalues to be passed to ref parameters by copying
* them to a temp, then pass the temp as the argument
*/
auto v = copyToTemp(0, "__rvalue", arg);
Expression ev = new DeclarationExp(arg.loc, v);
ev = new CommaExp(arg.loc, ev, new VarExp(arg.loc, v));
arg = ev.expressionSemantic(sc);
}
arg = arg.toLvalue(sc, arg);
// Look for mutable misaligned pointer, etc., in @safe mode
err |= checkUnsafeAccess(sc, arg, false, true);
}
else if (p.storageClass & STC.out_)
{
Type t = arg.type;
if (!t.isMutable() || !t.isAssignable()) // check blit assignable
{
arg.error("cannot modify struct `%s` with immutable members", arg.toChars());
err = true;
}
else
{
// Look for misaligned pointer, etc., in @safe mode
err |= checkUnsafeAccess(sc, arg, false, true);
err |= checkDefCtor(arg.loc, t); // t must be default constructible
}
arg = arg.toLvalue(sc, arg);
}
else if (p.isLazy())
{
// Convert lazy argument to a delegate
auto t = (p.type.ty == Tvoid) ? p.type : arg.type;
arg = toDelegate(arg, t, sc);
}
//printf("arg: %s\n", arg.toChars());
//printf("type: %s\n", arg.type.toChars());
//printf("param: %s\n", p.toChars());
const pStc = tf.parameterStorageClass(tthis, p);
if (firstArg && (pStc & STC.return_))
{
/* Argument value can be assigned to firstArg.
* Check arg to see if it matters.
*/
err |= checkParamArgumentReturn(sc, firstArg, arg, p, false);
}
// Allow 'lazy' to imply 'scope' - lazy parameters can be passed along
// as lazy parameters to the next function, but that isn't escaping.
// The arguments of `_d_arraycatnTX` are already handled in
// expressionsem.d, via `checkNewEscape`. Without `-dip1000`, the
// check does not return an error, so the lowering of `a ~ b` to
// `_d_arraycatnTX(a, b)` still occurs.
else if (!(pStc & STC.lazy_) && (!fd || fd.ident != Id._d_arraycatnTX))
{
/* Argument value can escape from the called function.
* Check arg to see if it matters.
*/
VarDeclaration vPar = fd ? (fd.parameters ? (*fd.parameters)[i] : null) : null;
err |= checkParamArgumentEscape(sc, fd, p.ident, vPar, cast(STC) pStc, arg, false, false);
}
// Turning heap allocations into stack allocations is dangerous without dip1000, since `scope` inference
// may be unreliable when scope violations only manifest as deprecation warnings.
// However, existing `@nogc` code may rely on it, so still do it when the parameter is explicitly marked `scope`
const explicitScope = p.isLazy() ||
((p.storageClass & STC.scope_) && !(p.storageClass & STC.scopeinferred));
if ((pStc & (STC.scope_ | STC.lazy_)) &&
((global.params.useDIP1000 == FeatureState.enabled) || explicitScope) &&
!(pStc & STC.return_))
{
/* Argument value cannot escape from the called function.
*/
Expression a = arg;
if (auto ce = a.isCastExp())
a = ce.e1;
ArrayLiteralExp ale;
if (p.type.toBasetype().ty == Tarray &&
(ale = a.isArrayLiteralExp()) !is null && ale.elements && ale.elements.length > 0)
{
// allocate the array literal as temporary static array on the stack
ale.type = ale.type.nextOf().sarrayOf(ale.elements.length);
auto tmp = copyToTemp(0, "__arrayliteral_on_stack", ale);
tmp.storage_class |= STC.exptemp;
auto declareTmp = new DeclarationExp(ale.loc, tmp);
auto castToSlice = new CastExp(ale.loc, new VarExp(ale.loc, tmp),
p.type.substWildTo(MODFlags.mutable));
arg = CommaExp.combine(declareTmp, castToSlice);
arg = arg.expressionSemantic(sc);
}
else if (auto fe = a.isFuncExp())
{
/* Function literals can only appear once, so if this
* appearance was scoped, there cannot be any others.
*/
fe.fd.tookAddressOf = 0;
}
else if (auto de = a.isDelegateExp())
{
/* For passing a delegate to a scoped parameter,
* this doesn't count as taking the address of it.
* We only worry about 'escaping' references to the function.
*/
if (auto ve = de.e1.isVarExp())
{
if (auto f = ve.var.isFuncDeclaration())
{
if (f.tookAddressOf)
--f.tookAddressOf;
//printf("--tookAddressOf = %d\n", f.tookAddressOf);
}
}
}
}
if (!p.isReference())
err |= arg.checkSharedAccess(sc);
arg = arg.optimize(WANTvalue, p.isReference());
}
else
{
// These will be the trailing ... arguments
// If not D linkage, do promotions
if (tf.linkage != LINK.d)
{
// Promote bytes, words, etc., to ints
arg = integralPromotions(arg, sc);
// Promote floats to doubles
switch (arg.type.ty)
{
case Tfloat32:
arg = arg.castTo(sc, Type.tfloat64);
break;
case Timaginary32:
arg = arg.castTo(sc, Type.timaginary64);
break;
default:
break;
}
if (tf.parameterList.varargs == VarArg.variadic ||
tf.parameterList.varargs == VarArg.KRvariadic)
{
const(char)* p = tf.linkage == LINK.c ? "extern(C)" : "extern(C++)";
if (arg.type.ty == Tarray)
{
arg.error("cannot pass dynamic arrays to `%s` vararg functions", p);
err = true;
}
if (arg.type.ty == Tsarray)
{
arg.error("cannot pass static arrays to `%s` vararg functions", p);
err = true;
}
}
}
// Do not allow types that need destructors or copy constructors.
if (arg.type.needsDestruction())
{
arg.error("cannot pass types that need destruction as variadic arguments");
err = true;
}
if (arg.type.needsCopyOrPostblit())
{
arg.error("cannot pass types with postblits or copy constructors as variadic arguments");
err = true;
}
// Convert static arrays to dynamic arrays
// BUG: I don't think this is right for D2
Type tb = arg.type.toBasetype();
if (auto ts = tb.isTypeSArray())
{
Type ta = ts.next.arrayOf();
if (ts.size(arg.loc) == 0)
arg = new NullExp(arg.loc, ta);
else
arg = arg.castTo(sc, ta);
}
if (tb.ty == Tstruct)
{
//arg = callCpCtor(sc, arg);
}
// Give error for overloaded function addresses
if (auto se = arg.isSymOffExp())
{
if (se.hasOverloads && !se.var.isFuncDeclaration().isUnique())
{
arg.error("function `%s` is overloaded", arg.toChars());
err = true;
}
}
err |= arg.checkValue();
err |= arg.checkSharedAccess(sc);
arg = arg.optimize(WANTvalue);
}
(*arguments)[i] = arg;
}
/* If calling C scanf(), printf(), or any variants, check the format string against the arguments
*/
const isVa_list = tf.parameterList.varargs == VarArg.none;
if (fd && fd.printf)
{
if (auto se = (*arguments)[nparams - 1 - isVa_list].isStringExp())
{
checkPrintfFormat(se.loc, se.peekString(), (*arguments)[nparams .. nargs], isVa_list);
}
}
else if (fd && fd.scanf)
{
if (auto se = (*arguments)[nparams - 1 - isVa_list].isStringExp())
{
checkScanfFormat(se.loc, se.peekString(), (*arguments)[nparams .. nargs], isVa_list);
}
}
else
{
// TODO: not checking the "v" functions yet (for those, check format string only, not args)
}
/* Remaining problems:
* 1. value structs (or static arrays of them) that need to be copy constructed
* 2. value structs (or static arrays of them) that have destructors, and subsequent arguments that may throw before the
* function gets called.
* 3. value structs need to be destructed after the function call for platforms where the caller destroys the arguments.
* Those are handled by doing the argument construction in 'eprefix' so that if a later argument throws, they are cleaned
* up properly. Pushing arguments on the stack then cannot fail.
*/
{
/* Does Problem (3) apply?
*/
const bool callerDestroysArgs = !target.isCalleeDestroyingArgs(tf);
/* Compute indices of last throwing argument and first arg needing destruction.
* Used to not set up destructors unless an arg needs destruction on a throw
* in a later argument.
*/
ptrdiff_t lastthrow = -1; // last argument that may throw
ptrdiff_t firstdtor = -1; // first argument that needs destruction
ptrdiff_t lastdtor = -1; // last argument that needs destruction
for (ptrdiff_t i = 0; i != nargs; i++)
{
Expression arg = (*arguments)[i];
if (canThrow(arg, sc.func, false))
lastthrow = i;
if (arg.type.needsDestruction())
{
Parameter p = (i >= nparams ? null : tf.parameterList[i]);
if (!(p && (p.isLazy() || p.isReference())))
{
if (firstdtor == -1)
firstdtor = i;
lastdtor = i;
}
}
}
/* Do we need 'eprefix' for problems 2 or 3?
*/
const bool needsPrefix = callerDestroysArgs
? firstdtor >= 0 // true if any argument needs destruction
: firstdtor >= 0 && lastthrow >= 0 &&
(lastthrow - firstdtor) > 0; // last throw after first destruction
const ptrdiff_t lastPrefix = callerDestroysArgs
? lastdtor // up to last argument requiring destruction
: lastthrow; // up to last potentially throwing argument
/* Problem 3: initialize 'eprefix' by declaring the gate
*/
VarDeclaration gate;
if (needsPrefix && !callerDestroysArgs)
{
// eprefix => bool __gate [= false]
Identifier idtmp = Identifier.generateId("__gate");
gate = new VarDeclaration(loc, Type.tbool, idtmp, null);
gate.storage_class |= STC.temp | STC.ctfe | STC.volatile_;
gate.dsymbolSemantic(sc);
auto ae = new DeclarationExp(loc, gate);
eprefix = ae.expressionSemantic(sc);
}
for (ptrdiff_t i = 0; i != nargs; i++)
{
Expression arg = (*arguments)[i];
//printf("arg[%d]: %s\n", cast(int)i, arg.toChars());
Parameter parameter = (i >= nparams ? null : tf.parameterList[i]);
const bool isRef = parameter && parameter.isReference();
const bool isLazy = parameter && parameter.isLazy();
/* Skip lazy parameters
*/
if (isLazy)
continue;
/* Do we have 'eprefix' and aren't past 'lastPrefix' yet?
* Then declare a temporary variable for this arg and append that declaration
* to 'eprefix', which will implicitly take care of potential problem 1) for
* this arg.
* 'eprefix' will therefore finally contain all args up to and including 'lastPrefix',
* excluding all lazy parameters.
*/
if (needsPrefix && (lastPrefix - i) >= 0)
{
const bool needsDtor = !isRef && arg.type.needsDestruction() &&
// Problem 3: last throwing arg doesn't require dtor patching
(callerDestroysArgs || i != lastPrefix);
/* Declare temporary 'auto __pfx = arg' (needsDtor) or 'auto __pfy = arg' (!needsDtor)
*/
auto tmp = copyToTemp(
(parameter ? parameter.storageClass : tf.parameterList.stc) & (STC.scope_),
needsDtor ? "__pfx" : "__pfy",
!isRef ? arg : arg.addressOf());
tmp.dsymbolSemantic(sc);
if (callerDestroysArgs)
{
/* Problem 4: Normal temporary, destructed after the call
*/
if (needsDtor)
tmp.isArgDtorVar = true; // mark it so that the backend passes it by ref to the function being called
}
else
{
/* Problem 2: Modify the destructor so it only runs if gate==false,
* i.e., only if there was a throw while constructing the args
*/
if (!needsDtor)
{
if (tmp.edtor)
{
assert(i == lastPrefix);
tmp.edtor = null;
}
}
else
{
// edtor => (__gate || edtor)
assert(tmp.edtor);
Expression e = tmp.edtor;
e = new LogicalExp(e.loc, EXP.orOr, new VarExp(e.loc, gate), e);
tmp.edtor = e.expressionSemantic(sc);
//printf("edtor: %s\n", tmp.edtor.toChars());
}
}
// eprefix => (eprefix, auto __pfx/y = arg)
auto ae = new DeclarationExp(loc, tmp);
eprefix = Expression.combine(eprefix, ae.expressionSemantic(sc));
// arg => __pfx/y
arg = new VarExp(loc, tmp);
arg = arg.expressionSemantic(sc);
if (isRef)
{
arg = new PtrExp(loc, arg);
arg = arg.expressionSemantic(sc);
}
/* Problem 2: Last throwing arg?
* Then finalize eprefix => (eprefix, gate = true), i.e., disable the
* dtors right after constructing the last throwing arg.
* From now on, the callee will take care of destructing the args because
* the args are implicitly moved into function parameters.
*/
if (!callerDestroysArgs && i == lastPrefix)
{
auto e = new AssignExp(gate.loc, new VarExp(gate.loc, gate), IntegerExp.createBool(true));
eprefix = Expression.combine(eprefix, e.expressionSemantic(sc));
}
}
else // not part of 'eprefix'
{
/* Handle problem 1) by calling the copy constructor for value structs
* (or static arrays of them) if appropriate.
*/
Type tv = arg.type.baseElemOf();
if (!isRef && tv.ty == Tstruct)
arg = doCopyOrMove(sc, arg, parameter ? parameter.type : null);
}
(*arguments)[i] = arg;
}
}
//if (eprefix) printf("eprefix: %s\n", eprefix.toChars());
/* Test compliance with DIP1021 Argument Ownership and Function Calls
*/
if (global.params.useDIP1021 && (tf.trust == TRUST.safe || tf.trust == TRUST.default_) ||
tf.islive)
err |= checkMutableArguments(sc, fd, tf, ethis, arguments, false);
// If D linkage and variadic, add _arguments[] as first argument
if (tf.isDstyleVariadic())
{
assert(arguments.length >= nparams);
auto args = new Parameters(arguments.length - nparams);
for (size_t i = 0; i < arguments.length - nparams; i++)
{
auto arg = new Parameter(STC.in_, (*arguments)[nparams + i].type, null, null, null);
(*args)[i] = arg;
}
auto tup = new TypeTuple(args);
Expression e = (new TypeidExp(loc, tup)).expressionSemantic(sc);
arguments.insert(0, e);
}
/* Determine function return type: tret
*/
Type tret = tf.next;
if (isCtorCall)
{
//printf("[%s] fd = %s %s, %d %d %d\n", loc.toChars(), fd.toChars(), fd.type.toChars(),
// wildmatch, tf.isWild(), fd.isReturnIsolated());
if (!tthis)
{
assert(sc.intypeof || global.errors);
tthis = fd.isThis().type.addMod(fd.type.mod);
}
if (tf.isWild() && !fd.isReturnIsolated())
{
if (wildmatch)
tret = tret.substWildTo(wildmatch);
int offset;
if (!tret.implicitConvTo(tthis) && !(MODimplicitConv(tret.mod, tthis.mod) && tret.isBaseOf(tthis, &offset) && offset == 0))
{
const(char)* s1 = tret.isNaked() ? " mutable" : tret.modToChars();
const(char)* s2 = tthis.isNaked() ? " mutable" : tthis.modToChars();
.error(loc, "`inout` constructor `%s` creates%s object, not%s", fd.toPrettyChars(), s1, s2);
err = true;
}
}
tret = tthis;
}
else if (wildmatch && tret)
{
/* Adjust function return type based on wildmatch
*/
//printf("wildmatch = x%x, tret = %s\n", wildmatch, tret.toChars());
tret = tret.substWildTo(wildmatch);
}
*prettype = tret;
*peprefix = eprefix;
return (err || olderrors != global.errors);
}
/**
* Determines whether a symbol represents a module or package
* (Used as a helper for is(type == module) and is(type == package))
*
* Params:
* sym = the symbol to be checked
*
* Returns:
* the symbol which `sym` represents (or `null` if it doesn't represent a `Package`)
*/
Package resolveIsPackage(Dsymbol sym)
{
Package pkg;
if (Import imp = sym.isImport())
{
if (imp.pkg is null)
{
.error(sym.loc, "internal compiler error: unable to process forward-referenced import `%s`",
imp.toChars());
assert(0);
}
pkg = imp.pkg;
}
else if (auto mod = sym.isModule())
pkg = mod.isPackageFile ? mod.pkg : sym.isPackage();
else
pkg = sym.isPackage();
if (pkg)
pkg.resolvePKGunknown();
return pkg;
}
private extern (C++) final class ExpressionSemanticVisitor : Visitor
{
alias visit = Visitor.visit;
Scope* sc;
Expression result;
this(Scope* sc) scope
{
this.sc = sc;
}
private void setError()
{
result = ErrorExp.get();
}
/**************************
* Semantically analyze Expression.
* Determine types, fold constants, etc.
*/
override void visit(Expression e)
{
static if (LOGSEMANTIC)
{
printf("Expression::semantic() %s\n", e.toChars());
}
if (e.type)
e.type = e.type.typeSemantic(e.loc, sc);
else
e.type = Type.tvoid;
result = e;
}
override void visit(IntegerExp e)
{
assert(e.type);
if (e.type.ty == Terror)
return setError();
assert(e.type.deco);
e.setInteger(e.getInteger());
result = e;
}
override void visit(RealExp e)
{
if (!e.type)
e.type = Type.tfloat64;
else if (e.type.isimaginary && sc.flags & SCOPE.Cfile)
{
/* Convert to core.stdc.config.complex
*/
Type t = getComplexLibraryType(e.loc, sc, e.type.ty);
if (t.ty == Terror)
return setError();
Type tf;
switch (e.type.ty)
{
case Timaginary32: tf = Type.tfloat32; break;
case Timaginary64: tf = Type.tfloat64; break;
case Timaginary80: tf = Type.tfloat80; break;
default:
assert(0);
}
/* Construct ts{re : 0.0, im : e}
*/
TypeStruct ts = t.isTypeStruct;
Expressions* elements = new Expressions(2);
(*elements)[0] = new RealExp(e.loc, CTFloat.zero, tf);
(*elements)[1] = new RealExp(e.loc, e.toImaginary(), tf);
Expression sle = new StructLiteralExp(e.loc, ts.sym, elements);
result = sle.expressionSemantic(sc);
return;
}
else
e.type = e.type.typeSemantic(e.loc, sc);
result = e;
}
override void visit(ComplexExp e)
{
if (!e.type)
e.type = Type.tcomplex80;
else
e.type = e.type.typeSemantic(e.loc, sc);
result = e;
}
override void visit(IdentifierExp exp)
{
static if (LOGSEMANTIC)
{
printf("IdentifierExp::semantic('%s')\n", exp.ident.toChars());
}
if (exp.type) // This is used as the dummy expression
{
result = exp;
return;
}
Dsymbol scopesym;
Dsymbol s = sc.search(exp.loc, exp.ident, &scopesym);
if (s)
{
if (s.errors)
return setError();
Expression e;
/* See if the symbol was a member of an enclosing 'with'
*/
WithScopeSymbol withsym = scopesym.isWithScopeSymbol();
if (withsym && withsym.withstate.wthis && symbolIsVisible(sc, s))
{
/* Disallow shadowing
*/
// First find the scope of the with
Scope* scwith = sc;
while (scwith.scopesym != scopesym)
{
scwith = scwith.enclosing;
assert(scwith);
}
// Look at enclosing scopes for symbols with the same name,
// in the same function
for (Scope* scx = scwith; scx && scx.func == scwith.func; scx = scx.enclosing)
{
Dsymbol s2;
if (scx.scopesym && scx.scopesym.symtab && (s2 = scx.scopesym.symtab.lookup(s.ident)) !is null && s != s2)
{
exp.error("with symbol `%s` is shadowing local symbol `%s`", s.toPrettyChars(), s2.toPrettyChars());
return setError();
}
}
s = s.toAlias();
// Same as wthis.ident
// TODO: DotIdExp.semantic will find 'ident' from 'wthis' again.
// The redudancy should be removed.
e = new VarExp(exp.loc, withsym.withstate.wthis);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.expressionSemantic(sc);
}
else
{
if (withsym)
{
if (withsym.withstate.exp.type.ty != Tvoid)
{
// 'with (exp)' is a type expression
// or 's' is not visible there (for error message)
e = new TypeExp(exp.loc, withsym.withstate.exp.type);
}
else
{
// 'with (exp)' is a Package/Module
e = withsym.withstate.exp;
}
e = new DotIdExp(exp.loc, e, exp.ident);
result = e.expressionSemantic(sc);
return;
}
/* If f is really a function template,
* then replace f with the function template declaration.
*/
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
TemplateDeclaration td = getFuncTemplateDecl(f);
if (td)
{
if (td.overroot) // if not start of overloaded list of TemplateDeclaration's
td = td.overroot; // then get the start
e = new TemplateExp(exp.loc, td, f);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
if (global.params.fixAliasThis)
{
ExpressionDsymbol expDsym = scopesym.isExpressionDsymbol();
if (expDsym)
{
//printf("expDsym = %s\n", expDsym.exp.toChars());
result = expDsym.exp.expressionSemantic(sc);
return;
}
}
// Haven't done overload resolution yet, so pass 1
e = symbolToExp(s, exp.loc, sc, true);
}
result = e;
return;
}
if (!global.params.fixAliasThis && hasThis(sc))
{
for (AggregateDeclaration ad = sc.getStructClassScope(); ad;)
{
if (ad.aliasthis)
{
Expression e;
e = new ThisExp(exp.loc);
e = new DotIdExp(exp.loc, e, ad.aliasthis.ident);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
auto cd = ad.isClassDeclaration();
if (cd && cd.baseClass && cd.baseClass != ClassDeclaration.object)
{
ad = cd.baseClass;
continue;
}
break;
}
}
if (exp.ident == Id.ctfe)
{
if (sc.flags & SCOPE.ctfe)
{
exp.error("variable `__ctfe` cannot be read at compile time");
return setError();
}
// Create the magic __ctfe bool variable
auto vd = new VarDeclaration(exp.loc, Type.tbool, Id.ctfe, null);
vd.storage_class |= STC.temp;
vd.semanticRun = PASS.semanticdone;
Expression e = new VarExp(exp.loc, vd);
e = e.expressionSemantic(sc);
result = e;
return;
}
// If we've reached this point and are inside a with() scope then we may
// try one last attempt by checking whether the 'wthis' object supports
// dynamic dispatching via opDispatch.
// This is done by rewriting this expression as wthis.ident.
// The innermost with() scope of the hierarchy to satisfy the condition
// above wins.
// https://issues.dlang.org/show_bug.cgi?id=6400
for (Scope* sc2 = sc; sc2; sc2 = sc2.enclosing)
{
if (!sc2.scopesym)
continue;
if (auto ss = sc2.scopesym.isWithScopeSymbol())
{
if (ss.withstate.wthis)
{
Expression e;
e = new VarExp(exp.loc, ss.withstate.wthis);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
// Try Type.opDispatch (so the static version)
else if (ss.withstate.exp && ss.withstate.exp.op == EXP.type)
{
if (Type t = ss.withstate.exp.isTypeExp().type)
{
Expression e;
e = new TypeExp(exp.loc, t);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
}
}
}
/* Look for what user might have meant
*/
if (const n = importHint(exp.ident.toString()))
exp.error("`%s` is not defined, perhaps `import %.*s;` is needed?", exp.ident.toChars(), cast(int)n.length, n.ptr);
else if (auto s2 = sc.search_correct(exp.ident))
exp.error("undefined identifier `%s`, did you mean %s `%s`?", exp.ident.toChars(), s2.kind(), s2.toChars());
else if (const p = Scope.search_correct_C(exp.ident))
exp.error("undefined identifier `%s`, did you mean `%s`?", exp.ident.toChars(), p);
else if (exp.ident == Id.dollar)
exp.error("undefined identifier `$`");
else
exp.error("undefined identifier `%s`", exp.ident.toChars());
result = ErrorExp.get();
}
override void visit(DsymbolExp e)
{
result = symbolToExp(e.s, e.loc, sc, e.hasOverloads);
}
override void visit(ThisExp e)
{
static if (LOGSEMANTIC)
{
printf("ThisExp::semantic()\n");
}
if (e.type)
{
result = e;
return;
}
FuncDeclaration fd = hasThis(sc); // fd is the uplevel function with the 'this' variable
AggregateDeclaration ad;
/* Special case for typeof(this) and typeof(super) since both
* should work even if they are not inside a non-static member function
*/
if (!fd && sc.intypeof == 1)
{
// Find enclosing struct or class
for (Dsymbol s = sc.getStructClassScope(); 1; s = s.parent)
{
if (!s)
{
e.error("`%s` is not in a class or struct scope", e.toChars());
return setError();
}
ClassDeclaration cd = s.isClassDeclaration();
if (cd)
{
e.type = cd.type;
result = e;
return;
}
StructDeclaration sd = s.isStructDeclaration();
if (sd)
{
e.type = sd.type;
result = e;
return;
}
}
}
if (!fd)
{
e.error("`this` is only defined in non-static member functions, not `%s`", sc.parent.toChars());
return setError();
}
assert(fd.vthis);
e.var = fd.vthis;
assert(e.var.parent);
ad = fd.isMemberLocal();
if (!ad)
ad = fd.isMember2();
assert(ad);
e.type = ad.type.addMod(e.var.type.mod);
if (e.var.checkNestedReference(sc, e.loc))
return setError();
result = e;
}
override void visit(SuperExp e)
{
static if (LOGSEMANTIC)
{
printf("SuperExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
FuncDeclaration fd = hasThis(sc);
ClassDeclaration cd;
Dsymbol s;
/* Special case for typeof(this) and typeof(super) since both
* should work even if they are not inside a non-static member function
*/
if (!fd && sc.intypeof == 1)
{
// Find enclosing class
for (s = sc.getStructClassScope(); 1; s = s.parent)
{
if (!s)
{
e.error("`%s` is not in a class scope", e.toChars());
return setError();
}
cd = s.isClassDeclaration();
if (cd)
{
cd = cd.baseClass;
if (!cd)
{
e.error("class `%s` has no `super`", s.toChars());
return setError();
}
e.type = cd.type;
result = e;
return;
}
}
}
if (!fd)
goto Lerr;
e.var = fd.vthis;
assert(e.var && e.var.parent);
s = fd.toParentDecl();
if (s.isTemplateDeclaration()) // allow inside template constraint
s = s.toParent();
assert(s);
cd = s.isClassDeclaration();
//printf("parent is %s %s\n", fd.toParent().kind(), fd.toParent().toChars());
if (!cd)
goto Lerr;
if (!cd.baseClass)
{
e.error("no base class for `%s`", cd.toChars());
e.type = cd.type.addMod(e.var.type.mod);
}
else
{
e.type = cd.baseClass.type;
e.type = e.type.castMod(e.var.type.mod);
}
if (e.var.checkNestedReference(sc, e.loc))
return setError();
result = e;
return;
Lerr:
e.error("`super` is only allowed in non-static class member functions");
result = ErrorExp.get();
}
override void visit(NullExp e)
{
static if (LOGSEMANTIC)
{
printf("NullExp::semantic('%s')\n", e.toChars());
}
// NULL is the same as (void *)0
if (e.type)
{
result = e;
return;
}
e.type = Type.tnull;
result = e;
}
override void visit(StringExp e)
{
static if (LOGSEMANTIC)
{
printf("StringExp::semantic() %s\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
OutBuffer buffer;
size_t newlen = 0;
size_t u;
dchar c;
switch (e.postfix)
{
case 'd':
for (u = 0; u < e.len;)
{
if (const p = utf_decodeChar(e.peekString(), u, c))
{
e.error("%.*s", cast(int)p.length, p.ptr);
return setError();
}
else
{
buffer.write4(c);
newlen++;
}
}
buffer.write4(0);
e.setData(buffer.extractData(), newlen, 4);
if (sc && sc.flags & SCOPE.Cfile)
e.type = Type.tuns32.sarrayOf(e.len + 1);
else
e.type = Type.tdchar.immutableOf().arrayOf();
e.committed = true;
break;
case 'w':
for (u = 0; u < e.len;)
{
if (const p = utf_decodeChar(e.peekString(), u, c))
{
e.error("%.*s", cast(int)p.length, p.ptr);
return setError();
}
else
{
buffer.writeUTF16(c);
newlen++;
if (c >= 0x10000)
newlen++;
}
}
buffer.writeUTF16(0);
e.setData(buffer.extractData(), newlen, 2);
if (sc && sc.flags & SCOPE.Cfile)
e.type = Type.tuns16.sarrayOf(e.len + 1);
else
e.type = Type.twchar.immutableOf().arrayOf();
e.committed = true;
break;
case 'c':
e.committed = true;
goto default;
default:
if (sc && sc.flags & SCOPE.Cfile)
e.type = Type.tchar.sarrayOf(e.len + 1);
else
e.type = Type.tchar.immutableOf().arrayOf();
break;
}
e.type = e.type.typeSemantic(e.loc, sc);
//type = type.immutableOf();
//printf("type = %s\n", type.toChars());
result = e;
}
override void visit(TupleExp exp)
{
static if (LOGSEMANTIC)
{
printf("+TupleExp::semantic(%s)\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (exp.e0)
exp.e0 = exp.e0.expressionSemantic(sc);
// Run semantic() on each argument
bool err = false;
for (size_t i = 0; i < exp.exps.length; i++)
{
Expression e = (*exp.exps)[i];
e = e.expressionSemantic(sc);
if (!e.type)
{
exp.error("`%s` has no value", e.toChars());
err = true;
}
else if (e.op == EXP.error)
err = true;
else
(*exp.exps)[i] = e;
}
if (err)
return setError();
expandTuples(exp.exps);
exp.type = new TypeTuple(exp.exps);
exp.type = exp.type.typeSemantic(exp.loc, sc);
//printf("-TupleExp::semantic(%s)\n", toChars());
result = exp;
}
override void visit(ArrayLiteralExp e)
{
static if (LOGSEMANTIC)
{
printf("ArrayLiteralExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
/* Perhaps an empty array literal [ ] should be rewritten as null?
*/
if (e.basis)
e.basis = e.basis.expressionSemantic(sc);
if (arrayExpressionSemantic(e.elements.peekSlice(), sc) || (e.basis && e.basis.op == EXP.error))
return setError();
expandTuples(e.elements);
if (e.basis)
e.elements.push(e.basis);
Type t0 = arrayExpressionToCommonType(sc, *e.elements);
if (e.basis)
e.basis = e.elements.pop();
if (t0 is null)
return setError();
e.type = t0.arrayOf();
e.type = e.type.typeSemantic(e.loc, sc);
/* Disallow array literals of type void being used.
*/
if (e.elements.length > 0 && t0.ty == Tvoid)
{
e.error("`%s` of type `%s` has no value", e.toChars(), e.type.toChars());
return setError();
}
if (global.params.useTypeInfo && Type.dtypeinfo)
semanticTypeInfo(sc, e.type);
result = e;
}
override void visit(AssocArrayLiteralExp e)
{
static if (LOGSEMANTIC)
{
printf("AssocArrayLiteralExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
// Run semantic() on each element
bool err_keys = arrayExpressionSemantic(e.keys.peekSlice(), sc);
bool err_vals = arrayExpressionSemantic(e.values.peekSlice(), sc);
if (err_keys || err_vals)
return setError();
expandTuples(e.keys);
expandTuples(e.values);
if (e.keys.length != e.values.length)
{
e.error("number of keys is %llu, must match number of values %llu",
cast(ulong) e.keys.length, cast(ulong) e.values.length);
return setError();
}
Type tkey = arrayExpressionToCommonType(sc, *e.keys);
Type tvalue = arrayExpressionToCommonType(sc, *e.values);
if (tkey is null || tvalue is null)
return setError();
e.type = new TypeAArray(tvalue, tkey);
e.type = e.type.typeSemantic(e.loc, sc);
semanticTypeInfo(sc, e.type);
if (checkAssocArrayLiteralEscape(sc, e, false))
return setError();
result = e;
}
override void visit(StructLiteralExp e)
{
static if (LOGSEMANTIC)
{
printf("StructLiteralExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
e.sd.size(e.loc);
if (e.sd.sizeok != Sizeok.done)
return setError();
// run semantic() on each element
if (arrayExpressionSemantic(e.elements.peekSlice(), sc))
return setError();
expandTuples(e.elements);
/* Fit elements[] to the corresponding type of field[].
*/
if (!e.sd.fit(e.loc, sc, e.elements, e.stype))
return setError();
/* Fill out remainder of elements[] with default initializers for fields[]
*/
if (!e.sd.fill(e.loc, *e.elements, false))
{
/* An error in the initializer needs to be recorded as an error
* in the enclosing function or template, since the initializer
* will be part of the stuct declaration.
*/
global.increaseErrorCount();
return setError();
}
if (checkFrameAccess(e.loc, sc, e.sd, e.elements.length))
return setError();
e.type = e.stype ? e.stype : e.sd.type;
result = e;
}
override void visit(CompoundLiteralExp cle)
{
static if (LOGSEMANTIC)
{
printf("CompoundLiteralExp::semantic('%s')\n", cle.toChars());
}
Type t = cle.type.typeSemantic(cle.loc, sc);
auto init = initializerSemantic(cle.initializer, sc, t, INITnointerpret);
auto e = initializerToExpression(init, t, (sc.flags & SCOPE.Cfile) != 0);
if (!e)
{
error(cle.loc, "cannot convert initializer `%s` to expression", init.toChars());
return setError();
}
result = e;
return;
}
override void visit(TypeExp exp)
{
if (exp.type.ty == Terror)
return setError();
//printf("TypeExp::semantic(%s)\n", exp.type.toChars());
Expression e;
Type t;
Dsymbol s;
dmd.typesem.resolve(exp.type, exp.loc, sc, e, t, s, true);
if (e)
{
// `(Type)` is actually `(var)` so if `(var)` is a member requiring `this`
// then rewrite as `(this.var)` in case it would be followed by a DotVar
// to fix https://issues.dlang.org/show_bug.cgi?id=9490
VarExp ve = e.isVarExp();
if (ve && ve.var && exp.parens && !ve.var.isStatic() && !(sc.stc & STC.static_) &&
sc.func && sc.func.needThis && ve.var.isMember2())
{
// printf("apply fix for bugzilla issue 9490: add `this.` to `%s`...\n", e.toChars());
e = new DotVarExp(exp.loc, new ThisExp(exp.loc), ve.var, false);
}
//printf("e = %s %s\n", Token.toChars(e.op), e.toChars());
e = e.expressionSemantic(sc);
}
else if (t)
{
//printf("t = %d %s\n", t.ty, t.toChars());
exp.type = t.typeSemantic(exp.loc, sc);
e = exp;
}
else if (s)
{
//printf("s = %s %s\n", s.kind(), s.toChars());
e = symbolToExp(s, exp.loc, sc, true);
}
else
assert(0);
exp.type.checkComplexTransition(exp.loc, sc);
result = e;
}
override void visit(ScopeExp exp)
{
static if (LOGSEMANTIC)
{
printf("+ScopeExp::semantic(%p '%s')\n", exp, exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
ScopeDsymbol sds2 = exp.sds;
TemplateInstance ti = sds2.isTemplateInstance();
while (ti)
{
WithScopeSymbol withsym;
if (!ti.findTempDecl(sc, &withsym) || !ti.semanticTiargs(sc))
return setError();
if (withsym && withsym.withstate.wthis)
{
Expression e = new VarExp(exp.loc, withsym.withstate.wthis);
e = new DotTemplateInstanceExp(exp.loc, e, ti);
result = e.expressionSemantic(sc);
return;
}
if (ti.needsTypeInference(sc))
{
if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration())
{
Dsymbol p = td.toParentLocal();
FuncDeclaration fdthis = hasThis(sc);
AggregateDeclaration ad = p ? p.isAggregateDeclaration() : null;
if (fdthis && ad && fdthis.isMemberLocal() == ad && (td._scope.stc & STC.static_) == 0)
{
Expression e = new DotTemplateInstanceExp(exp.loc, new ThisExp(exp.loc), ti);
result = e.expressionSemantic(sc);
return;
}
}
else if (OverloadSet os = ti.tempdecl.isOverloadSet())
{
FuncDeclaration fdthis = hasThis(sc);
AggregateDeclaration ad = os.parent.isAggregateDeclaration();
if (fdthis && ad && fdthis.isMemberLocal() == ad)
{
Expression e = new DotTemplateInstanceExp(exp.loc, new ThisExp(exp.loc), ti);
result = e.expressionSemantic(sc);
return;
}
}
// ti is an instance which requires IFTI.
exp.sds = ti;
exp.type = Type.tvoid;
result = exp;
return;
}
ti.dsymbolSemantic(sc);
if (!ti.inst || ti.errors)
return setError();
Dsymbol s = ti.toAlias();
if (s == ti)
{
exp.sds = ti;
exp.type = Type.tvoid;
result = exp;
return;
}
sds2 = s.isScopeDsymbol();
if (sds2)
{
ti = sds2.isTemplateInstance();
//printf("+ sds2 = %s, '%s'\n", sds2.kind(), sds2.toChars());
continue;
}
if (auto v = s.isVarDeclaration())
{
if (!v.type)
{
exp.error("forward reference of %s `%s`", v.kind(), v.toChars());
return setError();
}
if ((v.storage_class & STC.manifest) && v._init)
{
/* When an instance that will be converted to a constant exists,
* the instance representation "foo!tiargs" is treated like a
* variable name, and its recursive appearance check (note that
* it's equivalent with a recursive instantiation of foo) is done
* separately from the circular initialization check for the
* eponymous enum variable declaration.
*
* template foo(T) {
* enum bool foo = foo; // recursive definition check (v.inuse)
* }
* template bar(T) {
* enum bool bar = bar!T; // recursive instantiation check (ti.inuse)
* }
*/
if (ti.inuse)
{
exp.error("recursive expansion of %s `%s`", ti.kind(), ti.toPrettyChars());
return setError();
}
v.checkDeprecated(exp.loc, sc);
auto e = v.expandInitializer(exp.loc);
ti.inuse++;
e = e.expressionSemantic(sc);
ti.inuse--;
result = e;
return;
}
}
//printf("s = %s, '%s'\n", s.kind(), s.toChars());
auto e = symbolToExp(s, exp.loc, sc, true);
//printf("-1ScopeExp::semantic()\n");
result = e;
return;
}
//printf("sds2 = %s, '%s'\n", sds2.kind(), sds2.toChars());
//printf("\tparent = '%s'\n", sds2.parent.toChars());
sds2.dsymbolSemantic(sc);
// (Aggregate|Enum)Declaration
if (auto t = sds2.getType())
{
result = (new TypeExp(exp.loc, t)).expressionSemantic(sc);
return;
}
if (auto td = sds2.isTemplateDeclaration())
{
result = (new TemplateExp(exp.loc, td)).expressionSemantic(sc);
return;
}
exp.sds = sds2;
exp.type = Type.tvoid;
//printf("-2ScopeExp::semantic() %s\n", toChars());
result = exp;
}
/**
* Sets the `lowering` field of a `NewExp` to a call to `_d_newitemT` unless
* compiling with `-betterC` or within `__traits(compiles)`.
*
* Params:
* ne = the `NewExp` to lower
*/
private void tryLowerToNewItem(NewExp ne)
{
if (global.params.betterC || !sc.needsCodegen())
return;
auto hook = global.params.tracegc ? Id._d_newitemTTrace : Id._d_newitemT;
if (!verifyHookExist(ne.loc, *sc, hook, "new struct"))
return;
/* Lower the memory allocation and initialization of `new T()` to
* `_d_newitemT!T()`.
*/
Expression id = new IdentifierExp(ne.loc, Id.empty);
id = new DotIdExp(ne.loc, id, Id.object);
auto tiargs = new Objects();
/*
* Remove `inout`, `const`, `immutable` and `shared` to reduce the
* number of generated `_d_newitemT` instances.
*/
auto t = ne.type.nextOf.unqualify(MODFlags.wild | MODFlags.const_ |
MODFlags.immutable_ | MODFlags.shared_);
tiargs.push(t);
id = new DotTemplateInstanceExp(ne.loc, id, hook, tiargs);
auto arguments = new Expressions();
if (global.params.tracegc)
{
auto funcname = (sc.callsc && sc.callsc.func) ?
sc.callsc.func.toPrettyChars() : sc.func.toPrettyChars();
arguments.push(new StringExp(ne.loc, ne.loc.filename.toDString()));
arguments.push(new IntegerExp(ne.loc, ne.loc.linnum, Type.tint32));
arguments.push(new StringExp(ne.loc, funcname.toDString()));
}
id = new CallExp(ne.loc, id, arguments);
ne.lowering = id.expressionSemantic(sc);
}
override void visit(NewExp exp)
{
static if (LOGSEMANTIC)
{
printf("NewExp::semantic() %s\n", exp.toChars());
if (exp.thisexp)
printf("\tthisexp = %s\n", exp.thisexp.toChars());
printf("\tnewtype: %s\n", exp.newtype.toChars());
}
if (exp.type) // if semantic() already run
{
result = exp;
return;
}
//for error messages if the argument in [] is not convertible to size_t
const originalNewtype = exp.newtype;
// https://issues.dlang.org/show_bug.cgi?id=11581
// With the syntax `new T[edim]` or `thisexp.new T[edim]`,
// T should be analyzed first and edim should go into arguments iff it's
// not a tuple.
Expression edim = null;
if (!exp.arguments && exp.newtype.isTypeSArray())
{
auto ts = exp.newtype.isTypeSArray();
// check `new Value[Key]`
ts.dim = ts.dim.expressionSemantic(sc);
if (ts.dim.op == EXP.type)
{
exp.newtype = new TypeAArray(ts.next, ts.dim.isTypeExp().type);
}
else
{
edim = ts.dim;
exp.newtype = ts.next;
}
}
ClassDeclaration cdthis = null;
if (exp.thisexp)
{
exp.thisexp = exp.thisexp.expressionSemantic(sc);
if (exp.thisexp.op == EXP.error)
return setError();
cdthis = exp.thisexp.type.isClassHandle();
if (!cdthis)
{
exp.error("`this` for nested class must be a class type, not `%s`", exp.thisexp.type.toChars());
return setError();
}
sc = sc.push(cdthis);
exp.type = exp.newtype.typeSemantic(exp.loc, sc);
sc = sc.pop();
}
else
{
exp.type = exp.newtype.typeSemantic(exp.loc, sc);
}
if (exp.type.ty == Terror)
return setError();
if (edim)
{
if (exp.type.toBasetype().ty == Ttuple)
{
// --> new T[edim]
exp.type = new TypeSArray(exp.type, edim);
exp.type = exp.type.typeSemantic(exp.loc, sc);
if (exp.type.ty == Terror)
return setError();
}
else
{
// --> new T[](edim)
exp.arguments = new Expressions();
exp.arguments.push(edim);
exp.type = exp.type.arrayOf();
}
}
exp.newtype = exp.type; // in case type gets cast to something else
Type tb = exp.type.toBasetype();
//printf("tb: %s, deco = %s\n", tb.toChars(), tb.deco);
if (arrayExpressionSemantic(exp.arguments.peekSlice(), sc))
{
return setError();
}
if (preFunctionParameters(sc, exp.argumentList))
{
return setError();
}
if (exp.thisexp && tb.ty != Tclass)
{
exp.error("`.new` is only for allocating nested classes, not `%s`", tb.toChars());
return setError();
}
const size_t nargs = exp.arguments ? exp.arguments.length : 0;
Expression newprefix = null;
if (auto tc = tb.isTypeClass())
{
auto cd = tc.sym;
if (cd.errors)
return setError();
cd.size(exp.loc);
if (cd.sizeok != Sizeok.done)
return setError();
if (!cd.ctor)
cd.ctor = cd.searchCtor();
if (cd.noDefaultCtor && !nargs && !cd.defaultCtor)
{
exp.error("default construction is disabled for type `%s`", cd.type.toChars());
return setError();
}
if (cd.isInterfaceDeclaration())
{
exp.error("cannot create instance of interface `%s`", cd.toChars());
return setError();
}
if (cd.isAbstract())
{
exp.error("cannot create instance of abstract class `%s`", cd.toChars());
for (size_t i = 0; i < cd.vtbl.length; i++)
{
FuncDeclaration fd = cd.vtbl[i].isFuncDeclaration();
if (fd && fd.isAbstract())
{
errorSupplemental(exp.loc, "function `%s` is not implemented",
fd.toFullSignature());
}
}
return setError();
}
// checkDeprecated() is already done in newtype.typeSemantic().
if (cd.isNested())
{
/* We need a 'this' pointer for the nested class.
* Ensure we have the right one.
*/
Dsymbol s = cd.toParentLocal();
//printf("cd isNested, parent = %s '%s'\n", s.kind(), s.toPrettyChars());
if (auto cdn = s.isClassDeclaration())
{
if (!cdthis)
{
void noReferenceToOuterClass()
{
if (cd.isAnonymous)
exp.error("cannot construct anonymous nested class because no implicit `this` reference to outer class is available");
else
exp.error("cannot construct nested class `%s` because no implicit `this` reference to outer class `%s` is available",
cd.toChars(), cdn.toChars());
return setError();
}
if (!sc.hasThis)
return noReferenceToOuterClass();
// Supply an implicit 'this' and try again
exp.thisexp = new ThisExp(exp.loc);
for (Dsymbol sp = sc.parent; 1; sp = sp.toParentLocal())
{
if (!sp)
return noReferenceToOuterClass();
ClassDeclaration cdp = sp.isClassDeclaration();
if (!cdp)
continue;
if (cdp == cdn || cdn.isBaseOf(cdp, null))
break;
// Add a '.outer' and try again
exp.thisexp = new DotIdExp(exp.loc, exp.thisexp, Id.outer);
}
exp.thisexp = exp.thisexp.expressionSemantic(sc);
if (exp.thisexp.op == EXP.error)
return setError();
cdthis = exp.thisexp.type.isClassHandle();
}
if (cdthis != cdn && !cdn.isBaseOf(cdthis, null))
{
//printf("cdthis = %s\n", cdthis.toChars());
exp.error("`this` for nested class must be of type `%s`, not `%s`",
cdn.toChars(), exp.thisexp.type.toChars());
return setError();
}
if (!MODimplicitConv(exp.thisexp.type.mod, exp.newtype.mod))
{
exp.error("nested type `%s` should have the same or weaker constancy as enclosing type `%s`",
exp.newtype.toChars(), exp.thisexp.type.toChars());
return setError();
}
}
else if (exp.thisexp)
{
exp.error("`.new` is only for allocating nested classes");
return setError();
}
else if (auto fdn = s.isFuncDeclaration())
{
// make sure the parent context fdn of cd is reachable from sc
if (!ensureStaticLinkTo(sc.parent, fdn))
{
exp.error("outer function context of `%s` is needed to `new` nested class `%s`",
fdn.toPrettyChars(), cd.toPrettyChars());
return setError();
}
}
else
assert(0);
}
else if (exp.thisexp)
{
exp.error("`.new` is only for allocating nested classes");
return setError();
}
if (cd.vthis2)
{
if (AggregateDeclaration ad2 = cd.isMember2())
{
Expression te = new ThisExp(exp.loc).expressionSemantic(sc);
if (te.op != EXP.error)
te = getRightThis(exp.loc, sc, ad2, te, cd);
if (te.op == EXP.error)
{
exp.error("need `this` of type `%s` needed to `new` nested class `%s`", ad2.toChars(), cd.toChars());
return setError();
}
}
}
if (cd.disableNew && !exp.onstack)
{
exp.error("cannot allocate `class %s` with `new` because it is annotated with `@disable new()`",
originalNewtype.toChars());
return setError();
}
if (cd.ctor)
{
FuncDeclaration f = resolveFuncCall(exp.loc, sc, cd.ctor, null, tb, exp.argumentList, FuncResolveFlag.standard);
if (!f || f.errors)
return setError();
checkFunctionAttributes(exp, sc, f);
checkAccess(cd, exp.loc, sc, f);
TypeFunction tf = f.type.isTypeFunction();
if (!exp.arguments)
exp.arguments = new Expressions();
if (functionParameters(exp.loc, sc, tf, null, exp.type, exp.argumentList, f, &exp.type, &exp.argprefix))
return setError();
exp.member = f.isCtorDeclaration();
assert(exp.member);
}
else
{
if (nargs)
{
exp.error("no constructor for `%s`", cd.toChars());
return setError();
}
// https://issues.dlang.org/show_bug.cgi?id=19941
// Run semantic on all field initializers to resolve any forward
// references. This is the same as done for structs in sd.fill().
for (ClassDeclaration c = cd; c; c = c.baseClass)
{
foreach (v; c.fields)
{
if (v.inuse || v._scope is null || v._init is null ||
v._init.isVoidInitializer())
continue;
v.inuse++;
v._init = v._init.initializerSemantic(v._scope, v.type, INITinterpret);
v.inuse--;
}
}
}
// When using `@nogc` exception handling, lower `throw new E(args)` to
// `throw (__tmp = _d_newThrowable!E(), __tmp.__ctor(args), __tmp)`.
if (global.params.ehnogc && exp.thrownew &&
!cd.isCOMclass() && !cd.isCPPclass())
{
assert(cd.ctor);
Expression id = new IdentifierExp(exp.loc, Id.empty);
id = new DotIdExp(exp.loc, id, Id.object);
auto tiargs = new Objects();
tiargs.push(exp.newtype);
id = new DotTemplateInstanceExp(exp.loc, id, Id._d_newThrowable, tiargs);
id = new CallExp(exp.loc, id).expressionSemantic(sc);
Expression idVal;
Expression tmp = extractSideEffect(sc, "__tmpThrowable", idVal, id, true);
// auto castTmp = new CastExp(exp.loc, tmp, exp.type);
auto ctor = new DotIdExp(exp.loc, tmp, Id.ctor).expressionSemantic(sc);
auto ctorCall = new CallExp(exp.loc, ctor, exp.arguments);
id = Expression.combine(idVal, exp.argprefix).expressionSemantic(sc);
id = Expression.combine(id, ctorCall).expressionSemantic(sc);
// id = Expression.combine(id, castTmp).expressionSemantic(sc);
result = id.expressionSemantic(sc);
return;
}
else if (sc.needsCodegen() && // interpreter doesn't need this lowered
!exp.onstack && !exp.type.isscope()) // these won't use the GC
{
/* replace `new T(arguments)` with `core.lifetime._d_newclassT!T(arguments)`
* or `_d_newclassTTrace`
*/
auto hook = global.params.tracegc ? Id._d_newclassTTrace : Id._d_newclassT;
if (!verifyHookExist(exp.loc, *sc, hook, "new class"))
return setError();
Expression id = new IdentifierExp(exp.loc, Id.empty);
id = new DotIdExp(exp.loc, id, Id.object);
auto tiargs = new Objects();
auto t = exp.newtype.unqualify(MODFlags.wild); // remove `inout`
tiargs.push(t);
id = new DotTemplateInstanceExp(exp.loc, id, hook, tiargs);
auto arguments = new Expressions();
if (global.params.tracegc)
{
auto funcname = (sc.callsc && sc.callsc.func) ?
sc.callsc.func.toPrettyChars() : sc.func.toPrettyChars();
arguments.push(new StringExp(exp.loc, exp.loc.filename.toDString()));
arguments.push(new IntegerExp(exp.loc, exp.loc.linnum, Type.tint32));
arguments.push(new StringExp(exp.loc, funcname.toDString()));
}
id = new CallExp(exp.loc, id, arguments);
exp.lowering = id.expressionSemantic(sc);
}
}
else if (auto ts = tb.isTypeStruct())
{
auto sd = ts.sym;
sd.size(exp.loc);
if (sd.sizeok != Sizeok.done)
return setError();
if (!sd.ctor)
sd.ctor = sd.searchCtor();
if (sd.noDefaultCtor && !nargs)
{
exp.error("default construction is disabled for type `%s`", sd.type.toChars());
return setError();
}
// checkDeprecated() is already done in newtype.typeSemantic().
if (sd.disableNew)
{
exp.error("cannot allocate `struct %s` with `new` because it is annotated with `@disable new()`",
originalNewtype.toChars());
return setError();
}
// https://issues.dlang.org/show_bug.cgi?id=22639
// If the new expression has arguments, we either should call a
// regular constructor of a copy constructor if the first argument
// is the same type as the struct
if (nargs && (sd.hasRegularCtor() || (sd.ctor && (*exp.arguments)[0].type.mutableOf() == sd.type.mutableOf())))
{
FuncDeclaration f = resolveFuncCall(exp.loc, sc, sd.ctor, null, tb, exp.argumentList, FuncResolveFlag.standard);
if (!f || f.errors)
return setError();
checkFunctionAttributes(exp, sc, f);
checkAccess(sd, exp.loc, sc, f);
TypeFunction tf = f.type.isTypeFunction();
if (!exp.arguments)
exp.arguments = new Expressions();
if (functionParameters(exp.loc, sc, tf, null, exp.type, exp.argumentList, f, &exp.type, &exp.argprefix))
return setError();
exp.member = f.isCtorDeclaration();
assert(exp.member);
if (checkFrameAccess(exp.loc, sc, sd, sd.fields.length))
return setError();
}
else
{
if (exp.names)
{
exp.arguments = resolveStructLiteralNamedArgs(sd, exp.type, sc, exp.loc,
exp.names ? (*exp.names)[] : null,
(size_t i, Type t) => (*exp.arguments)[i],
i => (*exp.arguments)[i].loc
);
if (!exp.arguments)
return setError();
}
else if (!exp.arguments)
{
exp.arguments = new Expressions();
}
if (!sd.fit(exp.loc, sc, exp.arguments, tb))
return setError();
if (!sd.fill(exp.loc, *exp.arguments, false))
return setError();
if (checkFrameAccess(exp.loc, sc, sd, exp.arguments ? exp.arguments.length : 0))
return setError();
/* Since a `new` allocation may escape, check each of the arguments for escaping
*/
foreach (arg; *exp.arguments)
{
if (arg && checkNewEscape(sc, arg, false))
return setError();
}
}
exp.type = exp.type.pointerTo();
tryLowerToNewItem(exp);
}
else if (tb.ty == Tarray)
{
if (!nargs)
{
// https://issues.dlang.org/show_bug.cgi?id=20422
// Without this check the compiler would give a misleading error
exp.error("missing length argument for array");
return setError();
}
Type tn = tb.nextOf().baseElemOf();
Dsymbol s = tn.toDsymbol(sc);
AggregateDeclaration ad = s ? s.isAggregateDeclaration() : null;
if (ad && ad.noDefaultCtor)
{
exp.error("default construction is disabled for type `%s`", tb.nextOf().toChars());
return setError();
}
for (size_t i = 0; i < nargs; i++)
{
if (tb.ty != Tarray)
{
exp.error("too many arguments for array");
return setError();
}
Expression arg = (*exp.arguments)[i];
if (exp.names && (*exp.names)[i])
{
exp.error("no named argument `%s` allowed for array dimension", (*exp.names)[i].toChars());
return setError();
}
arg = resolveProperties(sc, arg);
arg = arg.implicitCastTo(sc, Type.tsize_t);
if (arg.op == EXP.error)
return setError();
arg = arg.optimize(WANTvalue);
if (arg.op == EXP.int64 && (target.is64bit ?
cast(sinteger_t)arg.toInteger() : cast(int)arg.toInteger()) < 0)
{
exp.error("negative array dimension `%s`", (*exp.arguments)[i].toChars());
return setError();
}
(*exp.arguments)[i] = arg;
tb = tb.isTypeDArray().next.toBasetype();
}
}
else if (tb.isscalar())
{
if (!nargs)
{
}
else if (nargs == 1)
{
if (exp.names && (*exp.names)[0])
{
exp.error("no named argument `%s` allowed for scalar", (*exp.names)[0].toChars());
return setError();
}
Expression e = (*exp.arguments)[0];
e = e.implicitCastTo(sc, tb);
(*exp.arguments)[0] = e;
}
else
{
exp.error("more than one argument for construction of `%s`", exp.type.toChars());
return setError();
}
exp.type = exp.type.pointerTo();
tryLowerToNewItem(exp);
}
else if (tb.ty == Taarray)
{
// e.g. `new Alias(args)`
if (nargs)
{
exp.error("`new` cannot take arguments for an associative array");
return setError();
}
}
else
{
exp.error("cannot create a `%s` with `new`", exp.type.toChars());
return setError();
}
//printf("NewExp: '%s'\n", toChars());
//printf("NewExp:type '%s'\n", type.toChars());
semanticTypeInfo(sc, exp.type);
if (newprefix)
{
result = Expression.combine(newprefix, exp);
return;
}
result = exp;
}
override void visit(NewAnonClassExp e)
{
static if (LOGSEMANTIC)
{
printf("NewAnonClassExp::semantic() %s\n", e.toChars());
//printf("thisexp = %p\n", thisexp);
//printf("type: %s\n", type.toChars());
}
Expression d = new DeclarationExp(e.loc, e.cd);
sc = sc.push(); // just create new scope
sc.flags &= ~SCOPE.ctfe; // temporary stop CTFE
d = d.expressionSemantic(sc);
sc = sc.pop();
if (!e.cd.errors && sc.intypeof && !sc.parent.inNonRoot())
{
ScopeDsymbol sds = sc.tinst ? cast(ScopeDsymbol)sc.tinst : sc._module;
if (!sds.members)
sds.members = new Dsymbols();
sds.members.push(e.cd);
}
Expression n = new NewExp(e.loc, e.thisexp, e.cd.type, e.arguments);
Expression c = new CommaExp(e.loc, d, n);
result = c.expressionSemantic(sc);
}
override void visit(SymOffExp e)
{
static if (LOGSEMANTIC)
{
printf("SymOffExp::semantic('%s')\n", e.toChars());
}
//var.dsymbolSemantic(sc);
if (!e.type)
e.type = e.var.type.pointerTo();
if (auto v = e.var.isVarDeclaration())
{
if (v.checkNestedReference(sc, e.loc))
return setError();
}
else if (auto f = e.var.isFuncDeclaration())
{
if (f.checkNestedReference(sc, e.loc))
return setError();
}
result = e;
}
override void visit(VarExp e)
{
static if (LOGSEMANTIC)
{
printf("VarExp::semantic(%s)\n", e.toChars());
}
auto vd = e.var.isVarDeclaration();
auto fd = e.var.isFuncDeclaration();
if (fd)
{
//printf("L%d fd = %s\n", __LINE__, f.toChars());
if (!fd.functionSemantic())
return setError();
}
if (!e.type)
e.type = e.var.type;
if (e.type && !e.type.deco)
{
auto decl = e.var.isDeclaration();
if (decl)
decl.inuse++;
e.type = e.type.typeSemantic(e.loc, sc);
if (decl)
decl.inuse--;
}
/* Fix for 1161 doesn't work because it causes visibility
* problems when instantiating imported templates passing private
* variables as alias template parameters.
*/
//checkAccess(loc, sc, NULL, var);
if (vd)
{
if (vd.checkNestedReference(sc, e.loc))
return setError();
// https://issues.dlang.org/show_bug.cgi?id=12025
// If the variable is not actually used in runtime code,
// the purity violation error is redundant.
//checkPurity(sc, vd);
}
else if (fd)
{
// TODO: If fd isn't yet resolved its overload, the checkNestedReference
// call would cause incorrect validation.
// Maybe here should be moved in CallExp, or AddrExp for functions.
if (fd.checkNestedReference(sc, e.loc))
return setError();
}
else if (auto od = e.var.isOverDeclaration())
{
e.type = Type.tvoid; // ambiguous type?
}
result = e;
}
override void visit(FuncExp exp)
{
static if (LOGSEMANTIC)
{
printf("FuncExp::semantic(%s)\n", exp.toChars());
if (exp.fd.treq)
printf(" treq = %s\n", exp.fd.treq.toChars());
}
if (exp.type)
{
result = exp;
return;
}
Expression e = exp;
uint olderrors;
sc = sc.push(); // just create new scope
sc.flags &= ~SCOPE.ctfe; // temporary stop CTFE
sc.visibility = Visibility(Visibility.Kind.public_); // https://issues.dlang.org/show_bug.cgi?id=12506
/* fd.treq might be incomplete type,
* so should not semantic it.
* void foo(T)(T delegate(int) dg){}
* foo(a=>a); // in IFTI, treq == T delegate(int)
*/
//if (fd.treq)
// fd.treq = fd.treq.dsymbolSemantic(loc, sc);
exp.genIdent(sc);
// Set target of return type inference
if (exp.fd.treq && !exp.fd.type.nextOf())
{
TypeFunction tfv = null;
if (exp.fd.treq.ty == Tdelegate || exp.fd.treq.isPtrToFunction())
tfv = cast(TypeFunction)exp.fd.treq.nextOf();
if (tfv)
{
TypeFunction tfl = cast(TypeFunction)exp.fd.type;
tfl.next = tfv.nextOf();
}
}
//printf("td = %p, treq = %p\n", td, fd.treq);
if (exp.td)
{
assert(exp.td.parameters && exp.td.parameters.length);
exp.td.dsymbolSemantic(sc);
exp.type = Type.tvoid; // temporary type
if (exp.fd.treq) // defer type determination
{
FuncExp fe;
if (exp.matchType(exp.fd.treq, sc, &fe) > MATCH.nomatch)
e = fe;
else
e = ErrorExp.get();
}
goto Ldone;
}
olderrors = global.errors;
exp.fd.dsymbolSemantic(sc);
if (olderrors == global.errors)
{
exp.fd.semantic2(sc);
if (olderrors == global.errors)
exp.fd.semantic3(sc);
}
if (olderrors != global.errors)
{
if (exp.fd.type && exp.fd.type.ty == Tfunction && !exp.fd.type.nextOf())
(cast(TypeFunction)exp.fd.type).next = Type.terror;
e = ErrorExp.get();
goto Ldone;
}
// Type is a "delegate to" or "pointer to" the function literal
if ((exp.fd.isNested() && exp.fd.tok == TOK.delegate_) || (exp.tok == TOK.reserved && exp.fd.treq && exp.fd.treq.ty == Tdelegate))
{
// https://issues.dlang.org/show_bug.cgi?id=22686
// if the delegate return type is an error
// abort semantic of the FuncExp and propagate
// the error
if (exp.fd.type.isTypeError())
{
e = ErrorExp.get();
goto Ldone;
}
exp.type = new TypeDelegate(exp.fd.type.isTypeFunction());
exp.type = exp.type.typeSemantic(exp.loc, sc);
exp.fd.tok = TOK.delegate_;
}
else
{
exp.type = new TypePointer(exp.fd.type);
exp.type = exp.type.typeSemantic(exp.loc, sc);
//type = fd.type.pointerTo();
/* A lambda expression deduced to function pointer might become
* to a delegate literal implicitly.
*
* auto foo(void function() fp) { return 1; }
* assert(foo({}) == 1);
*
* So, should keep fd.tok == TOK.reserve if fd.treq == NULL.
*/
if (exp.fd.treq && exp.fd.treq.ty == Tpointer)
{
// change to non-nested
exp.fd.tok = TOK.function_;
exp.fd.vthis = null;
}
}
exp.fd.tookAddressOf++;
Ldone:
sc = sc.pop();
result = e;
}
/**
* Perform semantic analysis on function literals
*
* Test the following construct:
* ---
* (x, y, z) { return x + y + z; }(42, 84, 1992);
* ---
*/
Expression callExpSemantic(FuncExp exp, Scope* sc, Expressions* arguments)
{
if ((!exp.type || exp.type == Type.tvoid) && exp.td && arguments && arguments.length)
{
for (size_t k = 0; k < arguments.length; k++)
{
Expression checkarg = (*arguments)[k];
if (checkarg.op == EXP.error)
return checkarg;
}
exp.genIdent(sc);
assert(exp.td.parameters && exp.td.parameters.length);
exp.td.dsymbolSemantic(sc);
TypeFunction tfl = cast(TypeFunction)exp.fd.type;
size_t dim = tfl.parameterList.length;
if (arguments.length < dim)
{
// Default arguments are always typed, so they don't need inference.
Parameter p = tfl.parameterList[arguments.length];
if (p.defaultArg)
dim = arguments.length;
}
if ((tfl.parameterList.varargs == VarArg.none && arguments.length > dim) ||
arguments.length < dim)
{
OutBuffer buf;
foreach (idx, ref arg; *arguments)
buf.printf("%s%s", (idx ? ", ".ptr : "".ptr), arg.type.toChars());
exp.error("function literal `%s%s` is not callable using argument types `(%s)`",
exp.fd.toChars(), parametersTypeToChars(tfl.parameterList),
buf.peekChars());
exp.errorSupplemental("too %s arguments, expected %d, got %d",
arguments.length < dim ? "few".ptr : "many".ptr,
cast(int)dim, cast(int)arguments.length);
return ErrorExp.get();
}
auto tiargs = new Objects();
tiargs.reserve(exp.td.parameters.length);
for (size_t i = 0; i < exp.td.parameters.length; i++)
{
TemplateParameter tp = (*exp.td.parameters)[i];
assert(dim <= tfl.parameterList.length);
foreach (u, p; tfl.parameterList)
{
if (u == dim)
break;
if (p.type.ty == Tident && (cast(TypeIdentifier)p.type).ident == tp.ident)
{
Expression e = (*arguments)[u];
tiargs.push(e.type);
break;
}
}
}
auto ti = new TemplateInstance(exp.loc, exp.td, tiargs);
return (new ScopeExp(exp.loc, ti)).expressionSemantic(sc);
}
return exp.expressionSemantic(sc);
}
override void visit(CallExp exp)
{
static if (LOGSEMANTIC)
{
printf("CallExp::semantic() %s\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return; // semantic() already run
}
Objects* tiargs = null; // initial list of template arguments
Expression ethis = null;
Type tthis = null;
Expression e1org = exp.e1;
if (auto ce = exp.e1.isCommaExp())
{
/* Rewrite (a,b)(args) as (a,(b(args)))
*/
exp.e1 = ce.e2;
ce.e2 = exp;
result = ce.expressionSemantic(sc);
return;
}
if (DelegateExp de = exp.e1.isDelegateExp())
{
exp.e1 = new DotVarExp(de.loc, de.e1, de.func, de.hasOverloads);
visit(exp);
return;
}
if (FuncExp fe = exp.e1.isFuncExp())
{
if (arrayExpressionSemantic(exp.arguments.peekSlice(), sc) ||
preFunctionParameters(sc, exp.argumentList))
return setError();
// Run e1 semantic even if arguments have any errors
exp.e1 = callExpSemantic(fe, sc, exp.arguments);
if (exp.e1.op == EXP.error)
{
result = exp.e1;
return;
}
}
if (sc.flags & SCOPE.Cfile)
{
/* See if need to rewrite the AST because of cast/call ambiguity
*/
if (auto e = castCallAmbiguity(exp, sc))
{
result = expressionSemantic(e, sc);
return;
}
}
if (Expression ex = resolveUFCS(sc, exp))
{
result = ex;
return;
}
/* This recognizes:
* foo!(tiargs)(funcargs)
*/
if (ScopeExp se = exp.e1.isScopeExp())
{
TemplateInstance ti = se.sds.isTemplateInstance();
if (ti)
{
/* Attempt to instantiate ti. If that works, go with it.
* If not, go with partial explicit specialization.
*/
WithScopeSymbol withsym;
if (!ti.findTempDecl(sc, &withsym) || !ti.semanticTiargs(sc))
return setError();
if (withsym && withsym.withstate.wthis)
{
exp.e1 = new VarExp(exp.e1.loc, withsym.withstate.wthis);
exp.e1 = new DotTemplateInstanceExp(exp.e1.loc, exp.e1, ti);
goto Ldotti;
}
if (ti.needsTypeInference(sc, 1))
{
/* Go with partial explicit specialization
*/
tiargs = ti.tiargs;
assert(ti.tempdecl);
if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration())
exp.e1 = new TemplateExp(exp.loc, td);
else if (OverDeclaration od = ti.tempdecl.isOverDeclaration())
exp.e1 = new VarExp(exp.loc, od);
else
exp.e1 = new OverExp(exp.loc, ti.tempdecl.isOverloadSet());
}
else
{
Expression e1x = exp.e1.expressionSemantic(sc);
if (e1x.op == EXP.error)
{
result = e1x;
return;
}
exp.e1 = e1x;
}
}
}
/* This recognizes:
* expr.foo!(tiargs)(funcargs)
*/
Ldotti:
if (DotTemplateInstanceExp se = exp.e1.isDotTemplateInstanceExp())
{
TemplateInstance ti = se.ti;
{
/* Attempt to instantiate ti. If that works, go with it.
* If not, go with partial explicit specialization.
*/
if (!se.findTempDecl(sc) || !ti.semanticTiargs(sc))
return setError();
if (ti.needsTypeInference(sc, 1))
{
/* Go with partial explicit specialization
*/
tiargs = ti.tiargs;
assert(ti.tempdecl);
if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration())
exp.e1 = new DotTemplateExp(exp.loc, se.e1, td);
else if (OverDeclaration od = ti.tempdecl.isOverDeclaration())
{
exp.e1 = new DotVarExp(exp.loc, se.e1, od, true);
}
else
exp.e1 = new DotExp(exp.loc, se.e1, new OverExp(exp.loc, ti.tempdecl.isOverloadSet()));
}
else
{
Expression e1x = exp.e1.expressionSemantic(sc);
if (e1x.op == EXP.error)
{
result = e1x;
return;
}
exp.e1 = e1x;
}
}
}
Type att = null;
Lagain:
//printf("Lagain: %s\n", toChars());
exp.f = null;
if (exp.e1.op == EXP.this_ || exp.e1.op == EXP.super_)
{
// semantic() run later for these
}
else
{
if (DotIdExp die = exp.e1.isDotIdExp())
{
exp.e1 = die.expressionSemantic(sc);
/* Look for e1 having been rewritten to expr.opDispatch!(string)
* We handle such earlier, so go back.
* Note that in the rewrite, we carefully did not run semantic() on e1
*/
if (exp.e1.op == EXP.dotTemplateInstance)
{
goto Ldotti;
}
}
else
{
__gshared int nest;
if (++nest > global.recursionLimit)
{
exp.error("recursive evaluation of `%s`", exp.toChars());
--nest;
return setError();
}
Expression ex = unaSemantic(exp, sc);
--nest;
if (ex)
{
result = ex;
return;
}
}
/* Look for e1 being a lazy parameter
*/
if (VarExp ve = exp.e1.isVarExp())
{
if (ve.var.storage_class & STC.lazy_)
{
// lazy parameters can be called without violating purity and safety
Type tw = ve.var.type;
Type tc = ve.var.type.substWildTo(MODFlags.const_);
auto tf = new TypeFunction(ParameterList(), tc, LINK.d, STC.safe | STC.pure_);
(tf = cast(TypeFunction)tf.typeSemantic(exp.loc, sc)).next = tw; // hack for bug7757
auto t = new TypeDelegate(tf);
ve.type = t.typeSemantic(exp.loc, sc);
}
VarDeclaration v = ve.var.isVarDeclaration();
if (v && ve.checkPurity(sc, v))
return setError();
}
if (exp.e1.op == EXP.symbolOffset && (cast(SymOffExp)exp.e1).hasOverloads)
{
SymOffExp se = cast(SymOffExp)exp.e1;
exp.e1 = new VarExp(se.loc, se.var, true);
exp.e1 = exp.e1.expressionSemantic(sc);
}
else if (DotExp de = exp.e1.isDotExp())
{
if (de.e2.op == EXP.overloadSet)
{
ethis = de.e1;
tthis = de.e1.type;
exp.e1 = de.e2;
}
}
else if (exp.e1.op == EXP.star && exp.e1.type.ty == Tfunction)
{
// Rewrite (*fp)(arguments) to fp(arguments)
exp.e1 = (cast(PtrExp)exp.e1).e1;
}
else if (exp.e1.op == EXP.type && (sc && sc.flags & SCOPE.Cfile))
{
const numArgs = exp.arguments ? exp.arguments.length : 0;
/* Ambiguous cases arise from CParser where there is not enough
* information to determine if we have a function call or declaration.
* type-name ( identifier ) ;
* identifier ( identifier ) ;
* If exp.e1 is a type-name, then this is a declaration. C11 does not
* have type construction syntax, so don't convert this to a cast().
*/
if (numArgs == 1)
{
Expression arg = (*exp.arguments)[0];
if (auto ie = (*exp.arguments)[0].isIdentifierExp())
{
TypeExp te = cast(TypeExp)exp.e1;
auto initializer = new VoidInitializer(ie.loc);
Dsymbol s = new VarDeclaration(ie.loc, te.type, ie.ident, initializer);
auto decls = new Dsymbols(1);
(*decls)[0] = s;
s = new LinkDeclaration(s.loc, LINK.c, decls);
result = new DeclarationExp(exp.loc, s);
result = result.expressionSemantic(sc);
}
else
{
arg.error("identifier or `(` expected");
result = ErrorExp.get();
}
return;
}
exp.error("identifier or `(` expected before `)`");
result = ErrorExp.get();
return;
}
}
Type t1 = exp.e1.type ? exp.e1.type.toBasetype() : null;
if (exp.e1.op == EXP.error)
{
result = exp.e1;
return;
}
if (arrayExpressionSemantic(exp.arguments.peekSlice(), sc) ||
preFunctionParameters(sc, exp.argumentList))
return setError();
// Check for call operator overload
if (t1)
{
if (t1.ty == Tstruct)
{
auto sd = (cast(TypeStruct)t1).sym;
sd.size(exp.loc); // Resolve forward references to construct object
if (sd.sizeok != Sizeok.done)
return setError();
if (!sd.ctor)
sd.ctor = sd.searchCtor();
/* If `sd.ctor` is a generated copy constructor, this means that it
is the single constructor that this struct has. In order to not
disable default construction, the ctor is nullified. The side effect
of this is that the generated copy constructor cannot be called
explicitly, but that is ok, because when calling a constructor the
default constructor should have priority over the generated copy
constructor.
*/
if (sd.ctor)
{
auto ctor = sd.ctor.isCtorDeclaration();
if (ctor && ctor.isCpCtor && ctor.isGenerated())
sd.ctor = null;
}
// First look for constructor
if (exp.e1.op == EXP.type && sd.ctor)
{
if (!sd.noDefaultCtor && !(exp.arguments && exp.arguments.length))
goto Lx;
/* https://issues.dlang.org/show_bug.cgi?id=20695
If all constructors are copy constructors, then
try default construction.
*/
if (!sd.hasRegularCtor &&
// https://issues.dlang.org/show_bug.cgi?id=22639
// we might still have a copy constructor that could be called
(*exp.arguments)[0].type.mutableOf != sd.type.mutableOf())
goto Lx;
auto sle = new StructLiteralExp(exp.loc, sd, null, exp.e1.type);
if (!sd.fill(exp.loc, *sle.elements, true))
return setError();
if (checkFrameAccess(exp.loc, sc, sd, sle.elements.length))
return setError();
// https://issues.dlang.org/show_bug.cgi?id=14556
// Set concrete type to avoid further redundant semantic().
sle.type = exp.e1.type;
/* Constructor takes a mutable object, so don't use
* the immutable initializer symbol.
*/
sle.useStaticInit = false;
Expression e = sle;
if (auto cf = sd.ctor.isCtorDeclaration())
{
e = new DotVarExp(exp.loc, e, cf, true);
}
else if (auto td = sd.ctor.isTemplateDeclaration())
{
e = new DotIdExp(exp.loc, e, td.ident);
}
else if (auto os = sd.ctor.isOverloadSet())
{
e = new DotExp(exp.loc, e, new OverExp(exp.loc, os));
}
else
assert(0);
e = new CallExp(exp.loc, e, exp.arguments);
e = e.expressionSemantic(sc);
result = e;
return;
}
// No constructor, look for overload of opCall
if (search_function(sd, Id.call))
goto L1;
// overload of opCall, therefore it's a call
if (exp.e1.op != EXP.type)
{
if (sd.aliasthis && !isRecursiveAliasThis(att, exp.e1.type))
{
exp.e1 = resolveAliasThis(sc, exp.e1);
goto Lagain;
}
exp.error("%s `%s` does not overload ()", sd.kind(), sd.toChars());
return setError();
}
/* It's a struct literal
*/
Lx:
Expressions* resolvedArgs = exp.arguments;
if (exp.names)
{
resolvedArgs = resolveStructLiteralNamedArgs(sd, exp.e1.type, sc, exp.loc,
(*exp.names)[],
(size_t i, Type t) => (*exp.arguments)[i],
i => (*exp.arguments)[i].loc
);
if (!resolvedArgs)
{
result = ErrorExp.get();
return;
}
}
Expression e = new StructLiteralExp(exp.loc, sd, resolvedArgs, exp.e1.type);
e = e.expressionSemantic(sc);
result = e;
return;
}
else if (t1.ty == Tclass)
{
L1:
// Rewrite as e1.call(arguments)
Expression e = new DotIdExp(exp.loc, exp.e1, Id.call);
e = new CallExp(exp.loc, e, exp.arguments, exp.names);
e = e.expressionSemantic(sc);
result = e;
return;
}
else if (exp.e1.op == EXP.type && t1.isscalar())
{
Expression e;
// Make sure to use the enum type itself rather than its
// base type
// https://issues.dlang.org/show_bug.cgi?id=16346
if (exp.e1.type.ty == Tenum)
{
t1 = exp.e1.type;
}
if (!exp.arguments || exp.arguments.length == 0)
{
e = t1.defaultInitLiteral(exp.loc);
}
else if (exp.arguments.length == 1)
{
e = (*exp.arguments)[0];
e = e.implicitCastTo(sc, t1);
e = new CastExp(exp.loc, e, t1);
}
else
{
exp.error("more than one argument for construction of `%s`", t1.toChars());
return setError();
}
e = e.expressionSemantic(sc);
result = e;
return;
}
}
FuncDeclaration resolveOverloadSet(Loc loc, Scope* sc,
OverloadSet os, Objects* tiargs, Type tthis, ArgumentList argumentList)
{
FuncDeclaration f = null;
foreach (s; os.a)
{
if (tiargs && s.isFuncDeclaration())
continue;
if (auto f2 = resolveFuncCall(loc, sc, s, tiargs, tthis, argumentList, FuncResolveFlag.quiet))
{
if (f2.errors)
return null;
if (f)
{
/* Match in more than one overload set,
* even if one is a 'better' match than the other.
*/
if (f.isCsymbol() && f2.isCsymbol())
{
/* C has global name space, so just pick one, such as f.
* If f and f2 are not compatible, that's how C rolls.
*/
}
else
ScopeDsymbol.multiplyDefined(loc, f, f2); // issue error
}
else
f = f2;
}
}
if (!f)
{
.error(loc, "no overload matches for `%s`", exp.toChars());
errorSupplemental(loc, "Candidates are:");
foreach (s; os.a)
{
overloadApply(s, (ds){
if (auto fd = ds.isFuncDeclaration())
.errorSupplemental(ds.loc, "%s%s", fd.toChars(),
fd.type.toTypeFunction().parameterList.parametersTypeToChars());
else
.errorSupplemental(ds.loc, "%s", ds.toChars());
return 0;
});
}
}
else if (f.errors)
f = null;
return f;
}
bool isSuper = false;
if (exp.e1.op == EXP.dotVariable && t1.ty == Tfunction || exp.e1.op == EXP.dotTemplateDeclaration)
{
UnaExp ue = cast(UnaExp)exp.e1;
Expression ue1old = ue.e1; // need for 'right this' check
DotVarExp dve;
DotTemplateExp dte;
Dsymbol s;
if (exp.e1.op == EXP.dotVariable)
{
dve = cast(DotVarExp)exp.e1;
dte = null;
s = dve.var;
tiargs = null;
}
else
{
dve = null;
dte = cast(DotTemplateExp)exp.e1;
s = dte.td;
}
// Do overload resolution
exp.f = resolveFuncCall(exp.loc, sc, s, tiargs, ue.e1.type, exp.argumentList, FuncResolveFlag.standard);
if (!exp.f || exp.f.errors || exp.f.type.ty == Terror)
return setError();
if (exp.f.interfaceVirtual)
{
/* Cast 'this' to the type of the interface, and replace f with the interface's equivalent
*/
auto b = exp.f.interfaceVirtual;
auto ad2 = b.sym;
ue.e1 = ue.e1.castTo(sc, ad2.type.addMod(ue.e1.type.mod));
ue.e1 = ue.e1.expressionSemantic(sc);
auto vi = exp.f.findVtblIndex(&ad2.vtbl, cast(int)ad2.vtbl.length);
assert(vi >= 0);
exp.f = ad2.vtbl[vi].isFuncDeclaration();
assert(exp.f);
}
if (exp.f.needThis())
{
AggregateDeclaration ad = exp.f.isMemberLocal();
ue.e1 = getRightThis(exp.loc, sc, ad, ue.e1, exp.f);
if (ue.e1.op == EXP.error)
{
result = ue.e1;
return;
}
ethis = ue.e1;
tthis = ue.e1.type;
if (!(exp.f.type.ty == Tfunction && (cast(TypeFunction)exp.f.type).isScopeQual))
{
if (checkParamArgumentEscape(sc, exp.f, Id.This, exp.f.vthis, STC.undefined_, ethis, false, false))
return setError();
}
}
/* Cannot call public functions from inside invariant
* (because then the invariant would have infinite recursion)
*/
if (sc.func && sc.func.isInvariantDeclaration() && ue.e1.op == EXP.this_ && exp.f.addPostInvariant())
{
exp.error("cannot call `public`/`export` function `%s` from invariant", exp.f.toChars());
return setError();
}
if (!exp.ignoreAttributes)
checkFunctionAttributes(exp, sc, exp.f);
// Cut-down version of checkAccess() that doesn't use the "most visible" version of exp.f.
// We've already selected an overload here.
const parent = exp.f.toParent();
if (parent && parent.isTemplateInstance())
{
// already a deprecation
}
else if (!checkSymbolAccess(sc, exp.f))
{
exp.error("%s `%s` of type `%s` is not accessible from module `%s`",
exp.f.kind(), exp.f.toPrettyChars(), exp.f.type.toChars(), sc._module.toChars);
return setError();
}
if (!exp.f.needThis())
{
exp.e1 = Expression.combine(ue.e1, new VarExp(exp.loc, exp.f, false));
}
else
{
if (ue1old.checkRightThis(sc))
return setError();
if (exp.e1.op == EXP.dotVariable)
{
dve.var = exp.f;
exp.e1.type = exp.f.type;
}
else
{
exp.e1 = new DotVarExp(exp.loc, dte.e1, exp.f, false);
exp.e1 = exp.e1.expressionSemantic(sc);
if (exp.e1.op == EXP.error)
return setError();
ue = cast(UnaExp)exp.e1;
}
version (none)
{
printf("ue.e1 = %s\n", ue.e1.toChars());
printf("f = %s\n", exp.f.toChars());
printf("t1 = %s\n", t1.toChars());
printf("e1 = %s\n", exp.e1.toChars());
printf("e1.type = %s\n", exp.e1.type.toChars());
}
// See if we need to adjust the 'this' pointer
AggregateDeclaration ad = exp.f.isThis();
ClassDeclaration cd = ue.e1.type.isClassHandle();
if (ad && cd && ad.isClassDeclaration())
{
if (ue.e1.op == EXP.dotType)
{
ue.e1 = (cast(DotTypeExp)ue.e1).e1;
exp.directcall = true;
}
else if (ue.e1.op == EXP.super_)
exp.directcall = true;
else if ((cd.storage_class & STC.final_) != 0) // https://issues.dlang.org/show_bug.cgi?id=14211
exp.directcall = true;
if (ad != cd)
{
ue.e1 = ue.e1.castTo(sc, ad.type.addMod(ue.e1.type.mod));
ue.e1 = ue.e1.expressionSemantic(sc);
}
}
}
// If we've got a pointer to a function then deference it
// https://issues.dlang.org/show_bug.cgi?id=16483
if (exp.e1.type.isPtrToFunction())
{
Expression e = new PtrExp(exp.loc, exp.e1);
e.type = exp.e1.type.nextOf();
exp.e1 = e;
}
t1 = exp.e1.type;
}
else if (exp.e1.op == EXP.super_ || exp.e1.op == EXP.this_)
{
auto ad = sc.func ? sc.func.isThis() : null;
auto cd = ad ? ad.isClassDeclaration() : null;
isSuper = exp.e1.op == EXP.super_;
if (isSuper)
{
// Base class constructor call
if (!cd || !cd.baseClass || !sc.func.isCtorDeclaration())
{
exp.error("super class constructor call must be in a constructor");
return setError();
}
if (!cd.baseClass.ctor)
{
exp.error("no super class constructor for `%s`", cd.baseClass.toChars());
return setError();
}
}
else
{
// `this` call expression must be inside a
// constructor
if (!ad || !sc.func.isCtorDeclaration())
{
exp.error("constructor call must be in a constructor");
return setError();
}
// https://issues.dlang.org/show_bug.cgi?id=18719
// If `exp` is a call expression to another constructor
// then it means that all struct/class fields will be
// initialized after this call.
foreach (ref field; sc.ctorflow.fieldinit)
{
field.csx |= CSX.this_ctor;
}
}
if (!sc.intypeof && !(sc.ctorflow.callSuper & CSX.halt))
{
if (sc.inLoop || sc.ctorflow.callSuper & CSX.label)
exp.error("constructor calls not allowed in loops or after labels");
if (sc.ctorflow.callSuper & (CSX.super_ctor | CSX.this_ctor))
exp.error("multiple constructor calls");
if ((sc.ctorflow.callSuper & CSX.return_) && !(sc.ctorflow.callSuper & CSX.any_ctor))
exp.error("an earlier `return` statement skips constructor");
sc.ctorflow.callSuper |= CSX.any_ctor | (isSuper ? CSX.super_ctor : CSX.this_ctor);
}
tthis = ad.type.addMod(sc.func.type.mod);
auto ctor = isSuper ? cd.baseClass.ctor : ad.ctor;
if (auto os = ctor.isOverloadSet())
exp.f = resolveOverloadSet(exp.loc, sc, os, null, tthis, exp.argumentList);
else
exp.f = resolveFuncCall(exp.loc, sc, ctor, null, tthis, exp.argumentList, FuncResolveFlag.standard);
if (!exp.f || exp.f.errors)
return setError();
checkFunctionAttributes(exp, sc, exp.f);
checkAccess(exp.loc, sc, null, exp.f);
exp.e1 = new DotVarExp(exp.e1.loc, exp.e1, exp.f, false);
exp.e1 = exp.e1.expressionSemantic(sc);
// https://issues.dlang.org/show_bug.cgi?id=21095
if (exp.e1.op == EXP.error)
return setError();
t1 = exp.e1.type;
// BUG: this should really be done by checking the static
// call graph
if (exp.f == sc.func)
{
exp.error("cyclic constructor call");
return setError();
}
}
else if (auto oe = exp.e1.isOverExp())
{
exp.f = resolveOverloadSet(exp.loc, sc, oe.vars, tiargs, tthis, exp.argumentList);
if (!exp.f)
return setError();
if (ethis)
exp.e1 = new DotVarExp(exp.loc, ethis, exp.f, false);
else
exp.e1 = new VarExp(exp.loc, exp.f, false);
goto Lagain;
}
else if (!t1)
{
exp.error("function expected before `()`, not `%s`", exp.e1.toChars());
return setError();
}
else if (t1.ty == Terror)
{
return setError();
}
else if (t1.ty != Tfunction)
{
TypeFunction tf;
const(char)* p;
Dsymbol s;
exp.f = null;
if (auto fe = exp.e1.isFuncExp())
{
// function literal that direct called is always inferred.
assert(fe.fd);
exp.f = fe.fd;
tf = cast(TypeFunction)exp.f.type;
p = "function literal";
}
else if (t1.ty == Tdelegate)
{
TypeDelegate td = cast(TypeDelegate)t1;
assert(td.next.ty == Tfunction);
tf = cast(TypeFunction)td.next;
p = "delegate";
}
else if (auto tfx = t1.isPtrToFunction())
{
tf = tfx;
p = "function pointer";
}
else if (exp.e1.op == EXP.dotVariable && (cast(DotVarExp)exp.e1).var.isOverDeclaration())
{
DotVarExp dve = cast(DotVarExp)exp.e1;
exp.f = resolveFuncCall(exp.loc, sc, dve.var, tiargs, dve.e1.type, exp.argumentList, FuncResolveFlag.overloadOnly);
if (!exp.f)
return setError();
if (exp.f.needThis())
{
dve.var = exp.f;
dve.type = exp.f.type;
dve.hasOverloads = false;
goto Lagain;
}
exp.e1 = new VarExp(dve.loc, exp.f, false);
Expression e = new CommaExp(exp.loc, dve.e1, exp);
result = e.expressionSemantic(sc);
return;
}
else if (exp.e1.op == EXP.variable && (cast(VarExp)exp.e1).var.isOverDeclaration())
{
s = (cast(VarExp)exp.e1).var;
goto L2;
}
else if (exp.e1.op == EXP.template_)
{
s = (cast(TemplateExp)exp.e1).td;
L2:
exp.f = resolveFuncCall(exp.loc, sc, s, tiargs, null, exp.argumentList,
exp.isUfcsRewrite ? FuncResolveFlag.ufcs : FuncResolveFlag.standard);
if (!exp.f || exp.f.errors)
return setError();
if (exp.f.needThis())
{
if (hasThis(sc))
{
// Supply an implicit 'this', as in
// this.ident
exp.e1 = new DotVarExp(exp.loc, (new ThisExp(exp.loc)).expressionSemantic(sc), exp.f, false);
goto Lagain;
}
else if (isNeedThisScope(sc, exp.f))
{
exp.error("need `this` for `%s` of type `%s`", exp.f.toChars(), exp.f.type.toChars());
return setError();
}
}
exp.e1 = new VarExp(exp.e1.loc, exp.f, false);
goto Lagain;
}
else
{
exp.error("function expected before `()`, not `%s` of type `%s`", exp.e1.toChars(), exp.e1.type.toChars());
return setError();
}
const(char)* failMessage;
if (!tf.callMatch(null, exp.argumentList, 0, &failMessage, sc))
{
OutBuffer buf;
buf.writeByte('(');
argExpTypesToCBuffer(&buf, exp.arguments);
buf.writeByte(')');
if (tthis)
tthis.modToBuffer(&buf);
//printf("tf = %s, args = %s\n", tf.deco, (*arguments)[0].type.deco);
.error(exp.loc, "%s `%s%s` is not callable using argument types `%s`",
p, exp.e1.toChars(), parametersTypeToChars(tf.parameterList), buf.peekChars());
if (failMessage)
errorSupplemental(exp.loc, "%s", failMessage);
return setError();
}
// Purity and safety check should run after testing arguments matching
if (exp.f)
{
exp.checkPurity(sc, exp.f);
exp.checkSafety(sc, exp.f);
exp.checkNogc(sc, exp.f);
if (exp.f.checkNestedReference(sc, exp.loc))
return setError();
}
else if (sc.func && sc.intypeof != 1 && !(sc.flags & (SCOPE.ctfe | SCOPE.debug_)))
{
bool err = false;
if (!tf.purity && sc.func.setImpure(exp.loc, "`pure` %s `%s` cannot call impure `%s`", exp.e1))
{
exp.error("`pure` %s `%s` cannot call impure %s `%s`",
sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars());
err = true;
}
if (!tf.isnogc && sc.func.setGC(exp.loc, "`@nogc` %s `%s` cannot call non-@nogc `%s`", exp.e1))
{
exp.error("`@nogc` %s `%s` cannot call non-@nogc %s `%s`",
sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars());
err = true;
}
if (tf.trust <= TRUST.system && sc.setUnsafe(true, exp.loc,
"`@safe` function `%s` cannot call `@system` `%s`", sc.func, exp.e1))
{
exp.error("`@safe` %s `%s` cannot call `@system` %s `%s`",
sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars());
err = true;
}
if (err)
return setError();
}
if (t1.ty == Tpointer)
{
Expression e = new PtrExp(exp.loc, exp.e1);
e.type = tf;
exp.e1 = e;
}
t1 = tf;
}
else if (VarExp ve = exp.e1.isVarExp())
{
// Do overload resolution
exp.f = ve.var.isFuncDeclaration();
assert(exp.f);
tiargs = null;
if (exp.f.overnext)
exp.f = resolveFuncCall(exp.loc, sc, exp.f, tiargs, null, exp.argumentList, FuncResolveFlag.overloadOnly);
else
{
exp.f = exp.f.toAliasFunc();
TypeFunction tf = cast(TypeFunction)exp.f.type;
const(char)* failMessage;
if (!tf.callMatch(null, exp.argumentList, 0, &failMessage, sc))
{
OutBuffer buf;
buf.writeByte('(');
argExpTypesToCBuffer(&buf, exp.arguments);
buf.writeByte(')');
//printf("tf = %s, args = %s\n", tf.deco, (*arguments)[0].type.deco);
if (exp.isUfcsRewrite)
{
const arg = (*exp.argumentList.arguments)[0];
.error(exp.loc, "no property `%s` for `%s` of type `%s`", exp.f.ident.toChars(), arg.toChars(), arg.type.toChars());
.errorSupplemental(exp.loc, "the following error occured while looking for a UFCS match");
}
.error(exp.loc, "%s `%s%s` is not callable using argument types `%s`",
exp.f.kind(), exp.f.toPrettyChars(), parametersTypeToChars(tf.parameterList), buf.peekChars());
if (failMessage)
errorSupplemental(exp.loc, "%s", failMessage);
exp.f = null;
}
}
if (!exp.f || exp.f.errors)
return setError();
if (exp.f.needThis())
{
// Change the ancestor lambdas to delegate before hasThis(sc) call.
if (exp.f.checkNestedReference(sc, exp.loc))
return setError();
auto memberFunc = hasThis(sc);
if (memberFunc && haveSameThis(memberFunc, exp.f))
{
// Supply an implicit 'this', as in
// this.ident
exp.e1 = new DotVarExp(exp.loc, (new ThisExp(exp.loc)).expressionSemantic(sc), ve.var);
// Note: we cannot use f directly, because further overload resolution
// through the supplied 'this' may cause different result.
goto Lagain;
}
else if (isNeedThisScope(sc, exp.f))
{
// At this point it is possible that `exp.f` had an ambiguity error that was
// silenced because the previous call to `resolveFuncCall` was done using
// `FuncResolveFlag.overloadOnly`. To make sure that a proper error message
// is printed, redo the call with `FuncResolveFlag.standard`.
//
// https://issues.dlang.org/show_bug.cgi?id=22157
if (exp.f.overnext)
exp.f = resolveFuncCall(exp.loc, sc, exp.f, tiargs, null, exp.argumentList, FuncResolveFlag.standard);
if (!exp.f || exp.f.errors)
return setError();
// If no error is printed, it means that `f` is the single matching overload
// and it needs `this`.
exp.error("need `this` for `%s` of type `%s`", exp.f.toChars(), exp.f.type.toChars());
return setError();
}
}
checkFunctionAttributes(exp, sc, exp.f);
checkAccess(exp.loc, sc, null, exp.f);
if (exp.f.checkNestedReference(sc, exp.loc))
return setError();
ethis = null;
tthis = null;
if (ve.hasOverloads)
{
exp.e1 = new VarExp(ve.loc, exp.f, false);
exp.e1.type = exp.f.type;
}
t1 = exp.f.type;
}
assert(t1.ty == Tfunction);
Expression argprefix;
if (!exp.arguments)
exp.arguments = new Expressions();
if (functionParameters(exp.loc, sc, cast(TypeFunction)t1, ethis, tthis, exp.argumentList, exp.f, &exp.type, &argprefix))
return setError();
if (!exp.type)
{
exp.e1 = e1org; // https://issues.dlang.org/show_bug.cgi?id=10922
// avoid recursive expression printing
exp.error("forward reference to inferred return type of function call `%s`", exp.toChars());
return setError();
}
if (exp.f && exp.f.tintro)
{
Type t = exp.type;
int offset = 0;
TypeFunction tf = cast(TypeFunction)exp.f.tintro;
if (tf.next.isBaseOf(t, &offset) && offset)
{
exp.type = tf.next;
result = Expression.combine(argprefix, exp.castTo(sc, t));
return;
}
}
// Handle the case of a direct lambda call
if (exp.f && exp.f.isFuncLiteralDeclaration() && sc.func && !sc.intypeof)
{
exp.f.tookAddressOf = 0;
}
result = Expression.combine(argprefix, exp);
if (isSuper)
{
auto ad = sc.func ? sc.func.isThis() : null;
auto cd = ad ? ad.isClassDeclaration() : null;
if (cd && cd.classKind == ClassKind.cpp && exp.f && !exp.f.fbody)
{
// if super is defined in C++, it sets the vtable pointer to the base class
// so we have to restore it, but still return 'this' from super() call:
// (auto __vptrTmp = this.__vptr, auto __superTmp = super()), (this.__vptr = __vptrTmp, __superTmp)
Loc loc = exp.loc;
auto vptr = new DotIdExp(loc, new ThisExp(loc), Id.__vptr);
auto vptrTmpDecl = copyToTemp(0, "__vptrTmp", vptr);
auto declareVptrTmp = new DeclarationExp(loc, vptrTmpDecl);
auto superTmpDecl = copyToTemp(0, "__superTmp", result);
auto declareSuperTmp = new DeclarationExp(loc, superTmpDecl);
auto declareTmps = new CommaExp(loc, declareVptrTmp, declareSuperTmp);
auto restoreVptr = new AssignExp(loc, vptr.syntaxCopy(), new VarExp(loc, vptrTmpDecl));
Expression e = new CommaExp(loc, declareTmps, new CommaExp(loc, restoreVptr, new VarExp(loc, superTmpDecl)));
result = e.expressionSemantic(sc);
}
}
// declare dual-context container
if (exp.f && exp.f.hasDualContext() && !sc.intypeof && sc.func)
{
// check access to second `this`
if (AggregateDeclaration ad2 = exp.f.isMember2())
{
Expression te = new ThisExp(exp.loc).expressionSemantic(sc);
if (te.op != EXP.error)
te = getRightThis(exp.loc, sc, ad2, te, exp.f);
if (te.op == EXP.error)
{
exp.error("need `this` of type `%s` to call function `%s`", ad2.toChars(), exp.f.toChars());
return setError();
}
}
exp.vthis2 = makeThis2Argument(exp.loc, sc, exp.f);
Expression de = new DeclarationExp(exp.loc, exp.vthis2);
result = Expression.combine(de, result);
result = result.expressionSemantic(sc);
}
}
override void visit(DeclarationExp e)
{
if (e.type)
{
result = e;
return;
}
static if (LOGSEMANTIC)
{
printf("DeclarationExp::semantic() %s\n", e.toChars());
}
uint olderrors = global.errors;
/* This is here to support extern(linkage) declaration,
* where the extern(linkage) winds up being an AttribDeclaration
* wrapper.
*/
Dsymbol s = e.declaration;
while (1)
{
AttribDeclaration ad = s.isAttribDeclaration();
if (ad)
{
if (ad.decl && ad.decl.length == 1)
{
s = (*ad.decl)[0];
continue;
}
}
break;
}
//printf("inserting '%s' %p into sc = %p\n", s.toChars(), s, sc);
// Insert into both local scope and function scope.
// Must be unique in both.
if (s.ident)
{
VarDeclaration v = s.isVarDeclaration();
if (v)
{
if (sc.flags & SCOPE.Cfile)
{
/* Do semantic() on the type before inserting v into the symbol table
*/
if (!v.originalType)
v.originalType = v.type.syntaxCopy();
Scope* sc2 = sc.push();
sc2.stc |= v.storage_class & STC.FUNCATTR;
sc2.linkage = LINK.c; // account for the extern(C) in front of the declaration
v.inuse++;
v.type = v.type.typeSemantic(v.loc, sc2);
v.inuse--;
sc2.pop();
}
else
{
/* Do semantic() on initializer first so this will be illegal:
* int a = a;
*/
e.declaration.dsymbolSemantic(sc);
s.parent = sc.parent;
}
}
if (!sc.insert(s))
{
auto conflict = sc.search(Loc.initial, s.ident, null);
e.error("declaration `%s` is already defined", s.toPrettyChars());
errorSupplemental(conflict.loc, "`%s` `%s` is defined here",
conflict.kind(), conflict.toChars());
return setError();
}
if (v && (sc.flags & SCOPE.Cfile))
{
/* Do semantic() on initializer last so this will be legal:
* int a = a;
*/
e.declaration.dsymbolSemantic(sc);
s.parent = sc.parent;
}
if (sc.func)
{
// https://issues.dlang.org/show_bug.cgi?id=11720
if ((s.isFuncDeclaration() ||
s.isAggregateDeclaration() ||
s.isEnumDeclaration() ||
s.isTemplateDeclaration() ||
v
) && !sc.func.localsymtab.insert(s))
{
// Get the previous symbol
Dsymbol originalSymbol = sc.func.localsymtab.lookup(s.ident);
// Perturb the name mangling so that the symbols can co-exist
// instead of colliding
s.localNum = cast(ushort)(originalSymbol.localNum + 1);
// 65535 should be enough for anyone
if (!s.localNum)
{
e.error("more than 65535 symbols with name `%s` generated", s.ident.toChars());
return setError();
}
// Replace originalSymbol with s, which updates the localCount
sc.func.localsymtab.update(s);
// The mangling change only works for D mangling
}
if (!(sc.flags & SCOPE.Cfile))
{
/* https://issues.dlang.org/show_bug.cgi?id=21272
* If we are in a foreach body we need to extract the
* function containing the foreach
*/
FuncDeclaration fes_enclosing_func;
if (sc.func && sc.func.fes)
fes_enclosing_func = sc.enclosing.enclosing.func;
// Disallow shadowing
for (Scope* scx = sc.enclosing; scx && (scx.func == sc.func || (fes_enclosing_func && scx.func == fes_enclosing_func)); scx = scx.enclosing)
{
Dsymbol s2;
if (scx.scopesym && scx.scopesym.symtab && (s2 = scx.scopesym.symtab.lookup(s.ident)) !is null && s != s2)
{
// allow STC.local symbols to be shadowed
// TODO: not really an optimal design
auto decl = s2.isDeclaration();
if (!decl || !(decl.storage_class & STC.local))
{
if (sc.func.fes)
{
e.deprecation("%s `%s` is shadowing %s `%s`. Rename the `foreach` variable.", s.kind(), s.ident.toChars(), s2.kind(), s2.toPrettyChars());
}
else
{
e.error("%s `%s` is shadowing %s `%s`", s.kind(), s.ident.toChars(), s2.kind(), s2.toPrettyChars());
return setError();
}
}
}
}
}
}
}
if (!s.isVarDeclaration())
{
Scope* sc2 = sc;
if (sc2.stc & (STC.pure_ | STC.nothrow_ | STC.nogc))
sc2 = sc.push();
sc2.stc &= ~(STC.pure_ | STC.nothrow_ | STC.nogc);
e.declaration.dsymbolSemantic(sc2);
if (sc2 != sc)
sc2.pop();
s.parent = sc.parent;
}
if (global.errors == olderrors)
{
e.declaration.semantic2(sc);
if (global.errors == olderrors)
{
e.declaration.semantic3(sc);
}
}
// todo: error in declaration should be propagated.
e.type = Type.tvoid;
result = e;
}
override void visit(TypeidExp exp)
{
static if (LOGSEMANTIC)
{
printf("TypeidExp::semantic() %s\n", exp.toChars());
}
Type ta = isType(exp.obj);
Expression ea = isExpression(exp.obj);
Dsymbol sa = isDsymbol(exp.obj);
//printf("ta %p ea %p sa %p\n", ta, ea, sa);
if (ta)
{
dmd.typesem.resolve(ta, exp.loc, sc, ea, ta, sa, true);
}
if (ea)
{
if (auto sym = getDsymbol(ea))
ea = symbolToExp(sym, exp.loc, sc, false);
else
ea = ea.expressionSemantic(sc);
ea = resolveProperties(sc, ea);
ta = ea.type;
if (ea.op == EXP.type)
ea = null;
}
if (!ta)
{
//printf("ta %p ea %p sa %p\n", ta, ea, sa);
exp.error("no type for `typeid(%s)`", ea ? ea.toChars() : (sa ? sa.toChars() : ""));
return setError();
}
ta.checkComplexTransition(exp.loc, sc);
Expression e;
auto tb = ta.toBasetype();
if (ea && tb.ty == Tclass)
{
if (tb.toDsymbol(sc).isClassDeclaration().classKind == ClassKind.cpp)
{
error(exp.loc, "runtime type information is not supported for `extern(C++)` classes");
e = ErrorExp.get();
}
else if (!Type.typeinfoclass)
{
error(exp.loc, "`object.TypeInfo_Class` could not be found, but is implicitly used");
e = ErrorExp.get();
}
else
{
/* Get the dynamic type, which is .classinfo
*/
ea = ea.expressionSemantic(sc);
e = new TypeidExp(ea.loc, ea);
e.type = Type.typeinfoclass.type;
}
}
else if (ta.ty == Terror)
{
e = ErrorExp.get();
}
else
{
// Handle this in the glue layer
e = new TypeidExp(exp.loc, ta);
bool genObjCode = true;
// https://issues.dlang.org/show_bug.cgi?id=23650
// We generate object code for typeinfo, required
// by typeid, only if in non-speculative context
if (sc.flags & SCOPE.compile)
{
genObjCode = false;
}
e.type = getTypeInfoType(exp.loc, ta, sc, genObjCode);
semanticTypeInfo(sc, ta);
if (ea)
{
e = new CommaExp(exp.loc, ea, e); // execute ea
e = e.expressionSemantic(sc);
}
}
result = e;
}
override void visit(TraitsExp e)
{
result = semanticTraits(e, sc);
}
override void visit(HaltExp e)
{
static if (LOGSEMANTIC)
{
printf("HaltExp::semantic()\n");
}
e.type = Type.tnoreturn;
result = e;
}
override void visit(IsExp e)
{
/* is(targ id tok tspec)
* is(targ id : tok2)
* is(targ id == tok2)
*/
Type tded = null;
void yes()
{
//printf("yes\n");
if (!e.id)
{
result = IntegerExp.createBool(true);
return;
}
Dsymbol s;
Tuple tup = isTuple(tded);
if (tup)
s = new TupleDeclaration(e.loc, e.id, &tup.objects);
else
s = new AliasDeclaration(e.loc, e.id, tded);
s.dsymbolSemantic(sc);
/* The reason for the !tup is unclear. It fails Phobos unittests if it is not there.
* More investigation is needed.
*/
if (!tup && !sc.insert(s))
{
auto conflict = sc.search(Loc.initial, s.ident, null);
e.error("declaration `%s` is already defined", s.toPrettyChars());
errorSupplemental(conflict.loc, "`%s` `%s` is defined here",
conflict.kind(), conflict.toChars());
}
unSpeculative(sc, s);
result = IntegerExp.createBool(true);
}
void no()
{
result = IntegerExp.createBool(false);
//printf("no\n");
}
static if (LOGSEMANTIC)
{
printf("IsExp::semantic(%s)\n", e.toChars());
}
if (e.id && !(sc.flags & SCOPE.condition))
{
e.error("can only declare type aliases within `static if` conditionals or `static assert`s");
return setError();
}
if (e.tok2 == TOK.package_ || e.tok2 == TOK.module_) // These is() expressions are special because they can work on modules, not just types.
{
const oldErrors = global.startGagging();
Dsymbol sym = e.targ.toDsymbol(sc);
global.endGagging(oldErrors);
if (sym is null)
return no();
Package p = resolveIsPackage(sym);
if (p is null)
return no();
if (e.tok2 == TOK.package_ && p.isModule()) // Note that isModule() will return null for package modules because they're not actually instances of Module.
return no();
else if(e.tok2 == TOK.module_ && !(p.isModule() || p.isPackageMod()))
return no();
tded = e.targ;
return yes();
}
{
Scope* sc2 = sc.copy(); // keep sc.flags
sc2.tinst = null;
sc2.minst = null;
sc2.flags |= SCOPE.fullinst;
Type t = e.targ.trySemantic(e.loc, sc2);
sc2.pop();
if (!t) // errors, so condition is false
return no();
e.targ = t;
}
if (e.tok2 != TOK.reserved)
{
switch (e.tok2)
{
case TOK.struct_:
if (e.targ.ty != Tstruct)
return no();
if ((cast(TypeStruct)e.targ).sym.isUnionDeclaration())
return no();
tded = e.targ;
break;
case TOK.union_:
if (e.targ.ty != Tstruct)
return no();
if (!(cast(TypeStruct)e.targ).sym.isUnionDeclaration())
return no();
tded = e.targ;
break;
case TOK.class_:
if (e.targ.ty != Tclass)
return no();
if ((cast(TypeClass)e.targ).sym.isInterfaceDeclaration())
return no();
tded = e.targ;
break;
case TOK.interface_:
if (e.targ.ty != Tclass)
return no();
if (!(cast(TypeClass)e.targ).sym.isInterfaceDeclaration())
return no();
tded = e.targ;
break;
case TOK.const_:
if (!e.targ.isConst())
return no();
tded = e.targ;
break;
case TOK.immutable_:
if (!e.targ.isImmutable())
return no();
tded = e.targ;
break;
case TOK.shared_:
if (!e.targ.isShared())
return no();
tded = e.targ;
break;
case TOK.inout_:
if (!e.targ.isWild())
return no();
tded = e.targ;
break;
case TOK.super_:
// If class or interface, get the base class and interfaces
if (e.targ.ty != Tclass)
return no();
else
{
ClassDeclaration cd = (cast(TypeClass)e.targ).sym;
auto args = new Parameters();
args.reserve(cd.baseclasses.length);
if (cd.semanticRun < PASS.semanticdone)
cd.dsymbolSemantic(null);
for (size_t i = 0; i < cd.baseclasses.length; i++)
{
BaseClass* b = (*cd.baseclasses)[i];
args.push(new Parameter(STC.in_, b.type, null, null, null));
}
tded = new TypeTuple(args);
}
break;
case TOK.enum_:
if (e.targ.ty != Tenum)
return no();
if (e.id)
tded = (cast(TypeEnum)e.targ).sym.getMemtype(e.loc);
else
tded = e.targ;
if (tded.ty == Terror)
return setError();
break;
case TOK.delegate_:
if (e.targ.ty != Tdelegate)
return no();
tded = (cast(TypeDelegate)e.targ).next; // the underlying function type
break;
case TOK.function_:
case TOK.parameters:
{
if (e.targ.ty != Tfunction)
return no();
tded = e.targ;
/* Generate tuple from function parameter types.
*/
assert(tded.ty == Tfunction);
auto tdedf = tded.isTypeFunction();
auto args = new Parameters();
foreach (i, arg; tdedf.parameterList)
{
assert(arg && arg.type);
/* If one of the default arguments was an error,
don't return an invalid tuple
*/
if (e.tok2 == TOK.parameters && arg.defaultArg && arg.defaultArg.op == EXP.error)
return setError();
args.push(new Parameter(arg.storageClass, arg.type, (e.tok2 == TOK.parameters) ? arg.ident : null, (e.tok2 == TOK.parameters) ? arg.defaultArg : null, arg.userAttribDecl));
}
tded = new TypeTuple(args);
break;
}
case TOK.return_:
/* Get the 'return type' for the function,
* delegate, or pointer to function.
*/
if (auto tf = e.targ.isFunction_Delegate_PtrToFunction())
tded = tf.next;
else
return no();
break;
case TOK.argumentTypes:
/* Generate a type tuple of the equivalent types used to determine if a
* function argument of this type can be passed in registers.
* The results of this are highly platform dependent, and intended
* primarly for use in implementing va_arg().
*/
tded = target.toArgTypes(e.targ);
if (!tded)
return no();
// not valid for a parameter
break;
case TOK.vector:
if (e.targ.ty != Tvector)
return no();
tded = (cast(TypeVector)e.targ).basetype;
break;
default:
assert(0);
}
// https://issues.dlang.org/show_bug.cgi?id=18753
if (tded)
return yes();
return no();
}
else if (e.tspec && !e.id && !(e.parameters && e.parameters.length))
{
/* Evaluate to true if targ matches tspec
* is(targ == tspec)
* is(targ : tspec)
*/
e.tspec = e.tspec.typeSemantic(e.loc, sc);
//printf("targ = %s, %s\n", e.targ.toChars(), e.targ.deco);
//printf("tspec = %s, %s\n", e.tspec.toChars(), e.tspec.deco);
if (e.tok == TOK.colon)
{
// current scope is itself deprecated, or deprecations are not errors
const bool deprecationAllowed = sc.isDeprecated
|| global.params.useDeprecated != DiagnosticReporting.error;
const bool preventAliasThis = e.targ.hasDeprecatedAliasThis && !deprecationAllowed;
if (preventAliasThis && e.targ.ty == Tstruct)
{
if ((cast(TypeStruct) e.targ).implicitConvToWithoutAliasThis(e.tspec))
return yes();
else
return no();
}
else if (preventAliasThis && e.targ.ty == Tclass)
{
if ((cast(TypeClass) e.targ).implicitConvToWithoutAliasThis(e.tspec))
return yes();
else
return no();
}
else if (e.targ.implicitConvTo(e.tspec))
return yes();
else
return no();
}
else /* == */
{
if (e.targ.equals(e.tspec))
return yes();
else
return no();
}
}
else if (e.tspec)
{
/* Evaluate to true if targ matches tspec.
* If true, declare id as an alias for the specialized type.
* is(targ == tspec, tpl)
* is(targ : tspec, tpl)
* is(targ id == tspec)
* is(targ id : tspec)
* is(targ id == tspec, tpl)
* is(targ id : tspec, tpl)
*/
Identifier tid = e.id ? e.id : Identifier.generateId("__isexp_id");
e.parameters.insert(0, new TemplateTypeParameter(e.loc, tid, null, null));
Objects dedtypes = Objects(e.parameters.length);
dedtypes.zero();
MATCH m = deduceType(e.targ, sc, e.tspec, e.parameters, &dedtypes, null, 0, e.tok == TOK.equal);
if (m == MATCH.nomatch || (m != MATCH.exact && e.tok == TOK.equal))
{
return no();
}
else
{
tded = cast(Type)dedtypes[0];
if (!tded)
tded = e.targ;
Objects tiargs = Objects(1);
tiargs[0] = e.targ;
/* Declare trailing parameters
*/
for (size_t i = 1; i < e.parameters.length; i++)
{
TemplateParameter tp = (*e.parameters)[i];
Declaration s = null;
m = tp.matchArg(e.loc, sc, &tiargs, i, e.parameters, &dedtypes, &s);
if (m == MATCH.nomatch)
return no();
s.dsymbolSemantic(sc);
if (!sc.insert(s))
{
auto conflict = sc.search(Loc.initial, s.ident, null);
e.error("declaration `%s` is already defined", s.toPrettyChars());
errorSupplemental(conflict.loc, "`%s` `%s` is defined here",
conflict.kind(), conflict.toChars());
}
unSpeculative(sc, s);
}
return yes();
}
}
else if (e.id)
{
/* Declare id as an alias for type targ. Evaluate to true
* is(targ id)
*/
tded = e.targ;
}
return yes();
}
override void visit(BinAssignExp exp)
{
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.op == EXP.arrayLength)
{
// arr.length op= e2;
e = rewriteOpAssign(exp);
e = e.expressionSemantic(sc);
result = e;
return;
}
if (exp.e1.op == EXP.slice || exp.e1.type.ty == Tarray || exp.e1.type.ty == Tsarray)
{
if (checkNonAssignmentArrayOp(exp.e1))
return setError();
if (exp.e1.op == EXP.slice)
(cast(SliceExp)exp.e1).arrayop = true;
// T[] op= ...
if (exp.e2.implicitConvTo(exp.e1.type.nextOf()))
{
// T[] op= T
exp.e2 = exp.e2.castTo(sc, exp.e1.type.nextOf());
}
else if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
exp.type = exp.e1.type;
result = arrayOp(exp, sc);
return;
}
exp.e1 = exp.e1.expressionSemantic(sc);
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
exp.e1 = exp.e1.optimize(WANTvalue, /*keepLvalue*/ true);
exp.type = exp.e1.type;
if (auto ad = isAggregate(exp.e1.type))
{
if (const s = search_function(ad, Id.opOpAssign))
{
error(exp.loc, "none of the `opOpAssign` overloads of `%s` are callable for `%s` of type `%s`", ad.toChars(), exp.e1.toChars(), exp.e1.type.toChars());
return setError();
}
}
if (exp.e1.checkScalar() ||
exp.e1.checkReadModifyWrite(exp.op, exp.e2) ||
exp.e1.checkSharedAccess(sc))
return setError();
int arith = (exp.op == EXP.addAssign || exp.op == EXP.minAssign || exp.op == EXP.mulAssign || exp.op == EXP.divAssign || exp.op == EXP.modAssign || exp.op == EXP.powAssign);
int bitwise = (exp.op == EXP.andAssign || exp.op == EXP.orAssign || exp.op == EXP.xorAssign);
int shift = (exp.op == EXP.leftShiftAssign || exp.op == EXP.rightShiftAssign || exp.op == EXP.unsignedRightShiftAssign);
if (bitwise && exp.type.toBasetype().ty == Tbool)
exp.e2 = exp.e2.implicitCastTo(sc, exp.type);
else if (exp.checkNoBool())
return setError();
if ((exp.op == EXP.addAssign || exp.op == EXP.minAssign) && exp.e1.type.toBasetype().ty == Tpointer && exp.e2.type.toBasetype().isintegral())
{
result = scaleFactor(exp, sc);
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
if (arith && (exp.checkArithmeticBin() || exp.checkSharedAccessBin(sc)))
return setError();
if ((bitwise || shift) && (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc)))
return setError();
if (shift)
{
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
}
if (!target.isVectorOpSupported(exp.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.op == EXP.error || exp.e2.op == EXP.error)
return setError();
e = exp.checkOpAssignTypes(sc);
if (e.op == EXP.error)
{
result = e;
return;
}
assert(e.op == EXP.assign || e == exp);
result = (cast(BinExp)e).reorderSettingAAElem(sc);
}
private Expression compileIt(MixinExp exp)
{
OutBuffer buf;
if (expressionsToString(buf, sc, exp.exps))
return null;
uint errors = global.errors;
const len = buf.length;
const str = buf.extractChars()[0 .. len];
const bool doUnittests = global.params.useUnitTests || global.params.ddoc.doOutput || global.params.dihdr.doOutput;
auto loc = adjustLocForMixin(str, exp.loc, global.params.mixinOut);
scope p = new Parser!ASTCodegen(loc, sc._module, str, false, global.errorSink, &global.compileEnv, doUnittests);
p.transitionIn = global.params.vin;
p.nextToken();
//printf("p.loc.linnum = %d\n", p.loc.linnum);
Expression e = p.parseExpression();
if (global.errors != errors)
return null;
if (p.token.value != TOK.endOfFile)
{
exp.error("incomplete mixin expression `%s`", str.ptr);
return null;
}
return e;
}
override void visit(MixinExp exp)
{
/* https://dlang.org/spec/expression.html#mixin_expressions
*/
static if (LOGSEMANTIC)
{
printf("MixinExp::semantic('%s')\n", exp.toChars());
}
auto e = compileIt(exp);
if (!e)
return setError();
result = e.expressionSemantic(sc);
}
override void visit(ImportExp e)
{
static if (LOGSEMANTIC)
{
printf("ImportExp::semantic('%s')\n", e.toChars());
}
auto se = semanticString(sc, e.e1, "file name argument");
if (!se)
return setError();
se = se.toUTF8(sc);
auto namez = se.toStringz();
if (!global.filePath)
{
e.error("need `-J` switch to import text file `%s`", namez.ptr);
return setError();
}
/* Be wary of CWE-22: Improper Limitation of a Pathname to a Restricted Directory
* ('Path Traversal') attacks.
* https://cwe.mitre.org/data/definitions/22.html
*/
if (FileName.absolute(namez))
{
e.error("absolute path is not allowed in import expression: `%s`", se.toChars());
return setError();
}
auto idxReserved = FileName.findReservedChar(namez);
if (idxReserved != size_t.max)
{
e.error("`%s` is not a valid filename on this platform", se.toChars());
e.errorSupplemental("Character `'%c'` is reserved and cannot be used", namez[idxReserved]);
return setError();
}
if (FileName.refersToParentDir(namez))
{
e.error("path refers to parent (`..`) directory: `%s`", se.toChars());
return setError();
}
auto resolvedNamez = FileName.searchPath(global.filePath, namez, false);
if (!resolvedNamez)
{
e.error("file `%s` cannot be found or not in a path specified with `-J`", se.toChars());
e.errorSupplemental("Path(s) searched (as provided by `-J`):");
foreach (idx, path; *global.filePath)
{
const attr = FileName.exists(path);
const(char)* err = attr == 2 ? "" :
(attr == 1 ? " (not a directory)" : " (path not found)");
e.errorSupplemental("[%llu]: `%s`%s", cast(ulong)idx, path, err);
}
return setError();
}
sc._module.contentImportedFiles.push(resolvedNamez.ptr);
if (global.params.verbose)
{
const slice = se.peekString();
message("file %.*s\t(%s)", cast(int)slice.length, slice.ptr, resolvedNamez.ptr);
}
if (global.params.moduleDeps.buffer !is null)
{
OutBuffer* ob = global.params.moduleDeps.buffer;
Module imod = sc._module;
if (!global.params.moduleDeps.name)
ob.writestring("depsFile ");
ob.writestring(imod.toPrettyChars());
ob.writestring(" (");
escapePath(ob, imod.srcfile.toChars());
ob.writestring(") : ");
if (global.params.moduleDeps.name)
ob.writestring("string : ");
ob.write(se.peekString());
ob.writestring(" (");
escapePath(ob, resolvedNamez.ptr);
ob.writestring(")");
ob.writenl();
}
if (global.params.makeDeps.doOutput)
{
global.params.makeDeps.files.push(resolvedNamez.ptr);
}
{
auto fileName = FileName(resolvedNamez);
if (auto fmResult = global.fileManager.lookup(fileName))
{
se = new StringExp(e.loc, fmResult);
}
else
{
e.error("cannot read file `%s`", resolvedNamez.ptr);
return setError();
}
}
result = se.expressionSemantic(sc);
}
override void visit(AssertExp exp)
{
// https://dlang.org/spec/expression.html#assert_expressions
static if (LOGSEMANTIC)
{
printf("AssertExp::semantic('%s')\n", exp.toChars());
}
const generateMsg = !exp.msg &&
sc.needsCodegen() && // let ctfe interpreter handle the error message
global.params.checkAction == CHECKACTION.context &&
global.params.useAssert == CHECKENABLE.on;
Expression temporariesPrefix;
if (generateMsg)
// no message - use assert expression as msg
{
if (!verifyHookExist(exp.loc, *sc, Id._d_assert_fail, "generating assert messages"))
return setError();
/*
{
auto a = e1, b = e2;
assert(a == b, _d_assert_fail!"=="(a, b));
}()
*/
/*
Stores the result of an operand expression into a temporary
if necessary, e.g. if it is an impure fuction call containing side
effects as in https://issues.dlang.org/show_bug.cgi?id=20114
Params:
op = an expression which may require a temporary (added to
`temporariesPrefix`: `auto tmp = op`) and will be replaced
by `tmp` if necessary
Returns: (possibly replaced) `op`
*/
Expression maybePromoteToTmp(ref Expression op)
{
// https://issues.dlang.org/show_bug.cgi?id=20989
// Flag that _d_assert_fail will never dereference `array.ptr` to avoid safety
// errors for `assert(!array.ptr)` => `_d_assert_fail!"!"(array.ptr)`
{
auto die = op.isDotIdExp();
if (die && die.ident == Id.ptr)
die.noderef = true;
}
op = op.expressionSemantic(sc);
op = resolveProperties(sc, op);
// Detect assert's using static operator overloads (e.g. `"var" in environment`)
if (auto te = op.isTypeExp())
{
// Replace the TypeExp with it's textual representation
// Including "..." in the error message isn't quite right but
// proper solutions require more drastic changes, e.g. directly
// using miniFormat and combine instead of calling _d_assert_fail
auto name = new StringExp(te.loc, te.toString());
return name.expressionSemantic(sc);
}
// Create a temporary for expressions with side effects
// Defensively assume that function calls may have side effects even
// though it's not detected by hasSideEffect (e.g. `debug puts("Hello")` )
// Rewriting CallExp's also avoids some issues with the inliner/debug generation
if (op.hasSideEffect(true))
{
// Don't create an invalid temporary for void-expressions
// Further semantic will issue an appropriate error
if (op.type.ty == Tvoid)
return op;
// https://issues.dlang.org/show_bug.cgi?id=21590
// Don't create unnecessary temporaries and detect `assert(a = b)`
if (op.isAssignExp() || op.isBinAssignExp())
{
auto left = (cast(BinExp) op).e1;
// Find leftmost expression to handle other rewrites,
// e.g. --(++a) => a += 1 -= 1
while (left.isAssignExp() || left.isBinAssignExp())
left = (cast(BinExp) left).e1;
// Only use the assignee if it's a variable and skip
// other lvalues (e.g. ref's returned by functions)
if (left.isVarExp())
return left;
// Sanity check that `op` can be converted to boolean
// But don't raise errors for assignments enclosed in another expression
if (op is exp.e1)
op.toBoolean(sc);
}
// Tuples with side-effects already receive a temporary during semantic
if (op.type.isTypeTuple())
{
auto te = op.isTupleExp();
assert(te);
// Create a new tuple without the associated temporary
auto res = new TupleExp(op.loc, te.exps);
return res.expressionSemantic(sc);
}
const stc = op.isLvalue() ? STC.ref_ : 0;
auto tmp = copyToTemp(stc, "__assertOp", op);
tmp.dsymbolSemantic(sc);
auto decl = new DeclarationExp(op.loc, tmp);
temporariesPrefix = Expression.combine(temporariesPrefix, decl);
op = new VarExp(op.loc, tmp);
op = op.expressionSemantic(sc);
}
return op;
}
// if the assert condition is a mixin expression, try to compile it
if (auto ce = exp.e1.isMixinExp())
{
if (auto e1 = compileIt(ce))
exp.e1 = e1;
}
Expressions* es;
Objects* tiargs;
Loc loc = exp.e1.loc;
const op = exp.e1.op;
bool isEqualsCallExpression;
if (const callExp = exp.e1.isCallExp())
{
// https://issues.dlang.org/show_bug.cgi?id=20331
// callExp.f may be null if the assert contains a call to
// a function pointer or literal
if (const callExpFunc = callExp.f)
{
const callExpIdent = callExpFunc.ident;
isEqualsCallExpression = callExpIdent == Id.__equals ||
callExpIdent == Id.eq;
}
}
if (op == EXP.equal || op == EXP.notEqual ||
op == EXP.lessThan || op == EXP.greaterThan ||
op == EXP.lessOrEqual || op == EXP.greaterOrEqual ||
op == EXP.identity || op == EXP.notIdentity ||
op == EXP.in_ ||
isEqualsCallExpression)
{
es = new Expressions(3);
tiargs = new Objects(1);
if (isEqualsCallExpression)
{
auto callExp = cast(CallExp) exp.e1;
auto args = callExp.arguments;
// structs with opEquals get rewritten to a DotVarExp:
// a.opEquals(b)
// https://issues.dlang.org/show_bug.cgi?id=20100
if (args.length == 1)
{
auto dv = callExp.e1.isDotVarExp();
assert(dv);
// runtime args
(*es)[1] = maybePromoteToTmp(dv.e1);
(*es)[2] = maybePromoteToTmp((*args)[0]);
}
else
{
// runtime args
(*es)[1] = maybePromoteToTmp((*args)[0]);
(*es)[2] = maybePromoteToTmp((*args)[1]);
}
}
else
{
auto binExp = cast(EqualExp) exp.e1;
// runtime args
(*es)[1] = maybePromoteToTmp(binExp.e1);
(*es)[2] = maybePromoteToTmp(binExp.e2);
}
// template args
Expression comp = new StringExp(loc, isEqualsCallExpression ? "==" : EXPtoString(exp.e1.op));
comp = comp.expressionSemantic(sc);
(*es)[0] = comp;
(*tiargs)[0] = (*es)[1].type;
}
// Format exp.e1 before any additional boolean conversion
// Ignore &&/|| because "assert(...) failed" is more informative than "false != true"
else if (op != EXP.andAnd && op != EXP.orOr)
{
es = new Expressions(2);
tiargs = new Objects(1);
if (auto ne = exp.e1.isNotExp())
{
// Fetch the (potential non-bool) expression and fold
// (n) negations into (n % 2) negations, e.g. !!a => a
for (bool neg = true; ; neg = !neg)
{
if (auto ne2 = ne.e1.isNotExp())
ne = ne2;
else
{
(*es)[0] = new StringExp(loc, neg ? "!" : "");
(*es)[1] = maybePromoteToTmp(ne.e1);
break;
}
}
}
else
{ // Simply format exp.e1
(*es)[0] = new StringExp(loc, "");
(*es)[1] = maybePromoteToTmp(exp.e1);
}
(*tiargs)[0] = (*es)[1].type;
// Passing __ctfe to auto ref infers ref and aborts compilation:
// "cannot modify compiler-generated variable __ctfe"
auto ve = (*es)[1].isVarExp();
if (ve && ve.var.ident == Id.ctfe)
{
exp.msg = new StringExp(loc, "assert(__ctfe) failed!");
goto LSkip;
}
}
else
{
OutBuffer buf;
buf.printf("%s failed", exp.toChars());
exp.msg = new StringExp(Loc.initial, buf.extractSlice());
goto LSkip;
}
Expression __assertFail = new IdentifierExp(exp.loc, Id.empty);
auto assertFail = new DotIdExp(loc, __assertFail, Id.object);
auto dt = new DotTemplateInstanceExp(loc, assertFail, Id._d_assert_fail, tiargs);
auto ec = CallExp.create(loc, dt, es);
exp.msg = ec;
}
LSkip:
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
exp.e1 = resolveProperties(sc, exp.e1);
// BUG: see if we can do compile time elimination of the Assert
exp.e1 = exp.e1.optimize(WANTvalue);
exp.e1 = exp.e1.toBoolean(sc);
if (exp.e1.op == EXP.error)
{
result = exp.e1;
return;
}
if (exp.msg)
{
exp.msg = expressionSemantic(exp.msg, sc);
exp.msg = resolveProperties(sc, exp.msg);
exp.msg = exp.msg.implicitCastTo(sc, Type.tchar.constOf().arrayOf());
exp.msg = exp.msg.optimize(WANTvalue);
checkParamArgumentEscape(sc, null, null, null, STC.undefined_, exp.msg, true, false);
}
if (exp.msg && exp.msg.op == EXP.error)
{
result = exp.msg;
return;
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = exp.msg && checkNonAssignmentArrayOp(exp.msg);
if (f1 || f2)
return setError();
if (exp.e1.toBool().hasValue(false))
{
/* This is an `assert(0)` which means halt program execution
*/
FuncDeclaration fd = sc.parent.isFuncDeclaration();
if (fd)
fd.hasReturnExp |= 4;
sc.ctorflow.orCSX(CSX.halt);
if (global.params.useAssert == CHECKENABLE.off)
{
Expression e = new HaltExp(exp.loc);
e = e.expressionSemantic(sc);
result = e;
return;
}
// Only override the type when it isn't already some flavour of noreturn,
// e.g. when this assert was generated by defaultInitLiteral
if (!exp.type || !exp.type.isTypeNoreturn())
exp.type = Type.tnoreturn;
}
else
exp.type = Type.tvoid;
result = !temporariesPrefix
? exp
: Expression.combine(temporariesPrefix, exp).expressionSemantic(sc);
}
override void visit(ThrowExp te)
{
import dmd.statementsem;
if (throwSemantic(te.loc, te.e1, sc))
result = te;
else
setError();
}
override void visit(DotIdExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotIdExp::semantic(this = %p, '%s')\n", exp, exp.toChars());
//printf("e1.op = %d, '%s'\n", e1.op, Token.toChars(e1.op));
}
if (sc.flags & SCOPE.Cfile)
{
/* See if need to rewrite the AST because of cast/call ambiguity
*/
if (auto e = castCallAmbiguity(exp, sc))
{
result = expressionSemantic(e, sc);
return;
}
if (exp.arrow) // ImportC only
exp.e1 = exp.e1.expressionSemantic(sc).arrayFuncConv(sc);
if (exp.ident == Id.__xalignof && exp.e1.isTypeExp())
{
// C11 6.5.3 says _Alignof only applies to types
Expression e;
Type t;
Dsymbol s;
dmd.typesem.resolve(exp.e1.type, exp.e1.loc, sc, e, t, s, true);
if (e)
{
exp.e1.error("argument to `_Alignof` must be a type");
return setError();
}
else if (t)
{
// Note similarity to getProperty() implementation of __xalignof
const explicitAlignment = t.alignment();
const naturalAlignment = t.alignsize();
const actualAlignment = (explicitAlignment.isDefault() ? naturalAlignment : explicitAlignment.get());
result = new IntegerExp(exp.loc, actualAlignment, Type.tsize_t);
}
else if (s)
{
exp.e1.error("argument to `_Alignof` must be a type");
return setError();
}
else
assert(0);
return;
}
if (exp.ident != Id.__sizeof)
{
result = fieldLookup(exp.e1, sc, exp.ident, exp.arrow);
return;
}
}
Expression e = exp.dotIdSemanticProp(sc, 1);
if (e && isDotOpDispatch(e))
{
auto ode = e;
uint errors = global.startGagging();
e = resolvePropertiesX(sc, e);
// Any error or if 'e' is not resolved, go to UFCS
if (global.endGagging(errors) || e is ode)
e = null; /* fall down to UFCS */
else
{
result = e;
return;
}
}
if (!e) // if failed to find the property
{
/* If ident is not a valid property, rewrite:
* e1.ident
* as:
* .ident(e1)
*/
e = resolveUFCSProperties(sc, exp);
}
result = e;
}
override void visit(DotTemplateExp e)
{
if (e.type)
{
result = e;
return;
}
if (Expression ex = unaSemantic(e, sc))
{
result = ex;
return;
}
// 'void' like TemplateExp
e.type = Type.tvoid;
result = e;
}
override void visit(DotVarExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotVarExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.var = exp.var.toAlias().isDeclaration();
exp.e1 = exp.e1.expressionSemantic(sc);
if (auto tup = exp.var.isTupleDeclaration())
{
/* Replace:
* e1.tuple(a, b, c)
* with:
* tuple(e1.a, e1.b, e1.c)
*/
Expression e0;
Expression ev = sc.func ? extractSideEffect(sc, "__tup", e0, exp.e1) : exp.e1;
auto exps = new Expressions();
exps.reserve(tup.objects.length);
for (size_t i = 0; i < tup.objects.length; i++)
{
RootObject o = (*tup.objects)[i];
Expression e;
Declaration var;
switch (o.dyncast()) with (DYNCAST)
{
case expression:
e = cast(Expression)o;
if (auto se = e.isDsymbolExp())
var = se.s.isDeclaration();
else if (auto ve = e.isVarExp())
if (!ve.var.isFuncDeclaration())
// Exempt functions for backwards compatibility reasons.
// See: https://issues.dlang.org/show_bug.cgi?id=20470#c1
var = ve.var;
break;
case dsymbol:
Dsymbol s = cast(Dsymbol) o;
Declaration d = s.isDeclaration();
if (!d || d.isFuncDeclaration())
// Exempt functions for backwards compatibility reasons.
// See: https://issues.dlang.org/show_bug.cgi?id=20470#c1
e = new DsymbolExp(exp.loc, s);
else
var = d;
break;
case type:
e = new TypeExp(exp.loc, cast(Type)o);
break;
default:
exp.error("`%s` is not an expression", o.toChars());
return setError();
}
if (var)
e = new DotVarExp(exp.loc, ev, var);
exps.push(e);
}
Expression e = new TupleExp(exp.loc, e0, exps);
e = e.expressionSemantic(sc);
result = e;
return;
}
else if (auto ad = exp.var.isAliasDeclaration())
{
if (auto t = ad.getType())
{
result = new TypeExp(exp.loc, t).expressionSemantic(sc);
return;
}
}
exp.e1 = exp.e1.addDtorHook(sc);
Type t1 = exp.e1.type;
if (FuncDeclaration fd = exp.var.isFuncDeclaration())
{
// for functions, do checks after overload resolution
if (!fd.functionSemantic())
return setError();
/* https://issues.dlang.org/show_bug.cgi?id=13843
* If fd obviously has no overloads, we should
* normalize AST, and it will give a chance to wrap fd with FuncExp.
*/
if ((fd.isNested() && !fd.isThis()) || fd.isFuncLiteralDeclaration())
{
// (e1, fd)
auto e = symbolToExp(fd, exp.loc, sc, false);
result = Expression.combine(exp.e1, e);
return;
}
exp.type = fd.type;
assert(exp.type);
}
else if (OverDeclaration od = exp.var.isOverDeclaration())
{
exp.type = Type.tvoid; // ambiguous type?
}
else
{
exp.type = exp.var.type;
if (!exp.type && global.errors) // var is goofed up, just return error.
return setError();
assert(exp.type);
if (t1.ty == Tpointer)
t1 = t1.nextOf();
exp.type = exp.type.addMod(t1.mod);
// https://issues.dlang.org/show_bug.cgi?id=23109
// Run semantic on the DotVarExp type
if (auto handle = exp.type.isClassHandle())
{
if (handle.semanticRun < PASS.semanticdone && !handle.isBaseInfoComplete())
handle.dsymbolSemantic(null);
}
Dsymbol vparent = exp.var.toParent();
AggregateDeclaration ad = vparent ? vparent.isAggregateDeclaration() : null;
if (Expression e1x = getRightThis(exp.loc, sc, ad, exp.e1, exp.var, 1))
exp.e1 = e1x;
else
{
/* Later checkRightThis will report correct error for invalid field variable access.
*/
Expression e = new VarExp(exp.loc, exp.var);
e = e.expressionSemantic(sc);
result = e;
return;
}
checkAccess(exp.loc, sc, exp.e1, exp.var);
VarDeclaration v = exp.var.isVarDeclaration();
if (v && (v.isDataseg() || (v.storage_class & STC.manifest)))
{
Expression e = expandVar(WANTvalue, v);
if (e)
{
result = e;
return;
}
}
if (v && (v.isDataseg() || // fix https://issues.dlang.org/show_bug.cgi?id=8238
(!v.needThis() && v.semanticRun > PASS.initial))) // fix https://issues.dlang.org/show_bug.cgi?id=17258
{
// (e1, v)
checkAccess(exp.loc, sc, exp.e1, v);
Expression e = new VarExp(exp.loc, v);
e = new CommaExp(exp.loc, exp.e1, e);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
//printf("-DotVarExp::semantic('%s')\n", toChars());
result = exp;
}
override void visit(DotTemplateInstanceExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotTemplateInstanceExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
// Indicate we need to resolve by UFCS.
Expression e = exp.dotTemplateSemanticProp(sc, DotExpFlag.gag);
if (!e)
e = resolveUFCSProperties(sc, exp);
if (e is exp)
e.type = Type.tvoid; // Unresolved type, because it needs inference
result = e;
}
override void visit(DelegateExp e)
{
static if (LOGSEMANTIC)
{
printf("DelegateExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
e.e1 = e.e1.expressionSemantic(sc);
e.type = new TypeDelegate(e.func.type.isTypeFunction());
e.type = e.type.typeSemantic(e.loc, sc);
FuncDeclaration f = e.func.toAliasFunc();
AggregateDeclaration ad = f.isMemberLocal();
if (f.needThis())
e.e1 = getRightThis(e.loc, sc, ad, e.e1, f);
if (f.type.ty == Tfunction)
{
TypeFunction tf = cast(TypeFunction)f.type;
if (!MODmethodConv(e.e1.type.mod, f.type.mod))
{
OutBuffer thisBuf, funcBuf;
MODMatchToBuffer(&thisBuf, e.e1.type.mod, tf.mod);
MODMatchToBuffer(&funcBuf, tf.mod, e.e1.type.mod);
e.error("%smethod `%s` is not callable using a %s`%s`",
funcBuf.peekChars(), f.toPrettyChars(), thisBuf.peekChars(), e.e1.toChars());
return setError();
}
}
if (ad && ad.isClassDeclaration() && ad.type != e.e1.type)
{
// A downcast is required for interfaces
// https://issues.dlang.org/show_bug.cgi?id=3706
e.e1 = new CastExp(e.loc, e.e1, ad.type);
e.e1 = e.e1.expressionSemantic(sc);
}
result = e;
// declare dual-context container
if (f.hasDualContext() && !sc.intypeof && sc.func)
{
// check access to second `this`
if (AggregateDeclaration ad2 = f.isMember2())
{
Expression te = new ThisExp(e.loc).expressionSemantic(sc);
if (te.op != EXP.error)
te = getRightThis(e.loc, sc, ad2, te, f);
if (te.op == EXP.error)
{
e.error("need `this` of type `%s` to make delegate from function `%s`", ad2.toChars(), f.toChars());
return setError();
}
}
VarDeclaration vthis2 = makeThis2Argument(e.loc, sc, f);
e.vthis2 = vthis2;
Expression de = new DeclarationExp(e.loc, vthis2);
result = Expression.combine(de, result);
result = result.expressionSemantic(sc);
}
}
override void visit(DotTypeExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotTypeExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (auto e = unaSemantic(exp, sc))
{
result = e;
return;
}
exp.type = exp.sym.getType().addMod(exp.e1.type.mod);
result = exp;
}
override void visit(AddrExp exp)
{
static if (LOGSEMANTIC)
{
printf("AddrExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
if (sc.flags & SCOPE.Cfile)
{
/* Special handling for &"string"/&(T[]){0, 1}
* since C regards string/array literals as lvalues
*/
auto e = exp.e1;
if(e.isStringExp() || e.isArrayLiteralExp())
{
e.type = typeSemantic(e.type, Loc.initial, sc);
// if type is already a pointer exp is an illegal expression of the form `&(&"")`
if (!e.type.isTypePointer())
{
e.type = e.type.pointerTo();
result = e;
return;
}
else
{
// `toLvalue` call further below is upon exp.e1, omitting & from the error message
exp.toLvalue(sc, null);
return setError();
}
}
}
int wasCond = exp.e1.op == EXP.question;
if (exp.e1.op == EXP.dotTemplateInstance)
{
DotTemplateInstanceExp dti = cast(DotTemplateInstanceExp)exp.e1;
TemplateInstance ti = dti.ti;
{
//assert(ti.needsTypeInference(sc));
ti.dsymbolSemantic(sc);
if (!ti.inst || ti.errors) // if template failed to expand
return setError();
Dsymbol s = ti.toAlias();
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
exp.e1 = new DotVarExp(exp.e1.loc, dti.e1, f);
exp.e1 = exp.e1.expressionSemantic(sc);
}
}
}
else if (exp.e1.op == EXP.scope_)
{
TemplateInstance ti = (cast(ScopeExp)exp.e1).sds.isTemplateInstance();
if (ti)
{
//assert(ti.needsTypeInference(sc));
ti.dsymbolSemantic(sc);
if (!ti.inst || ti.errors) // if template failed to expand
return setError();
Dsymbol s = ti.toAlias();
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
exp.e1 = new VarExp(exp.e1.loc, f);
exp.e1 = exp.e1.expressionSemantic(sc);
}
}
}
/* https://issues.dlang.org/show_bug.cgi?id=809
*
* If the address of a lazy variable is taken,
* the expression is rewritten so that the type
* of it is the delegate type. This means that
* the symbol is not going to represent a call
* to the delegate anymore, but rather, the
* actual symbol.
*/
if (auto ve = exp.e1.isVarExp())
{
if (ve.var.storage_class & STC.lazy_)
{
exp.e1 = exp.e1.expressionSemantic(sc);
exp.e1 = resolveProperties(sc, exp.e1);
if (auto callExp = exp.e1.isCallExp())
{
if (callExp.e1.type.toBasetype().ty == Tdelegate)
{
/* https://issues.dlang.org/show_bug.cgi?id=20551
*
* Cannot take address of lazy parameter in @safe code
* because it might end up being a pointer to undefined
* memory.
*/
if (1)
{
if (sc.setUnsafe(false, exp.loc,
"cannot take address of lazy parameter `%s` in `@safe` function `%s`", ve, sc.func))
{
setError();
return;
}
}
VarExp ve2 = callExp.e1.isVarExp();
ve2.delegateWasExtracted = true;
ve2.var.storage_class |= STC.scope_;
result = ve2;
return;
}
}
}
}
exp.e1 = exp.e1.toLvalue(sc, null);
if (exp.e1.op == EXP.error)
{
result = exp.e1;
return;
}
if (checkNonAssignmentArrayOp(exp.e1))
return setError();
if (!exp.e1.type)
{
exp.error("cannot take address of `%s`", exp.e1.toChars());
return setError();
}
if (!checkAddressable(exp, sc))
return setError();
bool hasOverloads;
if (auto f = isFuncAddress(exp, &hasOverloads))
{
if (!hasOverloads && f.checkForwardRef(exp.loc))
return setError();
}
else if (!exp.e1.type.deco)
{
// try to resolve the type
exp.e1.type = exp.e1.type.typeSemantic(exp.e1.loc, null);
if (!exp.e1.type.deco) // still couldn't resolve it
{
if (auto ve = exp.e1.isVarExp())
{
Declaration d = ve.var;
exp.error("forward reference to %s `%s`", d.kind(), d.toChars());
}
else
exp.error("forward reference to type `%s` of expression `%s`", exp.e1.type.toChars(), exp.e1.toChars());
return setError();
}
}
exp.type = exp.e1.type.pointerTo();
// See if this should really be a delegate
if (exp.e1.op == EXP.dotVariable)
{
DotVarExp dve = cast(DotVarExp)exp.e1;
FuncDeclaration f = dve.var.isFuncDeclaration();
if (f)
{
f = f.toAliasFunc(); // FIXME, should see overloads
// https://issues.dlang.org/show_bug.cgi?id=1983
if (!dve.hasOverloads)
f.tookAddressOf++;
Expression e;
if (f.needThis())
e = new DelegateExp(exp.loc, dve.e1, f, dve.hasOverloads);
else // It is a function pointer. Convert &v.f() --> (v, &V.f())
e = new CommaExp(exp.loc, dve.e1, new AddrExp(exp.loc, new VarExp(exp.loc, f, dve.hasOverloads)));
e = e.expressionSemantic(sc);
result = e;
return;
}
// Look for misaligned pointer in @safe mode
if (checkUnsafeAccess(sc, dve, !exp.type.isMutable(), true))
return setError();
}
else if (exp.e1.op == EXP.variable)
{
VarExp ve = cast(VarExp)exp.e1;
VarDeclaration v = ve.var.isVarDeclaration();
if (v)
{
if (!checkAddressVar(sc, exp.e1, v))
return setError();
ve.checkPurity(sc, v);
}
FuncDeclaration f = ve.var.isFuncDeclaration();
if (f)
{
/* Because nested functions cannot be overloaded,
* mark here that we took its address because castTo()
* may not be called with an exact match.
*
* https://issues.dlang.org/show_bug.cgi?id=19285 :
* We also need to make sure we aren't inside a typeof. Ideally the compiler
* would do typeof(...) semantic analysis speculatively then collect information
* about what it used rather than relying on what are effectively semantically-global
* variables but it doesn't.
*/
if (!sc.isFromSpeculativeSemanticContext() && (!ve.hasOverloads || (f.isNested() && !f.needThis())))
{
// TODO: Refactor to use a proper interface that can keep track of causes.
f.tookAddressOf++;
}
if (f.isNested() && !f.needThis())
{
if (f.isFuncLiteralDeclaration())
{
if (!f.FuncDeclaration.isNested())
{
/* Supply a 'null' for a this pointer if no this is available
*/
Expression e = new DelegateExp(exp.loc, new NullExp(exp.loc, Type.tnull), f, ve.hasOverloads);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
Expression e = new DelegateExp(exp.loc, exp.e1, f, ve.hasOverloads);
e = e.expressionSemantic(sc);
result = e;
return;
}
if (f.needThis())
{
auto memberFunc = hasThis(sc);
if (memberFunc && haveSameThis(memberFunc, f))
{
/* Should probably supply 'this' after overload resolution,
* not before.
*/
Expression ethis = new ThisExp(exp.loc);
Expression e = new DelegateExp(exp.loc, ethis, f, ve.hasOverloads);
e = e.expressionSemantic(sc);
result = e;
return;
}
if (sc.func && !sc.intypeof && !(sc.flags & SCOPE.debug_))
{
sc.setUnsafe(false, exp.loc,
"`this` reference necessary to take address of member `%s` in `@safe` function `%s`",
f, sc.func);
}
}
}
}
else if (exp.e1.op == EXP.index)
{
/* For:
* int[3] a;
* &a[i]
* check 'a' the same as for a regular variable
*/
if (VarDeclaration v = expToVariable(exp.e1))
{
exp.e1.checkPurity(sc, v);
}
}
else if (wasCond)
{
/* a ? b : c was transformed to *(a ? &b : &c), but we still
* need to do safety checks
*/
assert(exp.e1.op == EXP.star);
PtrExp pe = cast(PtrExp)exp.e1;
assert(pe.e1.op == EXP.question);
CondExp ce = cast(CondExp)pe.e1;
assert(ce.e1.op == EXP.address);
assert(ce.e2.op == EXP.address);
// Re-run semantic on the address expressions only
ce.e1.type = null;
ce.e1 = ce.e1.expressionSemantic(sc);
ce.e2.type = null;
ce.e2 = ce.e2.expressionSemantic(sc);
}
result = exp.optimize(WANTvalue);
}
override void visit(PtrExp exp)
{
static if (LOGSEMANTIC)
{
printf("PtrExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
exp.e1 = exp.e1.arrayFuncConv(sc);
Type tb = exp.e1.type.toBasetype();
switch (tb.ty)
{
case Tpointer:
exp.type = (cast(TypePointer)tb).next;
break;
case Tsarray:
case Tarray:
if (isNonAssignmentArrayOp(exp.e1))
goto default;
exp.error("using `*` on an array is no longer supported; use `*(%s).ptr` instead", exp.e1.toChars());
exp.type = (cast(TypeArray)tb).next;
exp.e1 = exp.e1.castTo(sc, exp.type.pointerTo());
break;
case Terror:
return setError();
case Tnull:
exp.type = Type.tnoreturn; // typeof(*null) is bottom type
break;
default:
exp.error("can only `*` a pointer, not a `%s`", exp.e1.type.toChars());
goto case Terror;
}
if (sc.flags & SCOPE.Cfile && exp.type && exp.type.toBasetype().ty == Tvoid)
{
// https://issues.dlang.org/show_bug.cgi?id=23752
// `&*((void*)(0))` is allowed in C
result = exp;
return;
}
if (exp.checkValue())
return setError();
result = exp;
}
override void visit(NegExp exp)
{
static if (LOGSEMANTIC)
{
printf("NegExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
fix16997(sc, exp);
exp.type = exp.e1.type;
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp.e1))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.checkNoBool())
return setError();
if (exp.e1.checkArithmetic() ||
exp.e1.checkSharedAccess(sc))
return setError();
result = exp;
}
override void visit(UAddExp exp)
{
static if (LOGSEMANTIC)
{
printf("UAddExp::semantic('%s')\n", exp.toChars());
}
assert(!exp.type);
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
fix16997(sc, exp);
if (!target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.checkNoBool())
return setError();
if (exp.e1.checkArithmetic())
return setError();
if (exp.e1.checkSharedAccess(sc))
return setError();
result = exp.e1;
}
override void visit(ComExp exp)
{
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
fix16997(sc, exp);
exp.type = exp.e1.type;
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp.e1))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.checkNoBool())
return setError();
if (exp.e1.checkIntegral() ||
exp.e1.checkSharedAccess(sc))
return setError();
result = exp;
}
override void visit(NotExp e)
{
if (e.type)
{
result = e;
return;
}
e.setNoderefOperand();
// Note there is no operator overload
if (Expression ex = unaSemantic(e, sc))
{
result = ex;
return;
}
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e.e1.op == EXP.type)
e.e1 = resolveAliasThis(sc, e.e1);
e.e1 = resolveProperties(sc, e.e1);
e.e1 = e.e1.toBoolean(sc);
if (e.e1.type == Type.terror)
{
result = e.e1;
return;
}
if (!target.isVectorOpSupported(e.e1.type.toBasetype(), e.op))
{
result = e.incompatibleTypes();
}
// https://issues.dlang.org/show_bug.cgi?id=13910
// Today NotExp can take an array as its operand.
if (checkNonAssignmentArrayOp(e.e1))
return setError();
e.type = (sc && sc.flags & SCOPE.Cfile) ? Type.tint32 : Type.tbool;
result = e;
}
override void visit(DeleteExp exp)
{
// @@@DEPRECATED_2.109@@@
// 1. Deprecated since 2.079
// 2. Error since 2.099
// 3. Removal of keyword, "delete" can be used for other identities
if (!exp.isRAII)
{
error(exp.loc, "the `delete` keyword is obsolete");
errorSupplemental(exp.loc, "use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead");
return setError();
}
Expression e = exp;
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
exp.e1 = resolveProperties(sc, exp.e1);
exp.e1 = exp.e1.modifiableLvalue(sc, null);
if (exp.e1.op == EXP.error)
{
result = exp.e1;
return;
}
exp.type = Type.tvoid;
Type tb = exp.e1.type.toBasetype();
/* Now that `delete` in user code is an error, we only get here when
* `isRAII` has been set to true for the deletion of a `scope class`. */
if (tb.ty != Tclass)
{
exp.error("cannot delete type `%s`", exp.e1.type.toChars());
return setError();
}
ClassDeclaration cd = (cast(TypeClass)tb).sym;
if (cd.isCOMinterface())
{
/* Because COM classes are deleted by IUnknown.Release()
*/
exp.error("cannot `delete` instance of COM interface `%s`", cd.toChars());
return setError();
}
bool err = false;
if (cd.dtor)
{
err |= !cd.dtor.functionSemantic();
err |= exp.checkPurity(sc, cd.dtor);
err |= exp.checkSafety(sc, cd.dtor);
err |= exp.checkNogc(sc, cd.dtor);
}
if (err)
return setError();
result = e;
}
override void visit(CastExp exp)
{
static if (LOGSEMANTIC)
{
printf("CastExp::semantic('%s')\n", exp.toChars());
}
//static int x; assert(++x < 10);
if (exp.type)
{
result = exp;
return;
}
if ((sc && sc.flags & SCOPE.Cfile) &&
exp.to && (exp.to.ty == Tident || exp.to.ty == Tsarray) &&
(exp.e1.op == EXP.address || exp.e1.op == EXP.star ||
exp.e1.op == EXP.uadd || exp.e1.op == EXP.negate))
{
/* Ambiguous cases arise from CParser if type-name is just an identifier.
* ( identifier ) cast-expression
* ( identifier [expression]) cast-expression
* If we determine that `identifier` is a variable, and cast-expression
* is one of the unary operators (& * + -), then rewrite this cast
* as a binary expression.
*/
Loc loc = exp.loc;
Type t;
Expression e;
Dsymbol s;
exp.to.resolve(loc, sc, e, t, s);
if (e !is null)
{
if (auto ex = exp.e1.isAddrExp()) // (ident) &exp -> (ident & exp)
result = new AndExp(loc, e, ex.e1);
else if (auto ex = exp.e1.isPtrExp()) // (ident) *exp -> (ident * exp)
result = new MulExp(loc, e, ex.e1);
else if (auto ex = exp.e1.isUAddExp()) // (ident) +exp -> (ident + exp)
result = new AddExp(loc, e, ex.e1);
else if (auto ex = exp.e1.isNegExp()) // (ident) -exp -> (ident - exp)
result = new MinExp(loc, e, ex.e1);
assert(result);
result = result.expressionSemantic(sc);
return;
}
}
if (exp.to)
{
exp.to = exp.to.typeSemantic(exp.loc, sc);
if (exp.to == Type.terror)
return setError();
if (!exp.to.hasPointers())
exp.setNoderefOperand();
// When e1 is a template lambda, this cast may instantiate it with
// the type 'to'.
exp.e1 = inferType(exp.e1, exp.to);
}
if (auto e = unaSemantic(exp, sc))
{
result = e;
return;
}
if (exp.to && !exp.to.isTypeSArray() && !exp.to.isTypeFunction())
exp.e1 = exp.e1.arrayFuncConv(sc);
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (exp.e1.op == EXP.type)
exp.e1 = resolveAliasThis(sc, exp.e1);
auto e1x = resolveProperties(sc, exp.e1);
if (e1x.op == EXP.error)
{
result = e1x;
return;
}
if (e1x.checkType())
return setError();
exp.e1 = e1x;
if (!exp.e1.type)
{
exp.error("cannot cast `%s`", exp.e1.toChars());
return setError();
}
// https://issues.dlang.org/show_bug.cgi?id=19954
if (exp.e1.type.ty == Ttuple)
{
if (exp.to)
{
if (TypeTuple tt = exp.to.isTypeTuple())
{
if (exp.e1.type.implicitConvTo(tt))
{
result = exp.e1.castTo(sc, tt);
return;
}
}
}
TupleExp te = exp.e1.isTupleExp();
if (te.exps.length == 1)
exp.e1 = (*te.exps)[0];
}
// only allow S(x) rewrite if cast specified S explicitly.
// See https://issues.dlang.org/show_bug.cgi?id=18545
const bool allowImplicitConstruction = exp.to !is null;
if (!exp.to) // Handle cast(const) and cast(immutable), etc.
{
exp.to = exp.e1.type.castMod(exp.mod);
exp.to = exp.to.typeSemantic(exp.loc, sc);
if (exp.to == Type.terror)
return setError();
}
if (exp.to.ty == Ttuple)
{
exp.error("cannot cast `%s` of type `%s` to type sequence `%s`", exp.e1.toChars(), exp.e1.type.toChars(), exp.to.toChars());
return setError();
}
// cast(void) is used to mark e1 as unused, so it is safe
if (exp.to.ty == Tvoid)
{
exp.type = exp.to;
result = exp;
return;
}
if (!exp.to.equals(exp.e1.type) && exp.mod == cast(ubyte)~0)
{
if (Expression e = exp.op_overload(sc))
{
result = e.implicitCastTo(sc, exp.to);
return;
}
}
Type t1b = exp.e1.type.toBasetype();
Type tob = exp.to.toBasetype();
if (allowImplicitConstruction && tob.ty == Tstruct && !tob.equals(t1b))
{
/* Look to replace:
* cast(S)t
* with:
* S(t)
*/
// Rewrite as to.call(e1)
Expression e = new TypeExp(exp.loc, exp.to);
e = new CallExp(exp.loc, e, exp.e1);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
if (!t1b.equals(tob) && (t1b.ty == Tarray || t1b.ty == Tsarray))
{
if (checkNonAssignmentArrayOp(exp.e1))
return setError();
}
// Look for casting to a vector type
if (tob.ty == Tvector && t1b.ty != Tvector)
{
result = new VectorExp(exp.loc, exp.e1, exp.to);
result = result.expressionSemantic(sc);
return;
}
Expression ex = exp.e1.castTo(sc, exp.to);
if (ex.op == EXP.error)
{
result = ex;
return;
}
// Check for unsafe casts
if (!isSafeCast(ex, t1b, tob))
{
if (sc.setUnsafe(false, exp.loc, "cast from `%s` to `%s` not allowed in safe code", exp.e1.type, exp.to))
{
return setError();
}
}
// `object.__ArrayCast` is a rewrite of an old runtime hook `_d_arraycast`. `_d_arraycast` was not built
// to handle certain casts. Those casts which `object.__ArrayCast` does not support are filtered out.
// See `e2ir.toElemCast` for other types of casts. If `object.__ArrayCast` is improved to support more
// casts these conditions and potentially some logic in `e2ir.toElemCast` can be removed.
if (tob.ty == Tarray)
{
// https://issues.dlang.org/show_bug.cgi?id=19840
if (auto ad = isAggregate(t1b))
{
if (ad.aliasthis)
{
Expression e = resolveAliasThis(sc, exp.e1);
e = new CastExp(exp.loc, e, exp.to);
result = e.expressionSemantic(sc);
return;
}
}
if(t1b.ty == Tarray && exp.e1.op != EXP.arrayLiteral && sc.needsCodegen())
{
auto tFrom = t1b.nextOf();
auto tTo = tob.nextOf();
// https://issues.dlang.org/show_bug.cgi?id=20130
if (exp.e1.op != EXP.string_ || !ex.isStringExp)
{
const uint fromSize = cast(uint)tFrom.size();
const uint toSize = cast(uint)tTo.size();
if (fromSize == SIZE_INVALID || toSize == SIZE_INVALID)
return setError();
// If array element sizes do not match, we must adjust the dimensions
if (fromSize != toSize)
{
if (!verifyHookExist(exp.loc, *sc, Id.__ArrayCast, "casting array of structs"))
return setError();
// A runtime check is needed in case arrays don't line up. That check should
// be done in the implementation of `object.__ArrayCast`
if (toSize == 0 || (fromSize % toSize) != 0)
{
// lower to `object.__ArrayCast!(TFrom, TTo)(from)`
// fully qualify as `object.__ArrayCast`
Expression id = new IdentifierExp(exp.loc, Id.empty);
auto dotid = new DotIdExp(exp.loc, id, Id.object);
auto tiargs = new Objects();
tiargs.push(tFrom);
tiargs.push(tTo);
auto dt = new DotTemplateInstanceExp(exp.loc, dotid, Id.__ArrayCast, tiargs);
auto arguments = new Expressions();
arguments.push(exp.e1);
Expression ce = new CallExp(exp.loc, dt, arguments);
result = expressionSemantic(ce, sc);
return;
}
}
}
}
}
if (sc && sc.flags & SCOPE.Cfile)
{
/* C11 6.5.4-5: A cast does not yield an lvalue.
* So ensure that castTo does not strip away the cast so that this
* can be enforced in other semantic visitor methods.
*/
if (!ex.isCastExp())
{
ex = new CastExp(exp.loc, ex, exp.to);
ex.type = exp.to;
}
}
result = ex;
}
override void visit(VectorExp exp)
{
static if (LOGSEMANTIC)
{
printf("VectorExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.e1 = exp.e1.expressionSemantic(sc);
exp.type = exp.to.typeSemantic(exp.loc, sc);
if (exp.e1.op == EXP.error || exp.type.ty == Terror)
{
result = exp.e1;
return;
}
Type tb = exp.type.toBasetype();
assert(tb.ty == Tvector);
TypeVector tv = cast(TypeVector)tb;
Type te = tv.elementType();
exp.dim = cast(int)(tv.size(exp.loc) / te.size(exp.loc));
bool checkElem(Expression elem)
{
if (elem.isConst() == 1)
return false;
exp.error("constant expression expected, not `%s`", elem.toChars());
return true;
}
exp.e1 = exp.e1.optimize(WANTvalue);
bool res;
if (exp.e1.op == EXP.arrayLiteral)
{
foreach (i; 0 .. exp.dim)
{
// Do not stop on first error - check all AST nodes even if error found
res |= checkElem(exp.e1.isArrayLiteralExp()[i]);
}
}
else if (exp.e1.type.ty == Tvoid)
checkElem(exp.e1);
result = res ? ErrorExp.get() : exp;
}
override void visit(VectorArrayExp e)
{
static if (LOGSEMANTIC)
{
printf("VectorArrayExp::semantic('%s')\n", e.toChars());
}
if (!e.type)
{
unaSemantic(e, sc);
e.e1 = resolveProperties(sc, e.e1);
if (e.e1.op == EXP.error)
{
result = e.e1;
return;
}
assert(e.e1.type.ty == Tvector);
e.type = e.e1.type.isTypeVector().basetype;
}
result = e;
}
override void visit(SliceExp exp)
{
static if (LOGSEMANTIC)
{
printf("SliceExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
// operator overloading should be handled in ArrayExp already.
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
exp.e1 = resolveProperties(sc, exp.e1);
if (exp.e1.op == EXP.type && exp.e1.type.ty != Ttuple)
{
if (exp.lwr || exp.upr)
{
exp.error("cannot slice type `%s`", exp.e1.toChars());
return setError();
}
Expression e = new TypeExp(exp.loc, exp.e1.type.arrayOf());
result = e.expressionSemantic(sc);
return;
}
if (!exp.lwr && !exp.upr)
{
if (exp.e1.op == EXP.arrayLiteral)
{
// Convert [a,b,c][] to [a,b,c]
Type t1b = exp.e1.type.toBasetype();
Expression e = exp.e1;
if (t1b.ty == Tsarray)
{
e = e.copy();
e.type = t1b.nextOf().arrayOf();
}
result = e;
return;
}
if (exp.e1.op == EXP.slice)
{
// Convert e[][] to e[]
SliceExp se = cast(SliceExp)exp.e1;
if (!se.lwr && !se.upr)
{
result = se;
return;
}
}
if (isArrayOpOperand(exp.e1))
{
// Convert (a[]+b[])[] to a[]+b[]
result = exp.e1;
return;
}
}
if (exp.e1.op == EXP.error)
{
result = exp.e1;
return;
}
if (exp.e1.type.ty == Terror)
return setError();
Type t1b = exp.e1.type.toBasetype();
if (auto tp = t1b.isTypePointer())
{
if (t1b.isPtrToFunction())
{
exp.error("cannot slice function pointer `%s`", exp.e1.toChars());
return setError();
}
if (!exp.lwr || !exp.upr)
{
exp.error("upper and lower bounds are needed to slice a pointer");
if (auto ad = isAggregate(tp.next.toBasetype()))
{
auto s = search_function(ad, Id.index);
if (!s) s = search_function(ad, Id.slice);
if (s)
{
auto fd = s.isFuncDeclaration();
if ((fd && !fd.getParameterList().length) || s.isTemplateDeclaration())
{
exp.errorSupplemental(
"pointer `%s` points to an aggregate that defines an `%s`, perhaps you meant `(*%s)[]`",
exp.e1.toChars(),
s.ident.toChars(),
exp.e1.toChars()
);
}
}
}
return setError();
}
if (sc.setUnsafe(false, exp.loc, "pointer slicing not allowed in safe functions"))
return setError();
}
else if (t1b.ty == Tarray)
{
}
else if (t1b.ty == Tsarray)
{
}
else if (t1b.ty == Ttuple)
{
if (!exp.lwr && !exp.upr)
{
result = exp.e1;
return;
}
if (!exp.lwr || !exp.upr)
{
exp.error("need upper and lower bound to slice a sequence");
return setError();
}
}
else if (t1b.ty == Tvector && exp.e1.isLvalue())
{
// Convert e1 to corresponding static array
TypeVector tv1 = cast(TypeVector)t1b;
t1b = tv1.basetype;
t1b = t1b.castMod(tv1.mod);
exp.e1.type = t1b;
}
else
{
exp.error("`%s` cannot be sliced with `[]`", t1b.ty == Tvoid ? exp.e1.toChars() : t1b.toChars());
return setError();
}
/* Run semantic on lwr and upr.
*/
Scope* scx = sc;
if (t1b.ty == Tsarray || t1b.ty == Tarray || t1b.ty == Ttuple)
{
// Create scope for 'length' variable
ScopeDsymbol sym = new ArrayScopeSymbol(sc, exp);
sym.parent = sc.scopesym;
sc = sc.push(sym);
}
if (exp.lwr)
{
if (t1b.ty == Ttuple)
sc = sc.startCTFE();
exp.lwr = exp.lwr.expressionSemantic(sc);
exp.lwr = resolveProperties(sc, exp.lwr);
if (t1b.ty == Ttuple)
sc = sc.endCTFE();
exp.lwr = exp.lwr.implicitCastTo(sc, Type.tsize_t);
}
if (exp.upr)
{
if (t1b.ty == Ttuple)
sc = sc.startCTFE();
exp.upr = exp.upr.expressionSemantic(sc);
exp.upr = resolveProperties(sc, exp.upr);
if (t1b.ty == Ttuple)
sc = sc.endCTFE();
exp.upr = exp.upr.implicitCastTo(sc, Type.tsize_t);
}
if (sc != scx)
sc = sc.pop();
if (exp.lwr && exp.lwr.type == Type.terror || exp.upr && exp.upr.type == Type.terror)
return setError();
if (t1b.ty == Ttuple)
{
exp.lwr = exp.lwr.ctfeInterpret();
exp.upr = exp.upr.ctfeInterpret();
uinteger_t i1 = exp.lwr.toUInteger();
uinteger_t i2 = exp.upr.toUInteger();
TupleExp te;
TypeTuple tup;
size_t length;
if (exp.e1.op == EXP.tuple) // slicing an expression tuple
{
te = cast(TupleExp)exp.e1;
tup = null;
length = te.exps.length;
}
else if (exp.e1.op == EXP.type) // slicing a type tuple
{
te = null;
tup = cast(TypeTuple)t1b;
length = Parameter.dim(tup.arguments);
}
else
assert(0);
if (i2 < i1 || length < i2)
{
exp.error("string slice `[%llu .. %llu]` is out of bounds", i1, i2);
return setError();
}
size_t j1 = cast(size_t)i1;
size_t j2 = cast(size_t)i2;
Expression e;
if (exp.e1.op == EXP.tuple)
{
auto exps = new Expressions(j2 - j1);
for (size_t i = 0; i < j2 - j1; i++)
{
(*exps)[i] = (*te.exps)[j1 + i];
}
e = new TupleExp(exp.loc, te.e0, exps);
}
else
{
auto args = new Parameters();
args.reserve(j2 - j1);
for (size_t i = j1; i < j2; i++)
{
Parameter arg = Parameter.getNth(tup.arguments, i);
args.push(arg);
}
e = new TypeExp(exp.e1.loc, new TypeTuple(args));
}
e = e.expressionSemantic(sc);
result = e;
return;
}
exp.type = t1b.nextOf().arrayOf();
// Allow typedef[] -> typedef[]
if (exp.type.equals(t1b))
exp.type = exp.e1.type;
// We might know $ now
setLengthVarIfKnown(exp.lengthVar, t1b);
if (exp.lwr && exp.upr)
{
exp.lwr = exp.lwr.optimize(WANTvalue);
exp.upr = exp.upr.optimize(WANTvalue);
IntRange lwrRange = getIntRange(exp.lwr);
IntRange uprRange = getIntRange(exp.upr);
if (t1b.ty == Tsarray || t1b.ty == Tarray)
{
Expression el = new ArrayLengthExp(exp.loc, exp.e1);
el = el.expressionSemantic(sc);
el = el.optimize(WANTvalue);
if (el.op == EXP.int64)
{
// Array length is known at compile-time. Upper is in bounds if it fits length.
dinteger_t length = el.toInteger();
auto bounds = IntRange(SignExtendedNumber(0), SignExtendedNumber(length));
exp.upperIsInBounds = bounds.contains(uprRange);
}
else if (exp.upr.op == EXP.int64 && exp.upr.toInteger() == 0)
{
// Upper slice expression is '0'. Value is always in bounds.
exp.upperIsInBounds = true;
}
else if (exp.upr.op == EXP.variable && (cast(VarExp)exp.upr).var.ident == Id.dollar)
{
// Upper slice expression is '$'. Value is always in bounds.
exp.upperIsInBounds = true;
}
}
else if (t1b.ty == Tpointer)
{
exp.upperIsInBounds = true;
}
else
assert(0);
exp.lowerIsLessThanUpper = (lwrRange.imax <= uprRange.imin);
//printf("upperIsInBounds = %d lowerIsLessThanUpper = %d\n", exp.upperIsInBounds, exp.lowerIsLessThanUpper);
}
result = exp;
}
override void visit(ArrayLengthExp e)
{
static if (LOGSEMANTIC)
{
printf("ArrayLengthExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
if (Expression ex = unaSemantic(e, sc))
{
result = ex;
return;
}
e.e1 = resolveProperties(sc, e.e1);
e.type = Type.tsize_t;
result = e;
}
override void visit(ArrayExp exp)
{
static if (LOGSEMANTIC)
{
printf("ArrayExp::semantic('%s')\n", exp.toChars());
}
assert(!exp.type);
if (sc.flags & SCOPE.Cfile)
{
/* See if need to rewrite the AST because of cast/call ambiguity
*/
if (auto e = castCallAmbiguity(exp, sc))
{
result = expressionSemantic(e, sc);
return;
}
}
result = exp.carraySemantic(sc); // C semantics
if (result)
return;
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (isAggregate(exp.e1.type))
exp.error("no `[]` operator overload for type `%s`", exp.e1.type.toChars());
else if (exp.e1.op == EXP.type && exp.e1.type.ty != Ttuple)
exp.error("static array of `%s` with multiple lengths not allowed", exp.e1.type.toChars());
else if (isIndexableNonAggregate(exp.e1.type))
exp.error("only one index allowed to index `%s`", exp.e1.type.toChars());
else
exp.error("cannot use `[]` operator on expression of type `%s`", exp.e1.type.toChars());
result = ErrorExp.get();
}
override void visit(DotExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotExp::semantic('%s')\n", exp.toChars());
if (exp.type)
printf("\ttype = %s\n", exp.type.toChars());
}
exp.e1 = exp.e1.expressionSemantic(sc);
exp.e2 = exp.e2.expressionSemantic(sc);
if (exp.e1.op == EXP.type)
{
result = exp.e2;
return;
}
if (exp.e2.op == EXP.type)
{
result = exp.e2;
return;
}
if (auto te = exp.e2.isTemplateExp())
{
Expression e = new DotTemplateExp(exp.loc, exp.e1, te.td);
result = e.expressionSemantic(sc);
return;
}
if (!exp.type)
exp.type = exp.e2.type;
result = exp;
}
override void visit(CommaExp e)
{
//printf("Semantic.CommaExp() %s\n", e.toChars());
if (e.type)
{
result = e;
return;
}
// Allow `((a,b),(x,y))`
if (e.allowCommaExp)
{
CommaExp.allow(e.e1);
CommaExp.allow(e.e2);
}
if (Expression ex = binSemanticProp(e, sc))
{
result = ex;
return;
}
e.e1 = e.e1.addDtorHook(sc);
if (checkNonAssignmentArrayOp(e.e1))
return setError();
// Comma expressions trigger this conversion
e.e2 = e.e2.arrayFuncConv(sc);
e.type = e.e2.type;
result = e;
if (sc.flags & SCOPE.Cfile)
return;
if (e.type is Type.tvoid)
{
checkMustUse(e.e1, sc);
discardValue(e.e1);
}
else if (!e.allowCommaExp && !e.isGenerated)
e.error("using the result of a comma expression is not allowed");
}
override void visit(IntervalExp e)
{
static if (LOGSEMANTIC)
{
printf("IntervalExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
Expression le = e.lwr;
le = le.expressionSemantic(sc);
le = resolveProperties(sc, le);
Expression ue = e.upr;
ue = ue.expressionSemantic(sc);
ue = resolveProperties(sc, ue);
if (le.op == EXP.error)
{
result = le;
return;
}
if (ue.op == EXP.error)
{
result = ue;
return;
}
e.lwr = le;
e.upr = ue;
e.type = Type.tvoid;
result = e;
}
override void visit(DelegatePtrExp e)
{
static if (LOGSEMANTIC)
{
printf("DelegatePtrExp::semantic('%s')\n", e.toChars());
}
if (!e.type)
{
unaSemantic(e, sc);
e.e1 = resolveProperties(sc, e.e1);
if (e.e1.op == EXP.error)
{
result = e.e1;
return;
}
e.type = Type.tvoidptr;
}
result = e;
}
override void visit(DelegateFuncptrExp e)
{
static if (LOGSEMANTIC)
{
printf("DelegateFuncptrExp::semantic('%s')\n", e.toChars());
}
if (!e.type)
{
unaSemantic(e, sc);
e.e1 = resolveProperties(sc, e.e1);
if (e.e1.op == EXP.error)
{
result = e.e1;
return;
}
e.type = e.e1.type.nextOf().pointerTo();
}
result = e;
}
override void visit(IndexExp exp)
{
static if (LOGSEMANTIC)
{
printf("IndexExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
// operator overloading should be handled in ArrayExp already.
if (!exp.e1.type)
exp.e1 = exp.e1.expressionSemantic(sc).arrayFuncConv(sc);
assert(exp.e1.type); // semantic() should already be run on it
if (exp.e1.op == EXP.type && exp.e1.type.ty != Ttuple)
{
exp.e2 = exp.e2.expressionSemantic(sc);
exp.e2 = resolveProperties(sc, exp.e2);
Type nt;
if (exp.e2.op == EXP.type)
nt = new TypeAArray(exp.e1.type, exp.e2.type);
else
nt = new TypeSArray(exp.e1.type, exp.e2);
Expression e = new TypeExp(exp.loc, nt);
result = e.expressionSemantic(sc);
return;
}
if (exp.e1.op == EXP.error)
{
result = exp.e1;
return;
}
if (exp.e1.type.ty == Terror)
return setError();
// Note that unlike C we do not implement the int[ptr]
Type t1b = exp.e1.type.toBasetype();
if (TypeVector tv1 = t1b.isTypeVector())
{
// Convert e1 to corresponding static array
t1b = tv1.basetype;
t1b = t1b.castMod(tv1.mod);
exp.e1 = exp.e1.castTo(sc, t1b);
}
if (t1b.ty == Tsarray || t1b.ty == Tarray)
{
if (!checkAddressable(exp, sc))
return setError();
}
/* Run semantic on e2
*/
Scope* scx = sc;
if (t1b.ty == Tsarray || t1b.ty == Tarray || t1b.ty == Ttuple)
{
// Create scope for 'length' variable
ScopeDsymbol sym = new ArrayScopeSymbol(sc, exp);
sym.parent = sc.scopesym;
sc = sc.push(sym);
}
if (t1b.ty == Ttuple)
sc = sc.startCTFE();
exp.e2 = exp.e2.expressionSemantic(sc).arrayFuncConv(sc);
exp.e2 = resolveProperties(sc, exp.e2);
if (t1b.ty == Ttuple)
sc = sc.endCTFE();
if (exp.e2.op == EXP.tuple)
{
TupleExp te = cast(TupleExp)exp.e2;
if (te.exps && te.exps.length == 1)
exp.e2 = Expression.combine(te.e0, (*te.exps)[0]); // bug 4444 fix
}
if (sc != scx)
sc = sc.pop();
if (exp.e2.type == Type.terror)
return setError();
if (checkNonAssignmentArrayOp(exp.e1))
return setError();
switch (t1b.ty)
{
case Tpointer:
if (t1b.isPtrToFunction())
{
exp.error("cannot index function pointer `%s`", exp.e1.toChars());
return setError();
}
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
return setError();
exp.e2 = exp.e2.optimize(WANTvalue);
if (exp.e2.op == EXP.int64 && exp.e2.toInteger() == 0)
{
}
else if (sc.setUnsafe(false, exp.loc, "`@safe` function `%s` cannot index pointer `%s`", sc.func, exp.e1))
{
return setError();
}
exp.type = (cast(TypeNext)t1b).next;
break;
case Tarray:
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
return setError();
exp.type = (cast(TypeNext)t1b).next;
break;
case Tsarray:
{
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
return setError();
exp.type = t1b.nextOf();
break;
}
case Taarray:
{
TypeAArray taa = cast(TypeAArray)t1b;
/* We can skip the implicit conversion if they differ only by
* constness
* https://issues.dlang.org/show_bug.cgi?id=2684
* see also bug https://issues.dlang.org/show_bug.cgi?id=2954 b
*/
if (!arrayTypeCompatibleWithoutCasting(exp.e2.type, taa.index))
{
exp.e2 = exp.e2.implicitCastTo(sc, taa.index); // type checking
if (exp.e2.type == Type.terror)
return setError();
}
semanticTypeInfo(sc, taa);
checkNewEscape(sc, exp.e2, false);
exp.type = taa.next;
break;
}
case Ttuple:
{
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
return setError();
exp.e2 = exp.e2.ctfeInterpret();
uinteger_t index = exp.e2.toUInteger();
TupleExp te;
TypeTuple tup;
size_t length;
if (exp.e1.op == EXP.tuple)
{
te = cast(TupleExp)exp.e1;
tup = null;
length = te.exps.length;
}
else if (exp.e1.op == EXP.type)
{
te = null;
tup = cast(TypeTuple)t1b;
length = Parameter.dim(tup.arguments);
}
else
assert(0);
if (length <= index)
{
exp.error("array index `[%llu]` is outside array bounds `[0 .. %llu]`", index, cast(ulong)length);
return setError();
}
Expression e;
if (exp.e1.op == EXP.tuple)
{
e = (*te.exps)[cast(size_t)index];
e = Expression.combine(te.e0, e);
}
else
e = new TypeExp(exp.e1.loc, Parameter.getNth(tup.arguments, cast(size_t)index).type);
result = e;
return;
}
default:
exp.error("`%s` must be an array or pointer type, not `%s`", exp.e1.toChars(), exp.e1.type.toChars());
return setError();
}
// We might know $ now
setLengthVarIfKnown(exp.lengthVar, t1b);
if (t1b.ty == Tsarray || t1b.ty == Tarray)
{
Expression el = new ArrayLengthExp(exp.loc, exp.e1);
el = el.expressionSemantic(sc);
el = el.optimize(WANTvalue);
if (el.op == EXP.int64)
{
exp.e2 = exp.e2.optimize(WANTvalue);
dinteger_t length = el.toInteger();
if (length)
{
auto bounds = IntRange(SignExtendedNumber(0), SignExtendedNumber(length - 1));
// OR it in, because it might already be set for C array indexing
exp.indexIsInBounds |= bounds.contains(getIntRange(exp.e2));
}
else if (sc.flags & SCOPE.Cfile && t1b.ty == Tsarray)
{
if (auto ve = exp.e1.isVarExp())
{
/* Rewrite 0-length C array ve[exp.e2] as *(ve + exp.e2)
*/
auto vp = ve.castTo(sc, t1b.isTypeSArray().next.pointerTo());
auto e = new AddExp(exp.loc, vp, exp.e2);
auto pe = new PtrExp(exp.loc, e);
result = pe.expressionSemantic(sc).optimize(WANTvalue);
return;
}
}
}
}
result = exp;
}
override void visit(PostExp exp)
{
static if (LOGSEMANTIC)
{
printf("PostExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (sc.flags & SCOPE.Cfile)
{
/* See if need to rewrite the AST because of cast/call ambiguity
*/
if (auto e = castCallAmbiguity(exp, sc))
{
result = expressionSemantic(e, sc);
return;
}
}
if (Expression ex = binSemantic(exp, sc))
{
result = ex;
return;
}
Expression e1x = resolveProperties(sc, exp.e1);
if (e1x.op == EXP.error)
{
result = e1x;
return;
}
exp.e1 = e1x;
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.checkReadModifyWrite(exp.op))
return setError();
if (exp.e1.op == EXP.slice)
{
const(char)* s = exp.op == EXP.plusPlus ? "increment" : "decrement";
exp.error("cannot post-%s array slice `%s`, use pre-%s instead", s, exp.e1.toChars(), s);
return setError();
}
Type t1 = exp.e1.type.toBasetype();
if (t1.ty == Tclass || t1.ty == Tstruct || exp.e1.op == EXP.arrayLength)
{
/* Check for operator overloading,
* but rewrite in terms of ++e instead of e++
*/
/* If e1 is not trivial, take a reference to it
*/
Expression de = null;
if (exp.e1.op != EXP.variable && exp.e1.op != EXP.arrayLength)
{
// ref v = e1;
auto v = copyToTemp(STC.ref_, "__postref", exp.e1);
de = new DeclarationExp(exp.loc, v);
exp.e1 = new VarExp(exp.e1.loc, v);
}
/* Rewrite as:
* auto tmp = e1; ++e1; tmp
*/
auto tmp = copyToTemp(0, "__pitmp", exp.e1);
Expression ea = new DeclarationExp(exp.loc, tmp);
Expression eb = exp.e1.syntaxCopy();
eb = new PreExp(exp.op == EXP.plusPlus ? EXP.prePlusPlus : EXP.preMinusMinus, exp.loc, eb);
Expression ec = new VarExp(exp.loc, tmp);
// Combine de,ea,eb,ec
if (de)
ea = new CommaExp(exp.loc, de, ea);
e = new CommaExp(exp.loc, ea, eb);
e = new CommaExp(exp.loc, e, ec);
e = e.expressionSemantic(sc);
result = e;
return;
}
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
exp.e1 = exp.e1.optimize(WANTvalue, /*keepLvalue*/ true);
e = exp;
if (exp.e1.checkScalar() ||
exp.e1.checkSharedAccess(sc))
return setError();
if (exp.e1.checkNoBool())
return setError();
if (exp.e1.type.ty == Tpointer)
e = scaleFactor(exp, sc);
else
exp.e2 = exp.e2.castTo(sc, exp.e1.type);
e.type = exp.e1.type;
result = e;
}
override void visit(PreExp exp)
{
Expression e = exp.op_overload(sc);
// printf("PreExp::semantic('%s')\n", toChars());
if (e)
{
result = e;
return;
}
// Rewrite as e1+=1 or e1-=1
if (exp.op == EXP.prePlusPlus)
e = new AddAssignExp(exp.loc, exp.e1, IntegerExp.literal!1);
else
e = new MinAssignExp(exp.loc, exp.e1, IntegerExp.literal!1);
result = e.expressionSemantic(sc);
}
/*
* Get the expression initializer for a specific struct
*
* Params:
* sd = the struct for which the expression initializer is needed
* loc = the location of the initializer
* sc = the scope where the expression is located
* t = the type of the expression
*
* Returns:
* The expression initializer or error expression if any errors occured
*/
private Expression getInitExp(StructDeclaration sd, Loc loc, Scope* sc, Type t)
{
if (sd.zeroInit && !sd.isNested())
{
// https://issues.dlang.org/show_bug.cgi?id=14606
// Always use BlitExp for the special expression: (struct = 0)
return IntegerExp.literal!0;
}
if (sd.isNested())
{
auto sle = new StructLiteralExp(loc, sd, null, t);
if (!sd.fill(loc, *sle.elements, true))
return ErrorExp.get();
if (checkFrameAccess(loc, sc, sd, sle.elements.length))
return ErrorExp.get();
sle.type = t;
return sle;
}
return t.defaultInit(loc);
}
override void visit(AssignExp exp)
{
static if (LOGSEMANTIC)
{
if (exp.op == EXP.blit) printf("BlitExp.toElem('%s')\n", exp.toChars());
if (exp.op == EXP.assign) printf("AssignExp.toElem('%s')\n", exp.toChars());
if (exp.op == EXP.construct) printf("ConstructExp.toElem('%s')\n", exp.toChars());
}
void setResult(Expression e, int line = __LINE__)
{
//printf("line %d\n", line);
result = e;
}
if (exp.type)
{
return setResult(exp);
}
Expression e1old = exp.e1;
if (auto e2comma = exp.e2.isCommaExp())
{
if (!e2comma.isGenerated && !(sc.flags & SCOPE.Cfile))
exp.error("using the result of a comma expression is not allowed");
/* Rewrite to get rid of the comma from rvalue
* e1=(e0,e2) => e0,(e1=e2)
*/
Expression e0;
exp.e2 = Expression.extractLast(e2comma, e0);
Expression e = Expression.combine(e0, exp);
return setResult(e.expressionSemantic(sc));
}
/* Look for operator overloading of a[arguments] = e2.
* Do it before e1.expressionSemantic() otherwise the ArrayExp will have been
* converted to unary operator overloading already.
*/
if (auto ae = exp.e1.isArrayExp())
{
Expression res;
ae.e1 = ae.e1.expressionSemantic(sc);
ae.e1 = resolveProperties(sc, ae.e1);
Expression ae1old = ae.e1;
const(bool) maybeSlice =
(ae.arguments.length == 0 ||
ae.arguments.length == 1 && (*ae.arguments)[0].op == EXP.interval);
IntervalExp ie = null;
if (maybeSlice && ae.arguments.length)
{
assert((*ae.arguments)[0].op == EXP.interval);
ie = cast(IntervalExp)(*ae.arguments)[0];
}
Type att = null; // first cyclic `alias this` type
while (true)
{
if (ae.e1.op == EXP.error)
return setResult(ae.e1);
Expression e0 = null;
Expression ae1save = ae.e1;
ae.lengthVar = null;
Type t1b = ae.e1.type.toBasetype();
AggregateDeclaration ad = isAggregate(t1b);
if (!ad)
break;
if (search_function(ad, Id.indexass))
{
// Deal with $
res = resolveOpDollar(sc, ae, &e0);
if (!res) // a[i..j] = e2 might be: a.opSliceAssign(e2, i, j)
goto Lfallback;
if (res.op == EXP.error)
return setResult(res);
res = exp.e2.expressionSemantic(sc);
if (res.op == EXP.error)
return setResult(res);
exp.e2 = res;
/* Rewrite (a[arguments] = e2) as:
* a.opIndexAssign(e2, arguments)
*/
Expressions* a = ae.arguments.copy();
a.insert(0, exp.e2);
res = new DotIdExp(exp.loc, ae.e1, Id.indexass);
res = new CallExp(exp.loc, res, a);
if (maybeSlice) // a[] = e2 might be: a.opSliceAssign(e2)
res = res.trySemantic(sc);
else
res = res.expressionSemantic(sc);
if (res)
return setResult(Expression.combine(e0, res));
}
Lfallback:
if (maybeSlice && search_function(ad, Id.sliceass))
{
// Deal with $
res = resolveOpDollar(sc, ae, ie, &e0);
if (res.op == EXP.error)
return setResult(res);
res = exp.e2.expressionSemantic(sc);
if (res.op == EXP.error)
return setResult(res);
exp.e2 = res;
/* Rewrite (a[i..j] = e2) as:
* a.opSliceAssign(e2, i, j)
*/
auto a = new Expressions();
a.push(exp.e2);
if (ie)
{
a.push(ie.lwr);
a.push(ie.upr);
}
res = new DotIdExp(exp.loc, ae.e1, Id.sliceass);
res = new CallExp(exp.loc, res, a);
res = res.expressionSemantic(sc);
return setResult(Expression.combine(e0, res));
}
// No operator overloading member function found yet, but
// there might be an alias this to try.
if (ad.aliasthis && !isRecursiveAliasThis(att, ae.e1.type))
{
/* Rewrite (a[arguments] op e2) as:
* a.aliasthis[arguments] op e2
*/
ae.e1 = resolveAliasThis(sc, ae1save, true);
if (ae.e1)
continue;
}
break;
}
ae.e1 = ae1old; // recovery
ae.lengthVar = null;
}
/* Run this.e1 semantic.
*/
{
Expression e1x = exp.e1;
/* With UFCS, e.f = value
* Could mean:
* .f(e, value)
* or:
* .f(e) = value
*/
if (auto dti = e1x.isDotTemplateInstanceExp())
{
Expression e = dti.dotTemplateSemanticProp(sc, DotExpFlag.gag);
if (!e)
{
return setResult(resolveUFCSProperties(sc, e1x, exp.e2));
}
e1x = e;
}
else if (sc.flags & SCOPE.Cfile && e1x.isDotIdExp())
{
auto die = e1x.isDotIdExp();
e1x = fieldLookup(die.e1, sc, die.ident, die.arrow);
}
else if (auto die = e1x.isDotIdExp())
{
Expression e = die.dotIdSemanticProp(sc, 1);
if (e && isDotOpDispatch(e))
{
/* https://issues.dlang.org/show_bug.cgi?id=19687
*
* On this branch, e2 is semantically analyzed in resolvePropertiesX,
* but that call is done with gagged errors. That is the only time when
* semantic gets ran on e2, that is why the error never gets to be printed.
* In order to make sure that UFCS is tried with correct parameters, e2
* needs to have semantic ran on it.
*/
auto ode = e;
exp.e2 = exp.e2.expressionSemantic(sc);
uint errors = global.startGagging();
e = resolvePropertiesX(sc, e, exp.e2);
// Any error or if 'e' is not resolved, go to UFCS
if (global.endGagging(errors) || e is ode)
e = null; /* fall down to UFCS */
else
return setResult(e);
}
if (!e)
return setResult(resolveUFCSProperties(sc, e1x, exp.e2));
e1x = e;
}
else
{
if (auto se = e1x.isSliceExp())
se.arrayop = true;
e1x = e1x.expressionSemantic(sc);
}
/* We have f = value.
* Could mean:
* f(value)
* or:
* f() = value
*/
if (Expression e = resolvePropertiesX(sc, e1x, exp.e2, exp))
return setResult(e);
if (e1x.checkRightThis(sc))
{
return setError();
}
exp.e1 = e1x;
assert(exp.e1.type);
}
Type t1 = exp.e1.type.isTypeEnum() ? exp.e1.type : exp.e1.type.toBasetype();
/* Run this.e2 semantic.
* Different from other binary expressions, the analysis of e2
* depends on the result of e1 in assignments.
*/
{
Expression e2x = inferType(exp.e2, t1.baseElemOf());
e2x = e2x.expressionSemantic(sc);
if (!t1.isTypeSArray())
e2x = e2x.arrayFuncConv(sc);
e2x = resolveProperties(sc, e2x);
if (e2x.op == EXP.type)
e2x = resolveAliasThis(sc, e2x); //https://issues.dlang.org/show_bug.cgi?id=17684
if (e2x.op == EXP.error)
return setResult(e2x);
// We delay checking the value for structs/classes as these might have
// an opAssign defined.
if ((t1.ty != Tstruct && t1.ty != Tclass && e2x.checkValue()) ||
e2x.checkSharedAccess(sc))
return setError();
auto etmp = checkNoreturnVarAccess(e2x);
if (etmp != e2x)
return setResult(etmp);
exp.e2 = e2x;
}
/* Rewrite tuple assignment as a tuple of assignments.
*/
{
Expression e2x = exp.e2;
Ltupleassign:
if (exp.e1.op == EXP.tuple && e2x.op == EXP.tuple)
{
TupleExp tup1 = cast(TupleExp)exp.e1;
TupleExp tup2 = cast(TupleExp)e2x;
size_t dim = tup1.exps.length;
Expression e = null;
if (dim != tup2.exps.length)
{
exp.error("mismatched sequence lengths, %d and %d", cast(int)dim, cast(int)tup2.exps.length);
return setError();
}
if (dim == 0)
{
e = IntegerExp.literal!0;
e = new CastExp(exp.loc, e, Type.tvoid); // avoid "has no effect" error
e = Expression.combine(tup1.e0, tup2.e0, e);
}
else
{
auto exps = new Expressions(dim);
for (size_t i = 0; i < dim; i++)
{
Expression ex1 = (*tup1.exps)[i];
Expression ex2 = (*tup2.exps)[i];
(*exps)[i] = new AssignExp(exp.loc, ex1, ex2);
}
e = new TupleExp(exp.loc, Expression.combine(tup1.e0, tup2.e0), exps);
}
return setResult(e.expressionSemantic(sc));
}
/* Look for form: e1 = e2.aliasthis.
*/
if (exp.e1.op == EXP.tuple)
{
TupleDeclaration td = isAliasThisTuple(e2x);
if (!td)
goto Lnomatch;
assert(exp.e1.type.ty == Ttuple);
TypeTuple tt = cast(TypeTuple)exp.e1.type;
Expression e0;
Expression ev = extractSideEffect(sc, "__tup", e0, e2x);
auto iexps = new Expressions();
iexps.push(ev);
for (size_t u = 0; u < iexps.length; u++)
{
Lexpand:
Expression e = (*iexps)[u];
Parameter arg = Parameter.getNth(tt.arguments, u);
//printf("[%d] iexps.length = %d, ", u, iexps.length);
//printf("e = (%s %s, %s), ", Token.toChars[e.op], e.toChars(), e.type.toChars());
//printf("arg = (%s, %s)\n", arg.toChars(), arg.type.toChars());
if (!arg || !e.type.implicitConvTo(arg.type))
{
// expand initializer to tuple
if (expandAliasThisTuples(iexps, u) != -1)
{
if (iexps.length <= u)
break;
goto Lexpand;
}
goto Lnomatch;
}
}
e2x = new TupleExp(e2x.loc, e0, iexps);
e2x = e2x.expressionSemantic(sc);
if (e2x.op == EXP.error)
{
result = e2x;
return;
}
// Do not need to overwrite this.e2
goto Ltupleassign;
}
Lnomatch:
}
/* Inside constructor, if this is the first assignment of object field,
* rewrite this to initializing the field.
*/
if (exp.op == EXP.assign
&& exp.e1.checkModifiable(sc) == Modifiable.initialization)
{
//printf("[%s] change to init - %s\n", exp.loc.toChars(), exp.toChars());
auto t = exp.type;
exp = new ConstructExp(exp.loc, exp.e1, exp.e2);
exp.type = t;
// https://issues.dlang.org/show_bug.cgi?id=13515
// set Index::modifiable flag for complex AA element initialization
if (auto ie1 = exp.e1.isIndexExp())
{
Expression e1x = ie1.markSettingAAElem();
if (e1x.op == EXP.error)
{
result = e1x;
return;
}
}
}
else if (exp.op == EXP.construct && exp.e1.op == EXP.variable &&
(cast(VarExp)exp.e1).var.storage_class & (STC.out_ | STC.ref_))
{
exp.memset = MemorySet.referenceInit;
}
if (exp.op == EXP.assign) // skip EXP.blit and EXP.construct, which are initializations
{
exp.e1.checkSharedAccess(sc);
checkUnsafeAccess(sc, exp.e1, false, true);
}
checkUnsafeAccess(sc, exp.e2, true, true); // Initializer must always be checked
/* If it is an assignment from a 'foreign' type,
* check for operator overloading.
*/
if (exp.memset == MemorySet.referenceInit)
{
// If this is an initialization of a reference,
// do nothing
}
else if (t1.ty == Tstruct)
{
auto e1x = exp.e1;
auto e2x = exp.e2;
auto sd = (cast(TypeStruct)t1).sym;
if (exp.op == EXP.construct)
{
Type t2 = e2x.type.toBasetype();
if (t2.ty == Tstruct && sd == (cast(TypeStruct)t2).sym)
{
sd.size(exp.loc);
if (sd.sizeok != Sizeok.done)
return setError();
if (!sd.ctor)
sd.ctor = sd.searchCtor();
// https://issues.dlang.org/show_bug.cgi?id=15661
// Look for the form from last of comma chain.
auto e2y = lastComma(e2x);
CallExp ce = (e2y.op == EXP.call) ? cast(CallExp)e2y : null;
DotVarExp dve = (ce && ce.e1.op == EXP.dotVariable)
? cast(DotVarExp)ce.e1 : null;
if (sd.ctor && ce && dve && dve.var.isCtorDeclaration() &&
// https://issues.dlang.org/show_bug.cgi?id=19389
dve.e1.op != EXP.dotVariable &&
e2y.type.implicitConvTo(t1))
{
/* Look for form of constructor call which is:
* __ctmp.ctor(arguments...)
*/
/* Before calling the constructor, initialize
* variable with a bit copy of the default
* initializer
*/
Expression einit = getInitExp(sd, exp.loc, sc, t1);
if (einit.op == EXP.error)
{
result = einit;
return;
}
auto ae = new BlitExp(exp.loc, exp.e1, einit);
ae.type = e1x.type;
/* Replace __ctmp being constructed with e1.
* We need to copy constructor call expression,
* because it may be used in other place.
*/
auto dvx = cast(DotVarExp)dve.copy();
dvx.e1 = e1x;
auto cx = cast(CallExp)ce.copy();
cx.e1 = dvx;
if (checkConstructorEscape(sc, cx, false))
return setError();
Expression e0;
Expression.extractLast(e2x, e0);
auto e = Expression.combine(e0, ae, cx);
e = e.expressionSemantic(sc);
result = e;
return;
}
// https://issues.dlang.org/show_bug.cgi?id=21586
// Rewrite CondExp or e1 will miss direct construction, e.g.
// e1 = a ? S(1) : ...; -> AST: e1 = a ? (S(0)).this(1) : ...;
// a temporary created and an extra destructor call.
// AST will be rewritten to:
// a ? e1 = 0, e1.this(1) : ...; -> blitting plus construction
if (e2x.op == EXP.question)
{
/* Rewrite as:
* a ? e1 = b : e1 = c;
*/
CondExp econd = cast(CondExp)e2x;
Expression ea1 = new ConstructExp(econd.e1.loc, e1x, econd.e1);
Expression ea2 = new ConstructExp(econd.e2.loc, e1x, econd.e2);
Expression e = new CondExp(exp.loc, econd.econd, ea1, ea2);
result = e.expressionSemantic(sc);
return;
}
if (sd.postblit || sd.hasCopyCtor)
{
/* We have a copy constructor for this
*/
if (e2x.isLvalue())
{
if (sd.hasCopyCtor)
{
/* Rewrite as:
* e1 = init, e1.copyCtor(e2);
*/
Expression einit = new BlitExp(exp.loc, exp.e1, getInitExp(sd, exp.loc, sc, t1));
einit.type = e1x.type;
Expression e;
e = new DotIdExp(exp.loc, e1x, Id.ctor);
e = new CallExp(exp.loc, e, e2x);
e = new CommaExp(exp.loc, einit, e);
//printf("e: %s\n", e.toChars());
result = e.expressionSemantic(sc);
return;
}
else
{
if (!e2x.type.implicitConvTo(e1x.type))
{
exp.error("conversion error from `%s` to `%s`",
e2x.type.toChars(), e1x.type.toChars());
return setError();
}
/* Rewrite as:
* (e1 = e2).postblit();
*
* Blit assignment e1 = e2 returns a reference to the original e1,
* then call the postblit on it.
*/
Expression e = e1x.copy();
e.type = e.type.mutableOf();
if (e.type.isShared && !sd.type.isShared)
e.type = e.type.unSharedOf();
e = new BlitExp(exp.loc, e, e2x);
e = new DotVarExp(exp.loc, e, sd.postblit, false);
e = new CallExp(exp.loc, e);
result = e.expressionSemantic(sc);
return;
}
}
else
{
/* The struct value returned from the function is transferred
* so should not call the destructor on it.
*/
e2x = valueNoDtor(e2x);
}
}
// https://issues.dlang.org/show_bug.cgi?id=19251
// if e2 cannot be converted to e1.type, maybe there is an alias this
if (!e2x.implicitConvTo(t1))
{
AggregateDeclaration ad2 = isAggregate(e2x.type);
if (ad2 && ad2.aliasthis && !isRecursiveAliasThis(exp.att2, exp.e2.type))
{
/* Rewrite (e1 op e2) as:
* (e1 op e2.aliasthis)
*/
exp.e2 = new DotIdExp(exp.e2.loc, exp.e2, ad2.aliasthis.ident);
result = exp.expressionSemantic(sc);
return;
}
}
}
else if (!e2x.implicitConvTo(t1))
{
sd.size(exp.loc);
if (sd.sizeok != Sizeok.done)
return setError();
if (!sd.ctor)
sd.ctor = sd.searchCtor();
if (sd.ctor)
{
/* Look for implicit constructor call
* Rewrite as:
* e1 = init, e1.ctor(e2)
*/
/* Fix Issue 5153 : https://issues.dlang.org/show_bug.cgi?id=5153
* Using `new` to initialize a struct object is a common mistake, but
* the error message from the compiler is not very helpful in that
* case. If exp.e2 is a NewExp and the type of new is the same as
* the type as exp.e1 (struct in this case), then we know for sure
* that the user wants to instantiate a struct. This is done to avoid
* issuing an error when the user actually wants to call a constructor
* which receives a class object.
*
* Foo f = new Foo2(0); is a valid expression if Foo has a constructor
* which receives an instance of a Foo2 class
*/
if (exp.e2.op == EXP.new_)
{
auto newExp = cast(NewExp)(exp.e2);
if (newExp.newtype && newExp.newtype == t1)
{
error(exp.loc, "cannot implicitly convert expression `%s` of type `%s` to `%s`",
newExp.toChars(), newExp.type.toChars(), t1.toChars());
errorSupplemental(exp.loc, "Perhaps remove the `new` keyword?");
return setError();
}
}
Expression einit = new BlitExp(exp.loc, e1x, getInitExp(sd, exp.loc, sc, t1));
einit.type = e1x.type;
Expression e;
e = new DotIdExp(exp.loc, e1x, Id.ctor);
e = new CallExp(exp.loc, e, e2x);
e = new CommaExp(exp.loc, einit, e);
e = e.expressionSemantic(sc);
result = e;
return;
}
if (search_function(sd, Id.call))
{
/* Look for static opCall
* https://issues.dlang.org/show_bug.cgi?id=2702
* Rewrite as:
* e1 = typeof(e1).opCall(arguments)
*/
e2x = typeDotIdExp(e2x.loc, e1x.type, Id.call);
e2x = new CallExp(exp.loc, e2x, exp.e2);
e2x = e2x.expressionSemantic(sc);
e2x = resolveProperties(sc, e2x);
if (e2x.op == EXP.error)
{
result = e2x;
return;
}
if (e2x.checkValue() || e2x.checkSharedAccess(sc))
return setError();
}
}
else // https://issues.dlang.org/show_bug.cgi?id=11355
{
AggregateDeclaration ad2 = isAggregate(e2x.type);
if (ad2 && ad2.aliasthis && !isRecursiveAliasThis(exp.att2, exp.e2.type))
{
/* Rewrite (e1 op e2) as:
* (e1 op e2.aliasthis)
*/
exp.e2 = new DotIdExp(exp.e2.loc, exp.e2, ad2.aliasthis.ident);
result = exp.expressionSemantic(sc);
return;
}
}
}
else if (exp.op == EXP.assign)
{
if (e1x.op == EXP.index && (cast(IndexExp)e1x).e1.type.toBasetype().ty == Taarray)
{
/*
* Rewrite:
* aa[key] = e2;
* as:
* ref __aatmp = aa;
* ref __aakey = key;
* ref __aaval = e2;
* (__aakey in __aatmp
* ? __aatmp[__aakey].opAssign(__aaval)
* : ConstructExp(__aatmp[__aakey], __aaval));
*/
// ensure we keep the expr modifiable
Expression esetting = (cast(IndexExp)e1x).markSettingAAElem();
if (esetting.op == EXP.error)
{
result = esetting;
return;
}
assert(esetting.op == EXP.index);
IndexExp ie = cast(IndexExp) esetting;
Type t2 = e2x.type.toBasetype();
Expression e0 = null;
Expression ea = extractSideEffect(sc, "__aatmp", e0, ie.e1);
Expression ek = extractSideEffect(sc, "__aakey", e0, ie.e2);
Expression ev = extractSideEffect(sc, "__aaval", e0, e2x);
AssignExp ae = cast(AssignExp)exp.copy();
ae.e1 = new IndexExp(exp.loc, ea, ek);
ae.e1 = ae.e1.expressionSemantic(sc);
ae.e1 = ae.e1.optimize(WANTvalue);
ae.e2 = ev;
Expression e = ae.op_overload(sc);
if (e)
{
Expression ey = null;
if (t2.ty == Tstruct && sd == t2.toDsymbol(sc))
{
ey = ev;
}
else if (!ev.implicitConvTo(ie.type) && sd.ctor)
{
// Look for implicit constructor call
// Rewrite as S().ctor(e2)
ey = new StructLiteralExp(exp.loc, sd, null);
ey = new DotIdExp(exp.loc, ey, Id.ctor);
ey = new CallExp(exp.loc, ey, ev);
ey = ey.trySemantic(sc);
}
if (ey)
{
Expression ex;
ex = new IndexExp(exp.loc, ea, ek);
ex = ex.expressionSemantic(sc);
ex = ex.modifiableLvalue(sc, ex); // allocate new slot
ex = ex.optimize(WANTvalue);
ey = new ConstructExp(exp.loc, ex, ey);
ey = ey.expressionSemantic(sc);
if (ey.op == EXP.error)
{
result = ey;
return;
}
ex = e;
// https://issues.dlang.org/show_bug.cgi?id=14144
// The whole expression should have the common type
// of opAssign() return and assigned AA entry.
// Even if there's no common type, expression should be typed as void.
if (!typeMerge(sc, EXP.question, ex, ey))
{
ex = new CastExp(ex.loc, ex, Type.tvoid);
ey = new CastExp(ey.loc, ey, Type.tvoid);
}
e = new CondExp(exp.loc, new InExp(exp.loc, ek, ea), ex, ey);
}
e = Expression.combine(e0, e);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
else
{
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
}
}
else
assert(exp.op == EXP.blit);
if (e2x.checkValue())
return setError();
exp.e1 = e1x;
exp.e2 = e2x;
}
else if (t1.ty == Tclass)
{
// Disallow assignment operator overloads for same type
if (exp.op == EXP.assign && !exp.e2.implicitConvTo(exp.e1.type))
{
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
}
if (exp.e2.checkValue())
return setError();
}
else if (t1.ty == Tsarray)
{
// SliceExp cannot have static array type without context inference.
assert(exp.e1.op != EXP.slice);
Expression e1x = exp.e1;
Expression e2x = exp.e2;
/* C strings come through as static arrays. May need to adjust the size of the
* string to match the size of e1.
*/
Type t2 = e2x.type.toBasetype();
if (sc.flags & SCOPE.Cfile && e2x.isStringExp() && t2.isTypeSArray())
{
uinteger_t dim1 = t1.isTypeSArray().dim.toInteger();
uinteger_t dim2 = t2.isTypeSArray().dim.toInteger();
if (dim1 + 1 == dim2 || dim2 < dim1)
{
auto tsa2 = t2.isTypeSArray();
auto newt = tsa2.next.sarrayOf(dim1).immutableOf();
e2x = castTo(e2x, sc, newt);
exp.e2 = e2x;
}
}
if (e2x.implicitConvTo(e1x.type))
{
if (exp.op != EXP.blit && (e2x.op == EXP.slice && (cast(UnaExp)e2x).e1.isLvalue() || e2x.op == EXP.cast_ && (cast(UnaExp)e2x).e1.isLvalue() || e2x.op != EXP.slice && e2x.isLvalue()))
{
if (e1x.checkPostblit(sc, t1))
return setError();
}
// e2 matches to t1 because of the implicit length match, so
if (isUnaArrayOp(e2x.op) || isBinArrayOp(e2x.op))
{
// convert e1 to e1[]
// e.g. e1[] = a[] + b[];
auto sle = new SliceExp(e1x.loc, e1x, null, null);
sle.arrayop = true;
e1x = sle.expressionSemantic(sc);
}
else
{
// convert e2 to t1 later
// e.g. e1 = [1, 2, 3];
}
}
else
{
if (e2x.implicitConvTo(t1.nextOf().arrayOf()) > MATCH.nomatch)
{
uinteger_t dim1 = (cast(TypeSArray)t1).dim.toInteger();
uinteger_t dim2 = dim1;
if (auto ale = e2x.isArrayLiteralExp())
{
dim2 = ale.elements ? ale.elements.length : 0;
}
else if (auto se = e2x.isSliceExp())
{
Type tx = toStaticArrayType(se);
if (tx)
dim2 = (cast(TypeSArray)tx).dim.toInteger();
}
if (dim1 != dim2)
{
exp.error("mismatched array lengths, %d and %d", cast(int)dim1, cast(int)dim2);
return setError();
}
}
// May be block or element-wise assignment, so
// convert e1 to e1[]
if (exp.op != EXP.assign)
{
// If multidimensional static array, treat as one large array
//
// Find the appropriate array type depending on the assignment, e.g.
// int[3] = int => int[3]
// int[3][2] = int => int[6]
// int[3][2] = int[] => int[3][2]
// int[3][2][4] + int => int[24]
// int[3][2][4] + int[] => int[3][8]
ulong dim = t1.isTypeSArray().dim.toUInteger();
auto type = t1.nextOf();
for (TypeSArray tsa; (tsa = type.isTypeSArray()) !is null; )
{
import core.checkedint : mulu;
// Accumulate skipped dimensions
bool overflow = false;
dim = mulu(dim, tsa.dim.toUInteger(), overflow);
if (overflow || dim >= uint.max)
{
// dym exceeds maximum array size
exp.error("static array `%s` size overflowed to %llu",
e1x.type.toChars(), cast(ulong) dim);
return setError();
}
// Move to the element type
type = tsa.nextOf().toBasetype();
// Rewrite ex1 as a static array if a matching type was found
if (e2x.implicitConvTo(type) > MATCH.nomatch)
{
e1x.type = type.sarrayOf(dim);
break;
}
}
}
auto sle = new SliceExp(e1x.loc, e1x, null, null);
sle.arrayop = true;
e1x = sle.expressionSemantic(sc);
}
if (e1x.op == EXP.error)
return setResult(e1x);
if (e2x.op == EXP.error)
return setResult(e2x);
exp.e1 = e1x;
exp.e2 = e2x;
t1 = e1x.type.toBasetype();
}
/* Check the mutability of e1.
*/
if (auto ale = exp.e1.isArrayLengthExp())
{
// e1 is not an lvalue, but we let code generator handle it
auto ale1x = ale.e1.modifiableLvalue(sc, exp.e1);
if (ale1x.op == EXP.error)
return setResult(ale1x);
ale.e1 = ale1x;
Type tn = ale.e1.type.toBasetype().nextOf();
checkDefCtor(ale.loc, tn);
Identifier hook = global.params.tracegc ? Id._d_arraysetlengthTTrace : Id._d_arraysetlengthT;
if (!verifyHookExist(exp.loc, *sc, Id._d_arraysetlengthTImpl, "resizing arrays"))
return setError();
exp.e2 = exp.e2.expressionSemantic(sc);
auto lc = lastComma(exp.e2);
lc = lc.optimize(WANTvalue);
// use slice expression when arr.length = 0 to avoid runtime call
if(lc.op == EXP.int64 && lc.toInteger() == 0)
{
Expression se = new SliceExp(ale.loc, ale.e1, lc, lc);
Expression as = new AssignExp(ale.loc, ale.e1, se);
as = as.expressionSemantic(sc);
auto res = Expression.combine(as, exp.e2);
res.type = ale.type;
return setResult(res);
}
if (!sc.needsCodegen()) // if compile time creature only
{
exp.type = Type.tsize_t;
return setResult(exp);
}
// Lower to object._d_arraysetlengthTImpl!(typeof(e1))._d_arraysetlengthT{,Trace}(e1, e2)
Expression id = new IdentifierExp(ale.loc, Id.empty);
id = new DotIdExp(ale.loc, id, Id.object);
auto tiargs = new Objects();
tiargs.push(ale.e1.type);
id = new DotTemplateInstanceExp(ale.loc, id, Id._d_arraysetlengthTImpl, tiargs);
id = new DotIdExp(ale.loc, id, hook);
id = id.expressionSemantic(sc);
auto arguments = new Expressions();
arguments.reserve(5);
if (global.params.tracegc)
{
auto funcname = (sc.callsc && sc.callsc.func) ? sc.callsc.func.toPrettyChars() : sc.func.toPrettyChars();
arguments.push(new StringExp(exp.loc, exp.loc.filename.toDString()));
arguments.push(new IntegerExp(exp.loc, exp.loc.linnum, Type.tint32));
arguments.push(new StringExp(exp.loc, funcname.toDString()));
}
arguments.push(ale.e1);
arguments.push(exp.e2);
Expression ce = new CallExp(ale.loc, id, arguments).expressionSemantic(sc);
auto res = new LoweredAssignExp(exp, ce);
// if (global.params.verbose)
// message("lowered %s =>\n %s", exp.toChars(), res.toChars());
res.type = Type.tsize_t;
return setResult(res);
}
else if (auto se = exp.e1.isSliceExp())
{
Type tn = se.type.nextOf();
const fun = sc.func;
if (exp.op == EXP.assign && !tn.isMutable() &&
// allow modifiation in module ctor, see
// https://issues.dlang.org/show_bug.cgi?id=9884
(!fun || (fun && !fun.isStaticCtorDeclaration())))
{
exp.error("slice `%s` is not mutable", se.toChars());
return setError();
}
if (exp.op == EXP.assign && !tn.baseElemOf().isAssignable())
{
exp.error("slice `%s` is not mutable, struct `%s` has immutable members",
exp.e1.toChars(), tn.baseElemOf().toChars());
result = ErrorExp.get();
return;
}
// For conditional operator, both branches need conversion.
while (se.e1.op == EXP.slice)
se = cast(SliceExp)se.e1;
if (se.e1.op == EXP.question && se.e1.type.toBasetype().ty == Tsarray)
{
se.e1 = se.e1.modifiableLvalue(sc, exp.e1);
if (se.e1.op == EXP.error)
return setResult(se.e1);
}
}
else
{
if (t1.ty == Tsarray && exp.op == EXP.assign)
{
Type tn = exp.e1.type.nextOf();
if (tn && !tn.baseElemOf().isAssignable())
{
exp.error("array `%s` is not mutable, struct `%s` has immutable members",
exp.e1.toChars(), tn.baseElemOf().toChars());
result = ErrorExp.get();
return;
}
}
Expression e1x = exp.e1;
// Try to do a decent error message with the expression
// before it gets constant folded
if (exp.op == EXP.assign)
e1x = e1x.modifiableLvalue(sc, e1old);
e1x = e1x.optimize(WANTvalue, /*keepLvalue*/ true);
if (e1x.op == EXP.error)
{
result = e1x;
return;
}
exp.e1 = e1x;
}
/* Tweak e2 based on the type of e1.
*/
Expression e2x = exp.e2;
Type t2 = e2x.type.toBasetype();
// If it is a array, get the element type. Note that it may be
// multi-dimensional.
Type telem = t1;
while (telem.ty == Tarray)
telem = telem.nextOf();
if (exp.e1.op == EXP.slice && t1.nextOf() &&
(telem.ty != Tvoid || e2x.op == EXP.null_) &&
e2x.implicitConvTo(t1.nextOf()))
{
// Check for block assignment. If it is of type void[], void[][], etc,
// '= null' is the only allowable block assignment (Bug 7493)
exp.memset = MemorySet.blockAssign; // make it easy for back end to tell what this is
e2x = e2x.implicitCastTo(sc, t1.nextOf());
if (exp.op != EXP.blit && e2x.isLvalue() && exp.e1.checkPostblit(sc, t1.nextOf()))
return setError();
}
else if (exp.e1.op == EXP.slice &&
(t2.ty == Tarray || t2.ty == Tsarray) &&
t2.nextOf().implicitConvTo(t1.nextOf()))
{
// Check element-wise assignment.
/* If assigned elements number is known at compile time,
* check the mismatch.
*/
SliceExp se1 = cast(SliceExp)exp.e1;
TypeSArray tsa1 = cast(TypeSArray)toStaticArrayType(se1);
TypeSArray tsa2 = null;
if (auto ale = e2x.isArrayLiteralExp())
tsa2 = cast(TypeSArray)t2.nextOf().sarrayOf(ale.elements.length);
else if (auto se = e2x.isSliceExp())
tsa2 = cast(TypeSArray)toStaticArrayType(se);
else
tsa2 = t2.isTypeSArray();
if (tsa1 && tsa2)
{
uinteger_t dim1 = tsa1.dim.toInteger();
uinteger_t dim2 = tsa2.dim.toInteger();
if (dim1 != dim2)
{
exp.error("mismatched array lengths %d and %d for assignment `%s`", cast(int)dim1, cast(int)dim2, exp.toChars());
return setError();
}
}
if (exp.op != EXP.blit &&
(e2x.op == EXP.slice && (cast(UnaExp)e2x).e1.isLvalue() ||
e2x.op == EXP.cast_ && (cast(UnaExp)e2x).e1.isLvalue() ||
e2x.op != EXP.slice && e2x.isLvalue()))
{
if (exp.e1.checkPostblit(sc, t1.nextOf()))
return setError();
}
if (0 && global.params.warnings != DiagnosticReporting.off && !global.gag && exp.op == EXP.assign &&
e2x.op != EXP.slice && e2x.op != EXP.assign &&
e2x.op != EXP.arrayLiteral && e2x.op != EXP.string_ &&
!(e2x.op == EXP.add || e2x.op == EXP.min ||
e2x.op == EXP.mul || e2x.op == EXP.div ||
e2x.op == EXP.mod || e2x.op == EXP.xor ||
e2x.op == EXP.and || e2x.op == EXP.or ||
e2x.op == EXP.pow ||
e2x.op == EXP.tilde || e2x.op == EXP.negate))
{
const(char)* e1str = exp.e1.toChars();
const(char)* e2str = e2x.toChars();
exp.warning("explicit element-wise assignment `%s = (%s)[]` is better than `%s = %s`", e1str, e2str, e1str, e2str);
}
Type t2n = t2.nextOf();
Type t1n = t1.nextOf();
int offset;
if (t2n.equivalent(t1n) ||
t1n.isBaseOf(t2n, &offset) && offset == 0)
{
/* Allow copy of distinct qualifier elements.
* eg.
* char[] dst; const(char)[] src;
* dst[] = src;
*
* class C {} class D : C {}
* C[2] ca; D[] da;
* ca[] = da;
*/
if (isArrayOpValid(e2x))
{
// Don't add CastExp to keep AST for array operations
e2x = e2x.copy();
e2x.type = exp.e1.type.constOf();
}
else
e2x = e2x.castTo(sc, exp.e1.type.constOf());
}
else
{
/* https://issues.dlang.org/show_bug.cgi?id=15778
* A string literal has an array type of immutable
* elements by default, and normally it cannot be convertible to
* array type of mutable elements. But for element-wise assignment,
* elements need to be const at best. So we should give a chance
* to change code unit size for polysemous string literal.
*/
if (e2x.op == EXP.string_)
e2x = e2x.implicitCastTo(sc, exp.e1.type.constOf());
else
e2x = e2x.implicitCastTo(sc, exp.e1.type);
}
if (t1n.toBasetype.ty == Tvoid && t2n.toBasetype.ty == Tvoid)
{
if (sc.setUnsafe(false, exp.loc, "cannot copy `void[]` to `void[]` in `@safe` code"))
return setError();
}
}
else
{
if (0 && global.params.warnings != DiagnosticReporting.off && !global.gag && exp.op == EXP.assign &&
t1.ty == Tarray && t2.ty == Tsarray &&
e2x.op != EXP.slice &&
t2.implicitConvTo(t1))
{
// Disallow ar[] = sa (Converted to ar[] = sa[])
// Disallow da = sa (Converted to da = sa[])
const(char)* e1str = exp.e1.toChars();
const(char)* e2str = e2x.toChars();
const(char)* atypestr = exp.e1.op == EXP.slice ? "element-wise" : "slice";
exp.warning("explicit %s assignment `%s = (%s)[]` is better than `%s = %s`", atypestr, e1str, e2str, e1str, e2str);
}
if (exp.op == EXP.blit)
e2x = e2x.castTo(sc, exp.e1.type);
else
{
e2x = e2x.implicitCastTo(sc, exp.e1.type);
// Fix Issue 13435: https://issues.dlang.org/show_bug.cgi?id=13435
// If the implicit cast has failed and the assign expression is
// the initialization of a struct member field
if (e2x.op == EXP.error && exp.op == EXP.construct && t1.ty == Tstruct)
{
scope sd = (cast(TypeStruct)t1).sym;
Dsymbol opAssign = search_function(sd, Id.assign);
// and the struct defines an opAssign
if (opAssign)
{
// offer more information about the cause of the problem
errorSupplemental(exp.loc,
"`%s` is the first assignment of `%s` therefore it represents its initialization",
exp.toChars(), exp.e1.toChars());
errorSupplemental(exp.loc,
"`opAssign` methods are not used for initialization, but for subsequent assignments");
}
}
}
}
if (e2x.op == EXP.error)
{
result = e2x;
return;
}
exp.e2 = e2x;
t2 = exp.e2.type.toBasetype();
/* Look for array operations
*/
if ((t2.ty == Tarray || t2.ty == Tsarray) && isArrayOpValid(exp.e2))
{
// Look for valid array operations
if (exp.memset != MemorySet.blockAssign &&
exp.e1.op == EXP.slice &&
(isUnaArrayOp(exp.e2.op) || isBinArrayOp(exp.e2.op)))
{
exp.type = exp.e1.type;
if (exp.op == EXP.construct) // https://issues.dlang.org/show_bug.cgi?id=10282
// tweak mutability of e1 element
exp.e1.type = exp.e1.type.nextOf().mutableOf().arrayOf();
result = arrayOp(exp, sc);
return;
}
// Drop invalid array operations in e2
// d = a[] + b[], d = (a[] + b[])[0..2], etc
if (checkNonAssignmentArrayOp(exp.e2, exp.memset != MemorySet.blockAssign && exp.op == EXP.assign))
return setError();
// Remains valid array assignments
// d = d[], d = [1,2,3], etc
}
/* Don't allow assignment to classes that were allocated on the stack with:
* scope Class c = new Class();
*/
if (exp.e1.op == EXP.variable && exp.op == EXP.assign)
{
VarExp ve = cast(VarExp)exp.e1;
VarDeclaration vd = ve.var.isVarDeclaration();
if (vd && vd.onstack)
{
assert(t1.ty == Tclass);
exp.error("cannot rebind scope variables");
}
}
if (exp.e1.op == EXP.variable && (cast(VarExp)exp.e1).var.ident == Id.ctfe)
{
exp.error("cannot modify compiler-generated variable `__ctfe`");
}
exp.type = exp.e1.type;
assert(exp.type);
auto assignElem = exp.e2;
auto res = exp.op == EXP.assign ? exp.reorderSettingAAElem(sc) : exp;
/* https://issues.dlang.org/show_bug.cgi?id=22366
*
* `reorderSettingAAElem` creates a tree of comma expressions, however,
* `checkAssignExp` expects only AssignExps.
*/
if (res == exp) // no `AA[k] = v` rewrite was performed
checkAssignEscape(sc, res, false, false);
else
checkNewEscape(sc, assignElem, false); // assigning to AA puts it on heap
if (auto ae = res.isConstructExp())
{
Type t1b = ae.e1.type.toBasetype();
if (t1b.ty != Tsarray && t1b.ty != Tarray)
return setResult(res);
// only non-trivial array constructions may need to be lowered (non-POD elements basically)
Type t1e = t1b.nextOf();
TypeStruct ts = t1e.baseElemOf().isTypeStruct();
if (!ts || (!ts.sym.postblit && !ts.sym.hasCopyCtor && !ts.sym.dtor))
return setResult(res);
// don't lower ref-constructions etc.
if (!(t1b.ty == Tsarray || ae.e1.isSliceExp) ||
(ae.e1.isVarExp && ae.e1.isVarExp.var.isVarDeclaration.isReference))
return setResult(res);
// Construction from an equivalent other array?
// Only lower with lvalue RHS elements; let the glue layer move rvalue elements.
Type t2b = ae.e2.type.toBasetype();
// skip over a (possibly implicit) cast of a static array RHS to a slice
Expression rhs = ae.e2;
Type rhsType = t2b;
if (t2b.ty == Tarray)
{
if (auto ce = rhs.isCastExp())
{
auto ct = ce.e1.type.toBasetype();
if (ct.ty == Tsarray)
{
rhs = ce.e1;
rhsType = ct;
}
}
}
if (!sc.needsCodegen()) // interpreter can handle these
return setResult(res);
const lowerToArrayCtor =
( (rhsType.ty == Tarray && !rhs.isArrayLiteralExp) ||
(rhsType.ty == Tsarray && rhs.isLvalue) ) &&
t1e.equivalent(t2b.nextOf);
// Construction from a single element?
// If the RHS is an rvalue, then we'll need to make a temporary for it (copied multiple times).
const lowerToArraySetCtor = !lowerToArrayCtor && t1e.equivalent(t2b);
if (lowerToArrayCtor || lowerToArraySetCtor)
{
auto func = lowerToArrayCtor ? Id._d_arrayctor : Id._d_arraysetctor;
const other = lowerToArrayCtor ? "other array" : "value";
if (!verifyHookExist(exp.loc, *sc, func, "construct array with " ~ other, Id.object))
return setError();
// Lower to object._d_array{,set}ctor(e1, e2)
Expression id = new IdentifierExp(exp.loc, Id.empty);
id = new DotIdExp(exp.loc, id, Id.object);
id = new DotIdExp(exp.loc, id, func);
auto arguments = new Expressions();
arguments.push(new CastExp(ae.loc, ae.e1, t1e.arrayOf).expressionSemantic(sc));
if (lowerToArrayCtor)
{
arguments.push(new CastExp(ae.loc, rhs, t2b.nextOf.arrayOf).expressionSemantic(sc));
Expression ce = new CallExp(exp.loc, id, arguments);
res = ce.expressionSemantic(sc);
}
else
{
Expression e0;
// promote an rvalue RHS element to a temporary, it's passed by ref to _d_arraysetctor
if (!ae.e2.isLvalue)
{
auto vd = copyToTemp(STC.scope_, "__setctor", ae.e2);
e0 = new DeclarationExp(vd.loc, vd).expressionSemantic(sc);
arguments.push(new VarExp(vd.loc, vd).expressionSemantic(sc));
}
else
arguments.push(ae.e2);
Expression ce = new CallExp(exp.loc, id, arguments);
res = Expression.combine(e0, ce).expressionSemantic(sc);
}
if (global.params.verbose)
message("lowered %s =>\n %s", exp.toChars(), res.toChars());
}
}
else if (auto ae = res.isAssignExp())
res = lowerArrayAssign(ae);
else if (auto ce = res.isCommaExp())
{
if (auto ae1 = ce.e1.isAssignExp())
ce.e1 = lowerArrayAssign(ae1, true);
if (auto ae2 = ce.e2.isAssignExp())
ce.e2 = lowerArrayAssign(ae2, true);
}
return setResult(res);
}
/***************************************
* Lower AssignExp to `_d_array{setassign,assign_l,assign_r}` if needed.
*
* Params:
* ae = the AssignExp to be lowered
* fromCommaExp = indicates whether `ae` is part of a CommaExp or not,
* so no unnecessary temporay variable is created.
* Returns:
* a CommaExp contiaining call a to `_d_array{setassign,assign_l,assign_r}`
* if needed or `ae` otherwise
*/
private Expression lowerArrayAssign(AssignExp ae, bool fromCommaExp = false)
{
Type t1b = ae.e1.type.toBasetype();
if (t1b.ty != Tsarray && t1b.ty != Tarray)
return ae;
const isArrayAssign = (ae.e1.isSliceExp() || ae.e1.type.ty == Tsarray) &&
(ae.e2.type.ty == Tsarray || ae.e2.type.ty == Tarray) &&
(ae.e1.type.nextOf() && ae.e2.type.nextOf() && ae.e1.type.nextOf.mutableOf.equals(ae.e2.type.nextOf.mutableOf()));
const isArraySetAssign = (ae.e1.isSliceExp() || ae.e1.type.ty == Tsarray) &&
(ae.e1.type.nextOf() && ae.e2.type.implicitConvTo(ae.e1.type.nextOf()));
if (!isArrayAssign && !isArraySetAssign)
return ae;
const ts = t1b.nextOf().baseElemOf().isTypeStruct();
if (!ts || (!ts.sym.postblit && !ts.sym.dtor))
return ae;
Expression res;
Identifier func = isArraySetAssign ? Id._d_arraysetassign :
ae.e2.isLvalue() || ae.e2.isSliceExp() ? Id._d_arrayassign_l : Id._d_arrayassign_r;
// Lower to `.object._d_array{setassign,assign_l,assign_r}(e1, e2)``
Expression id = new IdentifierExp(ae.loc, Id.empty);
id = new DotIdExp(ae.loc, id, Id.object);
id = new DotIdExp(ae.loc, id, func);
auto arguments = new Expressions();
arguments.push(new CastExp(ae.loc, ae.e1, ae.e1.type.nextOf.arrayOf)
.expressionSemantic(sc));
Expression eValue2, value2 = ae.e2;
if (isArrayAssign && value2.isLvalue())
value2 = new CastExp(ae.loc, ae.e2, ae.e2.type.nextOf.arrayOf())
.expressionSemantic(sc);
else if (!fromCommaExp &&
(isArrayAssign || (isArraySetAssign && !value2.isLvalue())))
{
// Rvalues from CommaExps were introduced in `visit(AssignExp)`
// and are temporary variables themselves. Rvalues from trivial
// SliceExps are simply passed by reference without any copying.
// `__assigntmp` will be destroyed together with the array `ae.e1`.
// When `ae.e2` is a variadic arg array, it is also `scope`, so
// `__assigntmp` may also be scope.
StorageClass stc = STC.nodtor;
if (isArrayAssign)
stc |= STC.rvalue | STC.scope_;
auto vd = copyToTemp(stc, "__assigntmp", ae.e2);
eValue2 = new DeclarationExp(vd.loc, vd).expressionSemantic(sc);
value2 = new VarExp(vd.loc, vd).expressionSemantic(sc);
}
arguments.push(value2);
Expression ce = new CallExp(ae.loc, id, arguments);
res = Expression.combine(eValue2, ce).expressionSemantic(sc);
if (isArrayAssign)
res = Expression.combine(res, ae.e1).expressionSemantic(sc);
if (global.params.verbose)
message("lowered %s =>\n %s", ae.toChars(), res.toChars());
res = new LoweredAssignExp(ae, res);
res.type = ae.type;
return res;
}
override void visit(PowAssignExp exp)
{
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.checkReadModifyWrite(exp.op, exp.e2))
return setError();
assert(exp.e1.type && exp.e2.type);
if (exp.e1.op == EXP.slice || exp.e1.type.ty == Tarray || exp.e1.type.ty == Tsarray)
{
if (checkNonAssignmentArrayOp(exp.e1))
return setError();
// T[] ^^= ...
if (exp.e2.implicitConvTo(exp.e1.type.nextOf()))
{
// T[] ^^= T
exp.e2 = exp.e2.castTo(sc, exp.e1.type.nextOf());
}
else if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
// Check element types are arithmetic
Type tb1 = exp.e1.type.nextOf().toBasetype();
Type tb2 = exp.e2.type.toBasetype();
if (tb2.ty == Tarray || tb2.ty == Tsarray)
tb2 = tb2.nextOf().toBasetype();
if ((tb1.isintegral() || tb1.isfloating()) && (tb2.isintegral() || tb2.isfloating()))
{
exp.type = exp.e1.type;
result = arrayOp(exp, sc);
return;
}
}
else
{
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
}
if ((exp.e1.type.isintegral() || exp.e1.type.isfloating()) && (exp.e2.type.isintegral() || exp.e2.type.isfloating()))
{
Expression e0 = null;
e = exp.reorderSettingAAElem(sc);
e = Expression.extractLast(e, e0);
assert(e == exp);
if (exp.e1.op == EXP.variable)
{
// Rewrite: e1 = e1 ^^ e2
e = new PowExp(exp.loc, exp.e1.syntaxCopy(), exp.e2);
e = new AssignExp(exp.loc, exp.e1, e);
}
else
{
// Rewrite: ref tmp = e1; tmp = tmp ^^ e2
auto v = copyToTemp(STC.ref_, "__powtmp", exp.e1);
auto de = new DeclarationExp(exp.e1.loc, v);
auto ve = new VarExp(exp.e1.loc, v);
e = new PowExp(exp.loc, ve, exp.e2);
e = new AssignExp(exp.loc, new VarExp(exp.e1.loc, v), e);
e = new CommaExp(exp.loc, de, e);
}
e = Expression.combine(e0, e);
e = e.expressionSemantic(sc);
result = e;
return;
}
result = exp.incompatibleTypes();
}
override void visit(CatAssignExp exp)
{
if (exp.type)
{
result = exp;
return;
}
//printf("CatAssignExp::semantic() %s\n", exp.toChars());
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (SliceExp se = exp.e1.isSliceExp())
{
if (se.e1.type.toBasetype().ty == Tsarray)
{
exp.error("cannot append to static array `%s`", se.e1.type.toChars());
return setError();
}
}
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
if (exp.e1.op == EXP.error)
{
result = exp.e1;
return;
}
if (exp.e2.op == EXP.error)
{
result = exp.e2;
return;
}
if (checkNonAssignmentArrayOp(exp.e2))
return setError();
Type tb1 = exp.e1.type.toBasetype();
Type tb1next = tb1.nextOf();
Type tb2 = exp.e2.type.toBasetype();
/* Possibilities:
* EXP.concatenateAssign: appending T[] to T[]
* EXP.concatenateElemAssign: appending T to T[]
* EXP.concatenateDcharAssign: appending dchar to T[]
*/
if ((tb1.ty == Tarray) &&
(tb2.ty == Tarray || tb2.ty == Tsarray) &&
(exp.e2.implicitConvTo(exp.e1.type) ||
(tb2.nextOf().implicitConvTo(tb1next) &&
(tb2.nextOf().size(Loc.initial) == tb1next.size(Loc.initial)))))
{
// EXP.concatenateAssign
assert(exp.op == EXP.concatenateAssign);
if (exp.e1.checkPostblit(sc, tb1next))
return setError();
exp.e2 = exp.e2.castTo(sc, exp.e1.type);
}
else if ((tb1.ty == Tarray) && exp.e2.implicitConvTo(tb1next))
{
/* https://issues.dlang.org/show_bug.cgi?id=19782
*
* If e2 is implicitly convertible to tb1next, the conversion
* might be done through alias this, in which case, e2 needs to
* be modified accordingly (e2 => e2.aliasthis).
*/
if (tb2.ty == Tstruct && (cast(TypeStruct)tb2).implicitConvToThroughAliasThis(tb1next))
goto Laliasthis;
if (tb2.ty == Tclass && (cast(TypeClass)tb2).implicitConvToThroughAliasThis(tb1next))
goto Laliasthis;
// Append element
if (exp.e2.checkPostblit(sc, tb2))
return setError();
if (checkNewEscape(sc, exp.e2, false))
return setError();
exp = new CatElemAssignExp(exp.loc, exp.type, exp.e1, exp.e2.castTo(sc, tb1next));
exp.e2 = doCopyOrMove(sc, exp.e2);
}
else if (tb1.ty == Tarray &&
(tb1next.ty == Tchar || tb1next.ty == Twchar) &&
exp.e2.type.ty != tb1next.ty &&
exp.e2.implicitConvTo(Type.tdchar))
{
// Append dchar to char[] or wchar[]
exp = new CatDcharAssignExp(exp.loc, exp.type, exp.e1, exp.e2.castTo(sc, Type.tdchar));
/* Do not allow appending wchar to char[] because if wchar happens
* to be a surrogate pair, nothing good can result.
*/
}
else
{
// Try alias this on first operand
static Expression tryAliasThisForLhs(BinAssignExp exp, Scope* sc)
{
AggregateDeclaration ad1 = isAggregate(exp.e1.type);
if (!ad1 || !ad1.aliasthis)
return null;
/* Rewrite (e1 op e2) as:
* (e1.aliasthis op e2)
*/
if (isRecursiveAliasThis(exp.att1, exp.e1.type))
return null;
//printf("att %s e1 = %s\n", Token.toChars(e.op), e.e1.type.toChars());
Expression e1 = new DotIdExp(exp.loc, exp.e1, ad1.aliasthis.ident);
BinExp be = cast(BinExp)exp.copy();
be.e1 = e1;
return be.trySemantic(sc);
}
// Try alias this on second operand
static Expression tryAliasThisForRhs(BinAssignExp exp, Scope* sc)
{
AggregateDeclaration ad2 = isAggregate(exp.e2.type);
if (!ad2 || !ad2.aliasthis)
return null;
/* Rewrite (e1 op e2) as:
* (e1 op e2.aliasthis)
*/
if (isRecursiveAliasThis(exp.att2, exp.e2.type))
return null;
//printf("att %s e2 = %s\n", Token.toChars(e.op), e.e2.type.toChars());
Expression e2 = new DotIdExp(exp.loc, exp.e2, ad2.aliasthis.ident);
BinExp be = cast(BinExp)exp.copy();
be.e2 = e2;
return be.trySemantic(sc);
}
Laliasthis:
result = tryAliasThisForLhs(exp, sc);
if (result)
return;
result = tryAliasThisForRhs(exp, sc);
if (result)
return;
exp.error("cannot append type `%s` to type `%s`", tb2.toChars(), tb1.toChars());
return setError();
}
if (exp.e2.checkValue() || exp.e2.checkSharedAccess(sc))
return setError();
exp.type = exp.e1.type;
auto assignElem = exp.e2;
auto res = exp.reorderSettingAAElem(sc);
if (res != exp) // `AA[k] = v` rewrite was performed
checkNewEscape(sc, assignElem, false);
else if (exp.op == EXP.concatenateElemAssign || exp.op == EXP.concatenateDcharAssign)
checkAssignEscape(sc, res, false, false);
result = res;
if ((exp.op == EXP.concatenateAssign || exp.op == EXP.concatenateElemAssign) &&
sc.needsCodegen())
{
// if aa ordering is triggered, `res` will be a CommaExp
// and `.e2` will be the rewritten original expression.
// `output` will point to the expression that the lowering will overwrite
Expression* output;
if (auto comma = res.isCommaExp())
{
output = &comma.e2;
// manual cast because it could be either CatAssignExp or CatElemAssignExp
exp = cast(CatAssignExp)comma.e2;
}
else
{
output = &result;
exp = cast(CatAssignExp)result;
}
if (exp.op == EXP.concatenateAssign)
{
Identifier hook = global.params.tracegc ? Id._d_arrayappendTTrace : Id._d_arrayappendT;
if (!verifyHookExist(exp.loc, *sc, hook, "appending array to arrays", Id.object))
return setError();
// Lower to object._d_arrayappendT{,Trace}({file, line, funcname}, e1, e2)
Expression id = new IdentifierExp(exp.loc, Id.empty);
id = new DotIdExp(exp.loc, id, Id.object);
id = new DotIdExp(exp.loc, id, hook);
auto arguments = new Expressions();
arguments.reserve(5);
if (global.params.tracegc)
{
auto funcname = (sc.callsc && sc.callsc.func) ? sc.callsc.func.toPrettyChars() : sc.func.toPrettyChars();
arguments.push(new StringExp(exp.loc, exp.loc.filename.toDString()));
arguments.push(new IntegerExp(exp.loc, exp.loc.linnum, Type.tint32));
arguments.push(new StringExp(exp.loc, funcname.toDString()));
}
arguments.push(exp.e1);
arguments.push(exp.e2);
Expression ce = new CallExp(exp.loc, id, arguments);
*output = ce.expressionSemantic(sc);
}
else if (exp.op == EXP.concatenateElemAssign)
{
/* Do not lower concats to the indices array returned by
*`static foreach`, as this array is only used at compile-time.
*/
if (auto ve = exp.e1.isVarExp)
{
import core.stdc.ctype : isdigit;
// The name of the indices array that static foreach loops uses.
// See dmd.cond.lowerNonArrayAggregate
enum varName = "__res";
const(char)[] id = ve.var.ident.toString;
if (ve.var.storage_class & STC.temp && id.length > varName.length &&
id[0 .. varName.length] == varName && id[varName.length].isdigit)
return;
}
Identifier hook = global.params.tracegc ? Id._d_arrayappendcTXTrace : Id._d_arrayappendcTX;
if (!verifyHookExist(exp.loc, *sc, Id._d_arrayappendcTXImpl, "appending element to arrays", Id.object))
return setError();
// Lower to object._d_arrayappendcTXImpl!(typeof(e1))._d_arrayappendcTX{,Trace}(e1, 1), e1[$-1]=e2
Expression id = new IdentifierExp(exp.loc, Id.empty);
id = new DotIdExp(exp.loc, id, Id.object);
auto tiargs = new Objects();
tiargs.push(exp.e1.type);
id = new DotTemplateInstanceExp(exp.loc, id, Id._d_arrayappendcTXImpl, tiargs);
id = new DotIdExp(exp.loc, id, hook);
auto arguments = new Expressions();
arguments.reserve(5);
if (global.params.tracegc)
{
auto funcname = (sc.callsc && sc.callsc.func) ? sc.callsc.func.toPrettyChars() : sc.func.toPrettyChars();
arguments.push(new StringExp(exp.loc, exp.loc.filename.toDString()));
arguments.push(new IntegerExp(exp.loc, exp.loc.linnum, Type.tint32));
arguments.push(new StringExp(exp.loc, funcname.toDString()));
}
Expression eValue1;
Expression value1 = extractSideEffect(sc, "__appendtmp", eValue1, exp.e1);
arguments.push(value1);
arguments.push(new IntegerExp(exp.loc, 1, Type.tsize_t));
Expression ce = new CallExp(exp.loc, id, arguments);
Expression eValue2;
Expression value2 = exp.e2;
if (!value2.isVarExp() && !value2.isConst())
{
/* Before the template hook, this check was performed in e2ir.d
* for expressions like `a ~= a[$-1]`. Here, $ will be modified
* by calling `_d_arrayappendcT`, so we need to save `a[$-1]` in
* a temporary variable.
*/
value2 = extractSideEffect(sc, "__appendtmp", eValue2, value2, true);
exp.e2 = value2;
// `__appendtmp*` will be destroyed together with the array `exp.e1`.
auto vd = eValue2.isDeclarationExp().declaration.isVarDeclaration();
vd.storage_class |= STC.nodtor;
// Be more explicit that this "declaration" is local to the expression
vd.storage_class |= STC.exptemp;
}
auto ale = new ArrayLengthExp(exp.loc, value1);
auto elem = new IndexExp(exp.loc, value1, new MinExp(exp.loc, ale, IntegerExp.literal!1));
auto ae = new ConstructExp(exp.loc, elem, value2);
auto e0 = Expression.combine(ce, ae).expressionSemantic(sc);
e0 = Expression.combine(e0, value1);
e0 = Expression.combine(eValue1, e0);
e0 = Expression.combine(eValue2, e0);
*output = e0.expressionSemantic(sc);
}
}
}
override void visit(AddExp exp)
{
static if (LOGSEMANTIC)
{
printf("AddExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
/* ImportC: convert arrays to pointers, functions to pointers to functions
*/
exp.e1 = exp.e1.arrayFuncConv(sc);
exp.e2 = exp.e2.arrayFuncConv(sc);
Type tb1 = exp.e1.type.toBasetype();
Type tb2 = exp.e2.type.toBasetype();
bool err = false;
if (tb1.ty == Tdelegate || tb1.isPtrToFunction())
{
err |= exp.e1.checkArithmetic() || exp.e1.checkSharedAccess(sc);
}
if (tb2.ty == Tdelegate || tb2.isPtrToFunction())
{
err |= exp.e2.checkArithmetic() || exp.e2.checkSharedAccess(sc);
}
if (err)
return setError();
if (tb1.ty == Tpointer && exp.e2.type.isintegral() || tb2.ty == Tpointer && exp.e1.type.isintegral())
{
result = scaleFactor(exp, sc);
return;
}
if (tb1.ty == Tpointer && tb2.ty == Tpointer)
{
result = exp.incompatibleTypes();
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
tb1 = exp.e1.type.toBasetype();
if (!target.isVectorOpSupported(tb1, exp.op, tb2))
{
result = exp.incompatibleTypes();
return;
}
if ((tb1.isreal() && exp.e2.type.isimaginary()) || (tb1.isimaginary() && exp.e2.type.isreal()))
{
switch (exp.type.toBasetype().ty)
{
case Tfloat32:
case Timaginary32:
exp.type = Type.tcomplex32;
break;
case Tfloat64:
case Timaginary64:
exp.type = Type.tcomplex64;
break;
case Tfloat80:
case Timaginary80:
exp.type = Type.tcomplex80;
break;
default:
assert(0);
}
}
result = exp;
}
override void visit(MinExp exp)
{
static if (LOGSEMANTIC)
{
printf("MinExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
/* ImportC: convert arrays to pointers, functions to pointers to functions
*/
exp.e1 = exp.e1.arrayFuncConv(sc);
exp.e2 = exp.e2.arrayFuncConv(sc);
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
bool err = false;
if (t1.ty == Tdelegate || t1.isPtrToFunction())
{
err |= exp.e1.checkArithmetic() || exp.e1.checkSharedAccess(sc);
}
if (t2.ty == Tdelegate || t2.isPtrToFunction())
{
err |= exp.e2.checkArithmetic() || exp.e2.checkSharedAccess(sc);
}
if (err)
return setError();
if (t1.ty == Tpointer)
{
if (t2.ty == Tpointer)
{
// https://dlang.org/spec/expression.html#add_expressions
// "If both operands are pointers, and the operator is -, the pointers are
// subtracted and the result is divided by the size of the type pointed to
// by the operands. It is an error if the pointers point to different types."
Type p1 = t1.nextOf();
Type p2 = t2.nextOf();
if (!p1.equivalent(p2))
{
// Deprecation to remain for at least a year, after which this should be
// changed to an error
// See https://github.com/dlang/dmd/pull/7332
deprecation(exp.loc,
"cannot subtract pointers to different types: `%s` and `%s`.",
t1.toChars(), t2.toChars());
}
// Need to divide the result by the stride
// Replace (ptr - ptr) with (ptr - ptr) / stride
long stride;
// make sure pointer types are compatible
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
exp.type = Type.tptrdiff_t;
stride = t2.nextOf().size();
if (stride == 0)
{
e = new IntegerExp(exp.loc, 0, Type.tptrdiff_t);
}
else if (stride == cast(long)SIZE_INVALID)
e = ErrorExp.get();
else
{
e = new DivExp(exp.loc, exp, new IntegerExp(Loc.initial, stride, Type.tptrdiff_t));
e.type = Type.tptrdiff_t;
}
}
else if (t2.isintegral())
e = scaleFactor(exp, sc);
else
{
exp.error("can't subtract `%s` from pointer", t2.toChars());
e = ErrorExp.get();
}
result = e;
return;
}
if (t2.ty == Tpointer)
{
exp.type = exp.e2.type;
exp.error("can't subtract pointer from `%s`", exp.e1.type.toChars());
return setError();
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
t1 = exp.e1.type.toBasetype();
t2 = exp.e2.type.toBasetype();
if (!target.isVectorOpSupported(t1, exp.op, t2))
{
result = exp.incompatibleTypes();
return;
}
if ((t1.isreal() && t2.isimaginary()) || (t1.isimaginary() && t2.isreal()))
{
switch (exp.type.ty)
{
case Tfloat32:
case Timaginary32:
exp.type = Type.tcomplex32;
break;
case Tfloat64:
case Timaginary64:
exp.type = Type.tcomplex64;
break;
case Tfloat80:
case Timaginary80:
exp.type = Type.tcomplex80;
break;
default:
assert(0);
}
}
result = exp;
return;
}
/**
* If the given expression is a `CatExp`, the function tries to lower it to
* `_d_arraycatnTX`.
*
* Params:
* ee = the `CatExp` to lower
* Returns:
* `_d_arraycatnTX(e1, e2, ..., en)` if `ee` is `e1 ~ e2 ~ ... en`
* `ee` otherwise
*/
private Expression lowerToArrayCat(CatExp exp)
{
// String literals are concatenated by the compiler. No lowering is needed.
if ((exp.e1.isStringExp() && (exp.e2.isIntegerExp() || exp.e2.isStringExp())) ||
(exp.e2.isStringExp() && (exp.e1.isIntegerExp() || exp.e1.isStringExp())))
return exp;
Identifier hook = global.params.tracegc ? Id._d_arraycatnTXTrace : Id._d_arraycatnTX;
if (!verifyHookExist(exp.loc, *sc, hook, "concatenating arrays"))
{
setError();
return result;
}
void handleCatArgument(Expressions *arguments, Expression e)
{
if (auto ce = e.isCatExp())
{
Expression lowering = ce.lowering;
/* Skip `file`, `line`, and `funcname` if the hook of the parent
* `CatExp` is `_d_arraycatnTXTrace`.
*/
if (auto callExp = isRuntimeHook(lowering, hook))
{
if (hook == Id._d_arraycatnTX)
arguments.pushSlice((*callExp.arguments)[]);
else
arguments.pushSlice((*callExp.arguments)[3 .. $]);
}
}
else
arguments.push(e);
}
auto arguments = new Expressions();
if (global.params.tracegc)
{
auto funcname = (sc.callsc && sc.callsc.func) ?
sc.callsc.func.toPrettyChars() : sc.func.toPrettyChars();
arguments.push(new StringExp(exp.loc, exp.loc.filename.toDString()));
arguments.push(new IntegerExp(exp.loc, exp.loc.linnum, Type.tint32));
arguments.push(new StringExp(exp.loc, funcname.toDString()));
}
handleCatArgument(arguments, exp.e1);
handleCatArgument(arguments, exp.e2);
Expression id = new IdentifierExp(exp.loc, Id.empty);
id = new DotIdExp(exp.loc, id, Id.object);
auto tiargs = new Objects();
tiargs.push(exp.type);
id = new DotTemplateInstanceExp(exp.loc, id, hook, tiargs);
id = new CallExp(exp.loc, id, arguments);
return id.expressionSemantic(sc);
}
void trySetCatExpLowering(Expression exp)
{
/* `_d_arraycatnTX` canot be used with `-betterC`, but `CatExp`s may be
* used with `-betterC`, but only during CTFE.
*/
if (global.params.betterC || !sc.needsCodegen())
return;
if (auto ce = exp.isCatExp())
ce.lowering = lowerToArrayCat(ce);
}
override void visit(CatExp exp)
{
// https://dlang.org/spec/expression.html#cat_expressions
//printf("CatExp.semantic() %s\n", toChars());
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type tb1 = exp.e1.type.toBasetype();
Type tb2 = exp.e2.type.toBasetype();
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
return setError();
Type tb1next = tb1.nextOf();
Type tb2next = tb2.nextOf();
// Check for: array ~ array
if (tb1next && tb2next && (tb1next.implicitConvTo(tb2next) >= MATCH.constant || tb2next.implicitConvTo(tb1next) >= MATCH.constant || exp.e1.op == EXP.arrayLiteral && exp.e1.implicitConvTo(tb2) || exp.e2.op == EXP.arrayLiteral && exp.e2.implicitConvTo(tb1)))
{
/* https://issues.dlang.org/show_bug.cgi?id=9248
* Here to avoid the case of:
* void*[] a = [cast(void*)1];
* void*[] b = [cast(void*)2];
* a ~ b;
* becoming:
* a ~ [cast(void*)b];
*/
/* https://issues.dlang.org/show_bug.cgi?id=14682
* Also to avoid the case of:
* int[][] a;
* a ~ [];
* becoming:
* a ~ cast(int[])[];
*/
goto Lpeer;
}
// Check for: array ~ element
if ((tb1.ty == Tsarray || tb1.ty == Tarray) && tb2.ty != Tvoid)
{
if (exp.e1.op == EXP.arrayLiteral)
{
exp.e2 = doCopyOrMove(sc, exp.e2);
// https://issues.dlang.org/show_bug.cgi?id=14686
// Postblit call appears in AST, and this is
// finally translated to an ArrayLiteralExp in below optimize().
}
else if (exp.e1.op == EXP.string_)
{
// No postblit call exists on character (integer) value.
}
else
{
if (exp.e2.checkPostblit(sc, tb2))
return setError();
// Postblit call will be done in runtime helper function
}
if (exp.e1.op == EXP.arrayLiteral && exp.e1.implicitConvTo(tb2.arrayOf()))
{
exp.e1 = exp.e1.implicitCastTo(sc, tb2.arrayOf());
exp.type = tb2.arrayOf();
goto L2elem;
}
if (exp.e2.implicitConvTo(tb1next) >= MATCH.convert)
{
exp.e2 = exp.e2.implicitCastTo(sc, tb1next);
exp.type = tb1next.arrayOf();
L2elem:
if (checkNewEscape(sc, exp.e2, false))
return setError();
result = exp.optimize(WANTvalue);
trySetCatExpLowering(result);
return;
}
}
// Check for: element ~ array
if ((tb2.ty == Tsarray || tb2.ty == Tarray) && tb1.ty != Tvoid)
{
if (exp.e2.op == EXP.arrayLiteral)
{
exp.e1 = doCopyOrMove(sc, exp.e1);
}
else if (exp.e2.op == EXP.string_)
{
}
else
{
if (exp.e1.checkPostblit(sc, tb1))
return setError();
}
if (exp.e2.op == EXP.arrayLiteral && exp.e2.implicitConvTo(tb1.arrayOf()))
{
exp.e2 = exp.e2.implicitCastTo(sc, tb1.arrayOf());
exp.type = tb1.arrayOf();
goto L1elem;
}
if (exp.e1.implicitConvTo(tb2next) >= MATCH.convert)
{
exp.e1 = exp.e1.implicitCastTo(sc, tb2next);
exp.type = tb2next.arrayOf();
L1elem:
if (checkNewEscape(sc, exp.e1, false))
return setError();
result = exp.optimize(WANTvalue);
trySetCatExpLowering(result);
return;
}
}
Lpeer:
if ((tb1.ty == Tsarray || tb1.ty == Tarray) && (tb2.ty == Tsarray || tb2.ty == Tarray) && (tb1next.mod || tb2next.mod) && (tb1next.mod != tb2next.mod))
{
Type t1 = tb1next.mutableOf().constOf().arrayOf();
Type t2 = tb2next.mutableOf().constOf().arrayOf();
if (exp.e1.op == EXP.string_ && !(cast(StringExp)exp.e1).committed)
exp.e1.type = t1;
else
exp.e1 = exp.e1.castTo(sc, t1);
if (exp.e2.op == EXP.string_ && !(cast(StringExp)exp.e2).committed)
exp.e2.type = t2;
else
exp.e2 = exp.e2.castTo(sc, t2);
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
trySetCatExpLowering(result);
return;
}
exp.type = exp.type.toHeadMutable();
Type tb = exp.type.toBasetype();
if (tb.ty == Tsarray)
exp.type = tb.nextOf().arrayOf();
if (exp.type.ty == Tarray && tb1next && tb2next && tb1next.mod != tb2next.mod)
{
exp.type = exp.type.nextOf().toHeadMutable().arrayOf();
}
if (Type tbn = tb.nextOf())
{
if (exp.checkPostblit(sc, tbn))
return setError();
}
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
if ((t1.ty == Tarray || t1.ty == Tsarray) &&
(t2.ty == Tarray || t2.ty == Tsarray))
{
// Normalize to ArrayLiteralExp or StringExp as far as possible
e = exp.optimize(WANTvalue);
}
else
{
//printf("(%s) ~ (%s)\n", e1.toChars(), e2.toChars());
result = exp.incompatibleTypes();
return;
}
result = e;
trySetCatExpLowering(result);
}
override void visit(MulExp exp)
{
version (none)
{
printf("MulExp::semantic() %s\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (exp.checkArithmeticBin() || exp.checkSharedAccessBin(sc))
return setError();
if (exp.type.isfloating())
{
Type t1 = exp.e1.type;
Type t2 = exp.e2.type;
if (t1.isreal())
{
exp.type = t2;
}
else if (t2.isreal())
{
exp.type = t1;
}
else if (t1.isimaginary())
{
if (t2.isimaginary())
{
switch (t1.toBasetype().ty)
{
case Timaginary32:
exp.type = Type.tfloat32;
break;
case Timaginary64:
exp.type = Type.tfloat64;
break;
case Timaginary80:
exp.type = Type.tfloat80;
break;
default:
assert(0);
}
// iy * iv = -yv
exp.e1.type = exp.type;
exp.e2.type = exp.type;
e = new NegExp(exp.loc, exp);
e = e.expressionSemantic(sc);
result = e;
return;
}
else
exp.type = t2; // t2 is complex
}
else if (t2.isimaginary())
{
exp.type = t1; // t1 is complex
}
}
else if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
result = exp;
}
override void visit(DivExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (exp.checkArithmeticBin() || exp.checkSharedAccessBin(sc))
return setError();
if (exp.type.isfloating())
{
Type t1 = exp.e1.type;
Type t2 = exp.e2.type;
if (t1.isreal())
{
exp.type = t2;
if (t2.isimaginary())
{
// x/iv = i(-x/v)
exp.e2.type = t1;
e = new NegExp(exp.loc, exp);
e = e.expressionSemantic(sc);
result = e;
return;
}
}
else if (t2.isreal())
{
exp.type = t1;
}
else if (t1.isimaginary())
{
if (t2.isimaginary())
{
switch (t1.toBasetype().ty)
{
case Timaginary32:
exp.type = Type.tfloat32;
break;
case Timaginary64:
exp.type = Type.tfloat64;
break;
case Timaginary80:
exp.type = Type.tfloat80;
break;
default:
assert(0);
}
}
else
exp.type = t2; // t2 is complex
}
else if (t2.isimaginary())
{
exp.type = t1; // t1 is complex
}
}
else if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
result = exp;
}
override void visit(ModExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkArithmeticBin() || exp.checkSharedAccessBin(sc))
return setError();
if (exp.type.isfloating())
{
exp.type = exp.e1.type;
if (exp.e2.type.iscomplex())
{
exp.error("cannot perform modulo complex arithmetic");
return setError();
}
}
result = exp;
}
override void visit(PowExp exp)
{
if (exp.type)
{
result = exp;
return;
}
//printf("PowExp::semantic() %s\n", toChars());
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (exp.checkArithmeticBin() || exp.checkSharedAccessBin(sc))
return setError();
if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
// First, attempt to fold the expression.
e = exp.optimize(WANTvalue);
if (e.op != EXP.pow)
{
e = e.expressionSemantic(sc);
result = e;
return;
}
Module mmath = Module.loadStdMath();
if (!mmath)
{
e.error("`%s` requires `std.math` for `^^` operators", e.toChars());
return setError();
}
e = new ScopeExp(exp.loc, mmath);
if (exp.e2.op == EXP.float64 && exp.e2.toReal() == CTFloat.half)
{
// Replace e1 ^^ 0.5 with .std.math.sqrt(e1)
e = new CallExp(exp.loc, new DotIdExp(exp.loc, e, Id._sqrt), exp.e1);
}
else
{
// Replace e1 ^^ e2 with .std.math.pow(e1, e2)
e = new CallExp(exp.loc, new DotIdExp(exp.loc, e, Id._pow), exp.e1, exp.e2);
}
e = e.expressionSemantic(sc);
result = e;
return;
}
override void visit(ShlExp exp)
{
//printf("ShlExp::semantic(), type = %p\n", type);
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
if (!target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
exp.e1 = integralPromotions(exp.e1, sc);
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
exp.type = exp.e1.type;
result = exp;
}
override void visit(ShrExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
if (!target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
exp.e1 = integralPromotions(exp.e1, sc);
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
exp.type = exp.e1.type;
result = exp;
}
override void visit(UshrExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
if (!target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
exp.e1 = integralPromotions(exp.e1, sc);
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
exp.type = exp.e1.type;
result = exp;
}
override void visit(AndExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool)
{
exp.type = exp.e1.type;
result = exp;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
result = exp;
}
override void visit(OrExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool)
{
exp.type = exp.e1.type;
result = exp;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
result = exp;
}
override void visit(XorExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool)
{
exp.type = exp.e1.type;
result = exp;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkIntegralBin() || exp.checkSharedAccessBin(sc))
return setError();
result = exp;
}
override void visit(LogicalExp exp)
{
static if (LOGSEMANTIC)
{
printf("LogicalExp::semantic() %s\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
Expression e1x = exp.e1.expressionSemantic(sc);
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e1x.op == EXP.type)
e1x = resolveAliasThis(sc, e1x);
e1x = resolveProperties(sc, e1x);
e1x = e1x.toBoolean(sc);
if (sc.flags & SCOPE.condition)
{
/* If in static if, don't evaluate e2 if we don't have to.
*/
e1x = e1x.optimize(WANTvalue);
if (e1x.toBool().hasValue(exp.op == EXP.orOr))
{
if (sc.flags & SCOPE.Cfile)
result = new IntegerExp(exp.op == EXP.orOr);
else
result = IntegerExp.createBool(exp.op == EXP.orOr);
return;
}
}
CtorFlow ctorflow = sc.ctorflow.clone();
Expression e2x = exp.e2.expressionSemantic(sc);
sc.merge(exp.loc, ctorflow);
ctorflow.freeFieldinit();
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e2x.op == EXP.type)
e2x = resolveAliasThis(sc, e2x);
e2x = resolveProperties(sc, e2x);
auto f1 = checkNonAssignmentArrayOp(e1x);
auto f2 = checkNonAssignmentArrayOp(e2x);
if (f1 || f2)
return setError();
// Unless the right operand is 'void', the expression is converted to 'bool'.
if (e2x.type.ty != Tvoid)
e2x = e2x.toBoolean(sc);
if (e2x.op == EXP.type || e2x.op == EXP.scope_)
{
exp.error("`%s` is not an expression", exp.e2.toChars());
return setError();
}
if (e1x.op == EXP.error || e1x.type.ty == Tnoreturn)
{
result = e1x;
return;
}
if (e2x.op == EXP.error)
{
result = e2x;
return;
}
// The result type is 'bool', unless the right operand has type 'void'.
if (e2x.type.ty == Tvoid)
exp.type = Type.tvoid;
else
exp.type = (sc && sc.flags & SCOPE.Cfile) ? Type.tint32 : Type.tbool;
exp.e1 = e1x;
exp.e2 = e2x;
result = exp;
}
override void visit(CmpExp exp)
{
static if (LOGSEMANTIC)
{
printf("CmpExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
if (t1.ty == Tclass && exp.e2.op == EXP.null_ || t2.ty == Tclass && exp.e1.op == EXP.null_)
{
exp.error("do not use `null` when comparing class types");
return setError();
}
EXP cmpop = exp.op;
if (auto e = exp.op_overload(sc, &cmpop))
{
if (!e.type.isscalar() && e.type.equals(exp.e1.type))
{
exp.error("recursive `opCmp` expansion");
return setError();
}
if (e.op == EXP.call)
{
if (t1.ty == Tclass && t2.ty == Tclass)
{
// Lower to object.__cmp(e1, e2)
Expression cl = new IdentifierExp(exp.loc, Id.empty);
cl = new DotIdExp(exp.loc, cl, Id.object);
cl = new DotIdExp(exp.loc, cl, Id.__cmp);
cl = cl.expressionSemantic(sc);
auto arguments = new Expressions();
// Check if op_overload found a better match by calling e2.opCmp(e1)
// If the operands were swapped, then the result must be reversed
// e1.opCmp(e2) == -e2.opCmp(e1)
// cmpop takes care of this
if (exp.op == cmpop)
{
arguments.push(exp.e1);
arguments.push(exp.e2);
}
else
{
// Use better match found by op_overload
arguments.push(exp.e2);
arguments.push(exp.e1);
}
cl = new CallExp(exp.loc, cl, arguments);
cl = new CmpExp(cmpop, exp.loc, cl, new IntegerExp(0));
result = cl.expressionSemantic(sc);
return;
}
e = new CmpExp(cmpop, exp.loc, e, IntegerExp.literal!0);
e = e.expressionSemantic(sc);
}
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
return setError();
exp.type = (sc && sc.flags & SCOPE.Cfile) ? Type.tint32 : Type.tbool;
// Special handling for array comparisons
Expression arrayLowering = null;
t1 = exp.e1.type.toBasetype();
t2 = exp.e2.type.toBasetype();
if ((t1.ty == Tarray || t1.ty == Tsarray || t1.ty == Tpointer) && (t2.ty == Tarray || t2.ty == Tsarray || t2.ty == Tpointer))
{
Type t1next = t1.nextOf();
Type t2next = t2.nextOf();
if (t1next.implicitConvTo(t2next) < MATCH.constant && t2next.implicitConvTo(t1next) < MATCH.constant && (t1next.ty != Tvoid && t2next.ty != Tvoid))
{
exp.error("array comparison type mismatch, `%s` vs `%s`", t1next.toChars(), t2next.toChars());
return setError();
}
if (sc.needsCodegen() &&
(t1.ty == Tarray || t1.ty == Tsarray) &&
(t2.ty == Tarray || t2.ty == Tsarray))
{
if (!verifyHookExist(exp.loc, *sc, Id.__cmp, "comparing arrays"))
return setError();
// Lower to object.__cmp(e1, e2)
Expression al = new IdentifierExp(exp.loc, Id.empty);
al = new DotIdExp(exp.loc, al, Id.object);
al = new DotIdExp(exp.loc, al, Id.__cmp);
al = al.expressionSemantic(sc);
auto arguments = new Expressions(2);
(*arguments)[0] = exp.e1;
(*arguments)[1] = exp.e2;
al = new CallExp(exp.loc, al, arguments);
al = new CmpExp(exp.op, exp.loc, al, IntegerExp.literal!0);
arrayLowering = al;
}
}
else if (t1.ty == Tstruct || t2.ty == Tstruct || (t1.ty == Tclass && t2.ty == Tclass))
{
if (t2.ty == Tstruct)
exp.error("need member function `opCmp()` for %s `%s` to compare", t2.toDsymbol(sc).kind(), t2.toChars());
else
exp.error("need member function `opCmp()` for %s `%s` to compare", t1.toDsymbol(sc).kind(), t1.toChars());
return setError();
}
else if (t1.iscomplex() || t2.iscomplex())
{
exp.error("compare not defined for complex operands");
return setError();
}
else if (t1.ty == Taarray || t2.ty == Taarray)
{
exp.error("`%s` is not defined for associative arrays", EXPtoString(exp.op).ptr);
return setError();
}
else if (!target.isVectorOpSupported(t1, exp.op, t2))
{
result = exp.incompatibleTypes();
return;
}
else
{
bool r1 = exp.e1.checkValue() || exp.e1.checkSharedAccess(sc);
bool r2 = exp.e2.checkValue() || exp.e2.checkSharedAccess(sc);
if (r1 || r2)
return setError();
}
//printf("CmpExp: %s, type = %s\n", e.toChars(), e.type.toChars());
if (arrayLowering)
{
arrayLowering = arrayLowering.expressionSemantic(sc);
result = arrayLowering;
return;
}
if (auto tv = t1.isTypeVector())
exp.type = tv.toBooleanVector();
result = exp;
return;
}
override void visit(InExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type t2b = exp.e2.type.toBasetype();
switch (t2b.ty)
{
case Taarray:
{
TypeAArray ta = cast(TypeAArray)t2b;
// Special handling for array keys
if (!arrayTypeCompatibleWithoutCasting(exp.e1.type, ta.index))
{
// Convert key to type of key
exp.e1 = exp.e1.implicitCastTo(sc, ta.index);
}
semanticTypeInfo(sc, ta.index);
// Return type is pointer to value
exp.type = ta.nextOf().pointerTo();
break;
}
case Terror:
return setError();
case Tarray, Tsarray:
result = exp.incompatibleTypes();
exp.errorSupplemental("`in` is only allowed on associative arrays");
const(char)* slice = (t2b.ty == Tsarray) ? "[]" : "";
exp.errorSupplemental("perhaps use `std.algorithm.find(%s, %s%s)` instead",
exp.e1.toChars(), exp.e2.toChars(), slice);
return;
default:
result = exp.incompatibleTypes();
return;
}
result = exp;
}
override void visit(RemoveExp e)
{
if (Expression ex = binSemantic(e, sc))
{
result = ex;
return;
}
result = e;
}
override void visit(EqualExp exp)
{
//printf("EqualExp::semantic('%s')\n", exp.toChars());
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
if (auto e = binSemanticProp(exp, sc))
{
result = e;
return;
}
if (exp.e1.op == EXP.type || exp.e2.op == EXP.type)
{
/* https://issues.dlang.org/show_bug.cgi?id=12520
* empty tuples are represented as types so special cases are added
* so that they can be compared for equality with tuples of values.
*/
static auto extractTypeTupAndExpTup(Expression e)
{
static struct Result { bool ttEmpty; bool te; }
auto tt = e.op == EXP.type ? e.isTypeExp().type.isTypeTuple() : null;
return Result(tt && (!tt.arguments || !tt.arguments.length), e.isTupleExp() !is null);
}
auto tups1 = extractTypeTupAndExpTup(exp.e1);
auto tups2 = extractTypeTupAndExpTup(exp.e2);
// AliasSeq!() == AliasSeq!(<at least a value>)
if (tups1.ttEmpty && tups2.te)
{
result = IntegerExp.createBool(exp.op != EXP.equal);
return;
}
// AliasSeq!(<at least a value>) == AliasSeq!()
else if (tups1.te && tups2.ttEmpty)
{
result = IntegerExp.createBool(exp.op != EXP.equal);
return;
}
// AliasSeq!() == AliasSeq!()
else if (tups1.ttEmpty && tups2.ttEmpty)
{
result = IntegerExp.createBool(exp.op == EXP.equal);
return;
}
// otherwise, two types are really not comparable
result = exp.incompatibleTypes();
return;
}
{
auto t1 = exp.e1.type;
auto t2 = exp.e2.type;
if (t1.ty == Tenum && t2.ty == Tenum && !t1.equivalent(t2))
exp.error("comparison between different enumeration types `%s` and `%s`; If this behavior is intended consider using `std.conv.asOriginalType`",
t1.toChars(), t2.toChars());
}
/* Before checking for operator overloading, check to see if we're
* comparing the addresses of two statics. If so, we can just see
* if they are the same symbol.
*/
if (exp.e1.op == EXP.address && exp.e2.op == EXP.address)
{
AddrExp ae1 = cast(AddrExp)exp.e1;
AddrExp ae2 = cast(AddrExp)exp.e2;
if (ae1.e1.op == EXP.variable && ae2.e1.op == EXP.variable)
{
VarExp ve1 = cast(VarExp)ae1.e1;
VarExp ve2 = cast(VarExp)ae2.e1;
if (ve1.var == ve2.var)
{
// They are the same, result is 'true' for ==, 'false' for !=
result = IntegerExp.createBool(exp.op == EXP.equal);
return;
}
}
}
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
// Indicates whether the comparison of the 2 specified array types
// requires an object.__equals() lowering.
static bool needsDirectEq(Type t1, Type t2, Scope* sc)
{
Type t1n = t1.nextOf().toBasetype();
Type t2n = t2.nextOf().toBasetype();
if ((t1n.ty.isSomeChar && t2n.ty.isSomeChar) ||
(t1n.ty == Tvoid || t2n.ty == Tvoid))
{
return false;
}
if (t1n.constOf() != t2n.constOf())
return true;
Type t = t1n;
while (t.toBasetype().nextOf())
t = t.nextOf().toBasetype();
if (auto ts = t.isTypeStruct())
{
// semanticTypeInfo() makes sure hasIdentityEquals has been computed
if (global.params.useTypeInfo && Type.dtypeinfo)
semanticTypeInfo(sc, ts);
return ts.sym.hasIdentityEquals; // has custom opEquals
}
return false;
}
if (auto e = exp.op_overload(sc))
{
result = e;
return;
}
const isArrayComparison = (t1.ty == Tarray || t1.ty == Tsarray) &&
(t2.ty == Tarray || t2.ty == Tsarray);
const needsArrayLowering = isArrayComparison && needsDirectEq(t1, t2, sc);
if (!needsArrayLowering)
{
// https://issues.dlang.org/show_bug.cgi?id=23783
if (exp.e1.checkSharedAccess(sc) || exp.e2.checkSharedAccess(sc))
return setError();
if (auto e = typeCombine(exp, sc))
{
result = e;
return;
}
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
return setError();
exp.type = (sc && sc.flags & SCOPE.Cfile) ? Type.tint32 : Type.tbool;
if (!isArrayComparison)
{
if (exp.e1.type != exp.e2.type && exp.e1.type.isfloating() && exp.e2.type.isfloating())
{
// Cast both to complex
exp.e1 = exp.e1.castTo(sc, Type.tcomplex80);
exp.e2 = exp.e2.castTo(sc, Type.tcomplex80);
}
}
// lower some array comparisons to object.__equals(e1, e2)
if (needsArrayLowering || (t1.ty == Tarray && t2.ty == Tarray))
{
//printf("Lowering to __equals %s %s\n", exp.e1.toChars(), exp.e2.toChars());
// https://issues.dlang.org/show_bug.cgi?id=22390
// Equality comparison between array of noreturns simply lowers to length equality comparison
if (t1.nextOf.isTypeNoreturn() && t2.nextOf.isTypeNoreturn())
{
Expression exp_l1 = new DotIdExp(exp.e1.loc, exp.e1, Id.length);
Expression exp_l2 = new DotIdExp(exp.e2.loc, exp.e2, Id.length);
auto e = new EqualExp(EXP.equal, exp.loc, exp_l1, exp_l2);
result = e.expressionSemantic(sc);
return;
}
if (!verifyHookExist(exp.loc, *sc, Id.__equals, "equal checks on arrays"))
return setError();
Expression __equals = new IdentifierExp(exp.loc, Id.empty);
Identifier id = Identifier.idPool("__equals");
__equals = new DotIdExp(exp.loc, __equals, Id.object);
__equals = new DotIdExp(exp.loc, __equals, id);
/* https://issues.dlang.org/show_bug.cgi?id=23674
*
* Optimize before creating the call expression to the
* druntime hook as the optimizer may output errors
* that will get swallowed otherwise.
*/
exp.e1 = exp.e1.optimize(WANTvalue);
exp.e2 = exp.e2.optimize(WANTvalue);
auto arguments = new Expressions(2);
(*arguments)[0] = exp.e1;
(*arguments)[1] = exp.e2;
__equals = new CallExp(exp.loc, __equals, arguments);
if (exp.op == EXP.notEqual)
{
__equals = new NotExp(exp.loc, __equals);
}
__equals = __equals.trySemantic(sc); // for better error message
if (!__equals)
{
exp.error("incompatible types for array comparison: `%s` and `%s`",
exp.e1.type.toChars(), exp.e2.type.toChars());
__equals = ErrorExp.get();
}
result = __equals;
return;
}
if (exp.e1.type.toBasetype().ty == Taarray)
semanticTypeInfo(sc, exp.e1.type.toBasetype());
if (!target.isVectorOpSupported(t1, exp.op, t2))
{
result = exp.incompatibleTypes();
return;
}
if (auto tv = t1.isTypeVector())
exp.type = tv.toBooleanVector();
result = exp;
}
override void visit(IdentityExp exp)
{
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
if (auto e = binSemanticProp(exp, sc))
{
result = e;
return;
}
if (auto e = typeCombine(exp, sc))
{
result = e;
return;
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
return setError();
if (exp.e1.op == EXP.type || exp.e2.op == EXP.type)
{
result = exp.incompatibleTypes();
return;
}
exp.type = Type.tbool;
if (exp.e1.type != exp.e2.type && exp.e1.type.isfloating() && exp.e2.type.isfloating())
{
// Cast both to complex
exp.e1 = exp.e1.castTo(sc, Type.tcomplex80);
exp.e2 = exp.e2.castTo(sc, Type.tcomplex80);
}
auto tb1 = exp.e1.type.toBasetype();
auto tb2 = exp.e2.type.toBasetype();
if (!target.isVectorOpSupported(tb1, exp.op, tb2))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.op == EXP.call)
exp.e1 = (cast(CallExp)exp.e1).addDtorHook(sc);
if (exp.e2.op == EXP.call)
exp.e2 = (cast(CallExp)exp.e2).addDtorHook(sc);
if (exp.e1.type.toBasetype().ty == Tsarray ||
exp.e2.type.toBasetype().ty == Tsarray)
exp.deprecation("identity comparison of static arrays "
~ "implicitly coerces them to slices, "
~ "which are compared by reference");
result = exp;
}
override void visit(CondExp exp)
{
static if (LOGSEMANTIC)
{
printf("CondExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (auto die = exp.econd.isDotIdExp())
die.noderef = true;
Expression ec = exp.econd.expressionSemantic(sc);
ec = resolveProperties(sc, ec);
ec = ec.toBoolean(sc);
CtorFlow ctorflow_root = sc.ctorflow.clone();
Expression e1x = exp.e1.expressionSemantic(sc).arrayFuncConv(sc);
e1x = resolveProperties(sc, e1x);
CtorFlow ctorflow1 = sc.ctorflow;
sc.ctorflow = ctorflow_root;
Expression e2x = exp.e2.expressionSemantic(sc).arrayFuncConv(sc);
e2x = resolveProperties(sc, e2x);
sc.merge(exp.loc, ctorflow1);
ctorflow1.freeFieldinit();
if (ec.op == EXP.error)
{
result = ec;
return;
}
if (ec.type == Type.terror)
return setError();
exp.econd = ec;
if (e1x.op == EXP.error)
{
result = e1x;
return;
}
if (e1x.type == Type.terror)
return setError();
exp.e1 = e1x;
if (e2x.op == EXP.error)
{
result = e2x;
return;
}
if (e2x.type == Type.terror)
return setError();
exp.e2 = e2x;
auto f0 = checkNonAssignmentArrayOp(exp.econd);
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f0 || f1 || f2)
return setError();
Type t1 = exp.e1.type;
Type t2 = exp.e2.type;
// https://issues.dlang.org/show_bug.cgi?id=23767
// `cast(void*) 0` should be treated as `null` so the ternary expression
// gets the pointer type of the other branch
if (sc.flags & SCOPE.Cfile)
{
static void rewriteCNull(ref Expression e, ref Type t)
{
if (!t.isTypePointer())
return;
if (auto ie = e.optimize(WANTvalue).isIntegerExp())
{
if (ie.getInteger() == 0)
{
e = new NullExp(e.loc, Type.tnull);
t = Type.tnull;
}
}
}
rewriteCNull(exp.e1, t1);
rewriteCNull(exp.e2, t2);
}
if (t1.ty == Tnoreturn)
{
exp.type = t2;
exp.e1 = specialNoreturnCast(exp.e1, exp.type);
}
else if (t2.ty == Tnoreturn)
{
exp.type = t1;
exp.e2 = specialNoreturnCast(exp.e2, exp.type);
}
// If either operand is void the result is void, we have to cast both
// the expression to void so that we explicitly discard the expression
// value if any
// https://issues.dlang.org/show_bug.cgi?id=16598
else if (t1.ty == Tvoid || t2.ty == Tvoid)
{
exp.type = Type.tvoid;
exp.e1 = exp.e1.castTo(sc, exp.type);
exp.e2 = exp.e2.castTo(sc, exp.type);
}
else if (t1 == t2)
exp.type = t1;
else
{
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
switch (exp.e1.type.toBasetype().ty)
{
case Tcomplex32:
case Tcomplex64:
case Tcomplex80:
exp.e2 = exp.e2.castTo(sc, exp.e1.type);
break;
default:
break;
}
switch (exp.e2.type.toBasetype().ty)
{
case Tcomplex32:
case Tcomplex64:
case Tcomplex80:
exp.e1 = exp.e1.castTo(sc, exp.e2.type);
break;
default:
break;
}
if (exp.type.toBasetype().ty == Tarray)
{
exp.e1 = exp.e1.castTo(sc, exp.type);
exp.e2 = exp.e2.castTo(sc, exp.type);
}
}
exp.type = exp.type.merge2();
version (none)
{
printf("res: %s\n", exp.type.toChars());
printf("e1 : %s\n", exp.e1.type.toChars());
printf("e2 : %s\n", exp.e2.type.toChars());
}
/* https://issues.dlang.org/show_bug.cgi?id=14696
* If either e1 or e2 contain temporaries which need dtor,
* make them conditional.
* Rewrite:
* cond ? (__tmp1 = ..., __tmp1) : (__tmp2 = ..., __tmp2)
* to:
* (auto __cond = cond) ? (... __tmp1) : (... __tmp2)
* and replace edtors of __tmp1 and __tmp2 with:
* __tmp1.edtor --> __cond && __tmp1.dtor()
* __tmp2.edtor --> __cond || __tmp2.dtor()
*/
exp.hookDtors(sc);
result = exp;
}
override void visit(GenericExp exp)
{
static if (LOGSEMANTIC)
{
printf("GenericExp::semantic('%s')\n", exp.toChars());
}
// C11 6.5.1.1 Generic Selection
auto ec = exp.cntlExp.expressionSemantic(sc).arrayFuncConv(sc);
bool errors = ec.isErrorExp() !is null;
auto tc = ec.type;
auto types = (*exp.types)[];
foreach (i, ref t; types)
{
if (!t)
continue; // `default:` case
t = t.typeSemantic(ec.loc, sc);
if (t.isTypeError())
{
errors = true;
continue;
}
/* C11 6.5.1-2 duplicate check
*/
/* C11 distinguishes int, long, and long long. But D doesn't, so depending on the
* C target, a long may have the same type as `int` in the D type system.
* So, skip checks when this may be the case. Later pick the first match
*/
if (
(t.ty == Tint32 || t.ty == Tuns32) && target.c.longsize == 4 ||
(t.ty == Tint64 || t.ty == Tuns64) && target.c.longsize == 8 ||
(t.ty == Tfloat64 || t.ty == Timaginary64 || t.ty == Tcomplex64) && target.c.long_doublesize == 8
)
continue;
foreach (t2; types[0 .. i])
{
if (t2 && t2.equals(t))
{
error(ec.loc, "generic association type `%s` can only appear once", t.toChars());
errors = true;
break;
}
}
}
auto exps = (*exp.exps)[];
foreach (ref e; exps)
{
e = e.expressionSemantic(sc);
if (e.isErrorExp())
errors = true;
}
if (errors)
return setError();
enum size_t None = ~0;
size_t imatch = None;
size_t idefault = None;
foreach (const i, t; types)
{
if (t)
{
/* if tc is compatible with t, it's a match
* C11 6.2.7 defines a compatible type as being the same type, including qualifiers
*/
if (tc.equals(t))
{
assert(imatch == None);
imatch = i;
break; // pick first match
}
}
else
idefault = i; // multiple defaults are not allowed, and are caught by cparse
}
if (imatch == None)
imatch = idefault;
if (imatch == None)
{
error(exp.loc, "no compatible generic association type for controlling expression type `%s`", tc.toChars());
return setError();
}
result = exps[imatch];
}
override void visit(FileInitExp e)
{
//printf("FileInitExp::semantic()\n");
e.type = Type.tstring;
result = e;
}
override void visit(LineInitExp e)
{
e.type = Type.tint32;
result = e;
}
override void visit(ModuleInitExp e)
{
//printf("ModuleInitExp::semantic()\n");
e.type = Type.tstring;
result = e;
}
override void visit(FuncInitExp e)
{
//printf("FuncInitExp::semantic()\n");
e.type = Type.tstring;
if (sc.func)
{
result = e.resolveLoc(Loc.initial, sc);
return;
}
result = e;
}
override void visit(PrettyFuncInitExp e)
{
//printf("PrettyFuncInitExp::semantic()\n");
e.type = Type.tstring;
if (sc.func)
{
result = e.resolveLoc(Loc.initial, sc);
return;
}
result = e;
}
}
/**********************************
* Try to run semantic routines.
* If they fail, return NULL.
*/
Expression trySemantic(Expression exp, Scope* sc)
{
//printf("+trySemantic(%s)\n", exp.toChars());
uint errors = global.startGagging();
Expression e = expressionSemantic(exp, sc);
if (global.endGagging(errors))
{
e = null;
}
//printf("-trySemantic(%s)\n", exp.toChars());
return e;
}
/**************************
* Helper function for easy error propagation.
* If error occurs, returns ErrorExp. Otherwise returns NULL.
*/
Expression unaSemantic(UnaExp e, Scope* sc)
{
static if (LOGSEMANTIC)
{
printf("UnaExp::semantic('%s')\n", e.toChars());
}
Expression e1x = e.e1.expressionSemantic(sc);
if (e1x.op == EXP.error)
return e1x;
e.e1 = e1x;
return null;
}
/**************************
* Helper function for easy error propagation.
* If error occurs, returns ErrorExp. Otherwise returns NULL.
*/
Expression binSemantic(BinExp e, Scope* sc)
{
static if (LOGSEMANTIC)
{
printf("BinExp::semantic('%s')\n", e.toChars());
}
Expression e1x = e.e1.expressionSemantic(sc);
Expression e2x = e.e2.expressionSemantic(sc);
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e1x.op == EXP.type)
e1x = resolveAliasThis(sc, e1x);
if (e2x.op == EXP.type)
e2x = resolveAliasThis(sc, e2x);
if (e1x.op == EXP.error)
return e1x;
if (e2x.op == EXP.error)
return e2x;
e.e1 = e1x;
e.e2 = e2x;
return null;
}
Expression binSemanticProp(BinExp e, Scope* sc)
{
if (Expression ex = binSemantic(e, sc))
return ex;
Expression e1x = resolveProperties(sc, e.e1);
Expression e2x = resolveProperties(sc, e.e2);
if (e1x.op == EXP.error)
return e1x;
if (e2x.op == EXP.error)
return e2x;
e.e1 = e1x;
e.e2 = e2x;
return null;
}
// entrypoint for semantic ExpressionSemanticVisitor
extern (C++) Expression expressionSemantic(Expression e, Scope* sc)
{
scope v = new ExpressionSemanticVisitor(sc);
e.accept(v);
return v.result;
}
private Expression dotIdSemanticPropX(DotIdExp exp, Scope* sc)
{
//printf("DotIdExp::semanticX(this = %p, '%s')\n", this, toChars());
if (Expression ex = unaSemantic(exp, sc))
return ex;
if (!(sc.flags & SCOPE.Cfile) && exp.ident == Id._mangleof)
{
// symbol.mangleof
// return mangleof as an Expression
static Expression dotMangleof(const ref Loc loc, Scope* sc, Dsymbol ds)
{
assert(ds);
if (auto f = ds.isFuncDeclaration())
{
if (f.checkForwardRef(loc))
return ErrorExp.get();
if (f.purityInprocess || f.safetyInprocess || f.nothrowInprocess || f.nogcInprocess)
{
f.error(loc, "cannot retrieve its `.mangleof` while inferring attributes");
return ErrorExp.get();
}
}
OutBuffer buf;
mangleToBuffer(ds, &buf);
Expression e = new StringExp(loc, buf.extractSlice());
return e.expressionSemantic(sc);
}
Dsymbol ds;
switch (exp.e1.op)
{
case EXP.scope_: return dotMangleof(exp.loc, sc, exp.e1.isScopeExp().sds);
case EXP.variable: return dotMangleof(exp.loc, sc, exp.e1.isVarExp().var);
case EXP.dotVariable: return dotMangleof(exp.loc, sc, exp.e1.isDotVarExp().var);
case EXP.overloadSet: return dotMangleof(exp.loc, sc, exp.e1.isOverExp().vars);
case EXP.template_:
{
TemplateExp te = exp.e1.isTemplateExp();
return dotMangleof(exp.loc, sc, ds = te.fd ? te.fd.isDsymbol() : te.td);
}
default:
break;
}
}
if (exp.e1.isVarExp() && exp.e1.type.toBasetype().isTypeSArray() && exp.ident == Id.length)
{
// bypass checkPurity
return exp.e1.type.dotExp(sc, exp.e1, exp.ident, cast(DotExpFlag) (exp.noderef * DotExpFlag.noDeref));
}
if (!exp.e1.isDotExp())
{
exp.e1 = resolvePropertiesX(sc, exp.e1);
}
if (auto te = exp.e1.isTupleExp())
{
if (exp.ident == Id.offsetof)
{
/* 'distribute' the .offsetof to each of the tuple elements.
*/
auto exps = new Expressions(te.exps.length);
foreach (i, e; (*te.exps)[])
{
(*exps)[i] = new DotIdExp(e.loc, e, Id.offsetof);
}
// Don't evaluate te.e0 in runtime
Expression e = new TupleExp(exp.loc, null, exps);
e = e.expressionSemantic(sc);
return e;
}
if (exp.ident == Id.length)
{
// Don't evaluate te.e0 in runtime
return new IntegerExp(exp.loc, te.exps.length, Type.tsize_t);
}
}
// https://issues.dlang.org/show_bug.cgi?id=14416
// Template has no built-in properties except for 'stringof'.
if ((exp.e1.isDotTemplateExp() || exp.e1.isTemplateExp()) && exp.ident != Id.stringof)
{
exp.error("template `%s` does not have property `%s`", exp.e1.toChars(), exp.ident.toChars());
return ErrorExp.get();
}
if (!exp.e1.type)
{
exp.error("expression `%s` does not have property `%s`", exp.e1.toChars(), exp.ident.toChars());
return ErrorExp.get();
}
return exp;
}
/******************************
* Resolve properties, i.e. `e1.ident`, without seeing UFCS.
* Params:
* exp = expression to resolve
* sc = context
* gag = do not emit error messages, just return `null`
* Returns:
* resolved expression, null if error
*/
Expression dotIdSemanticProp(DotIdExp exp, Scope* sc, bool gag)
{
//printf("DotIdExp::semanticY(this = %p, '%s')\n", exp, exp.toChars());
//{ static int z; fflush(stdout); if (++z == 10) *(char*)0=0; }
const cfile = (sc.flags & SCOPE.Cfile) != 0;
/* Special case: rewrite this.id and super.id
* to be classtype.id and baseclasstype.id
* if we have no this pointer.
*/
if ((exp.e1.isThisExp() || exp.e1.isSuperExp()) && !hasThis(sc))
{
if (AggregateDeclaration ad = sc.getStructClassScope())
{
if (exp.e1.isThisExp())
{
exp.e1 = new TypeExp(exp.e1.loc, ad.type);
}
else
{
if (auto cd = ad.isClassDeclaration())
{
if (cd.baseClass)
exp.e1 = new TypeExp(exp.e1.loc, cd.baseClass.type);
}
}
}
}
{
Expression e = dotIdSemanticPropX(exp, sc);
if (e != exp)
return e;
}
Expression eleft;
Expression eright;
if (auto de = exp.e1.isDotExp())
{
eleft = de.e1;
eright = de.e2;
}
else
{
eleft = null;
eright = exp.e1;
}
Type t1b = exp.e1.type.toBasetype();
if (auto ie = eright.isScopeExp()) // also used for template alias's
{
auto flags = SearchLocalsOnly;
/* Disable access to another module's private imports.
* The check for 'is sds our current module' is because
* the current module should have access to its own imports.
*/
if (ie.sds.isModule() && ie.sds != sc._module)
flags |= IgnorePrivateImports;
if (sc.flags & SCOPE.ignoresymbolvisibility)
flags |= IgnoreSymbolVisibility;
Dsymbol s = ie.sds.search(exp.loc, exp.ident, flags);
/* Check for visibility before resolving aliases because public
* aliases to private symbols are public.
*/
if (s && !(sc.flags & SCOPE.ignoresymbolvisibility) && !symbolIsVisible(sc._module, s))
{
s = null;
}
if (s)
{
auto p = s.isPackage();
if (p && checkAccess(sc, p))
{
s = null;
}
}
if (s)
{
// if 's' is a tuple variable, the tuple is returned.
s = s.toAlias();
exp.checkDeprecated(sc, s);
exp.checkDisabled(sc, s);
if (auto em = s.isEnumMember())
{
return em.getVarExp(exp.loc, sc);
}
if (auto v = s.isVarDeclaration())
{
//printf("DotIdExp:: Identifier '%s' is a variable, type '%s'\n", toChars(), v.type.toChars());
if (!v.type ||
!v.type.deco && v.inuse)
{
if (v.inuse)
exp.error("circular reference to %s `%s`", v.kind(), v.toPrettyChars());
else
exp.error("forward reference to %s `%s`", v.kind(), v.toPrettyChars());
return ErrorExp.get();
}
if (v.type.isTypeError())
return ErrorExp.get();
if ((v.storage_class & STC.manifest) && v._init && !exp.wantsym)
{
/* Normally, the replacement of a symbol with its initializer is supposed to be in semantic2().
* Introduced by https://github.com/dlang/dmd/pull/5588 which should probably
* be reverted. `wantsym` is the hack to work around the problem.
*/
if (v.inuse)
{
error(exp.loc, "circular initialization of %s `%s`", v.kind(), v.toPrettyChars());
return ErrorExp.get();
}
auto e = v.expandInitializer(exp.loc);
v.inuse++;
e = e.expressionSemantic(sc);
v.inuse--;
return e;
}
Expression e;
if (v.needThis())
{
if (!eleft)
eleft = new ThisExp(exp.loc);
e = new DotVarExp(exp.loc, eleft, v);
e = e.expressionSemantic(sc);
}
else
{
e = new VarExp(exp.loc, v);
if (eleft)
{
e = new CommaExp(exp.loc, eleft, e);
e.type = v.type;
}
}
e = e.deref();
return e.expressionSemantic(sc);
}
if (auto f = s.isFuncDeclaration())
{
//printf("it's a function\n");
if (!f.functionSemantic())
return ErrorExp.get();
Expression e;
if (f.needThis())
{
if (!eleft)
eleft = new ThisExp(exp.loc);
e = new DotVarExp(exp.loc, eleft, f, true);
e = e.expressionSemantic(sc);
}
else
{
e = new VarExp(exp.loc, f, true);
if (eleft)
{
e = new CommaExp(exp.loc, eleft, e);
e.type = f.type;
}
}
return e;
}
if (auto td = s.isTemplateDeclaration())
{
Expression e;
if (eleft)
e = new DotTemplateExp(exp.loc, eleft, td);
else
e = new TemplateExp(exp.loc, td);
e = e.expressionSemantic(sc);
return e;
}
if (OverDeclaration od = s.isOverDeclaration())
{
Expression e = new VarExp(exp.loc, od, true);
if (eleft)
{
e = new CommaExp(exp.loc, eleft, e);
e.type = Type.tvoid; // ambiguous type?
}
return e.expressionSemantic(sc);
}
if (auto o = s.isOverloadSet())
{
//printf("'%s' is an overload set\n", o.toChars());
return new OverExp(exp.loc, o);
}
if (auto t = s.getType())
{
return (new TypeExp(exp.loc, t)).expressionSemantic(sc);
}
if (auto tup = s.isTupleDeclaration())
{
if (eleft)
{
Expression e = new DotVarExp(exp.loc, eleft, tup);
e = e.expressionSemantic(sc);
return e;
}
Expression e = new TupleExp(exp.loc, tup);
e = e.expressionSemantic(sc);
return e;
}
if (auto sds = s.isScopeDsymbol())
{
//printf("it's a ScopeDsymbol %s\n", ident.toChars());
Expression e = new ScopeExp(exp.loc, sds);
e = e.expressionSemantic(sc);
if (eleft)
e = new DotExp(exp.loc, eleft, e);
return e;
}
if (auto imp = s.isImport())
{
Expression se = new ScopeExp(exp.loc, imp.pkg);
return se.expressionSemantic(sc);
}
if (auto attr = s.isAttribDeclaration())
{
if (auto sm = ie.sds.search(exp.loc, exp.ident, flags))
{
auto es = new DsymbolExp(exp.loc, sm);
return es;
}
}
// BUG: handle other cases like in IdentifierExp::semantic()
debug
{
printf("s = %p '%s', kind = '%s'\n", s, s.toChars(), s.kind());
}
assert(0);
}
else if (exp.ident == Id.stringof)
{
Expression e = new StringExp(exp.loc, ie.toString());
e = e.expressionSemantic(sc);
return e;
}
if (ie.sds.isPackage() || ie.sds.isImport() || ie.sds.isModule())
{
gag = false;
}
if (gag)
return null;
s = ie.sds.search_correct(exp.ident);
if (s && symbolIsVisible(sc, s))
{
if (s.isPackage())
exp.error("undefined identifier `%s` in %s `%s`, perhaps add `static import %s;`", exp.ident.toChars(), ie.sds.kind(), ie.sds.toPrettyChars(), s.toPrettyChars());
else
exp.error("undefined identifier `%s` in %s `%s`, did you mean %s `%s`?", exp.ident.toChars(), ie.sds.kind(), ie.sds.toPrettyChars(), s.kind(), s.toChars());
}
else
exp.error("undefined identifier `%s` in %s `%s`", exp.ident.toChars(), ie.sds.kind(), ie.sds.toPrettyChars());
return ErrorExp.get();
}
else if (t1b.ty == Tpointer && exp.e1.type.ty != Tenum &&
!(
exp.ident == Id.__sizeof ||
exp.ident == Id.__xalignof ||
!cfile &&
(exp.ident == Id._mangleof ||
exp.ident == Id.offsetof ||
exp.ident == Id._init ||
exp.ident == Id.stringof)
))
{
Type t1bn = t1b.nextOf();
if (gag)
{
if (AggregateDeclaration ad = isAggregate(t1bn))
{
if (!ad.members) // https://issues.dlang.org/show_bug.cgi?id=11312
return null;
}
}
/* Rewrite:
* p.ident
* as:
* (*p).ident
*/
if (gag && t1bn.ty == Tvoid)
return null;
Expression e = new PtrExp(exp.loc, exp.e1);
e = e.expressionSemantic(sc);
const newFlag = cast(DotExpFlag) (gag * DotExpFlag.gag | exp.noderef * DotExpFlag.noDeref);
return e.type.dotExp(sc, e, exp.ident, newFlag);
}
else if (exp.ident == Id.__xalignof &&
exp.e1.isVarExp() &&
exp.e1.isVarExp().var.isVarDeclaration() &&
!exp.e1.isVarExp().var.isVarDeclaration().alignment.isUnknown())
{
// For `x.alignof` get the alignment of the variable, not the alignment of its type
const explicitAlignment = exp.e1.isVarExp().var.isVarDeclaration().alignment;
const naturalAlignment = exp.e1.type.alignsize();
const actualAlignment = explicitAlignment.isDefault() ? naturalAlignment : explicitAlignment.get();
Expression e = new IntegerExp(exp.loc, actualAlignment, Type.tsize_t);
return e;
}
else if ((exp.ident == Id.max || exp.ident == Id.min) &&
exp.e1.isVarExp() &&
exp.e1.isVarExp().var.isBitFieldDeclaration())
{
// For `x.max` and `x.min` get the max/min of the bitfield, not the max/min of its type
auto bf = exp.e1.isVarExp().var.isBitFieldDeclaration();
return new IntegerExp(exp.loc, bf.getMinMax(exp.ident), bf.type);
}
else if ((exp.ident == Id.max || exp.ident == Id.min) &&
exp.e1.isDotVarExp() &&
exp.e1.isDotVarExp().var.isBitFieldDeclaration())
{
// For `x.max` and `x.min` get the max/min of the bitfield, not the max/min of its type
auto bf = exp.e1.isDotVarExp().var.isBitFieldDeclaration();
return new IntegerExp(exp.loc, bf.getMinMax(exp.ident), bf.type);
}
else
{
if (exp.e1.isTypeExp() || exp.e1.isTemplateExp())
gag = false;
const flag = cast(DotExpFlag) (exp.noderef * DotExpFlag.noDeref | gag * DotExpFlag.gag);
Expression e = exp.e1.type.dotExp(sc, exp.e1, exp.ident, flag);
if (e)
{
e = e.expressionSemantic(sc);
}
return e;
}
}
/**
* Resolve `e1.ident!tiargs` without seeing UFCS.
* Params:
* exp = the `DotTemplateInstanceExp` to resolve
* sc = the semantic scope
* gag = stop "not a property" error and return `null`.
* Returns:
* `null` if error or not found, or the resolved expression.
*/
Expression dotTemplateSemanticProp(DotTemplateInstanceExp exp, Scope* sc, bool gag)
{
static if (LOGSEMANTIC)
{
printf("DotTemplateInstanceExpY::semantic('%s')\n", exp.toChars());
}
static Expression errorExp()
{
return ErrorExp.get();
}
Expression e1 = exp.e1;
if (exp.ti.tempdecl && exp.ti.tempdecl.parent && exp.ti.tempdecl.parent.isTemplateMixin())
{
// if 'ti.tempdecl' happens to be found in a mixin template don't lose that info
// and do the symbol search in that context (Issue: 19476)
auto tm = cast(TemplateMixin)exp.ti.tempdecl.parent;
e1 = new DotExp(exp.e1.loc, exp.e1, new ScopeExp(tm.loc, tm));
}
auto die = new DotIdExp(exp.loc, e1, exp.ti.name);
Expression e = die.dotIdSemanticPropX(sc);
if (e == die)
{
exp.e1 = die.e1; // take back
Type t1b = exp.e1.type.toBasetype();
if (t1b.ty == Tarray || t1b.ty == Tsarray || t1b.ty == Taarray || t1b.ty == Tnull || (t1b.isTypeBasic() && t1b.ty != Tvoid))
{
/* No built-in type has templatized properties, so do shortcut.
* It is necessary in: 1024.max!"a < b"
*/
if (gag)
return null;
}
e = die.dotIdSemanticProp(sc, gag);
if (gag)
{
if (!e ||
isDotOpDispatch(e))
{
/* opDispatch!tiargs would be a function template that needs IFTI,
* so it's not a template
*/
return null;
}
}
}
assert(e);
if (e.op == EXP.error)
return e;
if (DotVarExp dve = e.isDotVarExp())
{
if (FuncDeclaration fd = dve.var.isFuncDeclaration())
{
if (TemplateDeclaration td = fd.findTemplateDeclRoot())
{
e = new DotTemplateExp(dve.loc, dve.e1, td);
e = e.expressionSemantic(sc);
}
}
else if (OverDeclaration od = dve.var.isOverDeclaration())
{
exp.e1 = dve.e1; // pull semantic() result
if (!exp.findTempDecl(sc))
goto Lerr;
if (exp.ti.needsTypeInference(sc))
return exp;
exp.ti.dsymbolSemantic(sc);
if (!exp.ti.inst || exp.ti.errors) // if template failed to expand
return errorExp();
if (Declaration v = exp.ti.toAlias().isDeclaration())
{
if (v.type && !v.type.deco)
v.type = v.type.typeSemantic(v.loc, sc);
return new DotVarExp(exp.loc, exp.e1, v)
.expressionSemantic(sc);
}
return new DotExp(exp.loc, exp.e1, new ScopeExp(exp.loc, exp.ti))
.expressionSemantic(sc);
}
}
else if (e.op == EXP.variable)
{
VarExp ve = cast(VarExp)e;
if (FuncDeclaration fd = ve.var.isFuncDeclaration())
{
if (TemplateDeclaration td = fd.findTemplateDeclRoot())
{
e = new TemplateExp(ve.loc, td)
.expressionSemantic(sc);
}
}
else if (OverDeclaration od = ve.var.isOverDeclaration())
{
exp.ti.tempdecl = od;
return new ScopeExp(exp.loc, exp.ti)
.expressionSemantic(sc);
}
}
if (DotTemplateExp dte = e.isDotTemplateExp())
{
exp.e1 = dte.e1; // pull semantic() result
exp.ti.tempdecl = dte.td;
if (!exp.ti.semanticTiargs(sc))
return errorExp();
if (exp.ti.needsTypeInference(sc))
return exp;
exp.ti.dsymbolSemantic(sc);
if (!exp.ti.inst || exp.ti.errors) // if template failed to expand
return errorExp();
if (Declaration v = exp.ti.toAlias().isDeclaration())
{
return new DotVarExp(exp.loc, exp.e1, v)
.expressionSemantic(sc);
}
return new DotExp(exp.loc, exp.e1, new ScopeExp(exp.loc, exp.ti))
.expressionSemantic(sc);
}
else if (e.op == EXP.template_)
{
exp.ti.tempdecl = (cast(TemplateExp)e).td;
return new ScopeExp(exp.loc, exp.ti)
.expressionSemantic(sc);
}
else if (DotExp de = e.isDotExp())
{
if (de.e2.op == EXP.overloadSet)
{
if (!exp.findTempDecl(sc) || !exp.ti.semanticTiargs(sc))
{
return errorExp();
}
if (exp.ti.needsTypeInference(sc))
return exp;
exp.ti.dsymbolSemantic(sc);
if (!exp.ti.inst || exp.ti.errors) // if template failed to expand
return errorExp();
if (Declaration v = exp.ti.toAlias().isDeclaration())
{
if (v.type && !v.type.deco)
v.type = v.type.typeSemantic(v.loc, sc);
return new DotVarExp(exp.loc, exp.e1, v)
.expressionSemantic(sc);
}
return new DotExp(exp.loc, exp.e1, new ScopeExp(exp.loc, exp.ti))
.expressionSemantic(sc);
}
}
else if (OverExp oe = e.isOverExp())
{
exp.ti.tempdecl = oe.vars;
return new ScopeExp(exp.loc, exp.ti)
.expressionSemantic(sc);
}
Lerr:
exp.error("`%s` isn't a template", e.toChars());
return errorExp();
}
/***************************************
* If expression is shared, check that we can access it.
* Give error message if not.
*
* Params:
* e = expression to check
* sc = context
* returnRef = Whether this expression is for a `return` statement
* off a `ref` function, in which case a single level
* of dereference is allowed (e.g. `shared(int)*`).
* Returns:
* true on error
*/
bool checkSharedAccess(Expression e, Scope* sc, bool returnRef = false)
{
if (global.params.noSharedAccess != FeatureState.enabled ||
!sc ||
sc.intypeof ||
sc.flags & SCOPE.ctfe)
{
return false;
}
//printf("checkSharedAccess() `%s` returnRef: %d\n", e.toChars(), returnRef);
bool check(Expression e, bool allowRef)
{
bool sharedError(Expression e)
{
// https://dlang.org/phobos/core_atomic.html
e.error("direct access to shared `%s` is not allowed, see `core.atomic`", e.toChars());
return true;
}
// Error by default
bool visit(Expression e)
{
// https://issues.dlang.org/show_bug.cgi?id=23639
// Should be able to cast(shared)
if (!e.isCastExp() && e.type.isShared())
return sharedError(e);
return false;
}
bool visitNew(NewExp e)
{
if (e.thisexp)
check(e.thisexp, false);
return false;
}
bool visitVar(VarExp e)
{
// https://issues.dlang.org/show_bug.cgi?id=20908
// direct access to init symbols is ok as they
// cannot be modified.
if (e.var.isSymbolDeclaration())
return false;
// https://issues.dlang.org/show_bug.cgi?id=22626
// Synchronized functions don't need to use core.atomic
// when accessing `this`.
if (sc.func && sc.func.isSynchronized())
{
if (e.var.isThisDeclaration())
return false;
else
return sharedError(e);
}
else if (!allowRef && e.var.type.isShared())
return sharedError(e);
return false;
}
bool visitAddr(AddrExp e)
{
return check(e.e1, true);
}
bool visitPtr(PtrExp e)
{
if (!allowRef && e.type.isShared())
return sharedError(e);
if (e.e1.type.isShared())
return sharedError(e);
return check(e.e1, false);
}
bool visitDotVar(DotVarExp e)
{
//printf("dotvarexp = %s\n", e.toChars());
if (e.type.isShared())
{
if (e.e1.isThisExp())
{
// https://issues.dlang.org/show_bug.cgi?id=22626
if (sc.func && sc.func.isSynchronized())
return false;
// https://issues.dlang.org/show_bug.cgi?id=23790
if (e.e1.type.isTypeStruct())
return false;
}
auto fd = e.var.isFuncDeclaration();
const sharedFunc = fd && fd.type.isShared;
if (!allowRef && !sharedFunc)
return sharedError(e);
// Allow using `DotVarExp` within value types
if (e.e1.type.isTypeSArray() || e.e1.type.isTypeStruct())
return check(e.e1, allowRef);
// If we end up with a single `VarExp`, it might be a `ref` param
// `shared ref T` param == `shared(T)*`.
if (auto ve = e.e1.isVarExp())
{
return check(e.e1, allowRef && (ve.var.storage_class & STC.ref_));
}
return sharedError(e);
}
return check(e.e1, false);
}
bool visitIndex(IndexExp e)
{
if (!allowRef && e.type.isShared())
return sharedError(e);
if (e.e1.type.isShared())
return sharedError(e);
return check(e.e1, false);
}
bool visitComma(CommaExp e)
{
// Cannot be `return ref` since we can't use the return,
// but it's better to show that error than an unrelated `shared` one
return check(e.e2, true);
}
switch (e.op)
{
default: return visit(e);
// Those have no indirections / can be ignored
case EXP.call:
case EXP.error:
case EXP.complex80:
case EXP.int64:
case EXP.null_: return false;
case EXP.variable: return visitVar(e.isVarExp());
case EXP.new_: return visitNew(e.isNewExp());
case EXP.address: return visitAddr(e.isAddrExp());
case EXP.star: return visitPtr(e.isPtrExp());
case EXP.dotVariable: return visitDotVar(e.isDotVarExp());
case EXP.index: return visitIndex(e.isIndexExp());
}
}
return check(e, returnRef);
}
/****************************************************
* Determine if `exp`, which gets its address taken, can do so safely.
* Params:
* sc = context
* exp = expression having its address taken
* v = the variable getting its address taken
* Returns:
* `true` if ok, `false` for error
*/
bool checkAddressVar(Scope* sc, Expression exp, VarDeclaration v)
{
//printf("checkAddressVar(exp: %s, v: %s)\n", exp.toChars(), v.toChars());
if (v is null)
return true;
if (!v.canTakeAddressOf())
{
exp.error("cannot take address of `%s`", exp.toChars());
return false;
}
if (sc.func && !sc.intypeof && !v.isDataseg())
{
if (global.params.useDIP1000 != FeatureState.enabled &&
!(v.storage_class & STC.temp) &&
sc.setUnsafe(false, exp.loc, "cannot take address of local `%s` in `@safe` function `%s`", v, sc.func))
{
return false;
}
}
return true;
}
/**************************************
* This check ensures that the object in `exp` can have its address taken, or
* issue a diagnostic error.
* Params:
* e = expression to check
* sc = context
* Returns:
* true if the expression is addressable
*/
bool checkAddressable(Expression e, Scope* sc)
{
Expression ex = e;
while (true)
{
switch (ex.op)
{
case EXP.dotVariable:
// https://issues.dlang.org/show_bug.cgi?id=22749
// Error about taking address of any bit-field, regardless of
// whether SCOPE.Cfile is set.
if (auto bf = ex.isDotVarExp().var.isBitFieldDeclaration())
{
e.error("cannot take address of bit-field `%s`", bf.toChars());
return false;
}
goto case EXP.cast_;
case EXP.index:
ex = ex.isBinExp().e1;
continue;
case EXP.address:
case EXP.array:
case EXP.cast_:
ex = ex.isUnaExp().e1;
continue;
case EXP.variable:
if (sc.flags & SCOPE.Cfile)
{
// C11 6.5.3.2: A variable that has its address taken cannot be
// stored in a register.
// C11 6.3.2.1: An array that has its address computed with `[]`
// or cast to an lvalue pointer cannot be stored in a register.
if (ex.isVarExp().var.storage_class & STC.register)
{
if (e.isIndexExp())
e.error("cannot index through register variable `%s`", ex.toChars());
else
e.error("cannot take address of register variable `%s`", ex.toChars());
return false;
}
}
break;
default:
break;
}
break;
}
return true;
}
/*******************************
* Checks the attributes of a function.
* Purity (`pure`), safety (`@safe`), no GC allocations(`@nogc`)
* and usage of `deprecated` and `@disabled`-ed symbols are checked.
*
* Params:
* exp = expression to check attributes for
* sc = scope of the function
* f = function to be checked
* Returns: `true` if error occur.
*/
private bool checkFunctionAttributes(Expression exp, Scope* sc, FuncDeclaration f)
{
with(exp)
{
bool error = checkDisabled(sc, f);
error |= checkDeprecated(sc, f);
error |= checkPurity(sc, f);
error |= checkSafety(sc, f);
error |= checkNogc(sc, f);
return error;
}
}
/*******************************
* Helper function for `getRightThis()`.
* Gets `this` of the next outer aggregate.
* Params:
* loc = location to use for error messages
* sc = context
* s = the parent symbol of the existing `this`
* ad = struct or class we need the correct `this` for
* e1 = existing `this`
* t = type of the existing `this`
* var = the specific member of ad we're accessing
* flag = if true, return `null` instead of throwing an error
* Returns:
* Expression representing the `this` for the var
*/
Expression getThisSkipNestedFuncs(const ref Loc loc, Scope* sc, Dsymbol s, AggregateDeclaration ad, Expression e1, Type t, Dsymbol var, bool flag = false)
{
int n = 0;
while (s && s.isFuncDeclaration())
{
FuncDeclaration f = s.isFuncDeclaration();
if (f.vthis)
{
n++;
e1 = new VarExp(loc, f.vthis);
if (f.hasDualContext())
{
// (*__this)[i]
if (n > 1)
e1 = e1.expressionSemantic(sc);
e1 = new PtrExp(loc, e1);
uint i = f.followInstantiationContext(ad);
e1 = new IndexExp(loc, e1, new IntegerExp(i));
s = f.toParentP(ad);
continue;
}
}
else
{
if (flag)
return null;
e1.error("need `this` of type `%s` to access member `%s` from static function `%s`", ad.toChars(), var.toChars(), f.toChars());
e1 = ErrorExp.get();
return e1;
}
s = s.toParent2();
}
if (n > 1 || e1.op == EXP.index)
e1 = e1.expressionSemantic(sc);
if (s && e1.type.equivalent(Type.tvoidptr))
{
if (auto sad = s.isAggregateDeclaration())
{
Type ta = sad.handleType();
if (ta.ty == Tstruct)
ta = ta.pointerTo();
e1.type = ta;
}
}
e1.type = e1.type.addMod(t.mod);
return e1;
}
/*******************************
* Make a dual-context container for use as a `this` argument.
* Params:
* loc = location to use for error messages
* sc = current scope
* fd = target function that will take the `this` argument
* Returns:
* Temporary closure variable.
* Note:
* The function `fd` is added to the nested references of the
* newly created variable such that a closure is made for the variable when
* the address of `fd` is taken.
*/
VarDeclaration makeThis2Argument(const ref Loc loc, Scope* sc, FuncDeclaration fd)
{
Type tthis2 = Type.tvoidptr.sarrayOf(2);
VarDeclaration vthis2 = new VarDeclaration(loc, tthis2, Identifier.generateId("__this"), null);
vthis2.storage_class |= STC.temp;
vthis2.dsymbolSemantic(sc);
vthis2.parent = sc.parent;
// make it a closure var
assert(sc.func);
sc.func.closureVars.push(vthis2);
// add `fd` to the nested refs
vthis2.nestedrefs.push(fd);
return vthis2;
}
/*******************************
* Make sure that the runtime hook `id` exists.
* Params:
* loc = location to use for error messages
* sc = current scope
* id = the hook identifier
* description = what the hook does
* module_ = what module the hook is located in
* Returns:
* a `bool` indicating if the hook is present.
*/
bool verifyHookExist(const ref Loc loc, ref Scope sc, Identifier id, string description, Identifier module_ = Id.object)
{
auto rootSymbol = sc.search(loc, Id.empty, null);
if (auto moduleSymbol = rootSymbol.search(loc, module_))
if (moduleSymbol.search(loc, id))
return true;
error(loc, "`%s.%s` not found. The current runtime does not support %.*s, or the runtime is corrupt.", module_.toChars(), id.toChars(), cast(int)description.length, description.ptr);
return false;
}
/***************************************
* Fit elements[] to the corresponding types of the `sd`'s fields.
*
* Params:
* sd = the struct declaration
* loc = location to use for error messages
* sc = context
* elements = explicit arguments used to construct object
* stype = the constructed object type.
* Returns:
* false if any errors occur,
* otherwise true and elements[] are rewritten for the output.
*/
private bool fit(StructDeclaration sd, const ref Loc loc, Scope* sc, Expressions* elements, Type stype)
{
if (!elements)
return true;
const nfields = sd.nonHiddenFields();
size_t offset = 0;
for (size_t i = 0; i < elements.length; i++)
{
Expression e = (*elements)[i];
if (!e)
continue;
e = resolveProperties(sc, e);
if (i >= nfields)
{
if (i < sd.fields.length && e.op == EXP.null_)
{
// CTFE sometimes creates null as hidden pointer; we'll allow this.
continue;
}
.error(loc, "more initializers than fields (%llu) of `%s`", cast(ulong)nfields, sd.toChars());
return false;
}
VarDeclaration v = sd.fields[i];
if (v.offset < offset)
{
.error(loc, "overlapping initialization for `%s`", v.toChars());
if (!sd.isUnionDeclaration())
{
enum errorMsg = "`struct` initializers that contain anonymous unions" ~
" must initialize only the first member of a `union`. All subsequent" ~
" non-overlapping fields are default initialized";
.errorSupplemental(loc, errorMsg);
}
return false;
}
const vsize = v.type.size();
if (vsize == SIZE_INVALID)
return false;
offset = cast(uint)(v.offset + vsize);
Type t = v.type;
if (stype)
t = t.addMod(stype.mod);
Type origType = t;
Type tb = t.toBasetype();
const hasPointers = tb.hasPointers();
if (hasPointers)
{
if ((!stype.alignment.isDefault() && stype.alignment.get() < target.ptrsize ||
(v.offset & (target.ptrsize - 1))) &&
(sc.setUnsafe(false, loc,
"field `%s.%s` cannot assign to misaligned pointers in `@safe` code", sd, v)))
{
return false;
}
}
/* Look for case of initializing a static array with a too-short
* string literal, such as:
* char[5] foo = "abc";
* Allow this by doing an explicit cast, which will lengthen the string
* literal.
*/
if (e.op == EXP.string_ && tb.ty == Tsarray)
{
StringExp se = cast(StringExp)e;
Type typeb = se.type.toBasetype();
TY tynto = tb.nextOf().ty;
if (!se.committed &&
(typeb.ty == Tarray || typeb.ty == Tsarray) && tynto.isSomeChar &&
se.numberOfCodeUnits(tynto) < (cast(TypeSArray)tb).dim.toInteger())
{
e = se.castTo(sc, t);
goto L1;
}
}
while (!e.implicitConvTo(t) && tb.ty == Tsarray)
{
/* Static array initialization, as in:
* T[3][5] = e;
*/
t = tb.nextOf();
tb = t.toBasetype();
}
if (!e.implicitConvTo(t))
t = origType; // restore type for better diagnostic
e = e.implicitCastTo(sc, t);
L1:
if (e.op == EXP.error)
return false;
(*elements)[i] = doCopyOrMove(sc, e);
}
return true;
}
/**
* Returns `em` as a VariableExp
* Params:
* em = the EnumMember to wrap
* loc = location of use of em
* sc = scope of use of em
* Returns:
* VarExp referenceing `em` or ErrorExp if `em` if disabled/deprecated
*/
Expression getVarExp(EnumMember em, const ref Loc loc, Scope* sc)
{
dsymbolSemantic(em, sc);
if (em.errors)
return ErrorExp.get();
em.checkDisabled(loc, sc);
if (em.depdecl && !em.depdecl._scope)
em.depdecl._scope = sc;
em.checkDeprecated(loc, sc);
if (em.errors)
return ErrorExp.get();
Expression e = new VarExp(loc, em);
e = e.expressionSemantic(sc);
if (!(sc.flags & SCOPE.Cfile) && em.isCsymbol())
{
/* C11 types them as int. But if in D file,
* type qualified names as the enum
*/
e.type = em.parent.isEnumDeclaration().type;
assert(e.type);
}
return e;
}
/*****************************
* Try to treat `exp` as a boolean,
* Params:
* exp = the expression
* sc = scope to evalute `exp` in
* Returns:
* Modified expression on success, ErrorExp on error
*/
Expression toBoolean(Expression exp, Scope* sc)
{
switch(exp.op)
{
case EXP.delete_:
exp.error("`delete` does not give a boolean result");
return ErrorExp.get();
case EXP.comma:
auto ce = exp.isCommaExp();
auto ex2 = ce.e2.toBoolean(sc);
if (ex2.op == EXP.error)
return ex2;
ce.e2 = ex2;
ce.type = ce.e2.type;
return ce;
case EXP.assign:
case EXP.construct:
case EXP.blit:
case EXP.loweredAssignExp:
if (sc.flags & SCOPE.Cfile)
return exp;
// Things like:
// if (a = b) ...
// are usually mistakes.
exp.error("assignment cannot be used as a condition, perhaps `==` was meant?");
return ErrorExp.get();
//LogicalExp
case EXP.andAnd:
case EXP.orOr:
auto le = exp.isLogicalExp();
auto ex2 = le.e2.toBoolean(sc);
if (ex2.op == EXP.error)
return ex2;
le.e2 = ex2;
return le;
case EXP.question:
auto ce = exp.isCondExp();
auto ex1 = ce.e1.toBoolean(sc);
auto ex2 = ce.e2.toBoolean(sc);
if (ex1.op == EXP.error)
return ex1;
if (ex2.op == EXP.error)
return ex2;
ce.e1 = ex1;
ce.e2 = ex2;
return ce;
default:
// Default is 'yes' - do nothing
Expression e = arrayFuncConv(exp, sc);
Type t = e.type;
Type tb = t.toBasetype();
Type att = null;
while (1)
{
// Structs can be converted to bool using opCast(bool)()
if (auto ts = tb.isTypeStruct())
{
AggregateDeclaration ad = ts.sym;
/* Don't really need to check for opCast first, but by doing so we
* get better error messages if it isn't there.
*/
if (Dsymbol fd = search_function(ad, Id._cast))
{
e = new CastExp(exp.loc, e, Type.tbool);
e = e.expressionSemantic(sc);
return e;
}
// Forward to aliasthis.
if (ad.aliasthis && !isRecursiveAliasThis(att, tb))
{
e = resolveAliasThis(sc, e);
t = e.type;
tb = e.type.toBasetype();
continue;
}
}
break;
}
if (!t.isBoolean())
{
if (tb != Type.terror)
exp.error("expression `%s` of type `%s` does not have a boolean value",
exp.toChars(), t.toChars());
return ErrorExp.get();
}
return e;
}
}
|
D
|
/*
* $Id: displaylist.d,v 1.1.1.1 2005/06/18 00:46:00 kenta Exp $
*
* Copyright 2005 Kenta Cho. Some rights reserved.
*/
module abagames.util.sdl.displaylist;
private import opengl;
private import abagames.util.sdl.sdlexception;
/**
* Manage a display list.
*/
public class DisplayList {
private:
bool registered;
int num;
int idx;
int enumIdx;
public this(int num) {
this.num = num;
idx = glGenLists(num);
}
public void beginNewList() {
resetList();
newList();
}
public void nextNewList() {
glEndList();
enumIdx++;
if (enumIdx >= idx + num || enumIdx < idx)
throw new SDLException("Can't create new list. Index out of bound.");
glNewList(enumIdx, GL_COMPILE);
}
public void endNewList() {
glEndList();
registered = true;
}
public void resetList() {
enumIdx = idx;
}
public void newList() {
glNewList(enumIdx, GL_COMPILE);
}
public void endList() {
glEndList();
enumIdx++;
registered = true;
}
public void call(int i = 0) {
glCallList(idx + i);
}
public void close() {
if (!registered)
return;
glDeleteLists(idx, num);
}
}
|
D
|
// D import file generated from 'D:\dev\projects\d\ZetaBox\ZetaBox.Graphics\ZetaBox\Graphics\Screen.d'
module ZetaBox.Graphics.Screen;
import std.conv;
import std.string;
import ZetaBox.Graphics.Actor;
import ZetaBox.Graphics.Color;
import ZetaBox.Graphics.GL;
import ZetaBox.Graphics.Layout;
public class Screen : IActor2D
{
private GL _runtime;
private char* _title;
private Layout2D _layout;
private SDL_GLContext _context;
private SDL_Window* _screen;
public @property GL Runtime();
public @property string Title();
public @property void Title(string title);
public @property void Layout(Layout2D layout);
public @property Layout2D Layout();
public this();
public void Clear(Color color);
public void Viewport(Layout2D layout);
public void AlphaBg();
public void Render();
public void PrintGLInfo();
}
|
D
|
/*
* Hunt - a framework for web and console application based on Collie using Dlang development
*
* Copyright (C) 2015-2016 Shanghai Putao Technology Co., Ltd
*
* Developer: putao's Dlang team
*
* Licensed under the BSD License.
*
*/
module app.controller.index;
import hunt;
class IndexController : Controller
{
mixin MakeController;
@Action
void index()
{
response.html("Welcome to this example website.");
}
@Action
void show()
{
response.html("this is show page.");
}
}
|
D
|
; Copyright (C) 2008 The Android Open Source Project
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
.source T_or_int_lit8_6.java
.class public dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_6
.super java/lang/Object
.method public <init>()V
.limit regs 1
invoke-direct {v0}, java/lang/Object/<init>()V
return-void
.end method
.method public run(I)I
.limit regs 8
or-int/lit8 v0, v8, 10
return v0
.end method
|
D
|
import vibe.d;
import std.socket;
import std.uuid;
import std.file;
string destPathRoot;
shared static this() {
destPathRoot = readRequiredOption!string("p|path", "Path to file");
Socket s = new TcpSocket();
s.connect(new InternetAddress("google.com", 80));
ushort openPort = to!ushort(s.localAddress.toPortString());
string localAddr = s.localAddress.toAddrString();
s.close();
auto settings = new HTTPServerSettings;
settings.port = openPort;
settings.bindAddresses = ["::1", "0.0.0.0"];
auto uuid = randomUUID();
auto router = new URLRouter;
router.get("/" ~ uuid.toString(), staticTemplate!"index.dt");
router.post("/" ~ uuid.toString(), &recvFile);
listenHTTP(settings, router);
logInfo("Please open http://%s:%d/%s in your browser.", localAddr, openPort, uuid);
}
void recvFile(HTTPServerRequest req, HTTPServerResponse res) {
auto pf = "file" in req.files;
enforce(pf !is null, "No file uploaded!");
Path filepath;
if (exists(destPathRoot) && destPathRoot.isDir)
filepath = Path(destPathRoot) ~ pf.filename;
else
filepath = Path(destPathRoot);
try
moveFile(pf.tempPath, filepath);
catch (Exception e)
copyFile(pf.tempPath, filepath);
res.writeBody("Success!");
yield();
exitEventLoop();
}
|
D
|
//Events in Dream
var int timeToTalkWithBaal;
func void TimeEventsDream()
{
if (WORLD_CURRENT == WORLD_DREAM01)
{
if (isFirstTalkingInDream && InfoManager_HasFinished())
{
timeToTalkWithBaal = 41; //40 s
isFirstTalkingInDream = false;
};
if (timeToTalkWithBaal > 1)
{
timeToTalkWithBaal -= 1;
}
else if (timeToTalkWithBaal == 1)
{
Wld_insertNPC(GUR_12030_BaalTondral_Dream, "PSI_31_HUT_IN");
timeToTalkWithBaal -= 1;
};
if (Npc_isDead(hero) && drankPoisonInDream)
{
Dream_finished = true;
drankPoisonInDream = false;
purge_poison(hero, 0);
};
};
};
|
D
|
///
module jarena.data.loaders.core;
private
{
import core.thread : Fiber;
import std.traits, std.experimental.logger, std.typecons;
import jarena.core, jarena.gameplay.scene;
/++
Capabilities of the new loader:
- New data structure
- Previously, loading in assets was rather 'loose'. You'd pass any file to the loader and it'll figure out
the correct extension to use, which would then cache it into a cache you passed through.
- This meant that you'd pass in the "Data:file" file, and in the user code just use the cache hoping that
everything was loaded in properly.
- I wish to remedy this, in creating a formal structure for how data is read in and stored.
- Data is now stored within 'packages', which represent a formal 'package' of assets.
- Similar to the old "Data:file" file, packages have a master 'Package' file, listing all of the assets
making up the package, as well as other metadata (such as the name of the package).
- Multiple packages can be loaded, and more interestingly they can be unloaded.
- There will be a new system added to the engine called `AssetManager` (preferrably accessed as Systems.assets).
- Loaders provide the functionality of loading in packages, while the AssetManager provides the functionality of
accessing the data and other information about these packages. This distinction is important, as it allows
packages to be defined in various other forms (via different loaders + extension sets) while keeping a unified,
and seperate interface for accessing the actual data of these packages.
- The AssetManager contains an internal cache of `Object`s, representing all of the assets that have been loaded
by the various registered packages. It will then provide a templated interface to easily, and safely convert each
`Object` into the desired, original class.
- It is more likely that instead of directly storing an `Object` in the cache, the manager stores
a struct/class containing both the `Object` as well as various metadata about the asset.
- Packages will also contain this kind of asset cache, but it is only for the loading process and is short lived (see below).
Packages however, will still retain an array of strings, representing the names of all of it's assets.
- Whenever a new package is fully loaded, it is handed over to the AssetManager.
- The AssetManager will then move all loaded assets into it's internal cache.
The asset cache inside of the package is then destroyed, as it is no longer needed and is just using up memory.
- Whenever a package is set to be unloaded, the AssetManager is informed of which package to unload.
- The AssetManager will go over an array of strings in the Package, which contains the names of all assets it has loaded.
It will then look up these strings in it's cache, and first of all retrieve it from the cache, before removing it.
[Likely won't be implemented at first]
- The object is retrieved from the cache first, as the manager will then check to see if it inherits from certain
classes/interfaces, as well as to check if it has certain flags set which define how it handles being unloaded.
- In cases where there isn't a defined behaviour for unloading the object, it is simply removed from the cache.
This means the manager will no longer provide it to any code asking for it.
However, this also means any existing references to the object will:
- #1, prevent the GC from destroying it as there are still references to it, meaning it's memory will still be used.
- #2, it can still be used despite the package being 'unloaded', which makes the word 'unloading' a bit of a loose term.
- The object cannot be told to be destroyed manually, as then unusual 'Object access violation' errors may be thrown
when old references to the object are used.
- Extensions can be registered and used at runtime, instead of relying on a compile-time list of them.
- This will fix a giant hurdle in making this engine easily reusable for future projects, since my plan
is to seperate the engine code from the game code, as I really like this engine (I also really hate parts of it,
but those can be fixed :)).
- Names are unique. Two packages cannot create an asset with the same name.
- I do recognise however, that this will lower the performance of loading in assets. My counter to that however is that
there is little chance I'll make a game that has unacceptably bad load times with this system.
- I also recognise that certain features of the new loader will make more use of the GC than the previous version.
While it's a band-aid fix, the loader should force a GC collection after it has loaded in a package.
- Instead of referencing file paths, assets must now use names that all other files provide.
For example, a SpriteAtlas will register by the name of "atlas_PlayerCharacter", and an animation file
will reference it by that name.
- This gets rid of the headache of trying to make sure all of these paths are correct, and the very annoying issue
of trying to determine if an asset has already been loaded in just by going off it's file path.
- This adds an extra issue, without telling the loader what the file path of the asset is, it has no way of loading in
any referenced assets that haven't been cached yet. My solution is described under 'fiber-based loading'.
- Fiber-based loading system. An extention's loading process is handled inside of a fiber.
- This allows an easy way for the loader the pause the loading of assets, suited to an extention's need.
- For example, imagine that an animation file is loaded in, and references "atlas_Explosion", but the file that contains
that atlas hasn't been loaded in yet. The extension can flag that it should only continue loading once an asset with that name
has been loaded.
- It will be defined that two assets that reference eachother is an error. e.g "asset_One" referencing "asset_Two", which
then also references "asset_One" again, is an error. 'error' in this case meaning an exception is thrown, not D's `Error` class.
- Imagine that there is a extension for Animations, and that there are two animations to load in. The first animation has to go on pause
because of a missing asset, while the second animation can be loaded in while the first is paused. How does the extension handle it's internal
state when it has to load in one asset, while another asset is mid-way through being loaded?
- My answer to this is, the loader has functionality to store 'UserState' objects, which are defined by extensions.
Then, anytime an asset needs to be loaded, the extension tells the loader to create a UserState for the extension, which is
bound to the asset it is currently loading in.
++/
}
/++
+ Some libraries may have $(I issues) (read: crashes) when loading data within a fiber.
+
+ To get around this, the extension loading the data can return this class, which should function
+ almost identically to the normal `LoaderExtension.onLoadAssets` function, except that it will instead be ran outside
+ of a fiber, preventing any of these strange crashes.
+
+ $(B Beware) that `LoaderExtension.waitForAsset` $(B cannot) be used inside of the loading function, as it's
+ functionality relies on fibers. To get around this, all calls to this function should be made $(I before) returning
+ an object of this type (so it's all done in a fiber). If the loading function given to this object requires a call to `waitForAssets`
+ to properly function, then it is deemed unsupported by the loading system and unfortunately, a work around will have to be found.
+ ++/
class DelayedLoadAsset
{
alias FuncT = PackageAsset[] delegate();
/// The function that loads in the assets.
FuncT loadFunc;
///
this(FuncT loadFunc)
{
assert(loadFunc !is null);
this.loadFunc = loadFunc;
}
}
/++
+ This class is wrapped around a struct, and has special support in the `AssetManager`.
+
+ Anytime a struct needs to be loaded as an asset, use this class instead of a custom one.
+ ++/
class StructWrapperAsset(T)
if(is(T == struct))
{
alias value this;
T value;
this()(T value)
{
this.value = value;
}
}
package struct Package
{
string name;
Cache!PackageAsset assets;
}
/++
+ Contains information about an asset.
+ ++/
struct PackageAsset
{
/// The name of the asset. Must be unique between packages.
string name;
/// The asset itself. Must not be null.
Object value;
}
/++
+ The base class of a loader.
+
+ The loader is responsible for parsing package files, and loading in the assests a package contains.
+
+ The way a loader loads in assets is through `Extension`s, which are what provide the functionality of loading in assets.
+
+ Loaders will create a new Fiber for every asset it wants to load in, which is used as the main mechanic around
+ dependency resolution. For example, if a SpriteAtlas needs a certain texture, but that texture hasn't been loaded yet,
+ then the extenion that is loading the SpriteAtlas will tell the loader to pause it's Fiber until the texture has been loaded.
+ ++/
abstract class Loader
{
/// Debug information that loaders can provide so exceptions are given more informative messages.
struct DebugInfo
{
/// The name/file path/some kind of identifying info of the asset.
string assetName;
}
private final
{
/// Information about a loading process.
struct LoadingInfo
{
/// Mostly just for debug output.
int id;
/// The extension being used.
LoaderExtension extension;
/// The fiber being used for loading.
Fiber fiber;
/// Debug info about the loading process.
DebugInfo debugInfo;
}
/// Information about a loading task that is waiting for a certain asset.
struct OnHold_WaitingForAsset
{
LoadingInfo info;
string assetName;
}
// Variables for extensions
LoaderExtension[string] _extensions;
// Variables for loading
LoadingInfo _currentTask;
LoadingInfo[] _loadingList;
PackageAsset[] _lastResult; // After a fiber is done loading, it will set this to the result.
Package _currentPackage;
Object _lastLoadedAsset; // Used for waitForAsset.
// Waiting lists
string[] _loadedAssets; // Used to clean up the _waitingForAssetList
OnHold_WaitingForAsset[] _waitingForAssetList;
void executeTask(LoadingInfo task)
{
// Execute the task
this._currentTask = task;
auto thrown = task.fiber.call(Fiber.Rethrow.yes);
this._currentTask = LoadingInfo.init;
assert(thrown is null, "Not handled yet.");
// Then do stuff depending on it's state.
if(task.fiber.state == Fiber.State.HOLD)
info("The task was put on hold.");
else if(task.fiber.state == Fiber.State.TERM)
{
// It finished loading, and _lastResult was set.
infof("The task finished, with %s assets loaded. Adding them to the current package.",
this._lastResult.length);
foreach(asset; this._lastResult)
this.onAssetLoad(asset);
}
else // EXEC
assert(false, "It's still somehow running?");
}
void onAssetLoad(PackageAsset asset)
{
if(this._currentPackage.assets is null)
this._currentPackage.assets = new Cache!PackageAsset();
// Perform the delayed loading
auto delayed = (cast(DelayedLoadAsset)asset.value);
if(delayed !is null)
{
info("Performing delayed load.");
foreach(delayedAsset; delayed.loadFunc())
this.onAssetLoad(delayedAsset);
return;
}
this._currentPackage.assets.add(asset.name, asset);
// Wake up any fibers that were waiting on this asset, and then mark the fibers to be removed from
// the waiting list.
foreach(task; this._waitingForAssetList)
{
if(task.assetName == asset.name)
{
infof("Waking up task #%s, as the asset called '%s' was added.",
task.info.id, task.assetName);
this._loadedAssets ~= task.assetName;
this._lastLoadedAsset = asset.value;
this.executeTask(task.info);
}
}
}
/////////////////////////
/// Waiting functions ///
/////////////////////////
Object waitForAsset(LoaderExtension extension, string assetName)
{
if(this._currentTask == LoadingInfo.init)
assert(false, "This function was called outside a loading task.");
assert(extension == this._currentTask.extension, "This function was called with the wrong extension.");
// Check if it's already cached in the package assets.
if(this._currentPackage.assets !is null)
{
auto cached = this._currentPackage.assets.get(assetName);
if(cached != PackageAsset.init)
{
infof("No need to wait for asset '%s' as it's already cached.", assetName);
return cached.value;
}
}
// Check if it's an asset that's from another package.
if(Systems.assets.exists(assetName))
{
infof("No need to wait for asset '%s' as it's already cached.", assetName);
return Systems.assets.get!Object(assetName);
}
// Otherwise add it to the waiting list.
infof("Placing task on hold, as it is waiting for an asset named '%s'", assetName);
this._waitingForAssetList ~= OnHold_WaitingForAsset(
this._currentTask, assetName
);
// The asserts make sure this function is only being ran during a loading task, which is in it's own Fiber.
// So this should be fine.
Fiber.yield(); // When this Fiber is resumed, _lastLoadedAsset will be set to the asset that it was waiting for.
return this._lastLoadedAsset;
}
}
protected final
{
/++
+ Cleans the variables used to keep track of the state of loading a package.
+
+ It's recommended that this function is called at the start of `Loader.loadPackage` to reducse
+ the risk of left-over state causing bugs.
+ ++/
void cleanLoadingState()
{
this._loadingList = null;
this._lastResult = null;
this._currentPackage = Package.init;
this._currentTask = LoadingInfo.init;
this._waitingForAssetList = null;
this._loadedAssets = null;
}
/++
+ Adds a task to load in assets from a piece of data.
+
+ Notes:
+ `Loader.doTasks` must be called before the task is actually performed.
+
+ Params:
+ extension = The extension to use to load in the data.
+ data = The data to load in.
+ debugInfo = Debug information about the data being loaded in. Used mostly for pretty exception messages.
+ ++/
void addLoadingTask(LoaderExtension extension, const(ubyte[]) data, DebugInfo debugInfo = DebugInfo.init)
{
assert(extension !is null);
LoadingInfo info;
info.extension = extension;
info.fiber = new Fiber((){this._lastResult = extension.onLoadAssets(this, data);});
info.id = cast(int)this._loadingList.length; // The cast is fine for this case.
info.debugInfo = debugInfo;
infof("Created loading task #%s for extension '%s' with data with of length '%s'.",
info.id, extension, data.length);
this._loadingList ~= info;
}
/++
+ Performs all added tasks.
+
+ Notes:
+ There is currently no way to reset a select few internal variables that this function uses, without
+ dumping all the currently loaded progress. So only call this function *After* adding in every loading task
+ that will be needed.
+
+ After all tasks have been executed (but not finished). If any tasks that are still waiting for something
+ are still listed, then an exception is thrown as it means that whatever they're waiting for will never happen.
+
+ This exception should prevent the package from being finalised.
+ ++/
void doTasks()
{
trace("Executing tasks");
string[] debugLoadedAssets;
foreach(taskI, task; this._loadingList)
{
// Execute the task
infof("Executing task #%s, with extension '%s'.", task.id, task.extension);
// Catch any exceptions, and gather up enough information for a nice looking exception.
try
this.executeTask(task);
catch(Exception ex)
{
import std.algorithm : map, filter, canFind;
import std.array : array;
PackageLoadFailedException.Info info;
info.loadedNames = debugLoadedAssets;
info.failedInfo = task.debugInfo;
info.waitingInfo = this._waitingForAssetList.map!(waiting => PackageLoadFailedException.WaitingInfo(waiting.info.debugInfo, waiting.assetName))
.array;
info.loadedInfo = this._loadingList[0..taskI].filter!(task => !this._waitingForAssetList.canFind!"a.info == b"(task))
.map!(task => task.debugInfo)
.array;
info.notExecutedInfo = (taskI == this._loadingList.length - 1) ? null : this._loadingList[taskI+1..$].map!(task => task.debugInfo).array;
info.trace = ex.info.toString();
throw new PackageLoadFailedException(info, ex.message.idup);
}
// Then clean up the waiting list
foreach(loadedAsset; this._loadedAssets)
{
for(size_t i = 0; i < this._waitingForAssetList.length; i++)
{
if(this._waitingForAssetList[i].assetName == loadedAsset)
{
this._waitingForAssetList.removeAt(i);
i -= 1;
}
}
}
debugLoadedAssets ~= this._loadedAssets;
this._loadedAssets.length = 0;
}
// If any dependencies weren't resolved, then throw an exception.
if(this._waitingForAssetList.length > 0)
{
import std.algorithm : joiner, map, uniq;
import std.array : array;
errorf("The following dependencies were not found, so the package cannot be loaded: %s",
this._waitingForAssetList.map!(a => a.assetName).uniq.joiner(", "));
}
}
/++
+ Sets the name of the package that is being loaded in.
+
+ Notes:
+ If the name is not set by the time `Loader.finalisePackage` is called, then an assert is failed.
+
+ Params:
+ name = The name to give the package.
+ ++/
void setPackageName(string name)
{
this._currentPackage.name = name;
}
/++
+ Finalises the package.
+
+ This will pass the package over to the `AssetManager`, and then call `Loader.cleanLoadingState`.
+
+ Notes:
+ This function forces a GC collection to clean up the memory used from loading.
+
+ `Loader.setPackageName` must be called before this, otherwise an assert fails.
+ ++/
void finalisePackage()
{
import core.memory : GC;
if(this._currentPackage.name is null)
assert(false, "The package's name was not set before finalisation.");
Systems.assets.addPackage(this._currentPackage);
trace("Package finalised.");
this.cleanLoadingState(); // Reminder: Do this AFTER passing it to the AssetManager.
GC.collect();
}
}
public abstract
{
/++
+ Loads the package at the given file path.
+
+ Implemenation_Notes:
+ It is recommended to call `Loader.cleanLoaderState` before anything else, just in case the old state was left over.
+
+ The loader should then load in the file at `filePath` and begin parsing the file.
+
+ When the loader has identified an asset that needs loading, it should use `getExtensionFor` alongside any type
+ information stored in the file to identify which extension should be used.
+
+ A call to `Loader.addLoadingTask` should then be made using all the information the loader has for this asset.
+
+ Repeat as many times as neccessary, then called `Loader.doTasks` to perform the actual loading.
+
+ Finally, call `Loader.finalisePackage` to send the package to the `AssetManager`.
+ ++/
void loadPackage(const(char[]) filePath);
}
public final
{
/++
+ Sets an extension for a certain data type.
+
+ Notes:
+ Extensions are what provide the functionality for loading in data.
+
+ How the `type` is used and what it means is defined by each loader.
+
+ Params:
+ type = A string representing the type of data this extension can load.
+ extension = The extension to register.
+ ++/
void setExtensionFor(string type, LoaderExtension extension)
{
assert(extension !is null, "The extension is null.");
assert(type !is null, "The type is null.");
assert((type in this._extensions) is null, "There is already an extension registered for '"~type~"'");
this._extensions[type] = extension;
}
/++
+ Throws:
+ `Exception` if there is no extension registered for `type`.
+
+ Params:
+ type = The type of data that the extension loads.
+
+ Returns:
+ The extension for a certain type of data.
+ ++/
LoaderExtension getExtensionFor(string type)
{
import std.exception : enforce;
auto ptr = (type in this._extensions);
enforce(ptr !is null, "There is no extension registered for type '"~type~"'");
return *ptr;
}
}
}
/++
+ Defines an extension.
+
+ Extensions are what provide the functionality for `Loader`s to load in various game assets.
+
+ It is up to each `Loader` to define the way extensions are used.
+ ++/
abstract class LoaderExtension
{
protected
{
/++
+ Called whenever the extension is used to load in assets.
+
+ Notes:
+ The contents of `data` are dependent on the loader. As all extensions
+ should only be written for a certain loader, this is a non-issue.
+
+ An array must be returned, as there is a possibility the `data` can contain multiple assets.
+
+ The code in this function is ran in a Fiber exclusive to the loading of assets from `data`.
+
+ Params:
+ loader = The loader that is using this extension.
+ data = The data that the loader has given to this extension.
+
+ Returns:
+ An array of all the assets that could be loaded from the given data.
+ ++/
PackageAsset[] onLoadAssets(Loader loader, const(ubyte[]) data);
/++
+ A helper function to easily check and treat the given data as valid UTF-8 text.
+
+ Params:
+ data = The data that the loader has given to this extension.
+
+ Returns:
+ `data` casted to a char[], but only after checking that it's valid UTF-8.
+ ++/
final const(char[]) dataAsText(return const(ubyte[]) data)
{
import std.utf : validate;
auto text = cast(const(char[]))data;
validate(text);
return text;
}
/++
+ Instructs the loader to pause the current loading task until an asset
+ with a certain name is loaded in.
+
+ Params:
+ T = The type to cast the PackageAsset to.
+ loader = The loader that is using this extension.
+ assetName = The name of the asset to wait for.
+
+ Returns:
+ The asset that was loaded in.
+ ++/
final T waitForAsset(T : Object)(Loader loader, string assetName)
{
assert(loader !is null);
return cast(T)loader.waitForAsset(this, assetName);
}
}
}
/// An exception thrown by a `Loader` when it fails to load in a package.
/// For now, throwing this exception can only be done internally (since there's no way to gather the `PackageLoadFailedException.Info` from the outside).
class PackageLoadFailedException : Exception
{
struct WaitingInfo
{
Loader.DebugInfo info;
string assetName;
string toString()
{
import std.format : format;
return format("\"%s\" needed by %s", this.assetName, this.info);
}
}
struct Info
{
// Loaded assets.
// On wait assets.
// File that failed.
string[] loadedNames;
Loader.DebugInfo[] loadedInfo;
WaitingInfo[] waitingInfo;
Loader.DebugInfo[] notExecutedInfo;
Loader.DebugInfo failedInfo;
string trace;
}
Info info;
this(Info info, string reason, string file = __FILE__, int line = __LINE__)
{
import std.array : appender;
import std.format : format;
import std.algorithm : map, joiner;
import std.conv : to;
this.info = info;
auto output = appender!(char[]);
output.put("Uncaught exception while loading package.\n");
output.put("FAILED:\n");
output.put("\tInfo: %s\n".format(this.info.failedInfo));
output.put("\tReason: %s\n".format(reason));
output.put("\tTRACE:\n%s".format(this.info.trace));
output.put("LOADED(Debug Info):\n\t");
output.put(this.info.loadedInfo.map!(to!string).joiner("\n\t"));
output.put("\nLOADED(Asset Names):\n\t");
output.put(this.info.loadedNames.joiner("\n\t"));
output.put("\nWAITING:\n\t");
output.put(this.info.waitingInfo.map!(to!string).joiner("\n\t"));
output.put("\nNOT YET RAN:\n\t");
output.put(this.info.notExecutedInfo.map!(to!string).joiner("\n\t"));
super(output.data.idup, file, line);
}
}
|
D
|
/* *
Don't use this file anymore. The maintained version is in http2.d, just use that.
Old docs below:
This is CLIENT only at this point. Don't try to
bind/accept with these.
FIXME: Windows isn't implemented
On Windows, it uses Microsoft schannel so it doesn't
need openssl or gnutls as a dependency.
On other platforms, it uses the openssl api, which should
work with both openssl and gnutls.
btw, interesting:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364510%28v=vs.85%29.aspx
*/
module sslsocket;
import std.socket;
// see also:
// http://msdn.microsoft.com/en-us/library/aa380536%28v=vs.85%29.aspx
// import deimos.openssl.ssl;
version=use_openssl;
version(use_openssl) {
alias SslClientSocket = OpenSslSocket;
extern(C) {
int SSL_library_init();
void OpenSSL_add_all_ciphers();
void OpenSSL_add_all_digests();
void SSL_load_error_strings();
struct SSL {}
struct SSL_CTX {}
struct SSL_METHOD {}
SSL_CTX* SSL_CTX_new(const SSL_METHOD* method);
SSL* SSL_new(SSL_CTX*);
int SSL_pending(SSL*);
int SSL_set_fd(SSL*, int);
int SSL_connect(SSL*);
int SSL_write(SSL*, const void*, int);
int SSL_read(SSL*, void*, int);
void SSL_free(SSL*);
void SSL_CTX_free(SSL_CTX*);
void SSL_set_verify(SSL*, int, void*);
enum SSL_VERIFY_NONE = 0;
SSL_METHOD* SSLv3_client_method();
SSL_METHOD* TLS_client_method();
SSL_METHOD* SSLv23_client_method();
void ERR_print_errors_fp(FILE*);
}
import core.stdc.stdio;
shared static this() {
SSL_library_init();
OpenSSL_add_all_ciphers();
OpenSSL_add_all_digests();
SSL_load_error_strings();
}
pragma(lib, "crypto");
pragma(lib, "ssl");
class OpenSslSocket : Socket {
private SSL* ssl;
private SSL_CTX* ctx;
private void initSsl(bool verifyPeer) {
ctx = SSL_CTX_new(SSLv23_client_method());
assert(ctx !is null);
ssl = SSL_new(ctx);
if(!verifyPeer)
SSL_set_verify(ssl, SSL_VERIFY_NONE, null);
SSL_set_fd(ssl, cast(int) this.handle);
}
bool dataPending() {
return SSL_pending(ssl) > 0;
}
@trusted
override void connect(Address to) {
super.connect(to);
if(SSL_connect(ssl) == -1) {
ERR_print_errors_fp(stderr);
int i;
printf("wtf\n");
scanf("%d\n", &i);
throw new Exception("ssl connect");
}
}
@trusted
override ptrdiff_t send(scope const(void)[] buf, SocketFlags flags) {
auto retval = SSL_write(ssl, buf.ptr, cast(uint) buf.length);
if(retval == -1) {
ERR_print_errors_fp(stderr);
int i;
printf("wtf\n");
scanf("%d\n", &i);
throw new Exception("ssl send");
}
return retval;
}
override ptrdiff_t send(scope const(void)[] buf) {
return send(buf, SocketFlags.NONE);
}
@trusted
override ptrdiff_t receive(scope void[] buf, SocketFlags flags) {
auto retval = SSL_read(ssl, buf.ptr, cast(int)buf.length);
if(retval == -1) {
ERR_print_errors_fp(stderr);
int i;
printf("wtf\n");
scanf("%d\n", &i);
throw new Exception("ssl send");
}
return retval;
}
override ptrdiff_t receive(scope void[] buf) {
return receive(buf, SocketFlags.NONE);
}
this(AddressFamily af, SocketType type = SocketType.STREAM, bool verifyPeer = true) {
super(af, type);
initSsl(verifyPeer);
}
this(socket_t sock, AddressFamily af) {
super(sock, af);
initSsl(true);
}
~this() {
SSL_free(ssl);
SSL_CTX_free(ctx);
}
}
}
version(ssl_test)
void main() {
auto sock = new SslClientSocket(AddressFamily.INET);
sock.connect(new InternetAddress("localhost", 443));
sock.send("GET / HTTP/1.0\r\n\r\n");
import std.stdio;
char[1024] buffer;
writeln(buffer[0 .. sock.receive(buffer)]);
}
|
D
|
// COMPILE_SEPARATELY
// EXTRA_SOURCES: imports/test55a.d
// PERMUTE_ARGS: -di
// REQUIRED_ARGS: -d
public import imports.test55a;
class Queue {
typedef int ListHead;
Arm a;
}
class MessageQueue : Queue {
}
class Queue2 {
typedef int ListHead;
Arm2 a;
}
|
D
|
// Copyright 2018 - 2021 Michael D. Parker
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
module bindbc.opengl.bind.arb.core_46;
import bindbc.loader;
import bindbc.opengl.config,
bindbc.opengl.context;
import bindbc.opengl.bind.types;
static if(glSupport >= GLSupport.gl46) {
enum has46 = true;
}
else enum has46 = false;
// ARB_polygon_offset_clamp
version(GL_ARB) enum useARBPolygonOffsetClamp = true;
else version(GL_ARB_polygon_offset_clamp) enum useARBPolygonOffsetClamp = true;
else enum useARBPolygonOffsetClamp = has46;
static if(useARBPolygonOffsetClamp) {
private bool _hasARBPolygonOffsetClamp;
@nogc nothrow bool hasARBPolygonOffsetClamp() { return _hasARBPolygonOffsetClamp; }
enum uint GL_POLYGON_OFFSET_CLAMP = 0x8E1B;
extern(System) @nogc nothrow alias pglPolygonOffsetClamp = void function( GLfloat,GLfloat,GLfloat );
__gshared pglPolygonOffsetClamp glPolygonOffsetClamp;
private @nogc nothrow
bool loadARBPolygonOffsetClamp(SharedLib lib, GLSupport contextVersion)
{
lib.bindGLSymbol(cast(void**)&glPolygonOffsetClamp, "glPolygonOffsetClamp");
return resetErrorCountGL;
}
}
else enum hasARBPolygonOffsetClamp = false;
// ARB_texture_filter_anisotropic
version(GL_ARB) enum useARBTextureFilterAnisotropic = true;
else version(GL_ARB_texture_filter_anisotropic) enum useARBTextureFilterAnisotropic = true;
else enum useARBTextureFilterAnisotropic = has46;
static if(useARBTextureFilterAnisotropic) {
private bool _hasARBTextureFilterAnisotropic;
@nogc nothrow bool hasARBTextureFilterAnisotropic() { return _hasARBTextureFilterAnisotropic; }
enum : uint {
GL_TEXTURE_MAX_ANISOTROPY = 0x84FE,
GL_MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF,
}
}
else enum hasARBTextureFilterAnisotropic = false;
package(bindbc.opengl) @nogc nothrow
bool loadARB46(SharedLib lib, GLSupport contextVersion)
{
static if(has46) {
if(contextVersion >= GLSupport.gl46) {
_hasARBTextureFilterAnisotropic = true;
bool ret = true;
ret = _hasARBPolygonOffsetClamp = lib.loadARBPolygonOffsetClamp(contextVersion);
return ret;
}
}
static if(useARBTextureFilterAnisotropic) _hasARBTextureFilterAnisotropic =
hasExtension(contextVersion, "GL_ARB_texture_filter_anisotropic");
static if(useARBPolygonOffsetClamp) _hasARBPolygonOffsetClamp =
hasExtension(contextVersion, "GL_ARB_polygon_offset_clamp") &&
lib.loadARBPolygonOffsetClamp(contextVersion);
return true;
}
|
D
|
instance Info_Sld_11_EXIT(C_Info)
{
nr = 999;
condition = Info_Sld_11_EXIT_Condition;
information = Info_Sld_11_EXIT_Info;
permanent = 1;
description = "KONIEC";
};
func int Info_Sld_11_EXIT_Condition()
{
return 1;
};
func void Info_Sld_11_EXIT_Info()
{
AI_StopProcessInfos(self);
};
instance Info_Sld_11_EinerVonEuchWerden(C_Info)
{
nr = 4;
condition = Info_Sld_11_EinerVonEuchWerden_Condition;
information = Info_Sld_11_EinerVonEuchWerden_Info;
permanent = 1;
description = "Chciałbym zostać Najemnikiem i pracować dla Magów.";
};
func int Info_Sld_11_EinerVonEuchWerden_Condition()
{
if((Npc_GetTrueGuild(other) != GIL_SLD) && (Npc_GetTrueGuild(other) != GIL_KDW) && !C_NpcBelongsToOldCamp(other) && !C_NpcBelongsToPsiCamp(other))
{
return TRUE;
};
};
func void Info_Sld_11_EinerVonEuchWerden_Info()
{
var C_Npc gorn;
AI_Output(other,self,"Info_Sld_11_EinerVonEuchWerden_15_00"); //Chciałbym zostać Najemnikiem i pracować dla Magów.
AI_Output(self,other,"Info_Sld_11_EinerVonEuchWerden_11_01"); //To nie takie trudne. Jeśli jesteś gotów do walki za naszą sprawę, Lee na pewno cię przyjmie.
AI_Output(self,other,"Info_Sld_11_EinerVonEuchWerden_11_02"); //Ale szanse na zostanie Najemnikiem mają tylko ludzie biegli w posługiwaniu się mieczem. Jak z tym u ciebie?
AI_Output(other,self,"Info_Sld_11_EinerVonEuchWerden_15_03"); //Cóż...
AI_Output(self,other,"Info_Sld_11_EinerVonEuchWerden_11_04"); //Tak właśnie myślałem. Jeśli myślisz o tym poważnie, porozmawiaj z Gornem. On kiedyś szkolił nowoprzybyłych.
AI_Output(self,other,"Info_Sld_11_EinerVonEuchWerden_11_05"); //Może ci się poszczęści, i Gorn zechce cię uczyć.
gorn = Hlp_GetNpc(PC_Fighter);
gorn.aivar[AIV_FINDABLE] = TRUE;
};
instance Info_Sld_11_WichtigePersonen(C_Info)
{
nr = 3;
condition = Info_Sld_11_WichtigePersonen_Condition;
information = Info_Sld_11_WichtigePersonen_Info;
permanent = 1;
description = "Kto tu rządzi?";
};
func int Info_Sld_11_WichtigePersonen_Condition()
{
return 1;
};
func void Info_Sld_11_WichtigePersonen_Info()
{
var C_Npc Lee;
var C_Npc Cronos;
AI_Output(other,self,"Info_Sld_11_WichtigePersonen_15_00"); //Kto tu rządzi?
AI_Output(self,other,"Info_Sld_11_WichtigePersonen_11_01"); //Wypełniamy polecenia magów, choć ci rzadko mają jakieś konkretne żądania. Siedzą tylko przy kopcu rudy i czytają te swoje księgi.
AI_Output(self,other,"Info_Sld_11_WichtigePersonen_11_02"); //W sumie rządzi tu Lee. To nasz szef.
Lee = Hlp_GetNpc(Sld_700_Lee);
Lee.aivar[AIV_FINDABLE] = TRUE;
Cronos = Hlp_GetNpc(KDW_604_Cronos);
Cronos.aivar[AIV_FINDABLE] = TRUE;
};
instance Info_Sld_11_DasLager(C_Info)
{
nr = 2;
condition = Info_Sld_11_DasLager_Condition;
information = Info_Sld_11_DasLager_Info;
permanent = 1;
description = "Czy w obozie dochodzi do jakichś spięć?";
};
func int Info_Sld_11_DasLager_Condition()
{
return 1;
};
func void Info_Sld_11_DasLager_Info()
{
AI_Output(other,self,"Info_Sld_11_DasLager_15_00"); //Czy w obozie dochodzi do jakichś spięć?
AI_Output(self,other,"Info_Sld_11_DasLager_11_01"); //Chłopie, co chwila są jakieś problemy! Szkodniki robią co się im żywnie podoba, a my musimy pilnować Magów i całego Obozu.
};
instance Info_Sld_11_DieLage(C_Info)
{
nr = 1;
condition = Info_Sld_11_DieLage_Condition;
information = Info_Sld_11_DieLage_Info;
permanent = 1;
description = "Wszystko w porządku?";
};
func int Info_Sld_11_DieLage_Condition()
{
return 1;
};
func void Info_Sld_11_DieLage_Info()
{
AI_Output(other,self,"Info_Sld_11_DieLage_15_00"); //Wszystko w porządku?
AI_Output(self,other,"Info_Sld_11_DieLage_11_01"); //Jeszcze jest cicho...
AI_Output(other,self,"Info_Sld_11_DieLage_15_02"); //Jeszcze?
AI_Output(self,other,"Info_Sld_11_DieLage_11_03"); //Jeśli Szkodniki nie przestaną atakować konwojów ze Starego Obozu, Gomez w końcu się wścieknie i zapuka do naszych bram.
AI_Output(self,other,"Info_Sld_11_DieLage_11_04"); //I będzie niezła zabawa!
};
instance Info_Sld_11_Krautprobe(C_Info)
{
nr = 5;
condition = Info_Sld_11_Krautprobe_Condition;
information = Info_Sld_11_Krautprobe_Info;
permanent = 1;
description = "Chcesz trochę bagiennego ziela?";
};
func int Info_Sld_11_Krautprobe_Condition()
{
if(((BaalKagan_VerteilKraut == LOG_RUNNING) || (BaalKagan_VerteilKraut == LOG_SUCCESS)) && (self.aivar[AIV_DEALDAY] <= Wld_GetDay()))
{
return TRUE;
};
};
func void Info_Sld_11_Krautprobe_Info()
{
AI_Output(other,self,"Info_Sld_11_Krautprobe_15_00"); //Chcesz trochę bagiennego ziela?
if((Npc_HasItems(other,ItMiJoint_1) > 0) || (Npc_HasItems(other,ItMiJoint_2) > 0) || (Npc_HasItems(other,ItMiJoint_3) > 0))
{
if(Npc_HasItems(other,ItMiJoint_1))
{
B_GiveInvItems(other,self,ItMiJoint_1,1);
}
else if(Npc_HasItems(other,ItMiJoint_2))
{
B_GiveInvItems(other,self,ItMiJoint_2,1);
}
else if(Npc_HasItems(other,ItMiJoint_3))
{
B_GiveInvItems(other,self,ItMiJoint_3,1);
};
AI_Output(self,other,"Info_Sld_11_Krautprobe_11_01"); //Jasne. Masz tu 10 bryłek rudy.
AI_Output(self,other,"Info_Sld_11_Krautprobe_11_02"); //Jakbyś miał jeszcze kiedyś trochę ziela, no wiesz...
CreateInvItems(self,ItMiNugget,10);
B_GiveInvItems(self,other,ItMiNugget,10);
NC_Joints_verteilt = NC_Joints_verteilt + 1;
self.aivar[AIV_DEALDAY] = Wld_GetDay() + 1;
}
else
{
AI_Output(self,other,"Info_Sld_11_Krautprobe_No_Joint_11_00"); //Najpierw je przynieś, wtedy pogadamy.
};
};
func void B_AssignAmbientInfos_Sld_11(var C_Npc slf)
{
B_AssignFindNpc_NC(slf);
Info_Sld_11_EXIT.npc = Hlp_GetInstanceID(slf);
Info_Sld_11_EinerVonEuchWerden.npc = Hlp_GetInstanceID(slf);
Info_Sld_11_WichtigePersonen.npc = Hlp_GetInstanceID(slf);
Info_Sld_11_DasLager.npc = Hlp_GetInstanceID(slf);
Info_Sld_11_DieLage.npc = Hlp_GetInstanceID(slf);
Info_Sld_11_Krautprobe.npc = Hlp_GetInstanceID(slf);
};
|
D
|
prototype MST_DEFAULT_UNDEADORCWARRIOR(C_NPC)
{
name[0] = "Орк-нежить";
guild = GIL_UNDEADORC;
aivar[AIV_MM_REAL_ID] = ID_UNDEADORCWARRIOR;
level = 30;
attribute[ATR_STRENGTH] = 150;
attribute[ATR_DEXTERITY] = 150;
attribute[ATR_HITPOINTS_MAX] = 300;
attribute[ATR_HITPOINTS] = 300;
attribute[ATR_MANA_MAX] = 0;
attribute[ATR_MANA] = 0;
protection[PROT_BLUNT] = 60;
protection[PROT_EDGE] = 60;
protection[PROT_POINT] = 60;
protection[PROT_FIRE] = 60;
protection[PROT_FLY] = 60;
protection[PROT_MAGIC] = 60;
hitchance[NPC_TALENT_1H] = 80;
hitchance[NPC_TALENT_2H] = 80;
hitchance[NPC_TALENT_BOW] = 80;
hitchance[NPC_TALENT_CROSSBOW] = 80;
damagetype = DAM_EDGE;
fight_tactic = FAI_ORC;
senses = SENSE_HEAR | SENSE_SEE | SENSE_SMELL;
senses_range = PERC_DIST_MONSTER_ACTIVE_MAX;
aivar[AIV_MM_FOLLOWTIME] = FOLLOWTIME_MEDIUM;
aivar[AIV_MM_FOLLOWINWATER] = FALSE;
};
func void b_setvisuals_undeadorcwarrior()
{
Mdl_SetVisual(self,"Orc.mds");
Mdl_SetVisualBody(self,"UOW_Body",DEFAULT,DEFAULT,"",DEFAULT,DEFAULT,-1);
};
instance UNDEADORCWARRIOR(MST_DEFAULT_UNDEADORCWARRIOR)
{
b_setvisuals_undeadorcwarrior();
EquipItem(self,itmw_2h_orcaxe_02);
start_aistate = zs_mm_allscheduler;
aivar[AIV_MM_RESTSTART] = ONLYROUTINE;
};
|
D
|
in a lyrical manner
|
D
|
// Written in the D programming language.
/**
$(H2 Assembling Your Own Allocator)
This package also implements
untyped composable memory allocators. They are $(I untyped) because they deal
exclusively in `void[]` and have no notion of what type the memory allocated
would be destined for. They are $(I composable) because the included allocators
are building blocks that can be assembled in complex nontrivial allocators.
$(P Unlike the allocators for the C and C++ programming languages, which manage
the allocated size internally, these allocators require that the client
maintains (or knows $(I a priori)) the allocation size for each piece of memory
allocated. Put simply, the client must pass the allocated size upon
deallocation. Storing the size in the _allocator has significant negative
performance implications, and is virtually always redundant because client code
needs knowledge of the allocated size in order to avoid buffer overruns. (See
more discussion in a $(HTTP open-
std.org/JTC1/SC22/WG21/docs/papers/2013/n3536.html, proposal) for sized
deallocation in C++.) For this reason, allocators herein traffic in `void[]`
as opposed to `void*`.)
$(P In order to be usable as an _allocator, a type should implement the
following methods with their respective semantics. Only `alignment` and $(D
allocate) are required. If any of the other methods is missing, the _allocator
is assumed to not have that capability (for example some allocators do not offer
manual deallocation of memory). Allocators should NOT implement
unsupported methods to always fail. For example, an allocator that lacks the
capability to implement `alignedAllocate` should not define it at all (as
opposed to defining it to always return `null` or throw an exception). The
missing implementation statically informs other components about the
allocator's capabilities and allows them to make design decisions accordingly.)
$(BOOKTABLE ,
$(TR $(TH Method name) $(TH Semantics))
$(TR $(TDC uint alignment;, $(POST $(RES) > 0)) $(TD Returns the minimum
alignment of all data returned by the allocator. An allocator may implement $(D
alignment) as a statically-known `enum` value only. Applications that need
dynamically-chosen alignment values should use the `alignedAllocate` and $(D
alignedReallocate) APIs.))
$(TR $(TDC size_t goodAllocSize(size_t n);, $(POST $(RES) >= n)) $(TD Allocators
customarily allocate memory in discretely-sized chunks. Therefore, a request for
`n` bytes may result in a larger allocation. The extra memory allocated goes
unused and adds to the so-called $(HTTP goo.gl/YoKffF,internal fragmentation).
The function `goodAllocSize(n)` returns the actual number of bytes that would
be allocated upon a request for `n` bytes. This module defines a default
implementation that returns `n` rounded up to a multiple of the allocator's
alignment.))
$(TR $(TDC void[] allocate(size_t s);, $(POST $(RES) is null || $(RES).length ==
s)) $(TD If $(D s == 0), the call may return any empty slice (including $(D
null)). Otherwise, the call allocates `s` bytes of memory and returns the
allocated block, or `null` if the request could not be satisfied.))
$(TR $(TDC void[] alignedAllocate(size_t s, uint a);, $(POST $(RES) is null ||
$(RES).length == s)) $(TD Similar to `allocate`, with the additional
guarantee that the memory returned is aligned to at least `a` bytes. `a`
must be a power of 2.))
$(TR $(TDC void[] allocateAll();) $(TD Offers all of allocator's memory to the
caller, so it's usually defined by fixed-size allocators. If the allocator is
currently NOT managing any memory, then `allocateAll()` shall allocate and
return all memory available to the allocator, and subsequent calls to all
allocation primitives should not succeed (e.g. `allocate` shall return $(D
null) etc). Otherwise, `allocateAll` only works on a best-effort basis, and
the allocator is allowed to return `null` even if does have available memory.
Memory allocated with `allocateAll` is not otherwise special (e.g. can be
reallocated or deallocated with the usual primitives, if defined).))
$(TR $(TDC bool expand(ref void[] b, size_t delta);, $(POST !$(RES) || b.length
== $(I old)(b).length + delta)) $(TD Expands `b` by `delta` bytes. If $(D
delta == 0), succeeds without changing `b`. If $(D b is null), returns
`false` (the null pointer cannot be expanded in place). Otherwise, $(D
b) must be a buffer previously allocated with the same allocator. If expansion
was successful, `expand` changes `b`'s length to $(D b.length + delta) and
returns `true`. Upon failure, the call effects no change upon the allocator
object, leaves `b` unchanged, and returns `false`.))
$(TR $(TDC bool reallocate(ref void[] b, size_t s);, $(POST !$(RES) || b.length
== s)) $(TD Reallocates `b` to size `s`, possibly moving memory around.
`b` must be `null` or a buffer allocated with the same allocator. If
reallocation was successful, `reallocate` changes `b` appropriately and
returns `true`. Upon failure, the call effects no change upon the allocator
object, leaves `b` unchanged, and returns `false`. An allocator should
implement `reallocate` if it can derive some advantage from doing so;
otherwise, this module defines a `reallocate` free function implemented in
terms of `expand`, `allocate`, and `deallocate`.))
$(TR $(TDC bool alignedReallocate(ref void[] b,$(BR) size_t s, uint a);, $(POST
!$(RES) || b.length == s)) $(TD Similar to `reallocate`, but guarantees the
reallocated memory is aligned at `a` bytes. The buffer must have been
originated with a call to `alignedAllocate`. `a` must be a power of 2
greater than `(void*).sizeof`. An allocator should implement $(D
alignedReallocate) if it can derive some advantage from doing so; otherwise,
this module defines a `alignedReallocate` free function implemented in terms
of `expand`, `alignedAllocate`, and `deallocate`.))
$(TR $(TDC Ternary owns(void[] b);) $(TD Returns `Ternary.yes` if `b` has been
allocated with this allocator. An allocator should define this method only if it
can decide on ownership precisely and fast (in constant time, logarithmic time,
or linear time with a low multiplication factor). Traditional allocators such as
the C heap do not define such functionality. If $(D b is null), the allocator
shall return `Ternary.no`, i.e. no allocator owns the `null` slice.))
$(TR $(TDC Ternary resolveInternalPointer(void* p, ref void[] result);) $(TD If
`p` is a pointer somewhere inside a block allocated with this allocator,
`result` holds a pointer to the beginning of the allocated block and returns
`Ternary.yes`. Otherwise, `result` holds `null` and returns `Ternary.no`.
If the pointer points immediately after an allocated block, the result is
implementation defined.))
$(TR $(TDC bool deallocate(void[] b);) $(TD If $(D b is null), does
nothing and returns `true`. Otherwise, deallocates memory previously allocated
with this allocator and returns `true` if successful, `false` otherwise. An
implementation that would not support deallocation (i.e. would always return
`false` should not define this primitive at all.)))
$(TR $(TDC bool deallocateAll();, $(POST empty)) $(TD Deallocates all memory
allocated with this allocator. If an allocator implements this method, it must
specify whether its destructor calls it, too.))
$(TR $(TDC Ternary empty();) $(TD Returns `Ternary.yes` if and only if the
allocator holds no memory (i.e. no allocation has occurred, or all allocations
have been deallocated).))
$(TR $(TDC static Allocator instance;, $(POST instance $(I is a valid)
Allocator $(I object))) $(TD Some allocators are $(I monostate), i.e. have only
an instance and hold only global state. (Notable examples are C's own
`malloc`-based allocator and D's garbage-collected heap.) Such allocators must
define a static `instance` instance that serves as the symbolic placeholder
for the global instance of the allocator. An allocator should not hold state
and define `instance` simultaneously. Depending on whether the allocator is
thread-safe or not, this instance may be `shared`.))
)
$(H2 Sample Assembly)
The example below features an _allocator modeled after $(HTTP goo.gl/m7329l,
jemalloc), which uses a battery of free-list allocators spaced so as to keep
internal fragmentation to a minimum. The `FList` definitions specify no
bounds for the freelist because the `Segregator` does all size selection in
advance.
Sizes through 3584 bytes are handled via freelists of staggered sizes. Sizes
from 3585 bytes through 4072 KB are handled by a `BitmappedBlock` with a
block size of 4 KB. Sizes above that are passed direct to the `GCAllocator`.
----
alias FList = FreeList!(GCAllocator, 0, unbounded);
alias A = Segregator!(
8, FreeList!(GCAllocator, 0, 8),
128, Bucketizer!(FList, 1, 128, 16),
256, Bucketizer!(FList, 129, 256, 32),
512, Bucketizer!(FList, 257, 512, 64),
1024, Bucketizer!(FList, 513, 1024, 128),
2048, Bucketizer!(FList, 1025, 2048, 256),
3584, Bucketizer!(FList, 2049, 3584, 512),
4072 * 1024, AllocatorList!(
() => BitmappedBlock!(GCAllocator, 4096)(4072 * 1024)),
GCAllocator
);
A tuMalloc;
auto b = tuMalloc.allocate(500);
assert(b.length == 500);
auto c = tuMalloc.allocate(113);
assert(c.length == 113);
assert(tuMalloc.expand(c, 14));
tuMalloc.deallocate(b);
tuMalloc.deallocate(c);
----
$(H2 Allocating memory for sharing across threads)
One allocation pattern used in multithreaded applications is to share memory
across threads, and to deallocate blocks in a different thread than the one that
allocated it.
All allocators in this module accept and return `void[]` (as opposed to
$(D shared void[])). This is because at the time of allocation, deallocation, or
reallocation, the memory is effectively not `shared` (if it were, it would
reveal a bug at the application level).
The issue remains of calling `a.deallocate(b)` from a different thread than
the one that allocated `b`. It follows that both threads must have access to
the same instance `a` of the respective allocator type. By definition of D,
this is possible only if `a` has the `shared` qualifier. It follows that
the allocator type must implement `allocate` and `deallocate` as $(D
shared) methods. That way, the allocator commits to allowing usable `shared`
instances.
Conversely, allocating memory with one non-`shared` allocator, passing it
across threads (by casting the obtained buffer to `shared`), and later
deallocating it in a different thread (either with a different allocator object
or with the same allocator object after casting it to `shared`) is illegal.
$(H2 Building Blocks)
$(P The table below gives a synopsis of predefined allocator building blocks,
with their respective modules. Either `import` the needed modules individually,
or `import` `std.experimental.building_blocks`, which imports them all
`public`ly. The building blocks can be assembled in unbounded ways and also
combined with your own. For a collection of typical and useful preassembled
allocators and for inspiration in defining more such assemblies, refer to
$(MREF std,experimental,allocator,showcase).)
$(BOOKTABLE,
$(TR $(TH Allocator$(BR)) $(TH Description))
$(TR $(TDC2 NullAllocator, null_allocator) $(TD Very good at doing absolutely nothing. A good
starting point for defining other allocators or for studying the API.))
$(TR $(TDC3 GCAllocator, gc_allocator) $(TD The system-provided garbage-collector allocator.
This should be the default fallback allocator tapping into system memory. It
offers manual `free` and dutifully collects litter.))
$(TR $(TDC3 Mallocator, mallocator) $(TD The C heap _allocator, a.k.a. $(D
malloc)/`realloc`/`free`. Use sparingly and only for code that is unlikely
to leak.))
$(TR $(TDC3 AlignedMallocator, mallocator) $(TD Interface to OS-specific _allocators that
support specifying alignment:
$(HTTP man7.org/linux/man-pages/man3/posix_memalign.3.html, `posix_memalign`)
on Posix and $(HTTP msdn.microsoft.com/en-us/library/fs9stz4e(v=vs.80).aspx,
`__aligned_xxx`) on Windows.))
$(TR $(TDC2 AlignedBlockList, aligned_block_list) $(TD A wrapper around a list of allocators
which allow for very fast deallocations.))
$(TR $(TDC2 AffixAllocator, affix_allocator) $(TD Allocator that allows and manages allocating
extra prefix and/or a suffix bytes for each block allocated.))
$(TR $(TDC2 BitmappedBlock, bitmapped_block) $(TD Organizes one contiguous chunk of memory in
equal-size blocks and tracks allocation status at the cost of one bit per
block.))
$(TR $(TDC2 FallbackAllocator, fallback_allocator) $(TD Allocator that combines two other allocators
- primary and fallback. Allocation requests are first tried with primary, and
upon failure are passed to the fallback. Useful for small and fast allocators
fronting general-purpose ones.))
$(TR $(TDC2 FreeList, free_list) $(TD Allocator that implements a $(HTTP
wikipedia.org/wiki/Free_list, free list) on top of any other allocator. The
preferred size, tolerance, and maximum elements are configurable at compile- and
run time.))
$(TR $(TDC2 SharedFreeList, free_list) $(TD Same features as `FreeList`, but packaged as
a `shared` structure that is accessible to several threads.))
$(TR $(TDC2 FreeTree, free_tree) $(TD Allocator similar to `FreeList` that uses a
binary search tree to adaptively store not one, but many free lists.))
$(TR $(TDC2 Region, region) $(TD Region allocator organizes a chunk of memory as a
simple bump-the-pointer allocator.))
$(TR $(TDC2 InSituRegion, region) $(TD Region holding its own allocation, most often on
the stack. Has statically-determined size.))
$(TR $(TDC2 SbrkRegion, region) $(TD Region using $(D $(LINK2 https://en.wikipedia.org/wiki/Sbrk,
sbrk)) for allocating memory.))
$(TR $(TDC3 MmapAllocator, mmap_allocator) $(TD Allocator using
$(D $(LINK2 https://en.wikipedia.org/wiki/Mmap, mmap)) directly.))
$(TR $(TDC2 StatsCollector, stats_collector) $(TD Collect statistics about any other
allocator.))
$(TR $(TDC2 Quantizer, quantizer) $(TD Allocates in coarse-grained quantas, thus
improving performance of reallocations by often reallocating in place. The drawback is higher memory consumption because of allocated and unused memory.))
$(TR $(TDC2 AllocatorList, allocator_list) $(TD Given an allocator factory, lazily creates as
many allocators as needed to satisfy allocation requests. The allocators are
stored in a linked list. Requests for allocation are satisfied by searching the
list in a linear manner.))
$(TR $(TDC2 Segregator, segregator) $(TD Segregates allocation requests by size
and dispatches them to distinct allocators.))
$(TR $(TDC2 Bucketizer, bucketizer) $(TD Divides allocation sizes in discrete buckets and
uses an array of allocators, one per bucket, to satisfy requests.))
$(TR $(TDC2 AscendingPageAllocator, ascending_page_allocator) $(TD A memory safe allocator
where sizes are rounded to a multiple of the page size and allocations are satisfied at increasing addresses.))
$(COMMENT $(TR $(TDC2 InternalPointersTree) $(TD Adds support for resolving internal
pointers on top of another allocator.)))
)
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/package.d)
Macros:
MYREF2 = $(REF_SHORT $1, std,experimental,allocator,building_blocks,$2)
MYREF3 = $(REF_SHORT $1, std,experimental,allocator,$2)
TDC = $(TDNW `$1`$+)
TDC2 = $(TDNW $(D $(MYREF2 $1,$+))$(BR)$(SMALL
`std.experimental.allocator.building_blocks.$2`))
TDC3 = $(TDNW $(D $(MYREF3 $1,$+))$(BR)$(SMALL
`std.experimental.allocator.$2`))
RES = $(I result)
POST = $(BR)$(SMALL $(I Post:) $(BLUE `$0`))
*/
module std.experimental.allocator.building_blocks;
public import
std.experimental.allocator.building_blocks.affix_allocator,
std.experimental.allocator.building_blocks.aligned_block_list,
std.experimental.allocator.building_blocks.allocator_list,
std.experimental.allocator.building_blocks.ascending_page_allocator,
std.experimental.allocator.building_blocks.bucketizer,
std.experimental.allocator.building_blocks.fallback_allocator,
std.experimental.allocator.building_blocks.free_list,
std.experimental.allocator.building_blocks.free_tree,
std.experimental.allocator.gc_allocator,
std.experimental.allocator.building_blocks.bitmapped_block,
std.experimental.allocator.building_blocks.kernighan_ritchie,
std.experimental.allocator.mallocator,
std.experimental.allocator.mmap_allocator,
std.experimental.allocator.building_blocks.null_allocator,
std.experimental.allocator.building_blocks.quantizer,
std.experimental.allocator.building_blocks.region,
std.experimental.allocator.building_blocks.segregator,
std.experimental.allocator.building_blocks.stats_collector;
|
D
|
import std.stdio;
import std.conv;
void main() {
string s;
for (uint i = 0; s.length <= 100_000; ++i)
s ~= to!string(i);
uint prod = 1;
for (uint d = 1; d <= 100_000; d *= 10)
prod *= s[d] - '0';
writeln(prod);
}
|
D
|
/**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| http://www.hprose.org/ |
| |
\**********************************************************/
/**********************************************************\
* *
* hprose/io/classmanager.d *
* *
* hprose classmanager library for D. *
* *
* LastModified: Mar 3, 2015 *
* Author: Ma Bingyao <andot@hprose.com> *
* *
\**********************************************************/
module hprose.io.classmanager;
@trusted:
import hprose.io.common;
import hprose.io.reader;
import std.container.util;
import std.stdio;
import std.traits;
import std.variant;
package interface Unserializer {
Variant get();
void setRef();
void setField(string name);
}
private synchronized class classmanager {
private {
TypeInfo[string] nameCache;
string[TypeInfo] typeCache;
Unserializer delegate(Reader reader)[TypeInfo] unserializerCache;
}
string register(T)(string name) {
if (name !in nameCache) {
nameCache[name] = cast(shared)typeid(Unqual!T);
typeCache[typeid(Unqual!T)] = name;
unserializerCache[typeid(Unqual!T)] = delegate(Reader reader) {
class UnserializerImpl: Unserializer {
private {
Unqual!T value = make!(Unqual!T);
@safe void delegate()[string] setters;
}
this() {
enum fieldList = getSerializableFields!(Unqual!T);
foreach(f; fieldList) {
setters[f] = delegate() {
__traits(getMember, value, f) = reader.unserialize!(typeof(__traits(getMember, value, f)))();
};
}
}
Variant get() {
return Variant(value);
}
void setRef() {
static if (is(T == struct)) {
reader.setRef(null);
}
else {
reader.setRef(value);
}
}
void setField(string name) {
if (name in setters) {
setters[name]();
}
else {
reader.unserialize!Variant();
}
}
}
return new UnserializerImpl();
};
}
return name;
}
TypeInfo getClass(string name) {
return (cast(TypeInfo[string])nameCache).get(name, null);
}
string getAlias(T)() {
return (cast(string[TypeInfo])typeCache).get(typeid(Unqual!T), register!T(Unqual!T.stringof));
}
package Unserializer getUnserializer(TypeInfo t, Reader reader) {
if (t in unserializerCache) {
return unserializerCache[t](reader);
}
return null;
}
}
static shared classmanager ClassManager = new shared classmanager();
private {
class MyClass { int a; }
class MyClass2 { int a; }
}
unittest {
ClassManager.register!(MyClass)("Apple");
assert(ClassManager.getAlias!(MyClass) == "Apple");
assert(ClassManager.getAlias!(MyClass2) == "MyClass2");
assert(ClassManager.getClass("Apple") is typeid(MyClass));
assert(ClassManager.getClass("MyClass2") is typeid(MyClass2));
}
|
D
|
/Users/Shinkangsan/Desktop/SiriKit-Demo/build/SiriKitDemo.build/Debug-iphonesimulator/SiriExtensionDemo.build/Objects-normal/x86_64/IntentHandler.o : /Users/Shinkangsan/Desktop/SiriKit-Demo/SiriExtensionDemo/IntentHandler.swift /Users/Shinkangsan/Desktop/SiriKit-Demo/SiriExtensionDemo/SendPaymentIntentHandler.swift /Users/Shinkangsan/Desktop/SiriKit-Demo/SiriKitDemo/PaymentsContact.swift /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Intents.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
/Users/Shinkangsan/Desktop/SiriKit-Demo/build/SiriKitDemo.build/Debug-iphonesimulator/SiriExtensionDemo.build/Objects-normal/x86_64/IntentHandler~partial.swiftmodule : /Users/Shinkangsan/Desktop/SiriKit-Demo/SiriExtensionDemo/IntentHandler.swift /Users/Shinkangsan/Desktop/SiriKit-Demo/SiriExtensionDemo/SendPaymentIntentHandler.swift /Users/Shinkangsan/Desktop/SiriKit-Demo/SiriKitDemo/PaymentsContact.swift /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Intents.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
/Users/Shinkangsan/Desktop/SiriKit-Demo/build/SiriKitDemo.build/Debug-iphonesimulator/SiriExtensionDemo.build/Objects-normal/x86_64/IntentHandler~partial.swiftdoc : /Users/Shinkangsan/Desktop/SiriKit-Demo/SiriExtensionDemo/IntentHandler.swift /Users/Shinkangsan/Desktop/SiriKit-Demo/SiriExtensionDemo/SendPaymentIntentHandler.swift /Users/Shinkangsan/Desktop/SiriKit-Demo/SiriKitDemo/PaymentsContact.swift /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Intents.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/Shinkangsan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
|
D
|
instance Info_Gorn_EXIT(C_Info)
{
npc = PC_Fighter;
nr = 999;
condition = Info_Gorn_EXIT_Condition;
information = Info_Gorn_EXIT_Info;
important = 0;
permanent = 1;
description = DIALOG_ENDE;
};
func int Info_Gorn_EXIT_Condition()
{
return 1;
};
func void Info_Gorn_EXIT_Info()
{
if(self.aivar[AIV_PARTYMEMBER])
{
AI_Output(self,other,"Info_Gorn_EXIT_09_01"); //Do boju!
}
else
{
AI_Output(self,other,"Info_Gorn_EXIT_09_02"); //Do zobaczenia.
};
AI_StopProcessInfos(self);
};
instance DIA_Gorn_First(C_Info)
{
npc = PC_Fighter;
nr = 1;
condition = Dia_Gorn_First_Condition;
information = Dia_Gorn_First_Info;
permanent = 0;
important = 1;
};
func int Dia_Gorn_First_Condition()
{
if(Kapitel < 3)
{
return 1;
};
};
func void Dia_Gorn_First_Info()
{
AI_Output(self,other,"DIA_Gorn_First_09_00"); //Hej, Nowa twarz.
AI_Output(other,self,"DIA_Gorn_First_15_01"); //Kim jesteś?
AI_Output(self,other,"DIA_Gorn_First_09_02"); //Nazywam się Gorn. Jestem najemnikiem w służbie magów.
};
instance DIA_Gorn_Leben(C_Info)
{
npc = PC_Fighter;
nr = 2;
condition = Dia_Gorn_Leben_Condition;
information = Dia_Gorn_Leben_Info;
permanent = 0;
description = "Czym się zajmują Najemnicy?";
};
func int Dia_Gorn_Leben_Condition()
{
if(Npc_KnowsInfo(hero,DIA_Gorn_First))
{
return 1;
};
};
func void Dia_Gorn_Leben_Info()
{
AI_Output(other,self,"DIA_Gorn_Leben_15_00"); //Czym się zajmują Najemnicy?
AI_Output(self,other,"DIA_Gorn_Leben_09_01"); //Lee zawarł z Magami umowę. Zatrudnia najlepszych wojowników z całej kolonii - czyli nas.
AI_Output(self,other,"DIA_Gorn_Leben_09_02"); //Pilnujemy, żeby nikt nie przeszkadzał Kretom w pracy i dbamy o bezpieczeństwo Magów.
AI_Output(self,other,"DIA_Gorn_Leben_09_03"); //Magowie natomiast przygotowują plan, który pozwoli się nam stąd wyrwać. Jako wynagrodzenie otrzymujemy trochę rudy.
};
var int Gorn_ShrikesHut;
instance DIA_Gorn_Hut(C_Info)
{
npc = PC_Fighter;
nr = 3;
condition = Dia_Gorn_Hut_Condition;
information = Dia_Gorn_Hut_Info;
permanent = 0;
description = "Czy w Obozie są jeszcze wolne miejsca?";
};
func int Dia_Gorn_Hut_Condition()
{
if(Npc_KnowsInfo(hero,DIA_Gorn_First))
{
return 1;
};
};
func void Dia_Gorn_Hut_Info()
{
AI_Output(other,self,"DIA_Gorn_Hut_15_00"); //Czy w Obozie są jeszcze wolne miejsca, czy będę musiał wykopać kogoś z jego chaty?
AI_Output(self,other,"DIA_Gorn_Hut_09_01"); //Chyba będziesz musiał. Jeśli naprawdę chcesz to zrobić, zacznij od Krzykacza.
AI_Output(self,other,"DIA_Gorn_Hut_09_02"); //Złapał dla siebie chatę przy samym wejściu do jaskini. Była pusta, ale tak naprawdę należała do nas.
AI_Output(other,self,"DIA_Gorn_Hut_15_03"); //Nas?
AI_Output(self,other,"DIA_Gorn_Hut_09_04"); //No nas, Najemników. Najemnicy i Szkodniki starają się nie włazić sobie w drogę. Ludzie Laresa nie mają wstępu do tej części obozu.
AI_Output(self,other,"DIA_Gorn_Hut_09_05"); //W sumie to drobiazg, ale sukinsyn nie zapytał nawet o pozwolenie. Tym Szkodnikom nie można pozwolić na zbyt wiele, bo zrobią się nie do wytrzymania.
Log_CreateTopic(CH1_ShrikesHut,LOG_MISSION);
Log_SetTopicStatus(CH1_ShrikesHut,LOG_RUNNING);
B_LogEntry(CH1_ShrikesHut,"Najemnik imieniem Gorn opowiedział mi o niejakim Krzykaczu, który przywłaszczył sobie jedną z chat. Jako że mam pozwolenie Gorna, żaden Najemnik nie będzie mi przeszkadzał w 'przekonywaniu' Krzykacza, żeby zmienił lokal.");
Gorn_ShrikesHut = LOG_RUNNING;
};
instance DIA_Gorn_HutFree(C_Info)
{
npc = PC_Fighter;
nr = 3;
condition = Dia_Gorn_HutFree_Condition;
information = Dia_Gorn_HutFree_Info;
permanent = 0;
description = "Krzykacz przeniósł się już do innej chaty.";
};
func int Dia_Gorn_HutFree_Condition()
{
if(Npc_KnowsInfo(hero,DIA_Shrike_GetLost))
{
return 1;
};
};
func void Dia_Gorn_HutFree_Info()
{
AI_Output(other,self,"DIA_Gorn_HutFree_15_00"); //Krzykacz przeniósł się już do innej chaty.
AI_Output(self,other,"DIA_Gorn_HutFree_09_01"); //Świetnie! Przed chwilą Torlof powiedział, że zamierza pokazać temu chłoptasiowi, gdzie jest jego miejsce.
AI_Output(self,other,"DIA_Gorn_HutFree_09_02"); //Tylko uważaj. Jak tylko dołączysz do króregoś z innych obozów, pozostali Najemnicy cię z tej chaty wyrzucą.
AI_Output(self,other,"DIA_Gorn_HutFree_09_03"); //Chłopakom niezbyt podoba się widok Strażnika wylegującego się w naszej chacie.
Gorn_ShrikesHut = LOG_SUCCESS;
Log_SetTopicStatus(CH1_ShrikesHut,LOG_SUCCESS);
B_LogEntry(CH1_ShrikesHut,"Wykopując Krzykacza z jego chaty wprawiłem Gorna w dobry humor. To chyba porządny człowiek - twardy, ale uczciwy. W przyszłości będę się trzymał blisko niego.");
B_GiveXP(XP_ReportedKickedShrike);
};
instance DIA_Gorn_BecomeSLD(C_Info)
{
npc = PC_Fighter;
nr = 5;
condition = Dia_Gorn_BecomeSLD_Condition;
information = Dia_Gorn_BecomeSLD_Info;
permanent = 0;
description = "Co mam zrobić, żeby zostać członkiem Nowego Obozu?";
};
func int Dia_Gorn_BecomeSLD_Condition()
{
if(Npc_KnowsInfo(hero,DIA_Gorn_First) && (Npc_GetTrueGuild(hero) == GIL_None))
{
return 1;
};
};
func void Dia_Gorn_BecomeSLD_Info()
{
AI_Output(other,self,"DIA_Gorn_BecomeSLD_15_00"); //Co mam zrobić, żeby zostać członkiem Nowego Obozu?
AI_Output(self,other,"DIA_Gorn_BecomeSLD_09_01"); //Musisz trochę popracować nad swoimi umiejętnościami bojowymi, zanim Lee zgodzi się cię przyjąć. Nieważne w jakiej broni się specjalizujesz, byleś był w tym dobry.
AI_Output(self,other,"DIA_Gorn_BecomeSLD_09_02"); //Oprócz tego powinieneś mieć chociaż ogólne pojęcie o życiu w kolonii, układach między obozami, i takie tam...
AI_Output(self,other,"DIA_Gorn_BecomeSLD_09_03"); //Jeśli nie interesują cię inne obozy, spróbuj na początek dołączyć do Szkodników. Na zostanie Najemnikiem jeszcze przyjdzie czas.
};
var int Gorn_Trade;
instance DIA_Gorn_TRADE(C_Info)
{
npc = PC_Fighter;
nr = 800;
condition = Dia_Gorn_TRADE_Condition;
information = Dia_Gorn_TRADE_Info;
permanent = 1;
description = "Masz więcej tego towaru?";
trade = 1;
};
func int Dia_Gorn_TRADE_Condition()
{
if(Npc_KnowsInfo(hero,dia_gorn_done))
{
return 1;
};
};
func void Dia_Gorn_TRADE_Info()
{
AI_Output(other,self,"DIA_Gorn_TRADE_15_00"); //Masz więcej tego towaru?
AI_Output(self,other,"DIA_Gorn_TRADE_09_01"); //Całe mnóstwo. Chcesz kupić?
};
instance DIA_Gorn_DuHehler(C_Info)
{
npc = PC_Fighter;
nr = 1;
condition = Dia_Gorn_DuHehler_Condition;
information = Dia_Gorn_DuHehler_Info;
permanent = 0;
description = "Jak to możliwe, że wziąłeś udział w jednym z napadów zorganizowanych przez tę bandę?";
};
func int Dia_Gorn_DuHehler_Condition()
{
};
func void Dia_Gorn_DuHehler_Info()
{
AI_Output(other,self,"DIA_Gorn_DuHehler_15_00"); //Jak to możliwe, że wziąłeś udział w jednym z napadów zorganizowanych przez tę bandę?
AI_Output(self,other,"DIA_Gorn_DuHehler_09_01"); //A kto twierdzi, że wziąłem?
AI_Output(other,self,"DIA_Gorn_DuHehler_15_02"); //Skąd mógłbyś wziąć taką ilość towaru, gdybyś nie uczestniczył w napadzie.
AI_Output(self,other,"DIA_Gorn_DuHehler_09_03"); //Naprawdę myślisz, że taką ilość towaru można zebrać po JEDNYM głupim napadzie?
AI_Output(other,self,"DIA_Gorn_DuHehler_15_04"); //To znaczy, że uczestniczysz w nich regularnie?
AI_Output(self,other,"DIA_Gorn_DuHehler_09_05"); //Nawet gdyby tak było, nie mógł bym ci o tym powiedzieć. Lee dałby mi zdrowo popalić.
AI_Output(other,self,"DIA_Gorn_DuHehler_15_06"); //Rozumiem.
CreateInvItems(self,ItFoApple,21);
B_GiveInvItems(self,other,ItFoApple,21);
Npc_RemoveInvItems(other,ItFoApple,21);
CreateInvItems(other,ItMw_1H_LightGuardsSword_03,1);
CreateInvItems(other,ItFoApple,5);
CreateInvItems(other,ItFoLoaf,5);
CreateInvItems(other,ItFoCheese,5);
CreateInvItems(other,ItFoBeer,5);
};
instance dia_gorn_ueberfall(C_Info)
{
npc = PC_Fighter;
nr = 1;
condition = dia_gorn_ueberfall_condition;
information = dia_gorn_ueberfall_info;
permanent = 0;
description = "Przysyła mnie Lares.";
};
func int dia_gorn_ueberfall_condition()
{
if((Npc_GetTrueGuild(hero) == GIL_ORG) && (Lares_BringListBack == LOG_SUCCESS))
{
return 1;
};
};
func void dia_gorn_ueberfall_info()
{
AI_Output(other,self,"DIA_Gorn_Ueberfall_15_00"); //Przysyła mnie Lares.
AI_Output(self,other,"DIA_Gorn_Ueberfall_09_01"); //A więc jesteś nowym członkiem naszej bandy, co?
AI_Output(other,self,"DIA_Gorn_Ueberfall_15_02"); //Zgadza się, tylko dlaczego bierzesz udział w tych wszystkich napadach?
AI_Output(self,other,"DIA_Gorn_Ueberfall_09_03"); //Stary, nie mogę ci tego powiedzieć, choćbym chciał. Lee by się to z pewnością nie spodobało.
AI_Output(other,self,"DIA_Gorn_Ueberfall_15_04"); //Rozumiem.
AI_Output(self,other,"DIA_Gorn_Ueberfall_09_05"); //To jak, możemy ruszać?
AI_Output(other,self,"DIA_Gorn_Ueberfall_15_06"); //W drogę!
Npc_ExchangeRoutine(self,"OCCONVOY");
Npc_ExchangeRoutine(Org_858_Quentin,"CONVOY");
Npc_ExchangeRoutine(Org_865_Raeuber,"OCCONVOY");
Npc_ExchangeRoutine(Org_870_Raeuber,"OCCONVOY");
Npc_ExchangeRoutine(grd_5018_ramon,"CONVOY");
Npc_ExchangeRoutine(grd_5014_convoitraeger,"CONVOY");
Npc_ExchangeRoutine(grd_5015_convoitraeger,"CONVOY");
Npc_ExchangeRoutine(grd_5016_convoiwache,"CONVOY");
Npc_ExchangeRoutine(grd_5017_convoiwache,"CONVOY");
AI_StopProcessInfos(self);
convoy_nc = LOG_RUNNING;
Log_CreateTopic(CH2_KONVOINC,LOG_MISSION);
Log_SetTopicStatus(CH2_KONVOINC,LOG_RUNNING);
B_LogEntry(CH2_KONVOINC,"Gorn - Najemnik w służbie Magów Wody - jest jednym z tych, którzy planują napad na konwój Starego Obozu. Teraz jedyne co mi pozostało to wspólny najazd.");
};
instance dia_gorn_done(C_Info)
{
npc = PC_Fighter;
nr = 1;
condition = dia_gorn_done_condition;
information = dia_gorn_done_info;
permanent = 0;
important = 1;
};
func int dia_gorn_done_condition()
{
if(Npc_KnowsInfo(hero,dia_quentin_third) && (Npc_GetTrueGuild(hero) == GIL_ORG))
{
return 1;
};
};
func void dia_gorn_done_info()
{
AI_Output(self,other,"DIA_Gorn_Done_15_00"); //Wydajesz się być całkiem niezłym wojownikiem.
AI_Output(self,other,"DIA_Gorn_Done_15_01"); //Ja wrócę znowu do Nowego Obozu.
AI_Output(self,other,"DIA_Gorn_Done_15_02"); //Myślę, że chyba nie widzimy się ostatni raz, prawda?
AI_Output(self,other,"DIA_Gorn_Done_15_03"); //Mam na składzie jeszcze więcej cacuszek z tych napadów. Jeśli chcesz dobić targu, to zapraszam.
AI_Output(self,other,"DIA_Gorn_Done_15_04"); //Tak czy inaczej - do następnego razu.
Npc_ExchangeRoutine(self,"START");
Npc_ExchangeRoutine(Org_858_Quentin,"START");
Npc_ExchangeRoutine(Org_865_Raeuber,"START");
Npc_ExchangeRoutine(Org_870_Raeuber,"START");
Npc_ExchangeRoutine(grd_5018_ramon,"ALTERNATIVE");
Npc_ExchangeRoutine(grd_5014_convoitraeger,"ALTERNATIVE");
Npc_ExchangeRoutine(grd_5015_convoitraeger,"ALTERNATIVE");
Npc_ExchangeRoutine(grd_5016_convoiwache,"ALTERNATIVE");
Npc_ExchangeRoutine(grd_5017_convoiwache,"ALTERNATIVE");
AI_StopProcessInfos(self);
convoy_nc = LOG_SUCCESS;
B_GiveXP(XP_CONVOINC);
Log_SetTopicStatus(CH2_KONVOINC,LOG_SUCCESS);
B_LogEntry(CH2_KONVOINC,"Gorn był pod wrażeniem moich umiejętności i twierdził, że odwaliłem kawał dobrej roboty. Po napadzie postanowił on wrócić znowu do obozu.");
};
instance Info_Gorn_NCWAIT(C_Info)
{
npc = PC_Fighter;
nr = 1;
condition = Info_Gorn_NCWAIT_Condition;
information = Info_Gorn_NCWAIT_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_NCWAIT_Condition()
{
if(Npc_GetDistToWP(self,"NC_PATH52") < 1000)
{
return TRUE;
};
};
func void Info_Gorn_NCWAIT_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_NCWAIT_09_01"); //Ach, to ty! Mój przyjaciel z obozu na bagnie, Lester, doniósł mi o twoich dokonaniach.
AI_Output(self,other,"Info_Gorn_NCWAIT_09_02"); //Jak na kogoś, kto jest tu od niedawna, zaszedłeś całkiem daleko.
AI_Output(other,self,"Info_Gorn_NCWAIT_15_03"); //Parę razy zaszedłem nawet na skraj własnego grobu.
};
instance Info_Gorn_MAGES(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_MAGES_Condition;
information = Info_Gorn_MAGES_Info;
important = 0;
permanent = 0;
description = "Mam ważną wiadomość dla Magów Wody!";
};
func int Info_Gorn_MAGES_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_NCWAIT))
{
return TRUE;
};
};
func void Info_Gorn_MAGES_Info()
{
AI_Output(other,self,"Info_Gorn_MAGES_15_01"); //Mam ważną wiadomość dla Magów Wody!
AI_Output(self,other,"Info_Gorn_MAGES_09_02"); //W takim razie powinieneś zgłosić się do Saturasa. To najwyższy z Magów Wody. Jak go znam, siedzi teraz nad jakąś magiczną księgą albo czymś w tym stylu.
AI_Output(self,other,"Info_Gorn_MAGES_09_03"); //Ale niezależnie od tego jak ważne są wieści, które przynosisz, strażnicy z górnego poziomu nie pozwolą ci się z nim zobaczyć.
AI_Output(other,self,"Info_Gorn_MAGES_15_04"); //A nie mógłbyś się za mną wstawić?
AI_Output(self,other,"Info_Gorn_MAGES_09_05"); //Ja nie, ale Cronos, strażnik rudy może udzielić ci pozwolenia na spotkanie z Saturasem.
};
instance Info_Gorn_CRONOS(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_CRONOS_Condition;
information = Info_Gorn_CRONOS_Info;
important = 0;
permanent = 0;
description = "Gdzie znajdę tego 'strażnika rudy'?";
};
func int Info_Gorn_CRONOS_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_MAGES))
{
return TRUE;
};
};
func void Info_Gorn_CRONOS_Info()
{
var C_Npc Cronos;
AI_Output(other,self,"Info_Gorn_CRONOS_15_01"); //Gdzie znajdę tego "strażnika rudy"?
AI_Output(self,other,"Info_Gorn_CRONOS_09_01a"); //Idąc stąd trafisz na wielką jaskinię mieszkalną, niedaleko tamy.
AI_Output(self,other,"Info_Gorn_CRONOS_09_02"); //Cronos przebywa zwykle obok kraty broniącej dostępu do kopca rudy.
AI_Output(self,other,"Info_Gorn_CRONOS_09_03"); //Ale to nieco arogancki człowiek. Będziesz musiał go jakoś przekonać, że twoja wiadomość jest naprawdę ważna.
Cronos = Hlp_GetNpc(KDW_604_Cronos);
Cronos.aivar[AIV_FINDABLE] = TRUE;
B_LogEntry(CH3_EscapePlanNC,"Gorn radzi mi iść wprost do Arcymistrza Magów Wody, niejakiego Saturasa. Cronos, Strażnik Rudy, może mi załatwić audiencję. Znajdę go w centrum obozu, przy kracie nad kopcem rudy.");
Npc_ExchangeRoutine(self,"start");
};
instance Info_Gorn_RUINWAIT(C_Info)
{
npc = PC_Fighter;
nr = 2;
condition = Info_Gorn_RUINWAIT_Condition;
information = Info_Gorn_RUINWAIT_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINWAIT_Condition()
{
if(Npc_GetDistToWP(self,"OW_PATH_ABYSS_4") < 1000)
{
return 1;
};
};
func void Info_Gorn_RUINWAIT_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINWAIT_09_01"); //Cześć, żółtodziobie. Jak widzisz kolonia to bardzo małe miejsce.
AI_Output(self,other,"Info_Gorn_RUINWAIT_09_02"); //Cały czas wpada się na tych samych ludzi.
};
instance Info_Gorn_RUINWHAT(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINWHAT_Condition;
information = Info_Gorn_RUINWHAT_Info;
important = 0;
permanent = 0;
description = "Co tu robisz?";
};
func int Info_Gorn_RUINWHAT_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINWAIT))
{
return 1;
};
};
func void Info_Gorn_RUINWHAT_Info()
{
AI_Output(other,self,"Info_Gorn_RUINWHAT_15_01"); //Co tu robisz?
AI_Output(self,other,"Info_Gorn_RUINWHAT_09_02"); //Och, podążam śladem pewnej prastarej legendy.
AI_Output(other,self,"Info_Gorn_RUINWHAT_15_03"); //Legendy?
AI_Output(self,other,"Info_Gorn_RUINWHAT_09_04"); //Tak, Milten - mój kumpel ze Starego Obozu, powiedział mi, że kiedyś ten teren zamieszkiwali mnisi.
AI_Output(self,other,"Info_Gorn_RUINWHAT_09_05"); //Oczywiście to było na długo przed powstaniem Bariery.
AI_Output(self,other,"Info_Gorn_RUINWHAT_09_06"); //Ponoć czczono tutaj bóstwo, które pozwalało mnichom przybierać postać zwierząt.
AI_Output(self,other,"Info_Gorn_RUINWHAT_09_07"); //Założę się, że są tu jeszcze jakieś skarby pozostałe po dawnych czasach.
if(!Npc_KnowsInfo(hero,Info_Gorn_RUINFOCUS))
{
AI_Output(self,other,"Info_Gorn_RUINWHAT_09_08"); //A co ciebie tu sprowadza?
};
};
instance Info_Gorn_RUINFOCUS(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINFOCUS_Condition;
information = Info_Gorn_RUINFOCUS_Info;
important = 0;
permanent = 0;
description = "Szukam magicznego kamienia ogniskującego.";
};
func int Info_Gorn_RUINFOCUS_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINWAIT))
{
return 1;
};
};
func void Info_Gorn_RUINFOCUS_Info()
{
AI_Output(other,self,"Info_Gorn_RUINFOCUS_15_01"); //Szukam magicznego kamienia ogniskującego.
AI_Output(other,self,"Info_Gorn_RUINFOCUS_15_02"); //Powinien być gdzieś w okolicy.
AI_Output(self,other,"Info_Gorn_RUINFOCUS_09_03"); //Przedmiot, którego szukasz może znajdować się na terenie starego klasztoru, za tym kanionem.
};
instance Info_Gorn_RUINJOIN(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINJOIN_Condition;
information = Info_Gorn_RUINJOIN_Info;
important = 0;
permanent = 0;
description = "Moglibyśmy wybrać się tam razem.";
};
func int Info_Gorn_RUINJOIN_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINFOCUS) && Npc_KnowsInfo(hero,Info_Gorn_RUINWHAT))
{
return 1;
};
};
func void Info_Gorn_RUINJOIN_Info()
{
AI_Output(other,self,"Info_Gorn_RUINJOIN_15_01"); //Moglibyśmy wybrać się tam razem.
AI_Output(self,other,"Info_Gorn_RUINJOIN_09_02"); //Dobry pomysł. Cała okolica aż roi się od zębaczy.
AI_Output(self,other,"Info_Gorn_RUINJOIN_09_03"); //W pojedynkę nie powinny stwarzać kłopotu wytrawnemu myśliwemu, ale te bestie zwykle polują całymi stadami.
AI_Output(self,other,"Info_Gorn_RUINJOIN_09_04"); //A grupa zębaczy potrafi rozerwać na strzępy nawet bardzo doświadczonego wojownika.
AI_Output(other,self,"Info_Gorn_RUINJOIN_15_05"); //Zatem pójdziemy tam razem?
AI_Output(self,other,"Info_Gorn_RUINJOIN_09_06"); //Dobra, ale zanim przejdziemy po tym pniu, chciałbym przyjrzeć się uważniej temu kanionowi. Lubię wiedzieć, co mam za plecami.
AI_Output(self,other,"Info_Gorn_RUINJOIN_09_07"); //Chodź za mną. Odkryłem ścieżkę, która nas tam zaprowadzi.
Log_CreateTopic(CH3_MonasteryRuin,LOG_MISSION);
Log_SetTopicStatus(CH3_MonasteryRuin,LOG_RUNNING);
B_LogEntry(CH3_MonasteryRuin,"W pobliżu ruin starego klasztoru spotkałem Najemnika Gorna. Zamierza rozejrzeć się po ruinach w poszukiwaniu starych skarbów.");
B_LogEntry(CH3_MonasteryRuin,"Od tej pory będziemy podróżować razem. Gorn uprzedził mnie o stadach zębaczy nawiedzających te tereny.");
self.aivar[AIV_PARTYMEMBER] = TRUE;
AI_StopProcessInfos(self);
Npc_ExchangeRoutine(self,"RuinAbyss");
};
instance Info_Gorn_RUINABYSS(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINABYSS_Condition;
information = Info_Gorn_RUINABYSS_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINABYSS_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINJOIN) && (Npc_GetDistToWP(self,"OW_ABYSS_TO_CAVE_MOVE6") < 1000))
{
return 1;
};
};
func void Info_Gorn_RUINABYSS_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINABYSS_09_01"); //To się nazywa szczęście! Najwyraźniej ta jaskinia była wykorzystywana jako składowisko.
AI_Output(self,other,"Info_Gorn_RUINABYSS_09_02"); //Możesz teraz prowadzić do klasztoru. Chciałem mieć pewność, że nie spotkają nas jakieś paskudne niespodzianki w drodze powrotnej.
B_LogEntry(CH3_MonasteryRuin,"Odkryliśmy ukrytą jaskinię! Pośród innych rzeczy, znaleźliśmy również dwa zwoje z zaklęciami i klucz!");
AI_StopProcessInfos(self);
Npc_ExchangeRoutine(self,"RuinFollow");
};
instance Info_Gorn_RUINLEAVE(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINLEAVE_Condition;
information = Info_Gorn_RUINLEAVE_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINLEAVE_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINJOIN) && (Npc_GetDistToWP(hero,"OW_PATH_175_MEATBUG") > 15000) && !Npc_KnowsInfo(hero,Info_Gorn_RUINGATE))
{
return 1;
};
};
func void Info_Gorn_RUINLEAVE_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINLEAVE_09_01"); //Widzę, że ten stary klasztor przestał cię już interesować.
AI_Output(self,other,"Info_Gorn_RUINLEAVE_09_02"); //Zatem dalej pójdę sam.
AI_Output(self,other,"Info_Gorn_RUINLEAVE_09_03"); //Gdybyś zmienił zdanie, możesz mnie dogonić.
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"RuinWall");
AI_StopProcessInfos(self);
};
instance Info_Gorn_RUINWALL(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINWALL_Condition;
information = Info_Gorn_RUINWALL_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINWALL_Condition()
{
if((Npc_KnowsInfo(hero,Info_Gorn_RUINJOIN) || Npc_KnowsInfo(hero,Info_Gorn_RUINLEAVE)) && (Npc_GetDistToWP(hero,"OW_PATH_175_GATE1") < 1000))
{
return 1;
};
};
func void Info_Gorn_RUINWALL_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINWALL_09_01"); //Cholerna brama. Ponoć nikomu jeszcze nie udało się jej otworzyć.
AI_Output(self,other,"Info_Gorn_RUINWALL_09_02"); //Te bestyjki pod drugiej stronie są pewnie jedynymi istotami, którym udało się dostać do środka.
B_LogEntry(CH3_MonasteryRuin,"Stoimy przed zamkniętą bramą. Wygląda na to, że nie da się jej otworzyć od zewnątrz.");
AI_StopProcessInfos(self);
Npc_ExchangeRoutine(self,"RuinWall");
};
instance Info_Gorn_RUINWALLWHAT(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINWALLWHAT_Condition;
information = Info_Gorn_RUINWALLWHAT_Info;
important = 0;
permanent = 1;
description = "I co teraz?";
};
func int Info_Gorn_RUINWALLWHAT_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINWALL) && !Npc_KnowsInfo(hero,Info_Gorn_RUINGATE))
{
return TRUE;
};
};
func void Info_Gorn_RUINWALLWHAT_Info()
{
AI_Output(other,self,"Info_Gorn_RUINWALLWHAT_15_01"); //I co teraz?
AI_Output(self,other,"Info_Gorn_RUINWALLWHAT_09_02"); //Musisz znaleźć jakiś sposób na przedostanie się na drugą stronę bramy.
};
instance Info_Gorn_RUINLEDGE(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINLEDGE_Condition;
information = Info_Gorn_RUINLEDGE_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINLEDGE_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINJOIN) && !Npc_KnowsInfo(hero,Info_Gorn_RUINSUCCESS) && (Npc_GetDistToWP(hero,"OW_MONSTER_NAVIGATE_02") < 1000))
{
return 1;
};
};
func void Info_Gorn_RUINLEDGE_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINLEDGE_09_01"); //Na górze jest chyba jakaś platforma. Ale wątpię, żeby udało się nam wspiąć tak wysoko.
AI_Output(self,other,"Info_Gorn_RUINLEDGE_09_02"); //Musimy znaleźć inną drogę.
AI_StopProcessInfos(self);
};
instance Info_Gorn_RUINPLATFORM(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINPLATFORM_Condition;
information = Info_Gorn_RUINPLATFORM_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINPLATFORM_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINJOIN) && !Npc_KnowsInfo(hero,Info_Gorn_RUINSUCCESS) && (Npc_GetDistToWP(hero,"OW_PATH_176_TEMPELFOCUS4") < 300))
{
return 1;
};
};
func void Info_Gorn_RUINPLATFORM_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINPLATFORM_09_01"); //To mi wygląda na jakiś piedestał.
AI_Output(self,other,"Info_Gorn_RUINPLATFORM_09_02"); //Może leżał tu kiedyś artefakt, którego szukasz.
AI_StopProcessInfos(self);
};
instance Info_Gorn_RUINGATE(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINGATE_Condition;
information = Info_Gorn_RUINGATE_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINGATE_Condition()
{
if((Npc_KnowsInfo(hero,Info_Gorn_RUINJOIN) || Npc_KnowsInfo(hero,Info_Gorn_RUINLEAVE)) && MonasteryRuin_GateOpen)
{
return TRUE;
};
};
func void Info_Gorn_RUINGATE_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINGATE_09_01"); //Widzę, że udało ci się otworzyć tę bramę. To zaklęcie, którego użyłeś było całkiem sprytne.
AI_Output(other,self,"Info_Gorn_RUINGATE_15_02"); //No, możemy iść dalej.
B_LogEntry(CH3_MonasteryRuin,"Przy pomocy jednego ze zwojów znalezionych w jaskini, zamieniłem się w chrząszcza. W ten sposób udało mi się dostać na teren klasztoru przez wyrwę w murze.");
B_LogEntry(CH3_MonasteryRuin,"Brama została otwarta.");
self.aivar[AIV_PARTYMEMBER] = TRUE;
Npc_ExchangeRoutine(self,"RuinFollowInside");
AI_StopProcessInfos(self);
};
instance Info_Gorn_RUINLEAVEINSIDE(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINLEAVEINSIDE_Condition;
information = Info_Gorn_RUINLEAVEINSIDE_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINLEAVEINSIDE_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINGATE) && (Npc_GetDistToWP(hero,"OW_PATH_ABYSS_CROSS_6") < 1000) && !Npc_HasItems(hero,Focus_4))
{
return TRUE;
};
};
func void Info_Gorn_RUINLEAVEINSIDE_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINLEAVEINSIDE_09_01"); //Widzę, że ten stary klasztor przestał cię już interesować.
AI_Output(self,other,"Info_Gorn_RUINLEAVEINSIDE_09_02"); //Dalej pójdę sam.
AI_Output(self,other,"Info_Gorn_RUINLEAVEINSIDE_09_03"); //Gdybyś zmienił zdanie, możesz mnie dogonić.
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"RuinStay");
AI_StopProcessInfos(self);
};
instance Info_Gorn_RUINSUCCESS(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINSUCCESS_Condition;
information = Info_Gorn_RUINSUCCESS_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINSUCCESS_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINJOIN) && Npc_HasItems(hero,Focus_4))
{
return TRUE;
};
};
func void Info_Gorn_RUINSUCCESS_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINSUCCESS_09_01"); //A więc znalazłeś swój magiczny artefakt!
AI_Output(other,self,"Info_Gorn_RUINSUCCESS_15_02"); //Tak. Muszę zanieść ten kamień ogniskujący do Magów Wody.
AI_Output(self,other,"Info_Gorn_RUINSUCCESS_09_03"); //Pójdę kawałek z tobą.
B_LogEntry(CH3_MonasteryRuin,"Znalazłem kamień ogniskujący! Gorn będzie mi jeszcze trochę towarzyszył.");
AI_StopProcessInfos(self);
Npc_ExchangeRoutine(self,"RuinYard");
Wld_InsertNpc(YoungTroll,"OW_PATH_176");
};
instance Info_Gorn_RUINTROLL(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINTROLL_Condition;
information = Info_Gorn_RUINTROLL_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINTROLL_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_RUINSUCCESS) && (Npc_GetDistToWP(hero,"OW_PATH_SNAPPER04_SPAWN01") < 1000))
{
return TRUE;
};
};
func void Info_Gorn_RUINTROLL_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINTROLL_09_01"); //O JASNA CHOLERA! A co to za monstrum?
AI_Output(other,self,"Info_Gorn_RUINTROLL_15_02"); //Skąd się tu wzięło coś takiego?
AI_Output(self,other,"Info_Gorn_RUINTROLL_09_03"); //To mi wygląda na jednego z tych niezniszczalnych Trolli, ale jest trochę mniejsze.
AI_Output(self,other,"Info_Gorn_RUINTROLL_09_04"); //Trudno, jeśli chcemy się stąd wydostać, musimy go jakoś minąć.
AI_StopProcessInfos(self);
AI_DrawWeapon(self);
AI_SetWalkMode(self,NPC_RUN);
};
instance Info_Gorn_RUINVICTORY(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RUINVICTORY_Condition;
information = Info_Gorn_RUINVICTORY_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RUINVICTORY_Condition()
{
var C_Npc yTroll;
yTroll = Hlp_GetNpc(YoungTroll);
if(Npc_KnowsInfo(hero,Info_Gorn_RUINTROLL) && Npc_IsDead(yTroll))
{
return TRUE;
};
};
func void Info_Gorn_RUINVICTORY_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,other,"Info_Gorn_RUINVICTORY_09_01"); //Nie było łatwo!
AI_Output(other,self,"Info_Gorn_RUINVICTORY_15_02"); //Tak, ale w końcu się nam udało! To chyba był jakiś młody Troll.
AI_Output(self,other,"Info_Gorn_RUINVICTORY_09_03"); //... Więc pewnie nie chciałbyś wpaść na jego rodziców, co?
AI_Output(other,self,"Info_Gorn_RUINVICTORY_15_04"); //Raczej nie!
AI_Output(self,other,"Info_Gorn_RUINVICTORY_09_05"); //Tutaj nasze drogi się rozchodzą. Chcę tu trochę zostać i rozejrzeć się po okolicy.
AI_Output(self,other,"Info_Gorn_RUINVICTORY_09_06"); //Ale na pewno jeszcze się spotkamy. Do zobaczenia, przyjacielu.
B_LogEntry(CH3_MonasteryRuin,"W drodze powrotnej, na dziedzińcu klasztoru, spotkaliśmy młodego trolla. Stoczyliśmy z nim ciężką walkę, ale koniec końców - zwyciężyliśmy!");
B_LogEntry(CH3_MonasteryRuin,"Nasze drogi tutaj się rozchodzą. Mam przeczucie, że już niedługo spotkamy się znowu.");
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"RuinStay");
AI_StopProcessInfos(self);
};
instance Info_Gorn_DIEGOMILTEN(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_DIEGOMILTEN_Condition;
information = Info_Gorn_DIEGOMILTEN_Info;
important = 0;
permanent = 0;
description = "Spotkałem Diego i Miltena przed Starym Obozem!";
};
func int Info_Gorn_DIEGOMILTEN_Condition()
{
if(Npc_KnowsInfo(hero,Info_Diego_OCFAVOR))
{
return TRUE;
};
};
func void Info_Gorn_DIEGOMILTEN_Info()
{
AI_Output(hero,self,"Info_Gorn_DIEGOMILTEN_15_01"); //Spotkałem Diego i Miltena przed Starym Obozem!
AI_Output(self,hero,"Info_Gorn_DIEGOMILTEN_09_02"); //To dobra wiadomość!
AI_Output(hero,self,"Info_Gorn_DIEGOMILTEN_15_03"); //Mają się spotkać z tobą i z Lesterem w zwykłym miejscu.
AI_Output(self,hero,"Info_Gorn_DIEGOMILTEN_09_04"); //Dzięki. W dzisiejszych czasach nie ma nic cenniejszego niż kilku oddanych przyjaciół.
AI_Output(self,hero,"Info_Gorn_DIEGOMILTEN_09_05"); //Jesteś już prawie jednym z nas. Udowodniłeś, że można na tobie polegać!
B_GiveXP(XP_MessageForGorn);
Npc_ExchangeRoutine(PC_Fighter,"MEETING");
Npc_ExchangeRoutine(PC_Thief,"MEETING");
Npc_ExchangeRoutine(PC_Mage,"MEETING");
if(warned_gorn_or_lester == FALSE)
{
warned_gorn_or_lester = TRUE;
}
else
{
B_LogEntry(CH4_4Friends,"Poinformowałem Lestera i Gorna o spotkaniu z ich przyjaciółmi. Moje zadanie skończone. Dalej będą musieli radzić sobie sami...");
Log_SetTopicStatus(CH4_4Friends,LOG_SUCCESS);
};
};
instance Info_Gorn_FREEMINE(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_FREEMINE_Condition;
information = Info_Gorn_FREEMINE_Info;
important = 0;
permanent = 0;
description = "Co zobaczyłeś w Wolnej Kopalni?";
};
func int Info_Gorn_FREEMINE_Condition()
{
if(Npc_KnowsInfo(hero,Info_Saturas_AMBUSH) && !FindXardas)
{
return TRUE;
};
};
func void Info_Gorn_FREEMINE_Info()
{
AI_Output(hero,self,"Info_Gorn_FREEMINE_15_01"); //Co zobaczyłeś w Wolnej Kopalni?
AI_Output(self,hero,"Info_Gorn_FREEMINE_09_02"); //Po powrocie ze starego klasztoru chciałem złożyć wizytę Okylowi, szefowi Wolnej Kopalni.
AI_Output(self,hero,"Info_Gorn_FREEMINE_09_03"); //Ale gdy dotarłem na miejsce, zastałem tylko stygnące ciała.
AI_Output(self,hero,"Info_Gorn_FREEMINE_09_04"); //Dostrzegłem kilku Strażników okopujących się przy wejściu do kopalni.
AI_Output(hero,self,"Info_Gorn_FREEMINE_15_05"); //Jak to możliwe, że duży oddział Najemników uległ garstce Strażników?
AI_Output(self,hero,"Info_Gorn_FREEMINE_09_06"); //To musiała być jakaś zasadzka. W końcu kto mógłby się spodziewać ataku od strony gór?
AI_Output(self,hero,"Info_Gorn_FREEMINE_09_07"); //Element zaskoczenia może zwielokrotnić zdolności bojowe oddziału.
Npc_ExchangeRoutine(SLD_704_Blade,"START");
};
instance Info_Gorn_GUARDNC(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_GUARDNC_Condition;
information = Info_Gorn_GUARDNC_Info;
important = 0;
permanent = 0;
description = "Co zamierzasz robić dalej?";
};
func int Info_Gorn_GUARDNC_Condition()
{
if(Npc_KnowsInfo(hero,Info_Saturas_AMBUSH))
{
return TRUE;
};
};
func void Info_Gorn_GUARDNC_Info()
{
AI_Output(hero,self,"Info_Gorn_GUARDNC_15_01"); //Co zamierzasz robić dalej?
AI_Output(self,hero,"Info_Gorn_GUARDNC_09_02"); //Musimy zmienić całą naszą strategię obrony. To trochę potrwa.
AI_Output(self,hero,"Info_Gorn_GUARDNC_09_03"); //Dopóki Lee nie zdoła przeorganizować swoich oddziałów, dołączę do prowizorycznej straży Corda.
AI_Output(hero,self,"Info_Gorn_GUARDNC_15_04"); //Przygotowujecie się do kontrataku?
AI_Output(self,hero,"Info_Gorn_GUARDNC_09_05"); //Jeszcze nie, ale wkrótce na pewno to zrobimy.
AI_Output(self,hero,"Info_Gorn_GUARDNC_09_06"); //Gdybyś mnie kiedyś potrzebował, zacznij tutaj i idź w stronę kopalni. Będę tam stał na straży.
B_Story_CordsPost();
AI_StopProcessInfos(self);
};
instance Info_Gorn_GUARDNCRUNNING(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_GUARDNCRUNNING_Condition;
information = Info_Gorn_GUARDNCRUNNING_Info;
important = 0;
permanent = 1;
description = "Jak leci?";
};
func int Info_Gorn_GUARDNCRUNNING_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_GUARDNC) && !UrShak_SpokeOfUluMulu)
{
return TRUE;
};
};
func void Info_Gorn_GUARDNCRUNNING_Info()
{
AI_Output(hero,self,"Info_Gorn_GUARDNCRUNNING_15_01"); //Jak leci?
AI_Output(self,hero,"Info_Gorn_GUARDNCRUNNING_09_02"); //Na razie cicho. W Wolnej Kopalni nic się nie rusza.
AI_Output(self,hero,"Info_Gorn_GUARDNCRUNNING_09_03"); //Lee zajmuje się jeszcze organizacją naszej obrony!
};
instance Info_Gorn_POST(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_POST_Condition;
information = Info_Gorn_POST_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_POST_Condition()
{
if(UrShak_SpokeOfUluMulu)
{
return TRUE;
};
};
func void Info_Gorn_POST_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,hero,"Info_Gorn_POST_09_01"); //Przybywasz w samą porę! Przygotowujemy się do kontruderzenia.
AI_Output(self,hero,"Info_Gorn_POST_09_02"); //Na początek spróbujemy odbić Wolną Kopalnię.
};
instance Info_Gorn_TAKEBACK(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_TAKEBACK_Condition;
information = Info_Gorn_TAKEBACK_Info;
important = 0;
permanent = 0;
description = "Zamierzacie ją zdobyć we czterech? A gdzie są wszyscy Najemnicy?";
};
func int Info_Gorn_TAKEBACK_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_POST))
{
return TRUE;
};
};
func void Info_Gorn_TAKEBACK_Info()
{
var int guild;
AI_Output(hero,self,"Info_Gorn_TAKEBACK_15_01"); //Zamierzacie ją zdobyć we czterech? A gdzie są wszyscy Najemnicy?
AI_Output(self,hero,"Info_Gorn_TAKEBACK_09_02"); //Uderzenie od frontu nie ma szans powodzenia. Ludzie Gomeza za dobrze się okopali.
AI_Output(self,hero,"Info_Gorn_TAKEBACK_09_03"); //Spróbujemy zaatakować po cichu, zabijając jednego strażnika po drugim. Może się uda...
AI_Output(self,hero,"Info_Gorn_TAKEBACK_09_04"); //Lee kazał mi przekazać ci wiadomość.
guild = Npc_GetTrueGuild(hero);
if(guild == GIL_SLD)
{
AI_Output(self,hero,"Info_Gorn_TAKEBACK_09_05"); //Jako jeden z naszych najlepszych Najemników zostałeś wyznaczony do udziału w tej misji.
}
else if(guild == GIL_KDW)
{
AI_Output(self,hero,"Info_Gorn_TAKEBACK_09_06"); //Jako Mag z Kręgu Wody i doświadczony wojownik, zostałeś wybrany do udziału w tej misji.
}
else if(guild == GIL_ORG)
{
AI_Output(self,hero,"Info_Gorn_TAKEBACK_09_07"); //Jako jeden z naszych najlepszych Szkodników zostałeś wybrany do udziału w tej misji.
}
else
{
AI_Output(self,hero,"Info_Gorn_TAKEBACK_09_08"); //Choć nie jesteś jednym z nas, wielokrotnie oddałeś nam nieocenione przysługi.
AI_Output(self,hero,"Info_Gorn_TAKEBACK_09_09"); //Dlatego chcemy cię prosić o udział w tej misji.
};
AI_Output(self,hero,"Info_Gorn_TAKEBACK_09_10"); //Pójdę z tobą. Razem może się nam udać.
};
instance Info_Gorn_SECOND(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_SECOND_Condition;
information = Info_Gorn_SECOND_Info;
important = 0;
permanent = 0;
description = "Na początek? A co zamierzacie robić później?";
};
func int Info_Gorn_SECOND_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_POST))
{
return TRUE;
};
};
func void Info_Gorn_SECOND_Info()
{
AI_Output(hero,self,"Info_Gorn_SECOND_15_01"); //Na początek? A co zamierzacie robić później?
AI_Output(self,hero,"Info_Gorn_SECOND_09_02"); //Jak tylko odbijemy kopalnię, spróbujemy odnaleźć ścieżkę, którą przyszli ludzie Gomeza!
AI_Output(self,hero,"Info_Gorn_SECOND_09_03"); //Kiedy ustawimy przy niej straż, będziemy bezpieczni.
AI_Output(hero,self,"Info_Gorn_SECOND_15_04"); //Rozumiem.
};
instance Info_Gorn_WHYME(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_WHYME_Condition;
information = Info_Gorn_WHYME_Info;
important = 0;
permanent = 0;
description = "Dlaczego właśnie ja?!";
};
func int Info_Gorn_WHYME_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_TAKEBACK))
{
return TRUE;
};
};
func void Info_Gorn_WHYME_Info()
{
AI_Output(hero,self,"Info_Gorn_WHYME_15_01"); //Dlaczego właśnie ja?!
AI_Output(self,hero,"Info_Gorn_WHYME_09_02"); //Wielokrotnie udowodniłeś, że jesteś silnym i przebiegłym wojownikiem!
AI_Output(self,hero,"Info_Gorn_WHYME_09_03"); //Poza tym znasz Stary Obóz i jego strażników lepiej niż ktokolwiek z nas.
AI_Output(self,hero,"Info_Gorn_WHYME_09_04"); //Trudno o kogoś lepszego niż ty!
};
instance Info_Gorn_KICKBUTT(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_KICKBUTT_Condition;
information = Info_Gorn_KICKBUTT_Info;
important = 0;
permanent = 0;
description = "No dobrze, chodźmy. Nauczymy tych nieproszonych gości dobrych manier!";
};
func int Info_Gorn_KICKBUTT_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_WHYME) && !Npc_KnowsInfo(hero,Info_Gorn_MYWAY))
{
return TRUE;
};
};
func void Info_Gorn_KICKBUTT_Info()
{
AI_Output(hero,self,"Info_Gorn_KICKBUTT_15_01"); //No dobrze, chodźmy. Nauczymy tych nieproszonych gości dobrych manier.
AI_Output(self,hero,"Info_Gorn_KICKBUTT_09_02"); //Wiedziałem, że można na ciebie liczyć.
AI_Output(self,hero,"Info_Gorn_KICKBUTT_09_03"); //Weź ten klucz. Otwiera stróżówkę przy wejściu do kopalni.
B_Story_GornJoins();
};
instance Info_Gorn_MYWAY(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_MYWAY_Condition;
information = Info_Gorn_MYWAY_Info;
important = 0;
permanent = 0;
description = "Czemu nie. I tak muszę dostać się do kopalni!";
};
func int Info_Gorn_MYWAY_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_WHYME) && !Npc_KnowsInfo(hero,Info_Gorn_KICKBUTT))
{
return TRUE;
};
};
func void Info_Gorn_MYWAY_Info()
{
AI_Output(hero,self,"Info_Gorn_MYWAY_15_01"); //Czemu nie. I tak muszę dostać się do kopalni!
AI_Output(self,hero,"Info_Gorn_MYWAY_09_02"); //Nieważne DLACZEGO to robisz. Cieszę się, że jesteś z nami!
AI_Output(self,hero,"Info_Gorn_MYWAY_09_03"); //Weź ten klucz. Otwiera stróżówkę przy wejściu do kopalni.
B_Story_GornJoins();
};
instance Info_Gorn_WOLF(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_WOLF_Condition;
information = Info_Gorn_WOLF_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_WOLF_Condition()
{
if(Gorn_JoinedForFM && (Npc_GetDistToWP(hero,"OW_PATH_076") < 500))
{
return TRUE;
};
};
func void Info_Gorn_WOLF_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,hero,"Info_Gorn_WOLF_09_01"); //Ach, prawie zapomniałem!
AI_Output(self,hero,"Info_Gorn_WOLF_09_02"); //Wilk chce z tobą koniecznie porozmawiać, zanim ruszymy do kopalni.
Info_ClearChoices(Info_Gorn_WOLF);
Info_AddChoice(Info_Gorn_WOLF,"To może zaczekać, mamy teraz ważniejsze sprawy na głowie.",Info_Gorn_WOLF_FM);
Info_AddChoice(Info_Gorn_WOLF,"Więc lepiej do niego zajrzę.",Info_Gorn_WOLF_WOLF);
B_LogEntry(CH4_UluMulu,"Wilk chce ze mną porozmawiać zanim ruszę do kopalni. Powinienem chyba do niego zajrzeć.");
Gorn_GotoWolf = TRUE;
};
func void Info_Gorn_WOLF_FM()
{
AI_Output(hero,self,"Info_Gorn_WOLF_15_04"); //To może zaczekać, mamy teraz ważniejsze sprawy na głowie.
AI_Output(self,hero,"Info_Gorn_WOLF_09_05"); //Jak chcesz!
AI_StopProcessInfos(self);
};
func void Info_Gorn_WOLF_WOLF()
{
AI_Output(hero,self,"Info_Gorn_WOLF_15_06"); //Więc lepiej do niego zajrzę.
AI_Output(self,hero,"Info_Gorn_WOLF_09_07"); //W porządku. Zaczekam na ciebie tutaj.
Gorn_JoinedForFM = FALSE;
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"GuardNC");
AI_StopProcessInfos(self);
};
instance Info_Gorn_LEAVEFORPOST(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_LEAVEFORPOST_Condition;
information = Info_Gorn_LEAVEFORPOST_Info;
important = 1;
permanent = 1;
};
func int Info_Gorn_LEAVEFORPOST_Condition()
{
if(Gorn_JoinedForFM && (Npc_GetDistToWP(hero,"OW_PATH_074") < 2000) && (FreemineOrc_LookingUlumulu != LOG_RUNNING))
{
return TRUE;
};
};
func void Info_Gorn_LEAVEFORPOST_Info()
{
AI_GotoNpc(self,hero);
if(Npc_KnowsInfo(hero,Info_Gorn_WOLF))
{
AI_Output(self,hero,"Info_Gorn_LEAVEFORPOST_09_01"); //Widzę, że jednak nie chcesz porozmawiać z Wilkiem!
}
else
{
AI_Output(self,hero,"Info_Gorn_LEAVEFORPOST_09_02"); //Idziesz w złą stronę! Mamy iść prosto do kopalni!
};
AI_Output(self,hero,"Info_Gorn_LEAVEFORPOST_09_03"); //Zaczekam na ciebie przy prowizorycznym punkcie strażniczym!
Gorn_JoinedForFM = FALSE;
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"GuardNC");
AI_StopProcessInfos(self);
};
instance Info_Gorn_REJOINFORFM(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_REJOINFORFM_Condition;
information = Info_Gorn_REJOINFORFM_Info;
important = 0;
permanent = 1;
description = "Ruszamy do kopalni!";
};
func int Info_Gorn_REJOINFORFM_Condition()
{
if((Npc_KnowsInfo(hero,Info_Gorn_MYWAY) || Npc_KnowsInfo(hero,Info_Gorn_KICKBUTT)) && (Npc_GetDistToWP(hero,"OW_PATH_075_GUARD4") < 1000) && !Gorn_JoinedForFM)
{
return TRUE;
};
};
func void Info_Gorn_REJOINFORFM_Info()
{
AI_Output(hero,self,"Info_Gorn_REJOINFORFM_15_01"); //Ruszamy do kopalni!
AI_Output(self,hero,"Info_Gorn_REJOINFORFM_09_02"); //Pora przepędzić stamtąd ludzi Gomeza!
AI_Output(self,hero,"Info_Gorn_REJOINFORFM_09_03"); //Idź przodem. Pójdę za tobą.
Gorn_JoinedForFM = TRUE;
self.aivar[AIV_PARTYMEMBER] = TRUE;
Npc_ExchangeRoutine(self,"FollowToFMC");
AI_StopProcessInfos(self);
};
instance Info_Gorn_RAZOR(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_RAZOR_Condition;
information = Info_Gorn_RAZOR_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_RAZOR_Condition()
{
if(Gorn_JoinedForFM && (Npc_GetDistToWP(hero,"OW_PATH_3000") < 1000))
{
return TRUE;
};
};
func void Info_Gorn_RAZOR_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,hero,"Info_Gorn_RAZOR_09_01"); //UWAGA! BRZYTWY!
AI_Output(self,hero,"Info_Gorn_RAZOR_09_02"); //Polują w stadach, jak zębacze, tylko gryzą znacznie mocniej!
AI_Output(self,hero,"Info_Gorn_RAZOR_09_03"); //Powinniśmy się najpierw z nimi rozprawić. Znasz mnie - lubię wiedzieć, co mam za plecami.
AI_StopProcessInfos(self);
};
instance Info_Gorn_FMCENTRANCE(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_FMCENTRANCE_Condition;
information = Info_Gorn_FMCENTRANCE_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_FMCENTRANCE_Condition()
{
if(Gorn_JoinedForFM && (Npc_GetDistToWP(hero,"FMC_ENTRANCE") < 1000))
{
return TRUE;
};
};
func void Info_Gorn_FMCENTRANCE_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,hero,"Info_Gorn_FMCENTRANCE_09_01"); //Zaczekaj! Widzisz te wszystkie ciała?
AI_Output(self,hero,"Info_Gorn_FMCENTRANCE_09_02"); //Idź do wejścia do kopalni. Ja zaczekam tutaj i przypilnuję, żeby ktoś lub coś nie zaszło nas od tyłu.
AI_Output(self,hero,"Info_Gorn_FMCENTRANCE_09_03"); //Kiedy już zejdziesz na dół, pójdę za tobą.
Npc_ExchangeRoutine(self,"WaitFMC");
AI_StopProcessInfos(self);
};
instance Info_Gorn_FMGATE(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_FMGATE_Condition;
information = Info_Gorn_FMGATE_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_FMGATE_Condition()
{
if(Gorn_JoinedForFM && !FM_GateOpen && (Npc_GetDistToWP(hero,"FMC_FM_ENTRANCE") < 1000))
{
return TRUE;
};
};
func void Info_Gorn_FMGATE_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,hero,"Info_Gorn_FMGATE_09_01"); //Usłyszałem odgłosy walki i przybiegłem najszybciej jak mogłem!
AI_Output(hero,self,"Info_Gorn_FMGATE_15_02"); //Stary znajomy... Rachunek wyrównany.
AI_Output(self,hero,"Info_Gorn_FMGATE_09_03"); //Dobra, otwieraj bramę. Je będę tu stał na straży!
Npc_ExchangeRoutine(self,"WaitFM");
AI_StopProcessInfos(self);
};
instance Info_Gorn_AFTERFM(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_AFTERFM_Condition;
information = Info_Gorn_AFTERFM_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_AFTERFM_Condition()
{
if(FreemineOrc_LookingUlumulu)
{
return TRUE;
};
};
func void Info_Gorn_AFTERFM_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,hero,"Info_Gorn_AFTERFM_09_01"); //Stary, to się dopiero nazywa trudna walka!
AI_Output(self,hero,"Info_Gorn_AFTERFM_09_02"); //Nie spodziewałem się, że Strażnicy Gomeza będą stawiali tak zaciekły opór.
AI_Output(hero,self,"Info_Gorn_AFTERFM_15_03"); //Grunt, że kopalnia znowu jest w naszych rękach.
AI_Output(self,hero,"Info_Gorn_AFTERFM_09_04"); //Zostanę tutaj i dopilnuję, żeby tak już zostało!
B_Story_LeftFM();
Lee_freeminereport = 1;
AI_StopProcessInfos(self);
};
instance Info_Gorn_FMWATCH(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_FMWATCH_Condition;
information = Info_Gorn_FMWATCH_Info;
important = 0;
permanent = 1;
description = "Co słychać?";
};
func int Info_Gorn_FMWATCH_Condition()
{
if(Npc_KnowsInfo(hero,Info_Gorn_AFTERFM))
{
return TRUE;
};
};
func void Info_Gorn_FMWATCH_Info()
{
AI_Output(hero,self,"Info_Gorn_FMWATCH_15_01"); //Co słychać?
AI_Output(self,hero,"Info_Gorn_FMWATCH_09_02"); //Na razie cicho. W Wolnej Kopalni nic się nie rusza.
AI_Output(self,hero,"Info_Gorn_FMWATCH_09_03"); //Lee powinien niedługo podesłać tu posiłki.
AI_Output(self,hero,"Info_Gorn_FMWATCH_09_04"); //Póki co postaram się tutaj rozgościć.
};
instance Info_Gorn_FOUNDULUMULU(C_Info)
{
npc = PC_Fighter;
condition = Info_Gorn_FOUNDULUMULU_Condition;
information = Info_Gorn_FOUNDULUMULU_Info;
important = 1;
permanent = 0;
};
func int Info_Gorn_FOUNDULUMULU_Condition()
{
if(FreemineOrc_LookingUlumulu == LOG_SUCCESS)
{
return TRUE;
};
};
func void Info_Gorn_FOUNDULUMULU_Info()
{
AI_GotoNpc(self,hero);
AI_Output(self,hero,"Info_Gorn_FOUNDULUMULU_09_01"); //Masz przy sobie ciekawą ozdóbkę. Orkowa, prawda?
AI_Output(self,hero,"Info_Gorn_FOUNDULUMULU_09_02"); //To od tego niewolnika z kopalni?
AI_Output(hero,self,"Info_Gorn_FOUNDULUMULU_15_03"); //To orkowy symbol przyjaźni. Przy jego pomocy zamierzam dostać się do miasta Orków.
AI_Output(self,hero,"Info_Gorn_FOUNDULUMULU_09_04"); //Oby tylko Orkowie uszanowali to... COŚ!
B_Kapitelwechsel(5);
AI_StopProcessInfos(self);
};
|
D
|
/Users/Ashley/Desktop/Bandsintown/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Alamofire.o : /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/MultipartFormData.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Timeline.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Alamofire.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Response.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/TaskDelegate.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/SessionDelegate.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/ParameterEncoding.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Validation.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/ResponseSerialization.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/SessionManager.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/AFError.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Notifications.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Result.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Request.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Ashley/Desktop/Bandsintown/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/Ashley/Desktop/Bandsintown/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap
/Users/Ashley/Desktop/Bandsintown/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Alamofire~partial.swiftmodule : /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/MultipartFormData.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Timeline.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Alamofire.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Response.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/TaskDelegate.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/SessionDelegate.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/ParameterEncoding.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Validation.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/ResponseSerialization.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/SessionManager.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/AFError.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Notifications.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Result.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Request.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Ashley/Desktop/Bandsintown/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/Ashley/Desktop/Bandsintown/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap
/Users/Ashley/Desktop/Bandsintown/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Alamofire~partial.swiftdoc : /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/MultipartFormData.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Timeline.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Alamofire.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Response.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/TaskDelegate.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/SessionDelegate.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/ParameterEncoding.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Validation.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/ResponseSerialization.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/SessionManager.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/AFError.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Notifications.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Result.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/Request.swift /Users/Ashley/Desktop/Bandsintown/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Ashley/Desktop/Bandsintown/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/Ashley/Desktop/Bandsintown/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap
|
D
|
import std.stdio, std.string, std.algorithm, std.array;
auto sierpinskiCarpet(in int n) pure nothrow @safe {
auto r = ["#"];
foreach (immutable _; 0 .. n) {
const p = r.map!q{a ~ a ~ a}.array;
r = p ~ r.map!q{a ~ a.replace("#", " ") ~ a}.array ~ p;
}
return r.join('\n');
}
void main() {
3.sierpinskiCarpet.writeln;
}
|
D
|
instance VLK_4147_Waffenknecht(Npc_Default)
{
name[0] = NAME_Waffenknecht;
guild = GIL_MIL;
id = 4147;
voice = 6;
flags = 0;
npcType = NPCTYPE_OCAMBIENT;
B_SetAttributesToChapter(self,1);
fight_tactic = FAI_HUMAN_COWARD;
EquipItem(self,ItMw_1h_Mil_Sword);
EquipItem(self,ItRw_Mil_Crossbow);
B_CreateAmbientInv(self);
B_SetNpcVisual(self,MALE,"Hum_Head_Bald",Face_N_NormalBart11,BodyTex_N,ITAR_MIL_L);
Mdl_SetModelFatness(self,2);
Mdl_ApplyOverlayMds(self,"Humans_Relaxed.mds");
B_GiveNpcTalents(self);
B_SetFightSkills(self,30);
daily_routine = Rtn_Start_4147;
};
func void Rtn_Start_4147()
{
TA_Stand_Guarding(8,0,23,0,"OC_GUARD_PALISADE_05");
TA_Stand_Guarding(23,0,8,0,"OC_GUARD_PALISADE_05");
};
|
D
|
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/HTTP.build/Async/Response+Async.swift.o : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Async/Response+Async.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Method/Method.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Messages/Message.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Response/ResponseRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Body/BodyRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Messages/Message+CustomStringConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Middleware/Middleware.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Response/Response.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Middleware/Middleware+Chaining.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Method/Method+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Chunk/Response+Chunk.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Chunk/Body+Chunk.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Chunk/ChunkStream.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Version/Version.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/URI+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/Response+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/Client+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/Request+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Responder/Responder.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Responder/AsyncResponder.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/AsyncServerWorker.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/CHTTPParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/ResponseParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/RequestParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/Server.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/TCPServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/TLSServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/BasicServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/AsyncServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/Serializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/ResponseSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/RequestSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/ParserError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/ServerError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/SerializerError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Body/Body+Bytes.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Headers/Headers.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/ParseResults.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Status/Status.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Response/Response+Redirect.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Client/HTTP+Client.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Client/Client.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Request/Request.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/ThreadsafeArray.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Body/Body.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/HTTP.build/Response+Async~partial.swiftmodule : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Async/Response+Async.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Method/Method.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Messages/Message.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Response/ResponseRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Body/BodyRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Messages/Message+CustomStringConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Middleware/Middleware.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Response/Response.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Middleware/Middleware+Chaining.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Method/Method+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Chunk/Response+Chunk.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Chunk/Body+Chunk.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Chunk/ChunkStream.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Version/Version.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/URI+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/Response+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/Client+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/Request+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Responder/Responder.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Responder/AsyncResponder.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/AsyncServerWorker.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/CHTTPParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/ResponseParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/RequestParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/Server.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/TCPServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/TLSServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/BasicServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/AsyncServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/Serializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/ResponseSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/RequestSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/ParserError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/ServerError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/SerializerError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Body/Body+Bytes.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Headers/Headers.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/ParseResults.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Status/Status.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Response/Response+Redirect.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Client/HTTP+Client.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Client/Client.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Request/Request.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/ThreadsafeArray.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Body/Body.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/HTTP.build/Response+Async~partial.swiftdoc : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Async/Response+Async.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Method/Method.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Messages/Message.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Response/ResponseRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Body/BodyRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Messages/Message+CustomStringConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Middleware/Middleware.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Response/Response.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Middleware/Middleware+Chaining.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Method/Method+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Chunk/Response+Chunk.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Chunk/Body+Chunk.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Chunk/ChunkStream.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Version/Version.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/URI+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/Response+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/Client+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/FoundationClient/Request+Foundation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Responder/Responder.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Responder/AsyncResponder.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/AsyncServerWorker.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/CHTTPParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/ResponseParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/RequestParser.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/Server.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/TCPServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/TLSServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/BasicServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/AsyncServer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/Serializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/ResponseSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/RequestSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/ParserError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/ServerError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Serializer/SerializerError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Body/Body+Bytes.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Headers/Headers.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Parser/ParseResults.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Status/Status.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Response/Response+Redirect.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Client/HTTP+Client.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Client/Client.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Request/Request.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Server/ThreadsafeArray.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/HTTP/Body/Body.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
|
D
|
/++
Simple non-blocking work with serial port for Posix and Windows.
See also `example/monitor`
+/
module serialport;
version (Posix) {} else version (Windows) {}
else static assert(0, "unsupported platform");
public
{
import serialport.base;
import serialport.config;
import serialport.block;
import serialport.nonblock;
import serialport.exception;
import serialport.types;
}
version (unittest): private:
import std.range;
import std.concurrency;
import std.exception;
import std.datetime;
import std.conv;
import std.string;
import std.stdio;
import std.random;
import std.process;
import core.thread;
enum BUFFER_SIZE = 1024;
interface ComPipe
{
void open();
string command() const @property;
string[2] ports() const @property;
}
class SocatPipe : ComPipe
{
int bufferSize;
ProcessPipes pipe;
string[2] _ports;
string _command;
this(int bs)
{
bufferSize = bs;
_command = ("socat -d -d -b%d pty,raw,"~
"echo=0 pty,raw,echo=0").format(bufferSize);
}
static string parsePort(string ln)
{
auto ret = ln.split[$-1];
enforce(ret.startsWith("/dev/"),
"unexpected last word in output line '%s'".format(ln));
return ret;
}
override void open()
{
pipe = pipeShell(_command);
_ports[0] = parsePort(pipe.stderr.readln.strip);
_ports[1] = parsePort(pipe.stderr.readln.strip);
}
override const @property
{
string command() { return _command; }
string[2] ports() { return _ports; }
}
}
unittest
{
enum socat_out_ln = "2018/03/08 02:56:58 socat[30331] N PTY is /dev/pts/1";
assert(SocatPipe.parsePort(socat_out_ln) == "/dev/pts/1");
assertThrown(SocatPipe.parsePort("some string"));
}
ComPipe getPlatformComPipe(int bufsz)
{
import std.stdio : stderr;
stderr.writeln("available ports: ", SerialPort.listAvailable);
version (linux) return new SocatPipe(bufsz);
else version (OSX) return new SocatPipe(bufsz);
else
{
pragma(msg, "platform doesn't support, no real test");
return null;
}
}
// real test main
//version (realtest)
unittest
{
stderr.writeln("=== start real test ===\n");
scope (exit) stderr.writeln("\n=== finish real test ===");
auto cp = getPlatformComPipe(BUFFER_SIZE);
if (cp is null)
{
stderr.writeln("platform doesn't support");
return;
}
void reopen()
{
stderr.writeln("\n");
Thread.sleep(150.msecs);
cp.open();
stderr.writefln("run command `%s`", cp.command);
stderr.writefln("pipe ports: %s <=> %s", cp.ports[0], cp.ports[1]);
}
reopen();
utCall!(threadTest!SerialPortNonBlk)("thread test for non-block", cp.ports);
reopen();
utCall!(threadTest!SerialPortBlk)("thread test for block", cp.ports);
reopen();
utCall!fiberTest("fiber test", cp.ports);
reopen();
utCall!fiberTest2("fiber test 2", cp.ports);
reopen();
utCall!readTimeoutTest("read timeout test", cp.ports);
}
auto utCall(alias fnc, Args...)(string fname, Args args)
{
stderr.writefln("--- run %s ---", fname);
scope (success) stderr.writefln("--- success %s ---", fname);
scope (failure) stderr.writefln("!!! failure %s !!!", fname);
return fnc(args);
}
void threadTest(SPT)(string[2] ports)
{
assert(SerialPort.listAvailable.length != 0);
static struct End {}
static End end() @property { return End.init; }
static void echoThread(string port)
{
auto com = new SPT(port, "2400:8N1");
scope (exit) com.close();
com.set(1200);
assert(com.config.baudRate == 1200);
com.baudRate = 19200;
assert(com.config.baudRate == 19200);
bool work = true;
void[BUFFER_SIZE] buffer = void;
while (work)
{
auto data = com.read(buffer);
if (data.length)
send(ownerTid, cast(string)(data.idup));
receiveTimeout(100.msecs,
(SPConfig cfg) { com.config = cfg; },
(End e) { work = false; },
(OwnerTerminated e) { work = false; }
);
}
send(ownerTid, end);
}
auto t = spawn(&echoThread, ports[1]);
auto com = new SPT(ports[0], 19200);
assert(com.baudRate == 19200);
assert(com.dataBits == DataBits.data8);
assert(com.parity == Parity.none);
assert(com.stopBits == StopBits.one);
assert(com.config.baudRate == 19200);
assert(com.config.dataBits == DataBits.data8);
assert(com.config.parity == Parity.none);
assert(com.config.stopBits == StopBits.one);
scope (exit) com.close();
version (linux) enum NN = BUFFER_SIZE;
version (OSX) enum NN = BUFFER_SIZE / 8;
version (Windows) enum NN = BUFFER_SIZE;
enum origList = [
"one",
"one two",
"one two three",
"x".repeat(NN).join
];
string[] list;
auto sets = [
SPConfig.parse("9600:8N1"),
SPConfig(38400),
SPConfig(1200),
SPConfig.parse("19200:8N2"),
];
string msg = sets.front.mode;
void initList()
{
com.config = sets.front;
send(t, sets.front);
msg = sets.front.mode;
sets.popFront;
list = origList.dup;
}
initList();
com.write(msg);
bool work = true;
while (work)
{
receive(
(string rec)
{
enforce(rec == msg, "break message: '%s' != '%s'".format(msg, rec));
if (list.empty)
{
if (sets.empty)
{
work = false;
stderr.writeln("ownerThread send 'end'");
send(t, end);
}
else initList();
}
else
{
msg = list.front;
list.popFront();
}
com.write(msg);
},
(End e)
{
work = false;
stderr.writeln("ownerThread receive 'end'");
},
(Throwable e)
{
work = false;
throw e;
}
);
}
/+
version (Posix) // socat not supported
{
assertThrown!SerialPortException(com.set(DataBits.data5));
assertThrown!SerialPortException(com.set(DataBits.data6));
assertThrown!SerialPortException(com.set(DataBits.data7));
assertThrown!SerialPortException(com.set(StopBits.onePointFive));
// on my system but not in travis
//assertThrown!SerialPortException(com.set(Parity.even));
}
+/
}
class CF : Fiber
{
void[] data;
SerialPortFR com;
this(SerialPortFR com, size_t bufsize)
{
this.com = com;
this.data = new void[bufsize];
super(&run);
}
abstract void run();
}
class CFSlave : CF
{
void[] result;
Duration readTimeout = 40.msecs;
Duration readGapTimeout = 10.msecs;
this(SerialPortFR com, size_t bufsize)
{ super(com, bufsize); }
override void run()
{ result = com.readLoop(data, readTimeout, readGapTimeout); }
}
class CFMaster : CF
{
CFSlave slave;
Duration writeTimeout = 20.msecs;
this(SerialPortFR com, size_t bufsize)
{
super(com, bufsize);
foreach (ref v; cast(ubyte[])data)
v = uniform(ubyte(0), ubyte(128));
}
override void run() { com.writeLoop(data, writeTimeout); }
}
void fiberTest(string[2] ports)
{
auto slave = new CFSlave(new SerialPortFR(ports[0]), BUFFER_SIZE);
auto master = new CFMaster(new SerialPortFR(ports[1]), BUFFER_SIZE);
bool work = true;
int step;
while (work)
{
if (master.state != Fiber.State.TERM) master.call;
if (slave.state != Fiber.State.TERM) slave.call;
step++;
Thread.sleep(250.nsecs);
if (slave.result.length == master.data.length)
{
import std.algorithm : equal;
enforce(equal(cast(ubyte[])slave.result, cast(ubyte[])master.data));
work = false;
writeln("basic loop steps: ", step);
}
}
}
void fiberTest2(string[2] ports)
{
string mode = "19200:8N1";
auto scom = new SerialPortFR(ports[0], 9600, "8N1");
auto mcom = new SerialPortFR(ports[1], "19200:8N1");
version (Posix)
assertThrown!UnsupportedException(scom.baudRate = 9200);
scom.reopen(ports[0], SPConfig.parse(mode));
version (OSX)
enum BK = 32;
else
enum BK = 1024;
auto slave = new CFSlave(scom, BUFFER_SIZE * BK);
auto master = new CFMaster(mcom, BUFFER_SIZE * BK);
version (OSX)
master.writeTimeout = 2000.msecs;
else
master.writeTimeout = 200.msecs;
void run()
{
bool work = true;
int step;
while (work)
{
if (master.state != Fiber.State.TERM) master.call;
if (slave.state != Fiber.State.TERM) slave.call;
step++;
Thread.sleep(250.nsecs);
if (slave.result.length == master.data.length)
{
import std.algorithm : equal;
enforce(equal(cast(ubyte[])slave.result, cast(ubyte[])master.data));
work = false;
writeln("basic loop steps: ", step);
}
}
}
run();
scom.reopen(scom.name, scom.config);
mcom.reopen(mcom.name, mcom.config);
master.writeTimeout = 10.msecs;
master.reset();
slave.reset();
slave.result = [];
assertThrown!TimeoutException(run());
}
void readTimeoutTest(string[2] ports)
{
string mode = "19200:8N1";
auto comA = new SerialPortFR(ports[0], 19200);
void[1024] buffer = void;
assertThrown!TimeoutException(comA.readLoop(buffer[], 1.msecs, 1.msecs));
auto comB = new SerialPortBlk(ports[1], 19200, "8N1");
comB.readTimeout = 1.msecs;
assertThrown!TimeoutException(comB.read(buffer[]));
}
|
D
|
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/FluentProvider.build/Exports.swift.o : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Node+Row+JSON.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Droplet+Storage.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Cache.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Updateable/Request+Updateable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Updateable/Updateable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/Query+Filterable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/Filterable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Droplet+Prepare.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Prepare.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/SQLite+Config.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/FilterableKey+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Model.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Pagination.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Config+Preparation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Provider.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Config+Driver.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Exports.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Updateable/UpdateableKey.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/FilterableKey.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/JSON.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/SMTP.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/FormData.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Node.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Cache.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/PathIndexable.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/SQLite.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Routing.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Crypto.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Vapor.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Branches.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Cookies.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Configs.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sessions.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/WebSockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Fluent.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/BCrypt.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Multipart.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/sqlite.git--8232814251736334455/Sources/CSQLite/include/sqlite3.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/FluentProvider.build/Exports~partial.swiftmodule : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Node+Row+JSON.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Droplet+Storage.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Cache.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Updateable/Request+Updateable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Updateable/Updateable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/Query+Filterable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/Filterable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Droplet+Prepare.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Prepare.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/SQLite+Config.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/FilterableKey+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Model.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Pagination.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Config+Preparation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Provider.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Config+Driver.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Exports.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Updateable/UpdateableKey.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/FilterableKey.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/JSON.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/SMTP.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/FormData.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Node.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Cache.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/PathIndexable.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/SQLite.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Routing.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Crypto.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Vapor.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Branches.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Cookies.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Configs.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sessions.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/WebSockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Fluent.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/BCrypt.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Multipart.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/sqlite.git--8232814251736334455/Sources/CSQLite/include/sqlite3.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/FluentProvider.build/Exports~partial.swiftdoc : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Node+Row+JSON.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Droplet+Storage.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Cache.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Updateable/Request+Updateable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Updateable/Updateable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/Query+Filterable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/Filterable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Droplet+Prepare.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Prepare.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/SQLite+Config.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/FilterableKey+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Model.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Pagination.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Config+Preparation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Provider.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Droplet/Config+Driver.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Exports.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Updateable/UpdateableKey.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent-provider.git-1502561075136423204/Sources/FluentProvider/Filterable/FilterableKey.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/JSON.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/SMTP.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/FormData.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Node.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Cache.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/PathIndexable.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/SQLite.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Routing.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Crypto.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Vapor.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Branches.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Cookies.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Configs.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sessions.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/WebSockets.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Fluent.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/BCrypt.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Multipart.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/sqlite.git--8232814251736334455/Sources/CSQLite/include/sqlite3.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes
|
D
|
the party who appeals a decision of a lower court
of or relating to or taking account of appeals (usually legal appeals
|
D
|
#!/usr/bin/env dub
/+dub.sdl:
dependency "dmd" path="../.."
+/
import dmd.permissivevisitor;
import dmd.transitivevisitor;
import dmd.tokens;
import dmd.root.outbuffer;
import core.stdc.stdio;
extern(C++) class ImportVisitor2(AST) : ParseTimeTransitiveVisitor!AST
{
alias visit = ParseTimeTransitiveVisitor!AST.visit;
override void visit(AST.Import imp)
{
if (imp.isstatic)
printf("static ");
printf("import ");
if (imp.packages && imp.packages.dim)
foreach (const pid; *imp.packages)
printf("%s.", pid.toChars());
printf("%s", imp.id.toChars());
if (imp.names.dim)
{
printf(" : ");
foreach (const i, const name; imp.names)
{
if (i)
printf(", ");
printf("%s", name.toChars());
}
}
printf(";");
printf("\n");
}
}
extern(C++) class ImportVisitor(AST) : PermissiveVisitor!AST
{
alias visit = PermissiveVisitor!AST.visit;
override void visit(AST.Module m)
{
foreach (s; *m.members)
{
s.accept(this);
}
}
override void visit(AST.Import i)
{
printf("import %s", i.toChars());
}
override void visit(AST.ImportStatement s)
{
foreach (imp; *s.imports)
{
imp.accept(this);
}
}
}
void main()
{
import std.stdio;
import std.file;
import std.path : buildPath, dirName;
import dmd.errors;
import dmd.parse;
import dmd.astbase;
import dmd.id;
import dmd.globals;
import dmd.identifier;
import core.memory;
GC.disable();
string path = __FILE_FULL_PATH__.dirName.buildPath("../../../phobos/std/");
string regex = "*.d";
auto dFiles = dirEntries(path, regex, SpanMode.depth);
foreach (f; dFiles)
{
string fn = f.name;
//writeln("Processing ", fn);
Id.initialize();
global._init();
global.params.isLinux = true;
global.params.is64bit = (size_t.sizeof == 8);
global.params.useUnitTests = true;
ASTBase.Type._init();
auto id = Identifier.idPool(fn);
auto m = new ASTBase.Module(&(fn.dup)[0], id, false, false);
auto input = readText(fn);
//writeln("Started parsing...");
scope diagnosticReporter = new StderrDiagnosticReporter(global.params.useDeprecated);
scope p = new Parser!ASTBase(m, input, false, diagnosticReporter);
p.nextToken();
m.members = p.parseModule();
//writeln("Finished parsing. Starting transitive visitor");
scope vis = new ImportVisitor2!ASTBase();
m.accept(vis);
//writeln("Finished!");
}
}
|
D
|
<?xml version="1.0" encoding="ASCII" standalone="no"?>
<di:SashWindowsMngr xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0">
<pageList>
<availablePage>
<emfPageIdentifier href="VAR_0_BeT-1233441727.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="VAR_0_BeT-1233441727.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
|
D
|
// D command-line interface parser that will make you smile.
// Copyright (c) 2014 Bob Tolbert, bob@tolbert.org
// Licensed under terms of MIT license (see LICENSE-MIT)
//
// https://github.com/rwtolbert/docopt.d
//
// Ported from Python to D based on:
// - http://docopt.org
import std.stdio;
import std.regex;
import std.array;
import std.string;
import std.algorithm;
import std.file;
import std.path;
import std.json;
import docopt;
string sortedJSON(string input) {
string[] parts = split(input, "\n");
if (parts.length == 1) {
return parts[0];
} else {
string[] res;
foreach(ref p; sort(parts[1..$-1])) {
string temp = strip(replace(p, ",", ""));
if (temp.length > 0) {
res ~= temp;
}
}
return join(res, "|");
}
return "D";
}
bool compareJSON(JSONValue expect, JSONValue result) {
string strE = sortedJSON(expect.toPrettyString);
string strR = sortedJSON(result.toPrettyString);
if (strE == strR) {
return true;
}
return false;
}
class DocoptTestItem {
private string _doc;
private uint _index;
private string _prog;
private string[] _argv;
private JSONValue _expect;
this(string doc, uint index, string prog, string[] argv, JSONValue expect) {
_doc = doc;
_index = index;
_prog = prog;
_argv = argv;
_expect = expect;
}
@property
string doc() {
return _doc;
}
bool runTest() {
string result;
try {
docopt.ArgValue[string] temp = docopt.parse(_doc, _argv);
result = prettyPrintArgs(temp);
} catch (DocoptArgumentError e) {
result = "\"user-error\"";
return (result == _expect.toString);
} catch (Exception e) {
writeln(e);
return false;
}
JSONValue _result = parseJSON(result);
if (compareJSON(_expect, _result)) {
return true;
} else {
writeln(format("expect: %s\nresult: %s",
_expect, _result));
return false;
}
}
}
DocoptTestItem[] splitTestCases(string raw) {
auto pat = regex("#.*$", "m");
auto res = replaceAll(raw, pat, "");
if (startsWith(raw, "\"\"\"")) {
raw = raw[3..$];
}
auto fixtures = split(raw, "r\"\"\"");
DocoptTestItem[] testcases;
foreach(uint i, fixture; fixtures[1..$]) {
auto parts = fixture.split("\"\"\"");
if (parts.length == 2) {
auto doc = parts[0];
foreach(testcase; parts[1].split('$')[1..$]) {
auto argv_parts = strip(testcase).split("\n");
auto expect = parseJSON(join(argv_parts[1..$], "\n"));
auto prog_parts = argv_parts[0].split();
auto prog = prog_parts[0];
string[] argv = [];
if (prog_parts.length > 1) {
argv = prog_parts[1..$];
}
testcases ~= new DocoptTestItem(doc, i, prog, argv, expect);
}
}
}
return testcases;
}
int main(string[] args) {
if (args.length < 2) {
writeln("usage: test_docopt <testfile>");
return 1;
}
auto raw = readText(args[1]);
auto testcases = splitTestCases(raw);
uint passed[];
foreach(uint i, test; testcases) {
if (test.runTest()) {
passed ~= i;
} else {
writeln(i, "failed");
writeln(test.doc);
writeln();
}
}
writeln(format("%d passed of %d run : %.1f%%",
passed.length, testcases.length,
100.0*cast(float)passed.length/cast(float)testcases.length));
return 0;
}
|
D
|
void main() { runSolver(); }
void problem() {
auto QN = scan!long;
auto solve() {
auto subSolve() {
auto N = scan!int;
auto A = scan!real(N);
int ans = N - 1;
foreach(i; 0..N - 1) foreach(j; i+1..N) {
real d = A[j] - A[i] == 0 ? 0 : (A[j] - A[i]) / (j - i);
real t = A[i] - d*i;
int tans = N;
foreach(x; 0..N) {
if (t.approxEqual(A[x], 1e-04, 1e-04)) tans--;
t += d;
}
ans = min(ans, tans);
}
return ans;
}
foreach(_; 0..QN) subSolve().writeln;
}
outputForAtCoder(&solve);
}
// ----------------------------------------------
import std.stdio, std.conv, std.array, std.string, std.algorithm, std.container, std.range, core.stdc.stdlib, std.math, std.typecons, std.numeric, std.traits, std.functional, std.bigint, std.datetime.stopwatch, core.time, core.bitop;
T[][] combinations(T)(T[] s, in long m) { if (!m) return [[]]; if (s.empty) return []; return s[1 .. $].combinations(m - 1).map!(x => s[0] ~ x).array ~ s[1 .. $].combinations(m); }
string scan(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }
T scan(T)(){ return scan.to!T; }
T[] scan(T)(long n){ return n.iota.map!(i => scan!T()).array; }
void deb(T ...)(T t){ debug writeln(t); }
alias Point = Tuple!(long, "x", long, "y");
Point invert(Point p) { return Point(p.y, p.x); }
long[] divisors(long n) { long[] ret; for (long i = 1; i * i <= n; i++) { if (n % i == 0) { ret ~= i; if (i * i != n) ret ~= n / i; } } return ret.sort.array; }
bool chmin(T)(ref T a, T b) { if (b < a) { a = b; return true; } else return false; }
bool chmax(T)(ref T a, T b) { if (b > a) { a = b; return true; } else return false; }
string charSort(alias S = "a < b")(string s) { return (cast(char[])((cast(byte[])s).sort!S.array)).to!string; }
ulong comb(ulong a, ulong b) { if (b == 0) {return 1;}else{return comb(a - 1, b - 1) * a / b;}}
T[] compress(T)(T[] arr, T origin = T.init) { T[T] indecies; arr.dup.sort.uniq.enumerate(origin).each!((i, t) => indecies[t] = i); return arr.map!(t => indecies[t]).array; }
string toAnswerString(R)(R r) { return r.map!"a.to!string".joiner(" ").array.to!string; }
struct ModInt(uint MD) if (MD < int.max) {ulong v;this(string v) {this(v.to!long);}this(int v) {this(long(v));}this(long v) {this.v = (v%MD+MD)%MD;}void opAssign(long t) {v = (t%MD+MD)%MD;}static auto normS(ulong x) {return (x<MD)?x:x-MD;}static auto make(ulong x) {ModInt m; m.v = x; return m;}auto opBinary(string op:"+")(ModInt r) const {return make(normS(v+r.v));}auto opBinary(string op:"-")(ModInt r) const {return make(normS(v+MD-r.v));}auto opBinary(string op:"*")(ModInt r) const {return make((ulong(v)*r.v%MD).to!ulong);}auto opBinary(string op:"^^", T)(T r) const {long x=v;long y=1;while(r){if(r%2==1)y=(y*x)%MD;x=x^^2%MD;r/=2;} return make(y);}auto opBinary(string op:"/")(ModInt r) const {return this*memoize!inv(r);}static ModInt inv(ModInt x) {return x^^(MD-2);}string toString() const {return v.to!string;}auto opOpAssign(string op)(ModInt r) {return mixin ("this=this"~op~"r");}}
alias MInt1 = ModInt!(10^^9 + 7);
alias MInt9 = ModInt!(998_244_353);
void outputForAtCoder(T)(T delegate() fn) {
static if (is(T == float) || is(T == double) || is(T == real)) "%.16f".writefln(fn());
else static if (is(T == void)) fn();
else static if (is(T == string)) fn().writeln;
else static if (isInputRange!T) {
static if (!is(string == ElementType!T) && isInputRange!(ElementType!T)) foreach(r; fn()) r.toAnswerString.writeln;
else foreach(r; fn()) r.writeln;
}
else fn().writeln;
}
void runSolver() {
enum BORDER = "==================================";
debug { BORDER.writeln; while(!stdin.eof) { "<<< Process time: %s >>>".writefln(benchmark!problem(1)); BORDER.writeln; } }
else problem();
}
enum YESNO = [true: "Yes", false: "No"];
// -----------------------------------------------
K binarySearch(K)(bool delegate(K) cond, K l, K r) { return binarySearch((K k) => k, cond, l, r); }
T binarySearch(T, K)(K delegate(T) fn, bool delegate(K) cond, T l, T r) {
auto ok = l;
auto ng = r;
const T TWO = 2;
bool again() {
static if (is(T == float) || is(T == double) || is(T == real)) {
return !ng.approxEqual(ok, 1e-08, 1e-08);
} else {
return abs(ng - ok) > 1;
}
}
while(again()) {
const half = (ng + ok) / TWO;
const halfValue = fn(half);
if (cond(halfValue)) {
ok = half;
} else {
ng = half;
}
}
return ok;
}
|
D
|
/Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.build/Activity/ActivityIndicator.swift.o : /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/ANSI.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Console.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleStyle.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Choose.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorState.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Ask.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/Terminal.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Ephemeral.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Confirm.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/LoadingBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ProgressBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Clear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/ConsoleClear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleLogger.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorRenderer.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Center.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleColor.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleError.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicator.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Wait.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleTextFragment.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Input.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Output.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleText.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.build/ActivityIndicator~partial.swiftmodule : /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/ANSI.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Console.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleStyle.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Choose.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorState.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Ask.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/Terminal.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Ephemeral.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Confirm.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/LoadingBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ProgressBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Clear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/ConsoleClear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleLogger.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorRenderer.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Center.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleColor.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleError.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicator.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Wait.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleTextFragment.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Input.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Output.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleText.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.build/ActivityIndicator~partial.swiftdoc : /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/ANSI.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Console.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleStyle.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Choose.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorState.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Ask.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/Terminal.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Ephemeral.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Confirm.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/LoadingBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ProgressBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Clear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/ConsoleClear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleLogger.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorRenderer.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Center.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleColor.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleError.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicator.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Wait.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleTextFragment.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Input.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Output.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleText.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/.build/x86_64-unknown-linux-gnu/debug/BooleanValueChallenge.build/challenge2.swift.o : /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/challenge1.swift /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/challenge2.swift /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/main.swift /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Swift.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/glibc.modulemap
/home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/.build/x86_64-unknown-linux-gnu/debug/BooleanValueChallenge.build/challenge2~partial.swiftmodule : /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/challenge1.swift /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/challenge2.swift /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/main.swift /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Swift.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/glibc.modulemap
/home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/.build/x86_64-unknown-linux-gnu/debug/BooleanValueChallenge.build/challenge2~partial.swiftdoc : /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/challenge1.swift /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/challenge2.swift /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/main.swift /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Swift.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/glibc.modulemap
/home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/.build/x86_64-unknown-linux-gnu/debug/BooleanValueChallenge.build/challenge2~partial.swiftsourceinfo : /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/challenge1.swift /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/challenge2.swift /home/dominator/Desktop/Swift\ Beginner/BooleanValueChallenge/Sources/main.swift /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/Swift.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/dominator/swift/swift-dev/usr/lib/swift/linux/x86_64/glibc.modulemap
|
D
|
INSTANCE Info_Mod_Sly_Hi (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_Hi_Condition;
information = Info_Mod_Sly_Hi_Info;
permanent = 0;
important = 0;
description = "Du hast auch nichts zu tun, oder?";
};
FUNC INT Info_Mod_Sly_Hi_Condition()
{
return 1;
};
FUNC VOID Info_Mod_Sly_Hi_Info()
{
AI_Output(hero, self, "Info_Mod_Sly_Hi_15_00"); //Du hast auch nichts zu tun, oder?
AI_Output(self, hero, "Info_Mod_Sly_Hi_10_01"); //(angetrunken) Bleib mal ganz ruhig, Bruder. Warum setzt du dich nicht dazu und hast ein bisschen Spaß mit uns?
};
INSTANCE Info_Mod_Sly_WasPassiert (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_WasPassiert_Condition;
information = Info_Mod_Sly_WasPassiert_Info;
permanent = 0;
important = 0;
description = "Was ist denn nur aus euch geworden?";
};
FUNC INT Info_Mod_Sly_WasPassiert_Condition()
{
if (Npc_KnowsInfo(hero, Info_Mod_Sly_Hi))
{
return 1;
};
};
FUNC VOID Info_Mod_Sly_WasPassiert_Info()
{
AI_Output(hero, self, "Info_Mod_Sly_WasPassiert_15_00"); //Was ist denn nur aus euch geworden?
AI_Output(self, hero, "Info_Mod_Sly_WasPassiert_10_01"); //Nichts weiter ... denk ich. Solange Cutter uns nicht zur Arbeit auf den Feldern einteilt, können wir auch nichts machen.
AI_Output(self, hero, "Info_Mod_Sly_WasPassiert_10_02"); //Na gut, ab und zu geht mal jemand jagen. Aber das lag mir eh noch nie, und ich will nicht als Wolfsfutter enden.
};
INSTANCE Info_Mod_Sly_LagerLeerer (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_LagerLeerer_Condition;
information = Info_Mod_Sly_LagerLeerer_Info;
permanent = 0;
important = 0;
description = "Ist es hier im Lager leerer geworden?";
};
FUNC INT Info_Mod_Sly_LagerLeerer_Condition()
{
if (Npc_KnowsInfo(hero, Info_Mod_Sly_Hi))
{
return 1;
};
};
FUNC VOID Info_Mod_Sly_LagerLeerer_Info()
{
AI_Output(hero, self, "Info_Mod_Sly_LagerLeerer_15_00"); //Ist es hier im Lager leerer geworden?
AI_Output(self, hero, "Info_Mod_Sly_LagerLeerer_10_01"); //Ein bisschen schon. Bei den meisten weiß man nicht, was aus ihnen geworden ist.
AI_Output(self, hero, "Info_Mod_Sly_LagerLeerer_10_02"); //Manche wollten zum Jagen losziehen und sind nie wiedergekommen.
AI_Output(self, hero, "Info_Mod_Sly_LagerLeerer_10_03"); //Entweder hat's die armen Schweine erwischt, oder die Dreckskerle haben sich abgesetzt.
AI_Output(self, hero, "Info_Mod_Sly_LagerLeerer_10_04"); //Seit kurzem dürfen wir deshalb ohne Genehmigung das Lager nicht mehr verlassen.
AI_Output(self, hero, "Info_Mod_Sly_LagerLeerer_10_05"); //Na ja, wer wirklich raus will, lässt sich von dem Verbot natürlich nicht behindern.
};
INSTANCE Info_Mod_Sly_Arena (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_Arena_Condition;
information = Info_Mod_Sly_Arena_Info;
permanent = 0;
important = 0;
description = "Was ist mit der Arena? Willst du dich dort nicht messen?";
};
FUNC INT Info_Mod_Sly_Arena_Condition()
{
if (Npc_KnowsInfo(hero, Info_Mod_Sly_WasPassiert))
{
return 1;
};
};
FUNC VOID Info_Mod_Sly_Arena_Info()
{
AI_Output(hero, self, "Info_Mod_Sly_Arena_15_00"); //Was ist mit der Arena? Willst du dich dort nicht messen?
AI_Output(self, hero, "Info_Mod_Sly_Arena_10_01"); //Die Arena wär schon was für mich ... immer wenn Kämpfe sind, stelle ich mir vor, ich wäre an der Stelle einer der Kämpfer.
AI_Output(self, hero, "Info_Mod_Sly_Arena_10_02"); //Aber ich bin nur ein einfacher Schatten und hatte schon seit langem kein Schwert mehr in der Hand.
AI_Output(self, hero, "Info_Mod_Sly_Arena_10_03"); //Früher war ich mal gut, zählte zu den Besten im Lager. Aber jetzt?
AI_Output(self, hero, "Info_Mod_Sly_Arena_10_04"); //So was wie mich verputzen die in der Arena zum Frühstück.
};
INSTANCE Info_Mod_Sly_Arena2 (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_Arena2_Condition;
information = Info_Mod_Sly_Arena2_Info;
permanent = 0;
important = 0;
description = "Wie wär's, wenn ich dich trainiere?";
};
FUNC INT Info_Mod_Sly_Arena2_Condition()
{
if (Npc_KnowsInfo(hero, Info_Mod_Sly_Arena))
{
return 1;
};
};
FUNC VOID Info_Mod_Sly_Arena2_Info()
{
AI_Output(hero, self, "Info_Mod_Sly_Arena2_15_00"); //Wie wär's, wenn ich dich trainiere?
AI_Output(self, hero, "Info_Mod_Sly_Arena2_10_01"); //(abschätzend) Du siehst schon aus, als hättest du was auf dem Kasten. Meinetwegen.
AI_Output(self, hero, "Info_Mod_Sly_Arena2_10_02"); //Wenn ich an der Arena erfolgreich bin, wirst du am Gewinn beteiligt.
AI_Output(hero, self, "Info_Mod_Sly_Arena2_15_03"); //Schön. Wann willst du anfangen?
AI_Output(self, hero, "Info_Mod_Sly_Arena2_10_04"); //Lass mich erst mal ganz nüchtern werden. Morgen Früh können wir uns, äh, auf dem Rasenstück zwischen dem kleinen Tümpel da vorn und dem Marktplatz treffen.
AI_Output(self, hero, "Info_Mod_Sly_Arena2_10_05"); //Dort sollte genügend Platz sein.
Log_CreateTopic (TOPIC_MOD_SLY_ARENA, LOG_MISSION);
B_SetTopicStatus (TOPIC_MOD_SLY_ARENA, LOG_RUNNING);
B_LogEntry (TOPIC_MOD_SLY_ARENA, "Ich habe mit Sly ausgemacht, dass wir uns morgens auf dem Rasenstück zwischen Tümpel und Marktplatz treffen, damit ich ihn für die Arena trainieren kann.");
Mod_Sly_Arena_Tag = Wld_GetDay();
};
INSTANCE Info_Mod_Sly_Arena3 (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_Arena3_Condition;
information = Info_Mod_Sly_Arena3_Info;
permanent = 0;
important = 1;
};
FUNC INT Info_Mod_Sly_Arena3_Condition()
{
if (Npc_KnowsInfo(hero, Info_Mod_Sly_Arena2))
&& (Mod_Sly_Arena == 1)
{
return 1;
};
};
FUNC VOID Info_Mod_Sly_Arena3_Info()
{
AI_Output(self, hero, "Info_Mod_Sly_Arena3_10_00"); //Na, komm endlich. Ich bin schon ganz heiß! Wie wollen wir anfangen?
AI_Output(hero, self, "Info_Mod_Sly_Arena3_15_01"); //Wenn ich mir dich so anschaue, mit Konditionstraining. Ein gemütlicher Lauf um die Burg wird dir ganz gut tun.
AI_Output(hero, self, "Info_Mod_Sly_Arena3_15_02"); //Ich komme lieber mit, damit du nicht schummelst.
AI_Output(self, hero, "Info_Mod_Sly_Arena3_10_03"); //(jammert) Laufen? Ich dachte, wir perfektionieren meinen Schwertkampf?
AI_Output(hero, self, "Info_Mod_Sly_Arena3_15_04"); //Damit du einen Schlag tun kannst und dann außer Puste bist? Los, auf die Beine!
AI_Output(self, hero, "Info_Mod_Sly_Arena3_10_05"); //Na schön, wenn's sein muss ...
AI_StopProcessInfos (self);
B_StartOtherRoutine (self, "TRAINING2");
};
INSTANCE Info_Mod_Sly_Arena4 (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_Arena4_Condition;
information = Info_Mod_Sly_Arena4_Info;
permanent = 0;
important = 1;
};
FUNC INT Info_Mod_Sly_Arena4_Condition()
{
if (Npc_KnowsInfo(hero, Info_Mod_Sly_Arena3))
&& (Mod_Sly_Arena == 3)
&& (Npc_GetDistToWP(hero, "OCR_OUTSIDE_HUT_65_MOVEMENT") < 500)
{
return 1;
};
};
FUNC VOID Info_Mod_Sly_Arena4_Info()
{
AI_Output(self, hero, "Info_Mod_Sly_Arena4_10_00"); //(nach Luft ringend) Ah, ich sterbe!
AI_Output(hero, self, "Info_Mod_Sly_Arena4_15_01"); //Vorher müssen wir uns noch duellieren. Hast du eine Waffe?
AI_Output(self, hero, "Info_Mod_Sly_Arena4_10_02"); //(keuchend) Ja, ja, alles dabei. Hab auch was für dich, damit du mir nicht allzu sehr weh tust.
B_GiveInvItems (self, hero, ItMw_Schlagstock, 1);
EquipItem (hero, ItMw_Schlagstock);
AI_Output(hero, self, "Info_Mod_Sly_Arena4_15_03"); //Dann zeig mal, was du noch so drauf hast.
AI_Output(self, hero, "Info_Mod_Sly_Arena4_10_04"); //Ok.
AI_StopProcessInfos (self);
B_Attack (self, hero, AR_None, 0);
};
INSTANCE Info_Mod_Sly_Arena5 (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_Arena5_Condition;
information = Info_Mod_Sly_Arena5_Info;
permanent = 0;
important = 0;
description = "Das war doch schon mal ganz ordentlich.";
};
FUNC INT Info_Mod_Sly_Arena5_Condition()
{
if (Npc_KnowsInfo(hero, Info_Mod_Sly_Arena4))
{
return 1;
};
};
FUNC VOID Info_Mod_Sly_Arena5_Info()
{
AI_Output(hero, self, "Info_Mod_Sly_Arena5_15_00"); //Das war doch schon mal ganz ordentlich. Kommt das Gefühl langsam wieder?
AI_Output(self, hero, "Info_Mod_Sly_Arena5_10_01"); //(ächzt) Wenn du mit Gefühlen die Schmerzen meinst, dann auf jeden Fall.
AI_Output(self, hero, "Info_Mod_Sly_Arena5_10_02"); //Hast du noch irgendwelche Tipps für mich?
Info_ClearChoices (Info_Mod_Sly_Arena5);
Info_AddChoice (Info_Mod_Sly_Arena5, "Nö, passt schon.", Info_Mod_Sly_Arena5_B);
Info_AddChoice (Info_Mod_Sly_Arena5, "Kämpfe weniger offensiv. Die Defensive liegt dir mehr.", Info_Mod_Sly_Arena5_A);
};
FUNC VOID Info_Mod_Sly_Arena5_C()
{
AI_Output(self, hero, "Info_Mod_Sly_Arena5_C_10_00"); //Gut. Vielen Dank für deine Hilfe. Ich glaube, ich hab's langsam wieder raus. Ich werd Scatty mal Bescheid sagen, dass er mich auf die Liste setzen soll.
AI_Output(self, hero, "Info_Mod_Sly_Arena5_C_10_01"); //Wenn ich gewinnen sollte, kriegst du die Hälfte meiner Bezahlung.
AI_Output(self, hero, "Info_Mod_Sly_Arena5_C_10_02"); //Jetzt werde ich noch ein wenig üben.
Info_ClearChoices (Info_Mod_Sly_Arena5);
B_LogEntry (TOPIC_MOD_SLY_ARENA, "Sly will sich nun bei Scatty für Arenakämpfe bewerben. Ich sollte also demnächst mal bei ihm vorbeischauen und fragen, wann Sly kämpft. Sollte Sly gewinnen, hat er mir die Hälfte seiner Bezahlung versprochen.");
B_StartOtherRoutine (self, "ATARENA");
};
FUNC VOID Info_Mod_Sly_Arena5_B()
{
AI_Output(hero, self, "Info_Mod_Sly_Arena5_B_15_00"); //Nö, passt schon.
B_LogEntry (TOPIC_MOD_SLY_ARENA, "Ich habe Sly in einem Schnellprogramm auf die Kämpfe in der Arena vorbereitet. Das muss jetzt reichen, um bestehen zu können.");
Info_Mod_Sly_Arena5_C();
};
FUNC VOID Info_Mod_Sly_Arena5_A()
{
AI_Output(hero, self, "Info_Mod_Sly_Arena5_A_15_00"); //Kämpfe weniger offensiv. Die Defensive liegt dir mehr.
B_LogEntry (TOPIC_MOD_SLY_ARENA, "Ich habe Sly in einem Schnellprogramm auf die Kämpfe in der Arena vorbereitet und ihm noch einen Vorschlag mitgegeben.");
Mod_Sly_Tipp = 1;
Info_Mod_Sly_Arena5_C();
};
INSTANCE Info_Mod_Sly_Arena6 (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_Arena6_Condition;
information = Info_Mod_Sly_Arena6_Info;
permanent = 0;
important = 1;
};
FUNC INT Info_Mod_Sly_Arena6_Condition()
{
if (Mod_Sly_Arena == 5)
|| (Mod_Sly_Arena == 6)
{
return 1;
};
};
FUNC VOID Info_Mod_Sly_Arena6_Info()
{
if (Mod_Sly_Arena == 5)
{
AI_Output(self, hero, "Info_Mod_Sly_Arena6_10_00"); //Schade, ich hätte diesen Karanto fast besiegt. Das schreit nach einer Revanche!
AI_Output(hero, self, "Info_Mod_Sly_Arena6_15_01"); //Du bleibst also dabei?
AI_Output(self, hero, "Info_Mod_Sly_Arena6_10_02"); //Na klar! Der soll sich nur warm anziehen!
B_GivePlayerXP (50);
}
else
{
AI_Output(self, hero, "Info_Mod_Sly_Arena6_10_03"); //Mann, ohne deinen Hinweis mit der Defensive hätte ich Gor Karanto nicht geknackt. Knapp, aber verdient, würde ich sagen.
AI_Output(hero, self, "Info_Mod_Sly_Arena6_15_04"); //Glückwunsch.
AI_Output(self, hero, "Info_Mod_Sly_Arena6_10_05"); //Hier hast du deinen Anteil.
B_GiveInvItems (self, hero, ItMi_Gold, 150);
AI_Output(self, hero, "Info_Mod_Sly_Arena6_10_06"); //Ich fiebere schon meinen nächsten Duell entgegen.
B_GivePlayerXP (100);
};
B_SetTopicStatus (TOPIC_MOD_SLY_ARENA, LOG_SUCCESS);
CurrentNQ += 1;
};
INSTANCE Info_Mod_Sly_SLDSpy (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_SLDSpy_Condition;
information = Info_Mod_Sly_SLDSpy_Info;
permanent = 0;
important = 0;
description = "Hallo, was gibt’s Neues im Lager?";
};
FUNC INT Info_Mod_Sly_SLDSpy_Condition()
{
if (Mod_SLD_STT_Mordrag == 1)
&& (Npc_KnowsInfo(hero, Info_Mod_Lee_GotoSylvio))
&& (Mod_SLD_Spy == 0)
{
return 1;
};
};
FUNC VOID Info_Mod_Sly_SLDSpy_Info()
{
AI_Output(hero, self, "Info_Mod_Sly_SLDSpy_15_00"); //Hallo, was gibt’s Neues im Lager?
AI_Output(self, hero, "Info_Mod_Sly_SLDSpy_10_01"); //Warum fragst du? Kann mich jetzt gar nicht an dein Gesicht erinnern ...
AI_Output(hero, self, "Info_Mod_Sly_SLDSpy_15_02"); //Ich war einige Zeit im Sumpflager und habe dort alles ausgekundschaftet. Hier hast du einen Stängel.
B_ShowGivenThings ("Stängel Sumpfkraut gegeben");
CreateInvItems (self, ItMi_Joint, 1);
AI_Output(self, hero, "Info_Mod_Sly_SLDSpy_10_03"); //Ahh, ein frischer harziger Stängel.
B_UseItem (self, ItMi_Joint);
AI_Output(self, hero, "Info_Mod_Sly_SLDSpy_10_04"); //Achja, wegen der Neuigkeiten. Hab gehört, dass die Gardisten in den nächsten Tagen was großes Planen.
AI_Output(self, hero, "Info_Mod_Sly_SLDSpy_10_05"); //Irgendeinen Angriff in der Morgendämmerung, hieß es. Bin schon mächtig gespannt ...
B_LogEntry (TOPIC_MOD_SLD_SPY, "Sly meinte, die Gardisten würden demnächst in der Morgendämmerung einen großen Angriff planen.");
};
INSTANCE Info_Mod_Sly_Pickpocket (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_Pickpocket_Condition;
information = Info_Mod_Sly_Pickpocket_Info;
permanent = 1;
important = 0;
description = Pickpocket_60;
};
FUNC INT Info_Mod_Sly_Pickpocket_Condition()
{
C_Beklauen (45, ItMi_Gold, 80);
};
FUNC VOID Info_Mod_Sly_Pickpocket_Info()
{
Info_ClearChoices (Info_Mod_Sly_Pickpocket);
Info_AddChoice (Info_Mod_Sly_Pickpocket, DIALOG_BACK, Info_Mod_Sly_Pickpocket_BACK);
Info_AddChoice (Info_Mod_Sly_Pickpocket, DIALOG_PICKPOCKET, Info_Mod_Sly_Pickpocket_DoIt);
};
FUNC VOID Info_Mod_Sly_Pickpocket_BACK()
{
Info_ClearChoices (Info_Mod_Sly_Pickpocket);
};
FUNC VOID Info_Mod_Sly_Pickpocket_DoIt()
{
if (B_Beklauen() == TRUE)
{
Info_ClearChoices (Info_Mod_Sly_Pickpocket);
}
else
{
Info_ClearChoices (Info_Mod_Sly_Pickpocket);
Info_AddChoice (Info_Mod_Sly_Pickpocket, DIALOG_PP_BESCHIMPFEN, Info_Mod_Sly_Pickpocket_Beschimpfen);
Info_AddChoice (Info_Mod_Sly_Pickpocket, DIALOG_PP_BESTECHUNG, Info_Mod_Sly_Pickpocket_Bestechung);
Info_AddChoice (Info_Mod_Sly_Pickpocket, DIALOG_PP_HERAUSREDEN, Info_Mod_Sly_Pickpocket_Herausreden);
};
};
FUNC VOID Info_Mod_Sly_Pickpocket_Beschimpfen()
{
B_Say (hero, self, "$PICKPOCKET_BESCHIMPFEN");
B_Say (self, hero, "$DIRTYTHIEF");
Info_ClearChoices (Info_Mod_Sly_Pickpocket);
AI_StopProcessInfos (self);
B_Attack (self, hero, AR_Theft, 1);
};
FUNC VOID Info_Mod_Sly_Pickpocket_Bestechung()
{
B_Say (hero, self, "$PICKPOCKET_BESTECHUNG");
var int rnd; rnd = r_max(99);
if (rnd < 25)
|| ((rnd >= 25) && (rnd < 50) && (Npc_HasItems(hero, ItMi_Gold) < 50))
|| ((rnd >= 50) && (rnd < 75) && (Npc_HasItems(hero, ItMi_Gold) < 100))
|| ((rnd >= 75) && (rnd < 100) && (Npc_HasItems(hero, ItMi_Gold) < 200))
{
B_Say (self, hero, "$DIRTYTHIEF");
Info_ClearChoices (Info_Mod_Sly_Pickpocket);
AI_StopProcessInfos (self);
B_Attack (self, hero, AR_Theft, 1);
}
else
{
if (rnd >= 75)
{
B_GiveInvItems (hero, self, ItMi_Gold, 200);
}
else if (rnd >= 50)
{
B_GiveInvItems (hero, self, ItMi_Gold, 100);
}
else if (rnd >= 25)
{
B_GiveInvItems (hero, self, ItMi_Gold, 50);
};
B_Say (self, hero, "$PICKPOCKET_BESTECHUNG_01");
Info_ClearChoices (Info_Mod_Sly_Pickpocket);
AI_StopProcessInfos (self);
};
};
FUNC VOID Info_Mod_Sly_Pickpocket_Herausreden()
{
B_Say (hero, self, "$PICKPOCKET_HERAUSREDEN");
if (r_max(99) < Mod_Verhandlungsgeschick)
{
B_Say (self, hero, "$PICKPOCKET_HERAUSREDEN_01");
Info_ClearChoices (Info_Mod_Sly_Pickpocket);
}
else
{
B_Say (self, hero, "$PICKPOCKET_HERAUSREDEN_02");
};
};
INSTANCE Info_Mod_Sly_EXIT (C_INFO)
{
npc = Mod_801_STT_Sly_MT;
nr = 1;
condition = Info_Mod_Sly_EXIT_Condition;
information = Info_Mod_Sly_EXIT_Info;
permanent = 1;
important = 0;
description = DIALOG_ENDE;
};
FUNC INT Info_Mod_Sly_EXIT_Condition()
{
return 1;
};
FUNC VOID Info_Mod_Sly_EXIT_Info()
{
AI_StopProcessInfos (self);
};
|
D
|
/**
* $(RED Deprecated. Use $(D core.sys.darwin.execinfo) instead. This module
* will be removed in June 2018.)
*
* D header file for OSX.
*
* Copyright: Copyright Martin Nowak 2012.
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Authors: Martin Nowak
*/
module core.sys.osx.execinfo;
public import core.sys.darwin.execinfo;
|
D
|
/*
* Vulkan Example - Basic non-indexed triangle rendering
*
* Note:
* This is a "pedal to the metal" example to show off how to get Vulkan up an displaying something
* It strongly relies on the concepts and abstractions of the V-Drive api
* However, in these example only basic features are used, heavier once will be introduced in later examples
*
* Example Structure:
* appstate : the struct VDrive_State holds the state of the application, vulkan non- and related data
* triangle : initializes all the required Vulkan non- and related data
* main : this module has the render loop and polls glfw events
*
* Common Structure ( to all examples, can be overridden on per example basis ):
* initialize : initialize glfw, window, vulkan instance, device and queue(s)
* input : setup glfw callbacks
*
* Navigation and keys:
* LMB + mouse move : orbit around camera target
* MMB + mouse move : pan the camera, speed is dependent on camera to target distance
* RMB + mouse u/d : fast dolly ( camera move towards its target )
* RMB + mouse r/l : slow dolly
* ALT + KP Enter : toggle fullscreen
* Home Key : return to initial camera state
* Escape : exit example
*
* Build and Run:
* library and examples work only on x64 architecture due to dlang VK_NULL_HANDLE issue
* dub run vdrive:triangle --arch x86_64
*
* Copyright (C) 2017 by Peter Particle, inspired by Sascha Willems Vulkan examples - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
module main;
import erupted;
import vdrive;
import core.stdc.stdio : printf, sprintf;
int main() {
printf( "\n" );
verbose = true;
// load global level functions
DerelictErupted.load();
listExtensions;
listLayers;
/*
// first load all global level instance functions
loadGlobalLevelFunctions( cast( typeof( vkGetInstanceProcAddr ))
glfwGetInstanceProcAddress( null, "vkGetInstanceProcAddr" ));
// get some useful info from the instance
//"VK_LAYER_LUNARG_standard_validation".isLayer;
// get vulkan extensions which are required by glfw
uint32_t extension_count;
auto glfw_required_extensions = glfwGetRequiredInstanceExtensions( &extension_count );
// we know that glfw requires only two extensions
// however we create storage for more of them, as we will add some extensions our self
const( char )*[8] extensions;
extensions[ 0..extension_count ] = glfw_required_extensions[ 0..extension_count ];
debug {
// we would like to use the debug report callback functionality
extensions[ extension_count ] = "VK_EXT_debug_report";
++extension_count;
// and report standard validation issues
const( char )*[1] layers = [ "VK_LAYER_LUNARG_standard_validation" ];
} else {
const( char )*[0] layers;
}
// check if all of the extensions are available, exit if not
foreach( extension; extensions[ 0..extension_count ] ) {
if( !extension.isExtension( false )) {
printf( "Required extension %s not available. Exiting!\n", extension );
return VK_ERROR_INITIALIZATION_FAILED;
}
}
// check if all of the layers are available, exit if not
foreach( layer; layers ) {
if( !layer.isLayer( false )) {
printf( "Required layers %s not available. Exiting!\n", layer );
return VK_ERROR_INITIALIZATION_FAILED;
}
}
*/
// initialize the vulkan instance, pass the correct slice into the extension array
//vk.initInstance( extensions[ 0..extension_count ], layers );
Vulkan vk;
vk.initInstance;
// check if any device supporting vulkan is available
uint32_t device_count;
vk.instance.vkEnumeratePhysicalDevices( & device_count, null ).vkAssert( "Ennumerate Physical Devices" );
printf( "Found %d physical devices supporting Vulkan\n\n", device_count );
if( device_count == 0 ) {
printf( "\nPress enter to exit!!!\n" );
char input;
import std.stdio : readf;
readf( "%s", & input );
}
// enumerate gpus
auto gpus = vk.instance.listPhysicalDevices( false );
// get some useful info from the physical devices
foreach( ref gpu; gpus ) {
//gpu.listProperties;
//gpu.listProperties( GPU_Info.properties );
//gpu.listProperties( GPU_Info.limits );
//gpu.listProperties( GPU_Info.sparse_properties );
gpu.listProperties( GPU_Info.properties | GPU_Info.limits | GPU_Info.sparse_properties );
gpu.listFeatures;
gpu.listLayers;
gpu.listExtensions;
//printf( "Present supported: %u\n", gpu.presentSupport( vk.surface ));
listQueueFamilies( gpu /*, false, vk.surface.surface*/ );
}
/*
// set the desired gpu into the state object
// Todo(pp): find a suitable "best fit" gpu
// - gpu must support the VK_KHR_swapchain extension
bool presentation_supported = false;
foreach( ref gpu; gpus ) {
if( gpu.presentSupport( vk.surface.surface )) {
presentation_supported = true;
vk.gpu = gpu;
break;
}
}
// Presentation capability is required for this example, terminate if not available
if( !presentation_supported ) {
// Todo(pp): print to error stream
printf( "No GPU with presentation capability detected. Terminating!" );
vk.destroyInstance;
return VK_ERROR_INITIALIZATION_FAILED;
}
// if presentation is supported on that gpu the gpu extension VK_KHR_swapchain must be available
const( char )*[1] deviceExtensions = [ "VK_KHR_swapchain" ];
*/
/+
// Todo(pp): the filtering bellow is not lazy and also allocates, change both to lazy range based
auto queue_families = listQueueFamilies( vk.gpu /*, false, vk.surface.surface*/ ); // last param is optional and only for printing
auto graphic_queues = queue_families
.filterQueueFlags( VK_QUEUE_GRAPHICS_BIT ); // .filterQueueFlags( include, exclude )
// .filterPresentSupport( vk.gpu, vk.surface.surface ); // .filterPresentSupport( gpu, surface )
// treat the case of combined graphics and presentation queue first
if( graphic_queues.length > 0 ) {
Queue_Family[1] filtered_queues = graphic_queues.front;
filtered_queues[0].queueCount = 1;
filtered_queues[0].priority( 0 ) = 1;
// initialize the logical device
vk.initDevice( filtered_queues/*, deviceExtensions, layers*/ );
// get graphics queue
VkQueue vk_queue;
vk.device.vkGetDeviceQueue( filtered_queues[0].family_index, 0, &vk_queue );
//vk.device.vkGetDeviceQueue( filtered_queues[0].family_index, 0, &vk.surface.present_queue );
// store queue family index, required for command pool creation
//vk.graphic_queue_family_index = filtered_queues[0].family_index;
}+/
/*
else {
graphic_queues = queue_families.filterQueueFlags( VK_QUEUE_GRAPHICS_BIT ); // .filterQueueFlags( include, exclude )
// a graphics queue is required for the example, terminate if not available
if( graphic_queues.length == 0 ) {
// Todo(pp): print to error stream
printf( "No queue with VK_QUEUE_GRAPHICS_BIT found. Terminating!" );
vk.destroyInstance;
return VK_ERROR_INITIALIZATION_FAILED;
}
// We know that the gpu has presentation support and can present to the surface
// take the first available presentation queue
Queue_Family[2] filtered_queues = [
graphic_queues.front,
queue_families.filterPresentSupport( vk.gpu, vk.surface.surface ).front // .filterPresentSupport( gpu, surface
];
// initialize the logical device
vk.initDevice( filtered_queues, deviceExtensions, layers );
// get device queues
vk.device.vkGetDeviceQueue( filtered_queues[0].family_index, 0, &vk.graphic_queue );
vk.device.vkGetDeviceQueue( filtered_queues[1].family_index, 0, &vk.surface.present_queue );
// store queue family index, required for command pool creation
// family_index of presentation queue seems not to be required later on
vk.graphic_queue_family_index = filtered_queues[0].family_index;
}
*/
printf( "\nPress enter to exit!!!\n" );
char input;
import std.stdio : readf;
readf( "%s", & input );
// vk.device.vkDeviceWaitIdle;
// vk.destroyDevice;
// debug vk.destroy( vk.debugReportCallback );
vk.destroyInstance;
return 0;
}
|
D
|
module dub.packagesuppliers.maven;
import dub.packagesuppliers.packagesupplier;
/**
Maven repository based package supplier.
This package supplier connects to a maven repository
to search for available packages.
*/
class MavenRegistryPackageSupplier : PackageSupplier {
import dub.internal.utils : retryDownload, HTTPStatusException;
import dub.internal.vibecompat.data.json : serializeToJson;
import dub.internal.vibecompat.core.log;
import dub.internal.vibecompat.inet.url : URL;
import std.datetime : Clock, Duration, hours, SysTime, UTC;
private {
URL m_mavenUrl;
struct CacheEntry { Json data; SysTime cacheTime; }
CacheEntry[string] m_metadataCache;
Duration m_maxCacheTime;
}
this(URL mavenUrl)
{
m_mavenUrl = mavenUrl;
m_maxCacheTime = 24.hours();
}
override @property string description() { return "maven repository at "~m_mavenUrl.toString(); }
Version[] getVersions(string package_id)
{
import std.algorithm.sorting : sort;
auto md = getMetadata(package_id);
if (md.type == Json.Type.null_)
return null;
Version[] ret;
foreach (json; md["versions"]) {
auto cur = Version(json["version"].get!string);
ret ~= cur;
}
ret.sort();
return ret;
}
void fetchPackage(NativePath path, string packageId, Dependency dep, bool pre_release)
{
import std.format : format;
auto md = getMetadata(packageId);
Json best = getBestPackage(md, packageId, dep, pre_release);
if (best.type == Json.Type.null_)
return;
auto vers = best["version"].get!string;
auto url = m_mavenUrl~NativePath("%s/%s/%s-%s.zip".format(packageId, vers, packageId, vers));
try {
retryDownload(url, path);
return;
}
catch(HTTPStatusException e) {
if (e.status == 404) throw e;
else logDebug("Failed to download package %s from %s", packageId, url);
}
catch(Exception e) {
logDebug("Failed to download package %s from %s", packageId, url);
}
throw new Exception("Failed to download package %s from %s".format(packageId, url));
}
Json fetchPackageRecipe(string packageId, Dependency dep, bool pre_release)
{
auto md = getMetadata(packageId);
return getBestPackage(md, packageId, dep, pre_release);
}
private Json getMetadata(string packageId)
{
import std.xml;
auto now = Clock.currTime(UTC());
if (auto pentry = packageId in m_metadataCache) {
if (pentry.cacheTime + m_maxCacheTime > now)
return pentry.data;
m_metadataCache.remove(packageId);
}
auto url = m_mavenUrl~NativePath(packageId~"/maven-metadata.xml");
logDebug("Downloading maven metadata for %s", packageId);
string xmlData;
try
xmlData = cast(string)retryDownload(url);
catch(HTTPStatusException e) {
if (e.status == 404) {
logDebug("Maven metadata %s not found at %s (404): %s", packageId, description, e.msg);
return Json(null);
}
else throw e;
}
auto json = Json(["name": Json(packageId), "versions": Json.emptyArray]);
auto xml = new DocumentParser(xmlData);
xml.onStartTag["versions"] = (ElementParser xml) {
xml.onEndTag["version"] = (in Element e) {
json["versions"] ~= serializeToJson(["name": packageId, "version": e.text]);
};
xml.parse();
};
xml.parse();
m_metadataCache[packageId] = CacheEntry(json, now);
return json;
}
SearchResult[] searchPackages(string query)
{
return [];
}
}
|
D
|
a content word that can be qualified by a modifier
a word placed at the beginning of a line or paragraph (as in a dictionary entry)
|
D
|
/Users/ziadharb/HelloWorld/Build/Intermediates.noindex/HelloWorld.build/Debug/HelloWorld\ (macOS).build/Objects-normal/x86_64/ContentView.o : /Users/ziadharb/HelloWorld/Shared/HelloWorldApp.swift /Users/ziadharb/HelloWorld/Shared/ContentView.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/XPC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/SwiftUI.framework/Modules/SwiftUI.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreData.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Metal.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreLocation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/os.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/UniformTypeIdentifiers.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CloudKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/AppKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/DeveloperToolsSupport.framework/Modules/DeveloperToolsSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftUI.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreData.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreImage.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/QuartzCore.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Metal.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreLocation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/os.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/UniformTypeIdentifiers.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CloudKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/AppKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/DeveloperToolsSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UniformTypeIdentifiers.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CloudKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/ziadharb/HelloWorld/Build/Intermediates.noindex/HelloWorld.build/Debug/HelloWorld\ (macOS).build/Objects-normal/x86_64/ContentView~partial.swiftmodule : /Users/ziadharb/HelloWorld/Shared/HelloWorldApp.swift /Users/ziadharb/HelloWorld/Shared/ContentView.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/XPC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/SwiftUI.framework/Modules/SwiftUI.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreData.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Metal.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreLocation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/os.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/UniformTypeIdentifiers.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CloudKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/AppKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/DeveloperToolsSupport.framework/Modules/DeveloperToolsSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftUI.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreData.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreImage.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/QuartzCore.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Metal.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreLocation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/os.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/UniformTypeIdentifiers.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CloudKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/AppKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/DeveloperToolsSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UniformTypeIdentifiers.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CloudKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/ziadharb/HelloWorld/Build/Intermediates.noindex/HelloWorld.build/Debug/HelloWorld\ (macOS).build/Objects-normal/x86_64/ContentView~partial.swiftdoc : /Users/ziadharb/HelloWorld/Shared/HelloWorldApp.swift /Users/ziadharb/HelloWorld/Shared/ContentView.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/XPC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/SwiftUI.framework/Modules/SwiftUI.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreData.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Metal.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreLocation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/os.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/UniformTypeIdentifiers.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CloudKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/AppKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/DeveloperToolsSupport.framework/Modules/DeveloperToolsSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftUI.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreData.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreImage.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/QuartzCore.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Metal.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreLocation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/os.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/UniformTypeIdentifiers.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CloudKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/AppKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/DeveloperToolsSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UniformTypeIdentifiers.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CloudKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/ziadharb/HelloWorld/Build/Intermediates.noindex/HelloWorld.build/Debug/HelloWorld\ (macOS).build/Objects-normal/x86_64/ContentView~partial.swiftsourceinfo : /Users/ziadharb/HelloWorld/Shared/HelloWorldApp.swift /Users/ziadharb/HelloWorld/Shared/ContentView.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/XPC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/SwiftUI.framework/Modules/SwiftUI.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreData.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Metal.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreLocation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/os.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/UniformTypeIdentifiers.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CloudKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/AppKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/DeveloperToolsSupport.framework/Modules/DeveloperToolsSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftUI.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreData.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreImage.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/QuartzCore.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Metal.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreLocation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/os.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/UniformTypeIdentifiers.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CloudKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/AppKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/DeveloperToolsSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UniformTypeIdentifiers.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CloudKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
void main() {
import std.stdio, std.container, std.range;
auto dll = DList!dchar("DCBA"d.dup);
dll[].writeln;
dll[].retro.writeln;
}
|
D
|
instance Vlk_402_Richter(Npc_Default)
{
name[0] = "Ристер";
guild = GIL_VLK;
id = 402;
voice = 10;
flags = 0;
npcType = npctype_main;
aivar[AIV_MM_RestEnd] = TRUE;
B_SetAttributesToChapter(self,5);
fight_tactic = FAI_HUMAN_NORMAL;
B_CreateAmbientInv(self);
EquipItem(self,ItMw_1h_Vlk_Mace);
CreateInvItems(self,ItKe_Richter,1);
B_SetNpcVisual(self,MALE,"Hum_Head_Bald",Face_N_Richter,BodyTex_N,ITAR_Judge);
Mdl_SetModelFatness(self,2);
Mdl_ApplyOverlayMds(self,"Humans_Relaxed.mds");
B_GiveNpcTalents(self);
B_SetFightSkills(self,30);
daily_routine = Rtn_Start_402;
};
func void Rtn_Start_402()
{
TA_Read_Bookstand(8,0,18,45,"NW_CITY_RICHTER_BED");
TA_Sit_Throne(18,45,22,0,"NW_CITY_UPTOWN_JUDGE_THRONE_02");
TA_Sleep(22,0,8,0,"NW_CITY_RICHTER_BED");
};
|
D
|
/Users/sol369/Desktop/curben-oc/DerivedData/curben/Build/Intermediates/Pods.build/Debug-iphonesimulator/ImageViewer.build/Objects-normal/x86_64/UIBezierPath.o : /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryPagingDataSource.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryItemsDataSource.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryDisplacedViewsDataSource.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ItemControllerDelegate.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryItemsDelegate.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CGSize.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIBezierPath.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Thumbnails\ Controller/ThumbnailCell.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/Bool.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryItem.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIApplication.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryConfiguration.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GallerySwipeToDismissTransition.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIButton.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/VideoScrubber.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Slider.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UISlider.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ImageFadeInHandler.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ItemBaseController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ItemController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ImageViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/VideoViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Thumbnails\ Controller/ThumbnailsViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CALayer.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CAShapeLayer.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/AVPlayer.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIColor.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/LayoutEnums.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/UtilityFunctions.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CGRect.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CGPoint.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIView.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIImageView.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/VideoView.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/BlurView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AudioToolbox.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/sol369/Desktop/curben-oc/Pods/Target\ Support\ Files/ImageViewer/ImageViewer-umbrella.h /Users/sol369/Desktop/curben-oc/DerivedData/curben/Build/Intermediates/Pods.build/Debug-iphonesimulator/ImageViewer.build/unextended-module.modulemap
/Users/sol369/Desktop/curben-oc/DerivedData/curben/Build/Intermediates/Pods.build/Debug-iphonesimulator/ImageViewer.build/Objects-normal/x86_64/UIBezierPath~partial.swiftmodule : /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryPagingDataSource.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryItemsDataSource.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryDisplacedViewsDataSource.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ItemControllerDelegate.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryItemsDelegate.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CGSize.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIBezierPath.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Thumbnails\ Controller/ThumbnailCell.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/Bool.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryItem.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIApplication.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryConfiguration.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GallerySwipeToDismissTransition.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIButton.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/VideoScrubber.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Slider.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UISlider.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ImageFadeInHandler.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ItemBaseController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ItemController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ImageViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/VideoViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Thumbnails\ Controller/ThumbnailsViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CALayer.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CAShapeLayer.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/AVPlayer.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIColor.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/LayoutEnums.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/UtilityFunctions.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CGRect.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CGPoint.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIView.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIImageView.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/VideoView.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/BlurView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AudioToolbox.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/sol369/Desktop/curben-oc/Pods/Target\ Support\ Files/ImageViewer/ImageViewer-umbrella.h /Users/sol369/Desktop/curben-oc/DerivedData/curben/Build/Intermediates/Pods.build/Debug-iphonesimulator/ImageViewer.build/unextended-module.modulemap
/Users/sol369/Desktop/curben-oc/DerivedData/curben/Build/Intermediates/Pods.build/Debug-iphonesimulator/ImageViewer.build/Objects-normal/x86_64/UIBezierPath~partial.swiftdoc : /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryPagingDataSource.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryItemsDataSource.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryDisplacedViewsDataSource.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ItemControllerDelegate.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryItemsDelegate.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CGSize.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIBezierPath.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Thumbnails\ Controller/ThumbnailCell.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/Bool.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryItem.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIApplication.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryConfiguration.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GallerySwipeToDismissTransition.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIButton.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/VideoScrubber.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Slider.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UISlider.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ImageFadeInHandler.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ItemBaseController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ItemController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/ImageViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/VideoViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Thumbnails\ Controller/ThumbnailsViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/GalleryViewController.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CALayer.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CAShapeLayer.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/AVPlayer.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIColor.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/LayoutEnums.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/UtilityFunctions.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CGRect.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/CGPoint.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIView.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/Extensions/UIImageView.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/VideoView.swift /Users/sol369/Desktop/curben-oc/Pods/ImageViewer/ImageViewer/Source/BlurView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AudioToolbox.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/sol369/Desktop/curben-oc/Pods/Target\ Support\ Files/ImageViewer/ImageViewer-umbrella.h /Users/sol369/Desktop/curben-oc/DerivedData/curben/Build/Intermediates/Pods.build/Debug-iphonesimulator/ImageViewer.build/unextended-module.modulemap
|
D
|
module mach.sdl.input.event.joystick;
private:
import derelict.sdl2.types;
import mach.sdl.input.event.mixins;
import mach.sdl.input.event.type : EventType;
import mach.sdl.input.joystick : Joystick;
public:
/// Event triggered by joystick axis movement.
/// https://wiki.libsdl.org/SDL_JoyAxisEvent
struct JoyAxisEvent{
mixin EventMixin!SDL_JoyAxisEvent;
mixin JoyEventMixin;
mixin JoyAxisEventMixin!ubyte;
}
/// Event triggered by joystick button presses.
/// https://wiki.libsdl.org/SDL_JoyButtonEvent
struct JoyButtonEvent{
mixin EventMixin!SDL_JoyButtonEvent;
mixin JoyEventMixin;
mixin ButtonEventMixin!ubyte;
}
/// Event triggered by joystick hat switch movement.
/// https://wiki.libsdl.org/SDL_JoyHatEvent
struct JoyHatEvent{
mixin EventMixin!SDL_JoyHatEvent;
mixin JoyEventMixin;
/// Get the index of the hat switch associated with the event.
@property Joystick.Hat.Index index() const{
return cast(Joystick.Hat.Index) this.eventdata.hat;
}
/// Set the index of the hat switch associated with the event.
@property void index(Joystick.Hat.Index index){
this.eventdata.hat = index;
}
/// Get the directional state of the hat switch associated with the event.
@property Joystick.Hat.State state() const{
return cast(Joystick.Hat.State) this.eventdata.value;
}
/// Set the directional state of the hat switch associated with the event.
@property void state(Joystick.Hat.State state){
this.eventdata.value = state;
}
/// Get as a Joystick.Hat object the hat associated with the event.
@property Joystick.Hat hat() const{
return Joystick.Hat(this.index, this.state);
}
/// Set as a Joystick.Hat object the hat associated with the event.
@property void hat(Joystick.Hat hat){
this.index = hat.index;
this.state = hat.state;
}
}
/// Event triggered by joystick trackball movement.
/// https://wiki.libsdl.org/SDL_JoyBallEvent
struct JoyBallEvent{
mixin EventMixin!SDL_JoyBallEvent;
mixin JoyEventMixin;
mixin RelativePositionEventMixin!(`xrel`, `yrel`);
/// Get the index of the trackball associated with the event.
@property Joystick.Ball.Index index() const{
return cast(Joystick.Ball.Index) this.eventdata.ball;
}
/// Set the index of the trackball associated with the event.
@property void index(Joystick.Ball.Index index){
this.eventdata.ball = index;
}
/// Get as a Joystick.Ball object the ball associated with the event.
@property Joystick.Ball ball() const{
return Joystick.Ball(this.index, this.dx, this.dy);
}
/// Set as a Joystick.Ball object the ball associated with the event.
@property void ball(Joystick.Ball ball){
this.index = ball.index;
this.dx = cast(typeof(this.dx())) ball.dx;
this.dy = cast(typeof(this.dy())) ball.dy;
}
}
/// Event related to joystick device changes.
/// https://wiki.libsdl.org/SDL_JoyDeviceEvent
struct JoyDeviceEvent{
mixin EventMixin!SDL_JoyDeviceEvent;
/// Assuming this is a device added event, get the device index of the
/// added joystick.
@property Joystick.DeviceIndex added() const{
return cast(Joystick.DeviceIndex) this.eventdata.which;
}
/// Set the device index of the added joystick.
@property void added(Joystick.DeviceIndex index){
this.eventdata.type = EventType.JoyDeviceAdded;
this.eventdata.which = index;
}
/// Assuming this is a device removed event, get a Joystick object
/// representing the removed joystick.
@property Joystick removed() const{
return Joystick.byid(this.removedid);
}
/// Set the Joystick object representing the removed joystick.
@property void removed(Joystick joystick){
this.removedid = joystick.id;
}
/// Assuming this is a device removed event, get the instance id of the
/// removed joystick.
@property Joystick.ID removedid() const{
return cast(Joystick.ID) this.eventdata.which;
}
/// Set the instance id of the removed joystick.
@property void removedid(Joystick.ID joystickid){
this.eventdata.type = EventType.JoyDeviceRemoved;
this.eventdata.which = joystickid;
}
}
|
D
|
module android.java.android.provider.Telephony_ThreadsColumns_d_interface;
import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers;
static import arsd.jni;
import import0 = android.java.java.lang.Class_d_interface;
@JavaName("Telephony$ThreadsColumns")
final class Telephony_ThreadsColumns : IJavaObject {
static immutable string[] _d_canCastTo = [
"android/provider/BaseColumns",
];
@Import import0.Class getClass();
@Import int hashCode();
@Import bool equals(IJavaObject);
@Import @JavaName("toString") string toString_();
override string toString() { return arsd.jni.javaObjectToString(this); }
@Import void notify();
@Import void notifyAll();
@Import void wait(long);
@Import void wait(long, int);
@Import void wait();
mixin IJavaObjectImplementation!(false);
public static immutable string _javaParameterString = "Landroid/provider/Telephony$ThreadsColumns;";
}
|
D
|
PLONG PLAT ED95 KD LOMAGAGE HIMAGAGE SLAT SLONG RESULTNO DP DM WT ROCKTYPE
306.399994 74.1999969 4.30000019 0 52 55 -31.8999996 151.300003 8785 5.9000001 5.9000001 0.666666667 extrusives, basalts
333.200012 64.6999969 6.5999999 0 52 55 -31.8999996 151.300003 8786 10.3000002 11.6999998 0.666666667 extrusives, basalts
-65.400002 61.2999992 1.39999998 297 50 70 -31.6000004 145.600006 9339 2.20000005 2.20000005 0.2 sediments, saprolite
264.399994 75 15.6000004 0 2 65 -8.80000019 126.699997 1206 10.3999996 18 0.0634920635 extrusives, intrusives
346 61 9 41.2000008 35 100 -31.3999996 138.600006 1170 13 15 0.0615384615 sediments
333 45 9 16.5 35 100 -30.3999996 139.399994 1161 17 18 0.0615384615 sediments, tillite
317 57 5 200 35 100 -30.5 139.300003 1165 9 10 0.0615384615 sediments, redbeds
329 58 25 4.0999999 35 100 -30.2000008 139 1166 41.5999985 45.5999985 0.0615384615 sediments, sandstone, tillite
223 26 13 14.8000002 35 100 -30.2999992 139.5 1157 26 26 0.0615384615 extrusives
320 63 9 15.5 34 65 -38 145.5 1854 16 16 0.129032258 extrusives
317 63 14 16 23 56 -32.5 151 1840 20 20 0.121212121 extrusives, basalts
302.700012 66.8000031 6.80000019 35 34 65 -38 145.5 1819 10.8000002 12.1000004 0.129032258 extrusives
305 73 17 29 23 56 -42 147 1821 25 29 0.121212121 extrusives, basalts
305.600006 70.5 3.5999999 48.5 52 54 -32 151.399994 1892 5.30000019 5.30000019 1 extrusives
274 66 27.6000004 8.60000038 25 65 -41.2999992 145.899994 1873 39.7999992 46.9000015 0.1 intrusives, granite
321 64 6 27.5 25 65 -35.5999985 137.5 1874 10 11 0.1 sediments
269 40 0 0 50 300 -32.5999985 151.5 1868 0 0 0.016 extrusives, andesites
294 75 11 7 25 65 -41.0999985 146.100006 1871 16.2999992 18.8999996 0.1 sediments, sandstone
315 66 10.5 18 25 65 -41 145.5 1872 18.2000008 19.6000004 0.1 extrusives, sediments
298 58.7999992 2.4000001 0 35 65 -27 141.5 1972 3.79999995 3.79999995 0.133333333 sediments, weathered
297.200012 59.2000008 6 0 50 70 -30.5 151.5 1964 9.10000038 9.89999962 0.2 sediments, weathered
310.899994 68.5 0 0 40 60 -35 150 1927 5.19999981 5.19999981 0.2 extrusives, basalts
271 63 2.9000001 352 50 80 -34 151 1595 3.5 4.5 0.133333333 intrusives
|
D
|
module resource;
import std.path, std.string;
import ast.decl;
public import resource.texture;
@safe :
Decl[] load_resource(string filename, string name) {
final switch(filename.extension) {
case ".idx":
//Texture index
if (name is null)
name = filename[0..filename.indexOf('.')];
return [new TexturePack(filename, name)];
case ".dn":
//Dioni source file
assert(false);
}
}
|
D
|
/mnt/c/Users/zeliwang/hello_world/digital_signature/target/release/deps/same_file-9810d9990ce068a4.rmeta: /home/zeliwang/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/same-file-1.0.5/src/lib.rs /home/zeliwang/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/same-file-1.0.5/src/unix.rs
/mnt/c/Users/zeliwang/hello_world/digital_signature/target/release/deps/libsame_file-9810d9990ce068a4.rlib: /home/zeliwang/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/same-file-1.0.5/src/lib.rs /home/zeliwang/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/same-file-1.0.5/src/unix.rs
/mnt/c/Users/zeliwang/hello_world/digital_signature/target/release/deps/same_file-9810d9990ce068a4.d: /home/zeliwang/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/same-file-1.0.5/src/lib.rs /home/zeliwang/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/same-file-1.0.5/src/unix.rs
/home/zeliwang/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/same-file-1.0.5/src/lib.rs:
/home/zeliwang/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/same-file-1.0.5/src/unix.rs:
|
D
|
be a hindrance or obstacle to
hinder or prevent the progress or accomplishment of
put at a disadvantage
located at or near the back of an animal
located at or near the back of an animal
|
D
|
module memutils.debugger;
import memutils.allocators;
import memutils.hashmap;
import memutils.dictionarylist;
import memutils.utils : Malloc;
import std.conv : emplace, to;
/**
* Another proxy allocator used to aggregate statistics and to enforce correct usage.
*/
final class DebugAllocator(Base : Allocator) : Allocator {
private {
static if (HasDictionaryDebugger) DictionaryListRef!(size_t, size_t, Malloc) m_blocks;
else HashMap!(size_t, size_t, Malloc) m_blocks;
size_t m_bytes;
size_t m_maxBytes;
void function(size_t) m_allocSizeCallback;
void function(size_t) m_freeSizeCallback;
}
package Base m_baseAlloc;
this()
{
version(TLSGC) { } else {
if (!mtx) mtx = new Mutex;
}
m_baseAlloc = getAllocator!Base();
}
public {
void setAllocSizeCallbacks(void function(size_t) alloc_sz_cb, void function(size_t) free_sz_cb) {
m_allocSizeCallback = alloc_sz_cb;
m_freeSizeCallback = free_sz_cb;
}
@property size_t allocatedBlockCount() const { return m_blocks.length; }
@property size_t bytesAllocated() const { return m_bytes; }
@property size_t maxBytesAllocated() const { return m_maxBytes; }
void printMap() {
foreach(const ref size_t ptr, const ref size_t sz; m_blocks) {
logDebug(cast(void*)ptr, " sz ", sz);
}
}
static if (HasDictionaryDebugger) auto getMap() {
return m_blocks;
}
}
void[] alloc(size_t sz)
{
version(TLSGC) { } else {
mtx.lock_nothrow();
scope(exit) mtx.unlock_nothrow();
}
assert(sz > 0, "Cannot serve a zero-length allocation");
//logTrace("Bytes allocated in ", Base.stringof, ": ", bytesAllocated());
auto ret = m_baseAlloc.alloc(sz);
synchronized(this) {
assert(ret.length == sz, "base.alloc() returned block with wrong size.");
assert( cast(size_t)ret.ptr !in m_blocks, "Returning already allocated pointer");
m_blocks[cast(size_t)ret.ptr] = sz;
m_bytes += sz;
if (m_allocSizeCallback)
m_allocSizeCallback(sz);
if( m_bytes > m_maxBytes ){
m_maxBytes = m_bytes;
//logTrace("New allocation maximum: %d (%d blocks)", m_maxBytes, m_blocks.length);
}
}
//logDebug("Alloc ptr: ", ret.ptr, " sz: ", ret.length);
return ret;
}
void[] realloc(void[] mem, size_t new_size)
{
version(TLSGC) { } else {
mtx.lock_nothrow();
scope(exit) mtx.unlock_nothrow();
}
assert(new_size > 0 && mem.length > 0, "Cannot serve a zero-length reallocation");
void[] ret;
size_t sz;
synchronized(this) {
sz = m_blocks.get(cast(size_t)mem.ptr, size_t.max);
assert(sz != size_t.max, "realloc() called with non-allocated pointer.");
assert(sz == mem.length, "realloc() called with block of wrong size.");
}
ret = m_baseAlloc.realloc(mem, new_size);
synchronized(this) {
//assert( cast(size_t)ret.ptr !in m_blocks, "Returning from realloc already allocated pointer");
assert(ret.length == new_size, "base.realloc() returned block with wrong size.");
//assert(ret.ptr is mem.ptr || m_blocks.get(ret.ptr, size_t.max) == size_t.max, "base.realloc() returned block that is already allocated.");
m_bytes -= sz;
m_blocks.remove(cast(size_t)mem.ptr);
m_blocks[cast(size_t)ret.ptr] = new_size;
m_bytes += new_size;
if (m_freeSizeCallback)
m_freeSizeCallback(sz);
if (m_allocSizeCallback)
m_allocSizeCallback(new_size);
}
return ret;
}
void free(void[] mem)
{
version(TLSGC) { } else {
mtx.lock_nothrow();
scope(exit) mtx.unlock_nothrow();
}
assert(mem.length > 0, "Cannot serve a zero-length deallocation");
size_t sz;
synchronized(this) {
sz = m_blocks.get(cast(const size_t)mem.ptr, size_t.max);
if (sz == size_t.max || sz != mem.length) logError("Debug Info: ", mem.ptr, " (", mem.length, " B) m_blocks len: ", m_blocks.length, " sz ", sz);
assert(sz != size_t.max, "free() called with non-allocated object.");
assert(sz == mem.length, "free() called with block of wrong size.");
}
//logDebug("free ptr: ", mem.ptr, " sz: ", mem.length);
m_baseAlloc.free(mem);
synchronized(this) {
m_bytes -= sz;
if (m_freeSizeCallback)
m_freeSizeCallback(sz);
m_blocks.remove(cast(size_t)mem.ptr);
}
}
package void ignore(void* ptr) {
synchronized(this) {
size_t sz = m_blocks.get(cast(const size_t) ptr, size_t.max);
m_bytes -= sz;
m_blocks.remove(cast(size_t)ptr);
}
}
}
|
D
|
a flighty and disorganized person
|
D
|
#pragma D option quiet
#pragma D option switchrate=10hz
dtrace:::BEGIN
{
printf(" %3s %15s:%-5s %15s:%-5s %6s %s\n", "CPU",
"LADDR", "LPORT", "RADDR", "RPORT", "BYTES", "FLAGS");
}
tcp:::send
{
this->length = args[2]->ip_plength - args[4]->tcp_offset;
printf(" %3d %16s:%-5d -> %16s:%-5d %6d (", cpu, args[2]->ip_saddr,
args[4]->tcp_sport, args[2]->ip_daddr, args[4]->tcp_dport,
this->length);
printf("%s", args[4]->tcp_flags & TH_FIN ? "FIN|" : "");
printf("%s", args[4]->tcp_flags & TH_SYN ? "SYN|" : "");
printf("%s", args[4]->tcp_flags & TH_RST ? "RST|" : "");
printf("%s", args[4]->tcp_flags & TH_PUSH ? "PUSH|" : "");
printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : "");
printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : "");
printf("%s", args[4]->tcp_flags == 0 ? "null " : "");
printf("\n");
}
tcp:::receive
{
this->length = args[2]->ip_plength - args[4]->tcp_offset;
printf(" %3d %16s:%-5d <- %16s:%-5d %6d (", cpu,
args[2]->ip_daddr, args[4]->tcp_dport, args[2]->ip_saddr,
args[4]->tcp_sport, this->length);
printf("%s", args[4]->tcp_flags & TH_FIN ? "FIN|" : "");
printf("%s", args[4]->tcp_flags & TH_SYN ? "SYN|" : "");
printf("%s", args[4]->tcp_flags & TH_RST ? "RST|" : "");
printf("%s", args[4]->tcp_flags & TH_PUSH ? "PUSH|" : "");
printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : "");
printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : "");
printf("%s", args[4]->tcp_flags == 0 ? "null " : "");
printf("\n");
}
|
D
|
any substance that can be metabolized by an animal to give energy and build tissue
any substance (such as a chemical element or inorganic compound) that can be taken in by a green plant and used in organic synthesis
of or providing nourishment
|
D
|
instance Mod_1094_BAU_Bauer_MT (Npc_Default)
{
//-------- primary data --------
name = name_Bauer;
npctype = NPCTYPE_MT_REISBAUER;
guild = GIL_MIL;
level = 2;
voice = 4;
id = 1094;
//-------- abilities --------
attribute[ATR_STRENGTH] = 15;
attribute[ATR_DEXTERITY] = 11;
attribute[ATR_MANA_MAX] = 0;
attribute[ATR_MANA] = 0;
attribute[ATR_HITPOINTS_MAX]= 76;
attribute[ATR_HITPOINTS] = 76;
//-------- visuals --------
// animations
Mdl_SetVisual (self,"HUMANS.MDS");
Mdl_ApplyOverlayMds (self,"Humans_Tired.mds");
// body mesh ,bdytex,skin,head mesh ,headtex4,teethtex,ruestung
Mdl_SetVisualBody (self,"hum_body_Naked0",2,1,"Hum_Head_Bald",56 , 1,DEFAULT);
Mdl_SetModelFatness(self,0);
fight_tactic = FAI_HUMAN_COWARD;
//-------- Talente --------
//-------- inventory --------
//-------------Daily Routine-------------
daily_routine = Rtn_start_1094;
};
FUNC VOID Rtn_start_1094 ()
{
TA_Sleep (20,50,07,50,"NC_PATH_PEASANT");
TA_PickRice (07,50,20,50,"NC_PATH82");
};
|
D
|
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module flow.variable.service.impl.types.DefaultVariableTypes;
import hunt.collection.ArrayList;
import hunt.collection.HashMap;
import hunt.collection.List;
import hunt.collection.Map;
import flow.common.api.FlowableException;
import flow.variable.service.api.types.VariableType;
import flow.variable.service.api.types.VariableTypes;
/**
* @author Tom Baeyens
*/
class DefaultVariableTypes : VariableTypes {
private List!VariableType typesList ;//= new ArrayList<>();
private Map!(string, VariableType) typesMap ;//= new HashMap<>();
this()
{
typesList = new ArrayList!VariableType;
typesMap = new HashMap!(string, VariableType);
}
public DefaultVariableTypes addType(VariableType type) {
return addType(type, typesList.size());
}
public DefaultVariableTypes addType(VariableType type, int index) {
typesList.add(index, type);
typesMap.put(type.getTypeName(), type);
return this;
}
public void setTypesList(List!VariableType typesList) {
this.typesList.clear();
this.typesList.addAll(typesList);
this.typesMap.clear();
foreach (VariableType type ; typesList) {
typesMap.put(type.getTypeName(), type);
}
}
public VariableType getVariableType(string typeName) {
return typesMap.get(typeName);
}
public VariableType findVariableType(Object value) {
foreach (VariableType type ; typesList) {
if (type.isAbleToStore(value)) {
return type;
}
}
throw new FlowableException("couldn't find a variable type that is able to serialize " );
}
public int getTypeIndex(VariableType type) {
return typesList.indexOf(type);
}
public int getTypeIndex(string typeName) {
VariableType type = typesMap.get(typeName);
if (type !is null) {
return getTypeIndex(type);
} else {
return -1;
}
}
public VariableTypes removeType(VariableType type) {
typesList.remove(type);
typesMap.remove(type.getTypeName());
return this;
}
}
|
D
|
import std.stdio;
immutable N = 7;
void printArray(ref float[N][N] a) {
foreach (ref row; a) writeln(row);
}
void main() {
float[N] f = [0.05, 0.4, 0.08, 0.04, 0.1, 0.1, 0.23];
float[N][N] t;
foreach (s; 0 .. N) {
foreach (i; 0 .. N) {
if (i + s >= N) break;
float best = float.infinity;
float sum = 0;
foreach (r; i .. i + s + 1) sum += f[r];
foreach (r; i .. i + s + 1) {
float left = i > r - 1 ? 0 : t[i][r - 1];
float right = r + 1 > i + s ? 0 : t[r + 1][i + s];
float current = sum + left + right;
if (current < best) best = current;
}
t[i][i + s] = best;
}
printArray(t);
writeln();
}
writeln(t[0][N - 1]);
}
|
D
|
module crunch.Utils;
import std.parallelism : totalCPUs;
import std.path : dirName;
import std.file;
import std.socket;
import core.sys.posix.signal;
void ignoreSignalSIGPIPE()
{
ignoreSignal(SIGPIPE);
}
void ignoreSignal(int a_signal)
{
signal(a_signal, SIG_IGN);
}
auto installDir()
{
return dirName(thisExePath());
}
auto availableCores()
{
return totalCPUs;
}
void setCork(Socket a_socket, bool enable)
{
enum TCP_CORK = 3;
a_socket.setOption(SocketOptionLevel.TCP, cast(SocketOption)TCP_CORK, enable);
}
void setLinger(Socket a_socket, bool enable)
{
if(enable)
{
Linger linger;
linger.on = 1;
linger.time = 1;
a_socket.setOption(SocketOptionLevel.SOCKET, SocketOption.LINGER, linger);
}
}
void setNoDelay(Socket a_socket, bool enable)
{
if(enable)
{
a_socket.setOption(SocketOptionLevel.TCP, SocketOption.TCP_NODELAY, true);
}
}
void enableReuseAddr(Socket a_socket, bool enable)
{
if(enable)
{
a_socket.setOption(SocketOptionLevel.SOCKET, SocketOption.REUSEADDR, true);
}
}
void enableReusePort(Socket a_socket, bool enable)
{
if(enable)
{
enum REUSEPORT = 15;
a_socket.setOption(SocketOptionLevel.SOCKET, cast(SocketOption)REUSEPORT, true);
}
}
void enableDeferAccept(Socket a_socket, bool enable)
{
if(enable)
{
enum TCP_DEFER_ACCEPT = 9;
a_socket.setOption(SocketOptionLevel.TCP, cast(SocketOption)TCP_DEFER_ACCEPT, true);
}
}
|
D
|
set_span/set.ml: Array Buffer Irmin Irmin_scylla Lwt Printf String Sys Unix
|
D
|
/Users/huuthang/Desktop/NFT/target/release/build/byteorder-e213a08301b23495/build_script_build-e213a08301b23495: /Users/huuthang/.cargo/registry/src/github.com-1ecc6299db9ec823/byteorder-1.3.4/build.rs
/Users/huuthang/Desktop/NFT/target/release/build/byteorder-e213a08301b23495/build_script_build-e213a08301b23495.d: /Users/huuthang/.cargo/registry/src/github.com-1ecc6299db9ec823/byteorder-1.3.4/build.rs
/Users/huuthang/.cargo/registry/src/github.com-1ecc6299db9ec823/byteorder-1.3.4/build.rs:
|
D
|
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QGRIDLAYOUT_H
#define QGRIDLAYOUT_H
public import qt.QtWidgets.qlayout;
#ifdef QT_INCLUDE_COMPAT
public import qt.QtWidgets.qwidget;
#endif
public import limits;
QT_BEGIN_NAMESPACE
class QGridLayoutPrivate;
class Q_WIDGETS_EXPORT QGridLayout : public QLayout
{
mixin Q_OBJECT;
mixin Q_DECLARE_PRIVATE;
QDOC_PROPERTY(int horizontalSpacing READ horizontalSpacing WRITE setHorizontalSpacing)
QDOC_PROPERTY(int verticalSpacing READ verticalSpacing WRITE setVerticalSpacing)
public:
explicit QGridLayout(QWidget *parent);
QGridLayout();
~QGridLayout();
QSize sizeHint() const;
QSize minimumSize() const;
QSize maximumSize() const;
void setHorizontalSpacing(int spacing);
int horizontalSpacing() const;
void setVerticalSpacing(int spacing);
int verticalSpacing() const;
void setSpacing(int spacing);
int spacing() const;
void setRowStretch(int row, int stretch);
void setColumnStretch(int column, int stretch);
int rowStretch(int row) const;
int columnStretch(int column) const;
void setRowMinimumHeight(int row, int minSize);
void setColumnMinimumWidth(int column, int minSize);
int rowMinimumHeight(int row) const;
int columnMinimumWidth(int column) const;
int columnCount() const;
int rowCount() const;
QRect cellRect(int row, int column) const;
bool hasHeightForWidth() const;
int heightForWidth(int) const;
int minimumHeightForWidth(int) const;
Qt.Orientations expandingDirections() const;
void invalidate();
/+inline+/ void addWidget(QWidget *w) { QLayout::addWidget(w); }
void addWidget(QWidget *, int row, int column, Qt.Alignment = 0);
void addWidget(QWidget *, int row, int column, int rowSpan, int columnSpan, Qt.Alignment = 0);
void addLayout(QLayout *, int row, int column, Qt.Alignment = 0);
void addLayout(QLayout *, int row, int column, int rowSpan, int columnSpan, Qt.Alignment = 0);
void setOriginCorner(Qt.Corner);
Qt.Corner originCorner() const;
QLayoutItem *itemAt(int index) const;
QLayoutItem *itemAtPosition(int row, int column) const;
QLayoutItem *takeAt(int index);
int count() const;
void setGeometry(ref const(QRect));
void addItem(QLayoutItem *item, int row, int column, int rowSpan = 1, int columnSpan = 1, Qt.Alignment = 0);
void setDefaultPositioning(int n, Qt.Orientation orient);
void getItemPosition(int idx, int *row, int *column, int *rowSpan, int *columnSpan) const;
protected:
void addItem(QLayoutItem *);
private:
mixin Q_DISABLE_COPY;
};
QT_END_NAMESPACE
#endif // QGRIDLAYOUT_H
|
D
|
/Users/sa-ta/Documents/MyRusts/RustVue/serverRust/target/rls/debug/deps/unic_char_range-24ac25ca2ff2fac7.rmeta: /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/lib.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/pkg_info.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/iter.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/range.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/macros.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/step.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/iter_fused.rs
/Users/sa-ta/Documents/MyRusts/RustVue/serverRust/target/rls/debug/deps/unic_char_range-24ac25ca2ff2fac7.d: /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/lib.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/pkg_info.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/iter.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/range.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/macros.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/step.rs /Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/iter_fused.rs
/Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/lib.rs:
/Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/pkg_info.rs:
/Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/iter.rs:
/Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/range.rs:
/Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/macros.rs:
/Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/step.rs:
/Users/sa-ta/.cargo/registry/src/github.com-1ecc6299db9ec823/unic-char-range-0.9.0/src/iter_fused.rs:
# env-dep:CARGO_PKG_DESCRIPTION=UNIC — Unicode Character Tools — Character Range and Iteration
# env-dep:CARGO_PKG_NAME=unic-char-range
# env-dep:CARGO_PKG_VERSION=0.9.0
|
D
|
var int bezi_bookstand_milten_03_s1;
func void Bookstand_Milten_03_S1()
{
var int nDocID;
if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(hero))
{
nDocID = Doc_Create();
Doc_SetPages(nDocID,2);
Doc_SetPage(nDocID,0,"Book_Brown_L.tga",0);
Doc_SetPage(nDocID,1,"Book_Brown_R.tga",0);
Doc_SetFont(nDocID,-1,FONT_Book);
Doc_SetMargins(nDocID,0,275,20,30,20,1);
Doc_PrintLine(nDocID,0,"");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLines(nDocID,0,"It's late.");
Doc_PrintLines(nDocID,0,"The collapse of the old mine brought about the downfall of the ore barons' mood.");
Doc_PrintLines(nDocID,0,"Gomez is like a powder keg about to explode.");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLine(nDocID,0,"Corristo");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLines(nDocID,0,"He thinks the new guy's to blame for the collapse of the mine. That man sure is strange. But he'd better not show his face round here again.");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLine(nDocID,0,"Corristo");
Doc_SetMargins(nDocID,-1,30,20,275,20,1);
Doc_PrintLine(nDocID,1,"");
Doc_PrintLines(nDocID,1,"Gomez' temper is hotter than ever, and I think I can guess what he's planning. We must warn the Water Mages, before it's too late.");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLine(nDocID,1,"Corristo");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLines(nDocID,1,"Maybe we can ward off a disaster. It doesn't bear thinking about what would happen if the free mine...");
Doc_Show(nDocID);
if(bezi_bookstand_milten_03_s1 == TRUE)
{
B_Say(hero,hero,"$BEZI_TO_WIE");
}
else
{
bezi_bookstand_milten_03_s1 = TRUE;
};
};
};
var int bezi_bookstand_milten_02_s1;
func void Bookstand_Milten_02_S1()
{
var int nDocID;
if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(hero))
{
nDocID = Doc_Create();
Doc_SetPages(nDocID,2);
Doc_SetPage(nDocID,0,"Book_Mage_L.tga",0);
Doc_SetPage(nDocID,1,"Book_Mage_R.tga",0);
Doc_SetFont(nDocID,-1,FONT_Book);
Doc_SetMargins(nDocID,0,275,20,30,20,1);
Doc_PrintLine(nDocID,0,"");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLines(nDocID,0,"I've taken the liberty of making myself more comfortable. Who'd have thought I would someday be the only mage in the camp?");
Doc_PrintLines(nDocID,0,"Well, I can't really say I'm glad to be back. In fact, I should be seeing about clearing out of here.");
Doc_PrintLines(nDocID,0,"This expedition just isn't having any success.");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLines(nDocID,0,"");
Doc_SetMargins(nDocID,-1,30,20,275,20,1);
Doc_PrintLine(nDocID,1,"");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLines(nDocID,1,"The scrapers left yesterday. They took Diego with them - wouldn't surprise me if he did a runner.");
Doc_PrintLines(nDocID,1,"He's not likely to swing a pickaxe anyhow.");
Doc_PrintLines(nDocID,1,"Well, I'll use the time to learn a bit about the art of alchemy.");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLine(nDocID,1,"Milten");
Doc_Show(nDocID);
if(bezi_bookstand_milten_02_s1 == TRUE)
{
B_Say(hero,hero,"$BEZI_TO_WIE");
}
else
{
bezi_bookstand_milten_02_s1 = TRUE;
};
};
};
func void Bookstand_Milten_01_S1()
{
var int Document;
if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(hero))
{
Document = Doc_CreateMap();
Doc_SetPages(Document,1);
Doc_SetPage(Document,0,"Map_OldWorld.tga",TRUE);
Doc_SetLevel(Document,"OldWorld\OldWorld.zen");
Doc_SetLevelCoords(Document,-78500,47500,54000,-53000);
Doc_Show(Document);
};
};
func void Bookstand_Engor_01_S1()
{
var int nDocID;
var int bezi_random;
if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(hero))
{
nDocID = Doc_Create();
Doc_SetPages(nDocID,2);
Doc_SetPage(nDocID,0,"Book_Red_L.tga",0);
Doc_SetPage(nDocID,1,"Book_Red_R.tga",0);
Doc_SetFont(nDocID,-1,FONT_Book);
Doc_SetMargins(nDocID,0,275,20,30,20,1);
Doc_PrintLine(nDocID,0,"");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLine(nDocID,0,"Stock");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLines(nDocID,0,"We found some stuff - nothing much usable. Remainder as follows:");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLines(nDocID,0,"3 crates of old rags");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLines(nDocID,0,"8 crates of rusty iron");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLines(nDocID,0,"4 crates of broken armor");
Doc_PrintLine(nDocID,0,"");
Doc_PrintLines(nDocID,0,"5 crates of (stinking) leather and pelts");
Doc_PrintLine(nDocID,0,"");
Doc_SetMargins(nDocID,-1,30,20,275,20,1);
Doc_PrintLine(nDocID,1,"");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLines(nDocID,1,"2 crates of pickaxes");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLines(nDocID,1,"3 crates of tools");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLines(nDocID,1,"16 crates of rocks (ore virtually nil)");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLines(nDocID,1,"1 crate of rusty razor blades");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLines(nDocID,1,"4 crates of broken crockery");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLines(nDocID,1,"56 water barrels");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLines(nDocID,1,"1 crate of something swampy (whatever it was, it's rotted)");
Doc_PrintLine(nDocID,1,"");
Doc_PrintLine(nDocID,1,"Engor");
Doc_Show(nDocID);
bezi_random = Hlp_Random(29);
if(bezi_random <= 9)
{
B_Say(hero,hero,"$BEZI_NIC_CIEKAWEGO");
}
else if(bezi_random <= 19)
{
B_Say(hero,hero,"$BEZI_NIECIEKAWE");
}
else if(bezi_random <= 29)
{
B_Say(hero,hero,"$BEZI_TO_WIE");
};
};
};
|
D
|
module app.form.LoginUser;
import hunt.framework.http.Form;
import hunt.validation;
import hunt.serialization.JsonSerializer;
class LoginUser : Form
{
mixin MakeForm;
@Length(4,12)
string name;
@Length(4,8)
string password;
@AliasField("e-mail")
string email;
bool rememeber = false;
}
|
D
|
module akaricastd.commands;
import std.experimental.logger;
import djrpc.v2 : JsonRpc2Request, JsonRpc2Response;
import akaricastd.player : Player;
import akaricastd.playlist: Playlist;
import akaricastd.commands.playback;
import akaricastd.commands.playlist;
import akaricastd.commands.info;
interface Command {
static string getName();
JsonRpc2Response run(JsonRpc2Request request);
}
class CommandLocator {
protected Command[string] commands;
this(Player player, Playlist playlist) {
this.commands[PlayCommand.getName()] = new PlayCommand(player);
this.commands[PauseCommand.getName()] = new PauseCommand(player);
this.commands[StopCommand.getName()] = new StopCommand(player);
this.commands[NextCommand.getName()] = new NextCommand(player);
this.commands[EnqueueCommand.getName()] = new EnqueueCommand(player, playlist);
this.commands[GetPlaylistCommand.getName()] = new GetPlaylistCommand(playlist);
this.commands[SupportInfoCommand.getName()] = new SupportInfoCommand();
}
Command getCommand(string name) {
if ((name in this.commands) != null) {
return this.commands[name];
}
return null;
}
}
|
D
|
/**
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 http://www.digitalmars.com, Walter Bright)
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/lexer.d, _lexer.d)
* Documentation: https://dlang.org/phobos/dmd_lexer.html
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/lexer.d
*/
module dmd.lexer;
import core.stdc.ctype;
import core.stdc.errno;
import core.stdc.stdarg;
import core.stdc.stdio;
import core.stdc.string;
import core.stdc.time;
import dmd.entity;
import dmd.errors;
import dmd.globals;
import dmd.id;
import dmd.identifier;
import dmd.root.ctfloat;
import dmd.root.outbuffer;
import dmd.root.port;
import dmd.root.rmem;
import dmd.tokens;
import dmd.utf;
enum LS = 0x2028; // UTF line separator
enum PS = 0x2029; // UTF paragraph separator
/********************************************
* Do our own char maps
*/
static immutable cmtable = () {
ubyte[256] table;
foreach (const c; 0 .. table.length)
{
if ('0' <= c && c <= '7')
table[c] |= CMoctal;
if (c_isxdigit(c))
table[c] |= CMhex;
if (c_isalnum(c) || c == '_')
table[c] |= CMidchar;
switch (c)
{
case 'x': case 'X':
case 'b': case 'B':
table[c] |= CMzerosecond;
break;
case '0': .. case '9':
case 'e': case 'E':
case 'f': case 'F':
case 'l': case 'L':
case 'p': case 'P':
case 'u': case 'U':
case 'i':
case '.':
case '_':
table[c] |= CMzerosecond | CMdigitsecond;
break;
default:
break;
}
switch (c)
{
case '\\':
case '\n':
case '\r':
case 0:
case 0x1A:
case '\'':
break;
default:
if (!(c & 0x80))
table[c] |= CMsinglechar;
break;
}
}
return table;
}();
enum CMoctal = 0x1;
enum CMhex = 0x2;
enum CMidchar = 0x4;
enum CMzerosecond = 0x8;
enum CMdigitsecond = 0x10;
enum CMsinglechar = 0x20;
bool isoctal(char c)
{
return (cmtable[c] & CMoctal) != 0;
}
bool ishex(char c)
{
return (cmtable[c] & CMhex) != 0;
}
bool isidchar(char c)
{
return (cmtable[c] & CMidchar) != 0;
}
bool isZeroSecond(char c)
{
return (cmtable[c] & CMzerosecond) != 0;
}
bool isDigitSecond(char c)
{
return (cmtable[c] & CMdigitsecond) != 0;
}
bool issinglechar(char c)
{
return (cmtable[c] & CMsinglechar) != 0;
}
private bool c_isxdigit(int c)
{
return (( c >= '0' && c <= '9') ||
( c >= 'a' && c <= 'f') ||
( c >= 'A' && c <= 'F'));
}
private bool c_isalnum(int c)
{
return (( c >= '0' && c <= '9') ||
( c >= 'a' && c <= 'z') ||
( c >= 'A' && c <= 'Z'));
}
unittest
{
//printf("lexer.unittest\n");
/* Not much here, just trying things out.
*/
string text = "int"; // We rely on the implicit null-terminator
scope Lexer lex1 = new Lexer(null, text.ptr, 0, text.length, 0, 0);
TOK tok;
tok = lex1.nextToken();
//printf("tok == %s, %d, %d\n", Token::toChars(tok), tok, TOK.int32);
assert(tok == TOK.int32);
tok = lex1.nextToken();
assert(tok == TOK.endOfFile);
tok = lex1.nextToken();
assert(tok == TOK.endOfFile);
tok = lex1.nextToken();
assert(tok == TOK.endOfFile);
}
unittest
{
// We don't want to see Lexer error output during these tests.
uint errors = global.startGagging();
scope(exit) global.endGagging(errors);
// Test malformed input: even malformed input should end in a TOK.endOfFile.
static immutable char[][] testcases =
[ // Testcase must end with 0 or 0x1A.
[0], // not malformed, but pathological
['\'', 0],
['\'', 0x1A],
['{', '{', 'q', '{', 0],
[0xFF, 0],
[0xFF, 0x80, 0],
[0xFF, 0xFF, 0],
[0xFF, 0xFF, 0],
['x', '"', 0x1A],
];
foreach (testcase; testcases)
{
scope Lexer lex2 = new Lexer(null, testcase.ptr, 0, testcase.length-1, 0, 0);
TOK tok = lex2.nextToken();
size_t iterations = 1;
while ((tok != TOK.endOfFile) && (iterations++ < testcase.length))
{
tok = lex2.nextToken();
}
assert(tok == TOK.endOfFile);
tok = lex2.nextToken();
assert(tok == TOK.endOfFile);
}
}
/**
Handles error messages
*/
class ErrorHandler
{
/**
Report an error message.
Params:
format = format string for error
... = format string arguments
*/
abstract void error(const(char)* format, ...);
/**
Report an error message.
Params:
loc = Location of error
format = format string for error
... = format string arguments
*/
abstract void error(Loc loc, const(char)* format, ...);
}
/***********************************************************
*/
class Lexer : ErrorHandler
{
__gshared OutBuffer stringbuffer;
Loc scanloc; // for error messages
Loc prevloc; // location of token before current
const(char)* base; // pointer to start of buffer
const(char)* end; // pointer to last element of buffer
const(char)* p; // current character
const(char)* line; // start of current line
Token token;
bool doDocComment; // collect doc comment information
bool anyToken; // seen at least one token
bool commentToken; // comments are TOK.comment's
int lastDocLine; // last line of previous doc comment
bool errors; // errors occurred during lexing or parsing
/*********************
* Creates a Lexer for the source code base[begoffset..endoffset+1].
* The last character, base[endoffset], must be null (0) or EOF (0x1A).
*
* Params:
* filename = used for error messages
* base = source code, must be terminated by a null (0) or EOF (0x1A) character
* begoffset = starting offset into base[]
* endoffset = the last offset to read into base[]
* doDocComment = handle documentation comments
* commentToken = comments become TOK.comment's
*/
this(const(char)* filename, const(char)* base, size_t begoffset, size_t endoffset, bool doDocComment, bool commentToken)
{
scanloc = Loc(filename, 1, 1);
//printf("Lexer::Lexer(%p,%d)\n",base,length);
//printf("lexer.filename = %s\n", filename);
token = Token.init;
this.base = base;
this.end = base + endoffset;
p = base + begoffset;
line = p;
this.doDocComment = doDocComment;
this.commentToken = commentToken;
this.lastDocLine = 0;
//initKeywords();
/* If first line starts with '#!', ignore the line
*/
if (p && p[0] == '#' && p[1] == '!')
{
p += 2;
while (1)
{
char c = *p++;
switch (c)
{
case 0:
case 0x1A:
p--;
goto case;
case '\n':
break;
default:
continue;
}
break;
}
endOfLine();
}
}
final TOK nextToken()
{
prevloc = token.loc;
if (token.next)
{
Token* t = token.next;
memcpy(&token, t, Token.sizeof);
t.free();
}
else
{
scan(&token);
}
//printf(token.toChars());
return token.value;
}
/***********************
* Look ahead at next token's value.
*/
final TOK peekNext()
{
return peek(&token).value;
}
/***********************
* Look 2 tokens ahead at value.
*/
final TOK peekNext2()
{
Token* t = peek(&token);
return peek(t).value;
}
/****************************
* Turn next token in buffer into a token.
*/
final void scan(Token* t)
{
const lastLine = scanloc.linnum;
Loc startLoc;
t.blockComment = null;
t.lineComment = null;
while (1)
{
t.ptr = p;
//printf("p = %p, *p = '%c'\n",p,*p);
t.loc = loc();
switch (*p)
{
case 0:
case 0x1A:
t.value = TOK.endOfFile; // end of file
// Intentionally not advancing `p`, such that subsequent calls keep returning TOK.endOfFile.
return;
case ' ':
case '\t':
case '\v':
case '\f':
p++;
continue; // skip white space
case '\r':
p++;
if (*p != '\n') // if CR stands by itself
endOfLine();
continue; // skip white space
case '\n':
p++;
endOfLine();
continue; // skip white space
case '0':
if (!isZeroSecond(p[1])) // if numeric literal does not continue
{
++p;
t.unsvalue = 0;
t.value = TOK.int32Literal;
return;
}
goto Lnumber;
case '1': .. case '9':
if (!isDigitSecond(p[1])) // if numeric literal does not continue
{
t.unsvalue = *p - '0';
++p;
t.value = TOK.int32Literal;
return;
}
Lnumber:
t.value = number(t);
return;
case '\'':
if (issinglechar(p[1]) && p[2] == '\'')
{
t.unsvalue = p[1]; // simple one character literal
t.value = TOK.charLiteral;
p += 3;
}
else
t.value = charConstant(t);
return;
case 'r':
if (p[1] != '"')
goto case_ident;
p++;
goto case '`';
case '`':
wysiwygStringConstant(t);
return;
case 'x':
if (p[1] != '"')
goto case_ident;
p++;
t.value = hexStringConstant(t);
deprecation("Built-in hex string literals are deprecated, use `std.conv.hexString` instead.");
return;
case 'q':
if (p[1] == '"')
{
p++;
delimitedStringConstant(t);
return;
}
else if (p[1] == '{')
{
p++;
tokenStringConstant(t);
return;
}
else
goto case_ident;
case '"':
escapeStringConstant(t);
return;
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
/*case 'q': case 'r':*/
case 's':
case 't':
case 'u':
case 'v':
case 'w':
/*case 'x':*/
case 'y':
case 'z':
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case '_':
case_ident:
{
while (1)
{
const c = *++p;
if (isidchar(c))
continue;
else if (c & 0x80)
{
const s = p;
const u = decodeUTF();
if (isUniAlpha(u))
continue;
error("char 0x%04x not allowed in identifier", u);
p = s;
}
break;
}
Identifier id = Identifier.idPool(cast(char*)t.ptr, p - t.ptr);
t.ident = id;
t.value = cast(TOK)id.getValue();
anyToken = 1;
if (*t.ptr == '_') // if special identifier token
{
__gshared bool initdone = false;
__gshared char[11 + 1] date;
__gshared char[8 + 1] time;
__gshared char[24 + 1] timestamp;
if (!initdone) // lazy evaluation
{
initdone = true;
time_t ct;
.time(&ct);
const p = ctime(&ct);
assert(p);
sprintf(&date[0], "%.6s %.4s", p + 4, p + 20);
sprintf(&time[0], "%.8s", p + 11);
sprintf(×tamp[0], "%.24s", p);
}
if (id == Id.DATE)
{
t.ustring = date.ptr;
goto Lstr;
}
else if (id == Id.TIME)
{
t.ustring = time.ptr;
goto Lstr;
}
else if (id == Id.VENDOR)
{
t.ustring = global.compiler.vendor;
goto Lstr;
}
else if (id == Id.TIMESTAMP)
{
t.ustring = timestamp.ptr;
Lstr:
t.value = TOK.string_;
t.postfix = 0;
t.len = cast(uint)strlen(t.ustring);
}
else if (id == Id.VERSIONX)
{
t.value = TOK.int64Literal;
t.unsvalue = global.versionNumber();
}
else if (id == Id.EOFX)
{
t.value = TOK.endOfFile;
// Advance scanner to end of file
while (!(*p == 0 || *p == 0x1A))
p++;
}
}
//printf("t.value = %d\n",t.value);
return;
}
case '/':
p++;
switch (*p)
{
case '=':
p++;
t.value = TOK.divAssign;
return;
case '*':
p++;
startLoc = loc();
while (1)
{
while (1)
{
const c = *p;
switch (c)
{
case '/':
break;
case '\n':
endOfLine();
p++;
continue;
case '\r':
p++;
if (*p != '\n')
endOfLine();
continue;
case 0:
case 0x1A:
error("unterminated /* */ comment");
p = end;
t.loc = loc();
t.value = TOK.endOfFile;
return;
default:
if (c & 0x80)
{
const u = decodeUTF();
if (u == PS || u == LS)
endOfLine();
}
p++;
continue;
}
break;
}
p++;
if (p[-2] == '*' && p - 3 != t.ptr)
break;
}
if (commentToken)
{
t.loc = startLoc;
t.value = TOK.comment;
return;
}
else if (doDocComment && t.ptr[2] == '*' && p - 4 != t.ptr)
{
// if /** but not /**/
getDocComment(t, lastLine == startLoc.linnum, startLoc.linnum - lastDocLine > 1);
lastDocLine = scanloc.linnum;
}
continue;
case '/': // do // style comments
startLoc = loc();
while (1)
{
const c = *++p;
switch (c)
{
case '\n':
break;
case '\r':
if (p[1] == '\n')
p++;
break;
case 0:
case 0x1A:
if (commentToken)
{
p = end;
t.loc = startLoc;
t.value = TOK.comment;
return;
}
if (doDocComment && t.ptr[2] == '/')
{
getDocComment(t, lastLine == startLoc.linnum, startLoc.linnum - lastDocLine > 1);
lastDocLine = scanloc.linnum;
}
p = end;
t.loc = loc();
t.value = TOK.endOfFile;
return;
default:
if (c & 0x80)
{
const u = decodeUTF();
if (u == PS || u == LS)
break;
}
continue;
}
break;
}
if (commentToken)
{
p++;
endOfLine();
t.loc = startLoc;
t.value = TOK.comment;
return;
}
if (doDocComment && t.ptr[2] == '/')
{
getDocComment(t, lastLine == startLoc.linnum, startLoc.linnum - lastDocLine > 1);
lastDocLine = scanloc.linnum;
}
p++;
endOfLine();
continue;
case '+':
{
int nest;
startLoc = loc();
p++;
nest = 1;
while (1)
{
char c = *p;
switch (c)
{
case '/':
p++;
if (*p == '+')
{
p++;
nest++;
}
continue;
case '+':
p++;
if (*p == '/')
{
p++;
if (--nest == 0)
break;
}
continue;
case '\r':
p++;
if (*p != '\n')
endOfLine();
continue;
case '\n':
endOfLine();
p++;
continue;
case 0:
case 0x1A:
error("unterminated /+ +/ comment");
p = end;
t.loc = loc();
t.value = TOK.endOfFile;
return;
default:
if (c & 0x80)
{
uint u = decodeUTF();
if (u == PS || u == LS)
endOfLine();
}
p++;
continue;
}
break;
}
if (commentToken)
{
t.loc = startLoc;
t.value = TOK.comment;
return;
}
if (doDocComment && t.ptr[2] == '+' && p - 4 != t.ptr)
{
// if /++ but not /++/
getDocComment(t, lastLine == startLoc.linnum, startLoc.linnum - lastDocLine > 1);
lastDocLine = scanloc.linnum;
}
continue;
}
default:
break;
}
t.value = TOK.div;
return;
case '.':
p++;
if (isdigit(*p))
{
/* Note that we don't allow ._1 and ._ as being
* valid floating point numbers.
*/
p--;
t.value = inreal(t);
}
else if (p[0] == '.')
{
if (p[1] == '.')
{
p += 2;
t.value = TOK.dotDotDot;
}
else
{
p++;
t.value = TOK.slice;
}
}
else
t.value = TOK.dot;
return;
case '&':
p++;
if (*p == '=')
{
p++;
t.value = TOK.andAssign;
}
else if (*p == '&')
{
p++;
t.value = TOK.andAnd;
}
else
t.value = TOK.and;
return;
case '|':
p++;
if (*p == '=')
{
p++;
t.value = TOK.orAssign;
}
else if (*p == '|')
{
p++;
t.value = TOK.orOr;
}
else
t.value = TOK.or;
return;
case '-':
p++;
if (*p == '=')
{
p++;
t.value = TOK.minAssign;
}
else if (*p == '-')
{
p++;
t.value = TOK.minusMinus;
}
else
t.value = TOK.min;
return;
case '+':
p++;
if (*p == '=')
{
p++;
t.value = TOK.addAssign;
}
else if (*p == '+')
{
p++;
t.value = TOK.plusPlus;
}
else
t.value = TOK.add;
return;
case '<':
p++;
if (*p == '=')
{
p++;
t.value = TOK.lessOrEqual; // <=
}
else if (*p == '<')
{
p++;
if (*p == '=')
{
p++;
t.value = TOK.leftShiftAssign; // <<=
}
else
t.value = TOK.leftShift; // <<
}
else
t.value = TOK.lessThan; // <
return;
case '>':
p++;
if (*p == '=')
{
p++;
t.value = TOK.greaterOrEqual; // >=
}
else if (*p == '>')
{
p++;
if (*p == '=')
{
p++;
t.value = TOK.rightShiftAssign; // >>=
}
else if (*p == '>')
{
p++;
if (*p == '=')
{
p++;
t.value = TOK.unsignedRightShiftAssign; // >>>=
}
else
t.value = TOK.unsignedRightShift; // >>>
}
else
t.value = TOK.rightShift; // >>
}
else
t.value = TOK.greaterThan; // >
return;
case '!':
p++;
if (*p == '=')
{
p++;
t.value = TOK.notEqual; // !=
}
else
t.value = TOK.not; // !
return;
case '=':
p++;
if (*p == '=')
{
p++;
t.value = TOK.equal; // ==
}
else if (*p == '>')
{
p++;
t.value = TOK.goesTo; // =>
}
else
t.value = TOK.assign; // =
return;
case '~':
p++;
if (*p == '=')
{
p++;
t.value = TOK.concatenateAssign; // ~=
}
else
t.value = TOK.tilde; // ~
return;
case '^':
p++;
if (*p == '^')
{
p++;
if (*p == '=')
{
p++;
t.value = TOK.powAssign; // ^^=
}
else
t.value = TOK.pow; // ^^
}
else if (*p == '=')
{
p++;
t.value = TOK.xorAssign; // ^=
}
else
t.value = TOK.xor; // ^
return;
case '(':
p++;
t.value = TOK.leftParentheses;
return;
case ')':
p++;
t.value = TOK.rightParentheses;
return;
case '[':
p++;
t.value = TOK.leftBracket;
return;
case ']':
p++;
t.value = TOK.rightBracket;
return;
case '{':
p++;
t.value = TOK.leftCurly;
return;
case '}':
p++;
t.value = TOK.rightCurly;
return;
case '?':
p++;
t.value = TOK.question;
return;
case ',':
p++;
t.value = TOK.comma;
return;
case ';':
p++;
t.value = TOK.semicolon;
return;
case ':':
p++;
t.value = TOK.colon;
return;
case '$':
p++;
t.value = TOK.dollar;
return;
case '@':
p++;
t.value = TOK.at;
return;
case '*':
p++;
if (*p == '=')
{
p++;
t.value = TOK.mulAssign;
}
else
t.value = TOK.mul;
return;
case '%':
p++;
if (*p == '=')
{
p++;
t.value = TOK.modAssign;
}
else
t.value = TOK.mod;
return;
case '#':
{
p++;
Token n;
scan(&n);
if (n.value == TOK.identifier)
{
if (n.ident == Id.line)
{
poundLine();
continue;
}
else
{
const locx = loc();
warning(locx, "C preprocessor directive `#%s` is not supported", n.ident.toChars());
}
}
else if (n.value == TOK.if_)
{
error("C preprocessor directive `#if` is not supported, use `version` or `static if`");
}
t.value = TOK.pound;
return;
}
default:
{
dchar c = *p;
if (c & 0x80)
{
c = decodeUTF();
// Check for start of unicode identifier
if (isUniAlpha(c))
goto case_ident;
if (c == PS || c == LS)
{
endOfLine();
p++;
continue;
}
}
if (c < 0x80 && isprint(c))
error("character '%c' is not a valid token", c);
else
error("character 0x%02x is not a valid token", c);
p++;
continue;
}
}
}
}
final Token* peek(Token* ct)
{
Token* t;
if (ct.next)
t = ct.next;
else
{
t = Token.alloc();
scan(t);
ct.next = t;
}
return t;
}
/*********************************
* tk is on the opening (.
* Look ahead and return token that is past the closing ).
*/
final Token* peekPastParen(Token* tk)
{
//printf("peekPastParen()\n");
int parens = 1;
int curlynest = 0;
while (1)
{
tk = peek(tk);
//tk.print();
switch (tk.value)
{
case TOK.leftParentheses:
parens++;
continue;
case TOK.rightParentheses:
--parens;
if (parens)
continue;
tk = peek(tk);
break;
case TOK.leftCurly:
curlynest++;
continue;
case TOK.rightCurly:
if (--curlynest >= 0)
continue;
break;
case TOK.semicolon:
if (curlynest)
continue;
break;
case TOK.endOfFile:
break;
default:
continue;
}
return tk;
}
}
/*******************************************
* Parse escape sequence.
*/
final uint escapeSequence()
{
return Lexer.escapeSequence(this, p);
}
/**
Parse the given string literal escape sequence into a single character.
Params:
handler = the error handler object
sequence = pointer to string with escape sequence to parse. this is a reference
variable that is also used to return the position after the sequence
Returns:
the escaped sequence as a single character
*/
static dchar escapeSequence(ErrorHandler handler, ref const(char)* sequence)
{
const(char)* p = sequence; // cache sequence reference on stack
scope(exit) sequence = p;
uint c = *p;
int ndigits;
switch (c)
{
case '\'':
case '"':
case '?':
case '\\':
Lconsume:
p++;
break;
case 'a':
c = 7;
goto Lconsume;
case 'b':
c = 8;
goto Lconsume;
case 'f':
c = 12;
goto Lconsume;
case 'n':
c = 10;
goto Lconsume;
case 'r':
c = 13;
goto Lconsume;
case 't':
c = 9;
goto Lconsume;
case 'v':
c = 11;
goto Lconsume;
case 'u':
ndigits = 4;
goto Lhex;
case 'U':
ndigits = 8;
goto Lhex;
case 'x':
ndigits = 2;
Lhex:
p++;
c = *p;
if (ishex(cast(char)c))
{
uint v = 0;
int n = 0;
while (1)
{
if (isdigit(cast(char)c))
c -= '0';
else if (islower(c))
c -= 'a' - 10;
else
c -= 'A' - 10;
v = v * 16 + c;
c = *++p;
if (++n == ndigits)
break;
if (!ishex(cast(char)c))
{
handler.error("escape hex sequence has %d hex digits instead of %d", n, ndigits);
break;
}
}
if (ndigits != 2 && !utf_isValidDchar(v))
{
handler.error("invalid UTF character \\U%08x", v);
v = '?'; // recover with valid UTF character
}
c = v;
}
else
{
handler.error("undefined escape hex sequence \\%c%c", sequence[0], c);
p++;
}
break;
case '&':
// named character entity
for (const idstart = ++p; 1; p++)
{
switch (*p)
{
case ';':
c = HtmlNamedEntity(idstart, p - idstart);
if (c == ~0)
{
handler.error("unnamed character entity &%.*s;", cast(int)(p - idstart), idstart);
c = '?';
}
p++;
break;
default:
if (isalpha(*p) || (p != idstart && isdigit(*p)))
continue;
handler.error("unterminated named entity &%.*s;", cast(int)(p - idstart + 1), idstart);
c = '?';
break;
}
break;
}
break;
case 0:
case 0x1A:
// end of file
c = '\\';
break;
default:
if (isoctal(cast(char)c))
{
uint v = 0;
int n = 0;
do
{
v = v * 8 + (c - '0');
c = *++p;
}
while (++n < 3 && isoctal(cast(char)c));
c = v;
if (c > 0xFF)
handler.error("escape octal sequence \\%03o is larger than \\377", c);
}
else
{
handler.error("undefined escape sequence \\%c", c);
p++;
}
break;
}
return c;
}
/**
Lex a wysiwyg string. `p` must be pointing to the first character before the
contents of the string literal. The character pointed to by `p` will be used as
the terminating character (i.e. backtick or double-quote).
Params:
result = pointer to the token that accepts the result
*/
final void wysiwygStringConstant(Token* result)
{
result.value = TOK.string_;
Loc start = loc();
auto terminator = p[0];
p++;
stringbuffer.reset();
while (1)
{
dchar c = p[0];
p++;
switch (c)
{
case '\n':
endOfLine();
break;
case '\r':
if (p[0] == '\n')
continue; // ignore
c = '\n'; // treat EndOfLine as \n character
endOfLine();
break;
case 0:
case 0x1A:
error("unterminated string constant starting at %s", start.toChars());
result.setString();
// rewind `p` so it points to the EOF character
p--;
return;
default:
if (c == terminator)
{
result.setString(stringbuffer);
stringPostfix(result);
return;
}
else if (c & 0x80)
{
p--;
const u = decodeUTF();
p++;
if (u == PS || u == LS)
endOfLine();
stringbuffer.writeUTF8(u);
continue;
}
break;
}
stringbuffer.writeByte(c);
}
}
/**************************************
* Lex hex strings:
* x"0A ae 34FE BD"
*/
final TOK hexStringConstant(Token* t)
{
Loc start = loc();
uint n = 0;
uint v = ~0; // dead assignment, needed to suppress warning
p++;
stringbuffer.reset();
while (1)
{
dchar c = *p++;
switch (c)
{
case ' ':
case '\t':
case '\v':
case '\f':
continue; // skip white space
case '\r':
if (*p == '\n')
continue; // ignore '\r' if followed by '\n'
// Treat isolated '\r' as if it were a '\n'
goto case '\n';
case '\n':
endOfLine();
continue;
case 0:
case 0x1A:
error("unterminated string constant starting at %s", start.toChars());
t.setString();
// decrement `p`, because it needs to point to the next token (the 0 or 0x1A character is the TOK.endOfFile token).
p--;
return TOK.hexadecimalString;
case '"':
if (n & 1)
{
error("odd number (%d) of hex characters in hex string", n);
stringbuffer.writeByte(v);
}
t.setString(stringbuffer);
stringPostfix(t);
return TOK.hexadecimalString;
default:
if (c >= '0' && c <= '9')
c -= '0';
else if (c >= 'a' && c <= 'f')
c -= 'a' - 10;
else if (c >= 'A' && c <= 'F')
c -= 'A' - 10;
else if (c & 0x80)
{
p--;
const u = decodeUTF();
p++;
if (u == PS || u == LS)
endOfLine();
else
error("non-hex character \\u%04x in hex string", u);
}
else
error("non-hex character '%c' in hex string", c);
if (n & 1)
{
v = (v << 4) | c;
stringbuffer.writeByte(v);
}
else
v = c;
n++;
break;
}
}
assert(0); // see bug 15731
}
/**
Lex a delimited string. Some examples of delimited strings are:
---
q"(foo(xxx))" // "foo(xxx)"
q"[foo$(LPAREN)]" // "foo$(LPAREN)"
q"/foo]/" // "foo]"
q"HERE
foo
HERE" // "foo\n"
---
It is assumed that `p` points to the opening double-quote '"'.
Params:
result = pointer to the token that accepts the result
*/
final void delimitedStringConstant(Token* result)
{
result.value = TOK.string_;
Loc start = loc();
dchar delimleft = 0;
dchar delimright = 0;
uint nest = 1;
uint nestcount = ~0; // dead assignment, needed to suppress warning
Identifier hereid = null;
uint blankrol = 0;
uint startline = 0;
p++;
stringbuffer.reset();
while (1)
{
dchar c = *p++;
//printf("c = '%c'\n", c);
switch (c)
{
case '\n':
Lnextline:
endOfLine();
startline = 1;
if (blankrol)
{
blankrol = 0;
continue;
}
if (hereid)
{
stringbuffer.writeUTF8(c);
continue;
}
break;
case '\r':
if (*p == '\n')
continue; // ignore
c = '\n'; // treat EndOfLine as \n character
goto Lnextline;
case 0:
case 0x1A:
error("unterminated delimited string constant starting at %s", start.toChars());
result.setString();
// decrement `p`, because it needs to point to the next token (the 0 or 0x1A character is the TOK.endOfFile token).
p--;
return;
default:
if (c & 0x80)
{
p--;
c = decodeUTF();
p++;
if (c == PS || c == LS)
goto Lnextline;
}
break;
}
if (delimleft == 0)
{
delimleft = c;
nest = 1;
nestcount = 1;
if (c == '(')
delimright = ')';
else if (c == '{')
delimright = '}';
else if (c == '[')
delimright = ']';
else if (c == '<')
delimright = '>';
else if (isalpha(c) || c == '_' || (c >= 0x80 && isUniAlpha(c)))
{
// Start of identifier; must be a heredoc
Token tok;
p--;
scan(&tok); // read in heredoc identifier
if (tok.value != TOK.identifier)
{
error("identifier expected for heredoc, not %s", tok.toChars());
delimright = c;
}
else
{
hereid = tok.ident;
//printf("hereid = '%s'\n", hereid.toChars());
blankrol = 1;
}
nest = 0;
}
else
{
delimright = c;
nest = 0;
if (isspace(c))
error("delimiter cannot be whitespace");
}
}
else
{
if (blankrol)
{
error("heredoc rest of line should be blank");
blankrol = 0;
continue;
}
if (nest == 1)
{
if (c == delimleft)
nestcount++;
else if (c == delimright)
{
nestcount--;
if (nestcount == 0)
goto Ldone;
}
}
else if (c == delimright)
goto Ldone;
if (startline && (isalpha(c) || c == '_' || (c >= 0x80 && isUniAlpha(c))) && hereid)
{
Token tok;
auto psave = p;
p--;
scan(&tok); // read in possible heredoc identifier
//printf("endid = '%s'\n", tok.ident.toChars());
if (tok.value == TOK.identifier && tok.ident.equals(hereid))
{
/* should check that rest of line is blank
*/
goto Ldone;
}
p = psave;
}
stringbuffer.writeUTF8(c);
startline = 0;
}
}
Ldone:
if (*p == '"')
p++;
else if (hereid)
error("delimited string must end in %s\"", hereid.toChars());
else
error("delimited string must end in %c\"", delimright);
result.setString(stringbuffer);
stringPostfix(result);
}
/**
Lex a token string. Some examples of token strings are:
---
q{ foo(xxx) } // " foo(xxx) "
q{foo$(LPAREN)} // "foo$(LPAREN)"
q{{foo}"}"} // "{foo}"}""
---
It is assumed that `p` points to the opening curly-brace '{'.
Params:
result = pointer to the token that accepts the result
*/
final void tokenStringConstant(Token* result)
{
result.value = TOK.string_;
uint nest = 1;
const start = loc();
const pstart = ++p;
while (1)
{
Token tok;
scan(&tok);
switch (tok.value)
{
case TOK.leftCurly:
nest++;
continue;
case TOK.rightCurly:
if (--nest == 0)
{
result.setString(pstart, p - 1 - pstart);
stringPostfix(result);
return;
}
continue;
case TOK.endOfFile:
error("unterminated token string constant starting at %s", start.toChars());
result.setString();
return;
default:
continue;
}
}
}
/**
Scan a double-quoted string while building the processed string value by
handling escape sequences. The result is returned in the given `t` token.
This function assumes that `p` currently points to the opening double-quote
of the string.
Params:
t = the token to set the resulting string to
*/
final void escapeStringConstant(Token* t)
{
t.value = TOK.string_;
const start = loc();
p++;
stringbuffer.reset();
while (1)
{
dchar c = *p++;
switch (c)
{
case '\\':
switch (*p)
{
case 'u':
case 'U':
case '&':
c = escapeSequence();
stringbuffer.writeUTF8(c);
continue;
default:
c = escapeSequence();
break;
}
break;
case '\n':
endOfLine();
break;
case '\r':
if (*p == '\n')
continue; // ignore
c = '\n'; // treat EndOfLine as \n character
endOfLine();
break;
case '"':
t.setString(stringbuffer);
stringPostfix(t);
return;
case 0:
case 0x1A:
// decrement `p`, because it needs to point to the next token (the 0 or 0x1A character is the TOK.endOfFile token).
p--;
error("unterminated string constant starting at %s", start.toChars());
t.setString();
return;
default:
if (c & 0x80)
{
p--;
c = decodeUTF();
if (c == LS || c == PS)
{
c = '\n';
endOfLine();
}
p++;
stringbuffer.writeUTF8(c);
continue;
}
break;
}
stringbuffer.writeByte(c);
}
}
/**************************************
*/
final TOK charConstant(Token* t)
{
TOK tk = TOK.charLiteral;
//printf("Lexer::charConstant\n");
p++;
dchar c = *p++;
switch (c)
{
case '\\':
switch (*p)
{
case 'u':
t.unsvalue = escapeSequence();
tk = TOK.wcharLiteral;
break;
case 'U':
case '&':
t.unsvalue = escapeSequence();
tk = TOK.dcharLiteral;
break;
default:
t.unsvalue = escapeSequence();
break;
}
break;
case '\n':
L1:
endOfLine();
goto case;
case '\r':
goto case '\'';
case 0:
case 0x1A:
// decrement `p`, because it needs to point to the next token (the 0 or 0x1A character is the TOK.endOfFile token).
p--;
goto case;
case '\'':
error("unterminated character constant");
t.unsvalue = '?';
return tk;
default:
if (c & 0x80)
{
p--;
c = decodeUTF();
p++;
if (c == LS || c == PS)
goto L1;
if (c < 0xD800 || (c >= 0xE000 && c < 0xFFFE))
tk = TOK.wcharLiteral;
else
tk = TOK.dcharLiteral;
}
t.unsvalue = c;
break;
}
if (*p != '\'')
{
error("unterminated character constant");
t.unsvalue = '?';
return tk;
}
p++;
return tk;
}
/***************************************
* Get postfix of string literal.
*/
final void stringPostfix(Token* t)
{
switch (*p)
{
case 'c':
case 'w':
case 'd':
t.postfix = *p;
p++;
break;
default:
t.postfix = 0;
break;
}
}
/**************************************
* Read in a number.
* If it's an integer, store it in tok.TKutok.Vlong.
* integers can be decimal, octal or hex
* Handle the suffixes U, UL, LU, L, etc.
* If it's double, store it in tok.TKutok.Vdouble.
* Returns:
* TKnum
* TKdouble,...
*/
final TOK number(Token* t)
{
int base = 10;
const start = p;
uinteger_t n = 0; // unsigned >=64 bit integer type
int d;
bool err = false;
bool overflow = false;
dchar c = *p;
if (c == '0')
{
++p;
c = *p;
switch (c)
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
n = c - '0';
++p;
base = 8;
break;
case 'x':
case 'X':
++p;
base = 16;
break;
case 'b':
case 'B':
++p;
base = 2;
break;
case '.':
if (p[1] == '.')
goto Ldone; // if ".."
if (isalpha(p[1]) || p[1] == '_' || p[1] & 0x80)
goto Ldone; // if ".identifier" or ".unicode"
goto Lreal; // '.' is part of current token
case 'i':
case 'f':
case 'F':
goto Lreal;
case '_':
++p;
base = 8;
break;
case 'L':
if (p[1] == 'i')
goto Lreal;
break;
default:
break;
}
}
while (1)
{
c = *p;
switch (c)
{
case '0':
case '1':
++p;
d = c - '0';
break;
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
if (base == 2 && !err)
{
error("binary digit expected");
err = true;
}
++p;
d = c - '0';
break;
case '8':
case '9':
++p;
if (base < 10 && !err)
{
error("radix %d digit expected, not `%c`", base, c);
err = true;
}
d = c - '0';
break;
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
++p;
if (base != 16)
{
if (c == 'e' || c == 'E' || c == 'f' || c == 'F')
goto Lreal;
if (!err)
{
error("radix %d digit expected, not `%c`", base, c);
err = true;
}
}
if (c >= 'a')
d = c + 10 - 'a';
else
d = c + 10 - 'A';
break;
case 'L':
if (p[1] == 'i')
goto Lreal;
goto Ldone;
case '.':
if (p[1] == '.')
goto Ldone; // if ".."
if (base == 10 && (isalpha(p[1]) || p[1] == '_' || p[1] & 0x80))
goto Ldone; // if ".identifier" or ".unicode"
goto Lreal; // otherwise as part of a floating point literal
case 'p':
case 'P':
case 'i':
Lreal:
p = start;
return inreal(t);
case '_':
++p;
continue;
default:
goto Ldone;
}
// Avoid expensive overflow check if we aren't at risk of overflow
if (n <= 0x0FFF_FFFF_FFFF_FFFFUL)
n = n * base + d;
else
{
import core.checkedint : mulu, addu;
n = mulu(n, base, overflow);
n = addu(n, d, overflow);
}
}
Ldone:
if (overflow && !err)
{
error("integer overflow");
err = true;
}
enum FLAGS : int
{
none = 0,
decimal = 1, // decimal
unsigned = 2, // u or U suffix
long_ = 4, // L suffix
}
FLAGS flags = (base == 10) ? FLAGS.decimal : FLAGS.none;
// Parse trailing 'u', 'U', 'l' or 'L' in any combination
const psuffix = p;
while (1)
{
FLAGS f;
switch (*p)
{
case 'U':
case 'u':
f = FLAGS.unsigned;
goto L1;
case 'l':
f = FLAGS.long_;
error("lower case integer suffix 'l' is not allowed. Please use 'L' instead");
goto L1;
case 'L':
f = FLAGS.long_;
L1:
p++;
if ((flags & f) && !err)
{
error("unrecognized token");
err = true;
}
flags = cast(FLAGS)(flags | f);
continue;
default:
break;
}
break;
}
if (base == 8 && n >= 8)
error("octal literals `0%llo%.*s` are no longer supported, use `std.conv.octal!%llo%.*s` instead", n, p - psuffix, psuffix, n, p - psuffix, psuffix);
TOK result;
switch (flags)
{
case FLAGS.none:
/* Octal or Hexadecimal constant.
* First that fits: int, uint, long, ulong
*/
if (n & 0x8000000000000000L)
result = TOK.uns64Literal;
else if (n & 0xFFFFFFFF00000000L)
result = TOK.int64Literal;
else if (n & 0x80000000)
result = TOK.uns32Literal;
else
result = TOK.int32Literal;
break;
case FLAGS.decimal:
/* First that fits: int, long, long long
*/
if (n & 0x8000000000000000L)
{
if (!err)
{
error("signed integer overflow");
err = true;
}
result = TOK.uns64Literal;
}
else if (n & 0xFFFFFFFF80000000L)
result = TOK.int64Literal;
else
result = TOK.int32Literal;
break;
case FLAGS.unsigned:
case FLAGS.decimal | FLAGS.unsigned:
/* First that fits: uint, ulong
*/
if (n & 0xFFFFFFFF00000000L)
result = TOK.uns64Literal;
else
result = TOK.uns32Literal;
break;
case FLAGS.decimal | FLAGS.long_:
if (n & 0x8000000000000000L)
{
if (!err)
{
error("signed integer overflow");
err = true;
}
result = TOK.uns64Literal;
}
else
result = TOK.int64Literal;
break;
case FLAGS.long_:
if (n & 0x8000000000000000L)
result = TOK.uns64Literal;
else
result = TOK.int64Literal;
break;
case FLAGS.unsigned | FLAGS.long_:
case FLAGS.decimal | FLAGS.unsigned | FLAGS.long_:
result = TOK.uns64Literal;
break;
default:
debug
{
printf("%x\n", flags);
}
assert(0);
}
t.unsvalue = n;
return result;
}
/**************************************
* Read in characters, converting them to real.
* Bugs:
* Exponent overflow not detected.
* Too much requested precision is not detected.
*/
final TOK inreal(Token* t)
{
//printf("Lexer::inreal()\n");
debug
{
assert(*p == '.' || isdigit(*p));
}
bool isWellformedString = true;
stringbuffer.reset();
auto pstart = p;
bool hex = false;
dchar c = *p++;
// Leading '0x'
if (c == '0')
{
c = *p++;
if (c == 'x' || c == 'X')
{
hex = true;
c = *p++;
}
}
// Digits to left of '.'
while (1)
{
if (c == '.')
{
c = *p++;
break;
}
if (isdigit(c) || (hex && isxdigit(c)) || c == '_')
{
c = *p++;
continue;
}
break;
}
// Digits to right of '.'
while (1)
{
if (isdigit(c) || (hex && isxdigit(c)) || c == '_')
{
c = *p++;
continue;
}
break;
}
if (c == 'e' || c == 'E' || (hex && (c == 'p' || c == 'P')))
{
c = *p++;
if (c == '-' || c == '+')
{
c = *p++;
}
bool anyexp = false;
while (1)
{
if (isdigit(c))
{
anyexp = true;
c = *p++;
continue;
}
if (c == '_')
{
c = *p++;
continue;
}
if (!anyexp)
{
error("missing exponent");
isWellformedString = false;
}
break;
}
}
else if (hex)
{
error("exponent required for hex float");
isWellformedString = false;
}
--p;
while (pstart < p)
{
if (*pstart != '_')
stringbuffer.writeByte(*pstart);
++pstart;
}
stringbuffer.writeByte(0);
auto sbufptr = cast(const(char)*)stringbuffer.data;
TOK result;
bool isOutOfRange = false;
t.floatvalue = (isWellformedString ? CTFloat.parse(sbufptr, &isOutOfRange) : CTFloat.zero);
switch (*p)
{
case 'F':
case 'f':
if (isWellformedString && !isOutOfRange)
isOutOfRange = Port.isFloat32LiteralOutOfRange(sbufptr);
result = TOK.float32Literal;
p++;
break;
default:
if (isWellformedString && !isOutOfRange)
isOutOfRange = Port.isFloat64LiteralOutOfRange(sbufptr);
result = TOK.float64Literal;
break;
case 'l':
error("use 'L' suffix instead of 'l'");
goto case 'L';
case 'L':
result = TOK.float80Literal;
p++;
break;
}
if (*p == 'i' || *p == 'I')
{
if (*p == 'I')
error("use 'i' suffix instead of 'I'");
p++;
switch (result)
{
case TOK.float32Literal:
result = TOK.imaginary32Literal;
break;
case TOK.float64Literal:
result = TOK.imaginary64Literal;
break;
case TOK.float80Literal:
result = TOK.imaginary80Literal;
break;
default:
break;
}
}
const isLong = (result == TOK.float80Literal || result == TOK.imaginary80Literal);
if (isOutOfRange && !isLong)
{
const char* suffix = (result == TOK.float32Literal || result == TOK.imaginary32Literal) ? "f" : "";
error(scanloc, "number `%s%s` is not representable", sbufptr, suffix);
}
debug
{
switch (result)
{
case TOK.float32Literal:
case TOK.float64Literal:
case TOK.float80Literal:
case TOK.imaginary32Literal:
case TOK.imaginary64Literal:
case TOK.imaginary80Literal:
break;
default:
assert(0);
}
}
return result;
}
final Loc loc()
{
scanloc.charnum = cast(uint)(1 + p - line);
return scanloc;
}
final override void error(const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
.verror(token.loc, format, ap);
va_end(ap);
errors = true;
}
final override void error(Loc loc, const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
.verror(loc, format, ap);
va_end(ap);
errors = true;
}
final void deprecation(const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
.vdeprecation(token.loc, format, ap);
va_end(ap);
if (global.params.useDeprecated == 0)
errors = true;
}
/*********************************************
* parse:
* #line linnum [filespec]
* also allow __LINE__ for linnum, and __FILE__ for filespec
*/
final void poundLine()
{
auto linnum = this.scanloc.linnum;
const(char)* filespec = null;
const loc = this.loc();
Token tok;
scan(&tok);
if (tok.value == TOK.int32Literal || tok.value == TOK.int64Literal)
{
const lin = cast(int)(tok.unsvalue - 1);
if (lin != tok.unsvalue - 1)
error("line number `%lld` out of range", cast(ulong)tok.unsvalue);
else
linnum = lin;
}
else if (tok.value == TOK.line)
{
}
else
goto Lerr;
while (1)
{
switch (*p)
{
case 0:
case 0x1A:
case '\n':
Lnewline:
this.scanloc.linnum = linnum;
if (filespec)
this.scanloc.filename = filespec;
return;
case '\r':
p++;
if (*p != '\n')
{
p--;
goto Lnewline;
}
continue;
case ' ':
case '\t':
case '\v':
case '\f':
p++;
continue; // skip white space
case '_':
if (memcmp(p, "__FILE__".ptr, 8) == 0)
{
p += 8;
filespec = mem.xstrdup(scanloc.filename);
continue;
}
goto Lerr;
case '"':
if (filespec)
goto Lerr;
stringbuffer.reset();
p++;
while (1)
{
uint c;
c = *p;
switch (c)
{
case '\n':
case '\r':
case 0:
case 0x1A:
goto Lerr;
case '"':
stringbuffer.writeByte(0);
filespec = mem.xstrdup(cast(const(char)*)stringbuffer.data);
p++;
break;
default:
if (c & 0x80)
{
uint u = decodeUTF();
if (u == PS || u == LS)
goto Lerr;
}
stringbuffer.writeByte(c);
p++;
continue;
}
break;
}
continue;
default:
if (*p & 0x80)
{
uint u = decodeUTF();
if (u == PS || u == LS)
goto Lnewline;
}
goto Lerr;
}
}
Lerr:
error(loc, "#line integer [\"filespec\"]\\n expected");
}
/********************************************
* Decode UTF character.
* Issue error messages for invalid sequences.
* Return decoded character, advance p to last character in UTF sequence.
*/
final uint decodeUTF()
{
const s = p;
assert(*s & 0x80);
// Check length of remaining string up to 6 UTF-8 characters
size_t len;
for (len = 1; len < 6 && s[len]; len++)
{
}
size_t idx = 0;
dchar u;
const msg = utf_decodeChar(s, len, idx, u);
p += idx - 1;
if (msg)
{
error("%s", msg);
}
return u;
}
/***************************************************
* Parse doc comment embedded between t.ptr and p.
* Remove trailing blanks and tabs from lines.
* Replace all newlines with \n.
* Remove leading comment character from each line.
* Decide if it's a lineComment or a blockComment.
* Append to previous one for this token.
*
* If newParagraph is true, an extra newline will be
* added between adjoining doc comments.
*/
final void getDocComment(Token* t, uint lineComment, bool newParagraph)
{
/* ct tells us which kind of comment it is: '/', '*', or '+'
*/
const ct = t.ptr[2];
/* Start of comment text skips over / * *, / + +, or / / /
*/
const(char)* q = t.ptr + 3; // start of comment text
const(char)* qend = p;
if (ct == '*' || ct == '+')
qend -= 2;
/* Scan over initial row of ****'s or ++++'s or ////'s
*/
for (; q < qend; q++)
{
if (*q != ct)
break;
}
/* Remove leading spaces until start of the comment
*/
int linestart = 0;
if (ct == '/')
{
while (q < qend && (*q == ' ' || *q == '\t'))
++q;
}
else if (q < qend)
{
if (*q == '\r')
{
++q;
if (q < qend && *q == '\n')
++q;
linestart = 1;
}
else if (*q == '\n')
{
++q;
linestart = 1;
}
}
/* Remove trailing row of ****'s or ++++'s
*/
if (ct != '/')
{
for (; q < qend; qend--)
{
if (qend[-1] != ct)
break;
}
}
/* Comment is now [q .. qend].
* Canonicalize it into buf[].
*/
OutBuffer buf;
void trimTrailingWhitespace()
{
const s = buf.peekSlice();
auto len = s.length;
while (len && (s[len - 1] == ' ' || s[len - 1] == '\t'))
--len;
buf.setsize(len);
}
for (; q < qend; q++)
{
char c = *q;
switch (c)
{
case '*':
case '+':
if (linestart && c == ct)
{
linestart = 0;
/* Trim preceding whitespace up to preceding \n
*/
trimTrailingWhitespace();
continue;
}
break;
case ' ':
case '\t':
break;
case '\r':
if (q[1] == '\n')
continue; // skip the \r
goto Lnewline;
default:
if (c == 226)
{
// If LS or PS
if (q[1] == 128 && (q[2] == 168 || q[2] == 169))
{
q += 2;
goto Lnewline;
}
}
linestart = 0;
break;
Lnewline:
c = '\n'; // replace all newlines with \n
goto case;
case '\n':
linestart = 1;
/* Trim trailing whitespace
*/
trimTrailingWhitespace();
break;
}
buf.writeByte(c);
}
/* Trim trailing whitespace (if the last line does not have newline)
*/
trimTrailingWhitespace();
// Always end with a newline
const s = buf.peekSlice();
if (s.length == 0 || s[$ - 1] != '\n')
buf.writeByte('\n');
// It's a line comment if the start of the doc comment comes
// after other non-whitespace on the same line.
auto dc = (lineComment && anyToken) ? &t.lineComment : &t.blockComment;
// Combine with previous doc comment, if any
if (*dc)
*dc = combineComments(*dc, buf.peekString(), newParagraph);
else
*dc = buf.extractString();
}
/********************************************
* Combine two document comments into one,
* separated by an extra newline if newParagraph is true.
*/
static const(char)* combineComments(const(char)* c1, const(char)* c2, bool newParagraph)
{
//printf("Lexer::combineComments('%s', '%s', '%i')\n", c1, c2, newParagraph);
auto c = c2;
const(int) newParagraphSize = newParagraph ? 1 : 0; // Size of the combining '\n'
if (c1)
{
c = c1;
if (c2)
{
size_t len1 = strlen(c1);
size_t len2 = strlen(c2);
int insertNewLine = 0;
if (len1 && c1[len1 - 1] != '\n')
{
++len1;
insertNewLine = 1;
}
auto p = cast(char*)mem.xmalloc(len1 + newParagraphSize + len2 + 1);
memcpy(p, c1, len1 - insertNewLine);
if (insertNewLine)
p[len1 - 1] = '\n';
if (newParagraph)
p[len1] = '\n';
memcpy(p + len1 + newParagraphSize, c2, len2);
p[len1 + newParagraphSize + len2] = 0;
c = p;
}
}
return c;
}
private:
final void endOfLine()
{
scanloc.linnum++;
line = p;
}
}
unittest
{
static class AssertErrorHandler : ErrorHandler
{
final void error(const(char)* format, ...) { assert(0); }
final void error(Loc loc, const(char)* format, ...) { assert(0); }
}
static void test(T)(string sequence, T expected)
{
scope assertOnError = new AssertErrorHandler();
auto p = cast(const(char)*)sequence.ptr;
assert(expected == Lexer.escapeSequence(assertOnError, p));
assert(p == sequence.ptr + sequence.length);
}
test(`'`, '\'');
test(`"`, '"');
test(`?`, '?');
test(`\`, '\\');
test(`0`, '\0');
test(`a`, '\a');
test(`b`, '\b');
test(`f`, '\f');
test(`n`, '\n');
test(`r`, '\r');
test(`t`, '\t');
test(`v`, '\v');
test(`x00`, 0x00);
test(`xff`, 0xff);
test(`xFF`, 0xff);
test(`xa7`, 0xa7);
test(`x3c`, 0x3c);
test(`xe2`, 0xe2);
test(`1`, '\1');
test(`42`, '\42');
test(`357`, '\357');
test(`u1234`, '\u1234');
test(`uf0e4`, '\uf0e4');
test(`U0001f603`, '\U0001f603');
test(`"`, '"');
test(`<`, '<');
test(`>`, '>');
}
unittest
{
static class ExpectErrorHandler : ErrorHandler
{
string expected;
bool gotError;
this(string expected) { this.expected = expected; }
final void error(const(char)* format, ...)
{
gotError = true;
char[100] buffer;
va_list ap;
va_start(ap, format);
auto actual = buffer[0 .. vsprintf(buffer.ptr, format, ap)];
va_end(ap);
assert(expected == actual);
}
final void error(Loc loc, const(char)* format, ...) { assert(0); }
}
static void test(string sequence, string expectedError, dchar expectedReturnValue, uint expectedScanLength)
{
scope handler = new ExpectErrorHandler(expectedError);
auto p = cast(const(char)*)sequence.ptr;
auto actualReturnValue = Lexer.escapeSequence(handler, p);
assert(handler.gotError);
assert(expectedReturnValue == actualReturnValue);
auto actualScanLength = p - sequence.ptr;
assert(expectedScanLength == actualScanLength);
}
test("c", `undefined escape sequence \c`, 'c', 1);
test("!", `undefined escape sequence \!`, '!', 1);
test("x1", `escape hex sequence has 1 hex digits instead of 2`, '\x01', 2);
test("u1" , `escape hex sequence has 1 hex digits instead of 4`, 0x1, 2);
test("u12" , `escape hex sequence has 2 hex digits instead of 4`, 0x12, 3);
test("u123", `escape hex sequence has 3 hex digits instead of 4`, 0x123, 4);
test("U0" , `escape hex sequence has 1 hex digits instead of 8`, 0x0, 2);
test("U00" , `escape hex sequence has 2 hex digits instead of 8`, 0x00, 3);
test("U000" , `escape hex sequence has 3 hex digits instead of 8`, 0x000, 4);
test("U0000" , `escape hex sequence has 4 hex digits instead of 8`, 0x0000, 5);
test("U0001f" , `escape hex sequence has 5 hex digits instead of 8`, 0x0001f, 6);
test("U0001f6" , `escape hex sequence has 6 hex digits instead of 8`, 0x0001f6, 7);
test("U0001f60", `escape hex sequence has 7 hex digits instead of 8`, 0x0001f60, 8);
test("ud800" , `invalid UTF character \U0000d800`, '?', 5);
test("udfff" , `invalid UTF character \U0000dfff`, '?', 5);
test("U00110000", `invalid UTF character \U00110000`, '?', 9);
test("xg0" , `undefined escape hex sequence \xg`, 'g', 2);
test("ug000" , `undefined escape hex sequence \ug`, 'g', 2);
test("Ug0000000", `undefined escape hex sequence \Ug`, 'g', 2);
test("&BAD;", `unnamed character entity &BAD;` , '?', 5);
test(""", `unterminated named entity "`, '?', 5);
test("400", `escape octal sequence \400 is larger than \377`, 0x100, 3);
}
|
D
|
instance KDF_511_Daron(Npc_Default)
{
name[0] = "Daron";
guild = GIL_VLK;
id = 511;
voice = 10;
flags = 0;
npcType = npctype_main;
aivar[AIV_MagicUser] = MAGIC_ALWAYS;
B_SetAttributesToChapter(self,5);
fight_tactic = FAI_HUMAN_STRONG;
EquipItem(self,ItMw_1h_Nov_Mace);
B_CreateAmbientInv(self);
B_SetNpcVisual(self,MALE,"Hum_Head_Thief",Face_N_Raven,BodyTex_N,ItAr_KDF_L);
Mdl_SetModelFatness(self,0);
Mdl_ApplyOverlayMds(self,"Humans_Mage.mds");
B_GiveNpcTalents(self);
B_SetFightSkills(self,80);
daily_routine = Rtn_Start_511;
};
func void Rtn_Start_511()
{
TA_Stand_Guarding(7,35,11,35,"NW_CITY_MERCHANT_PATH_29_B");
TA_Stand_Eating(11,35,12,5,"NW_CITY_MERCHANT_PATH_28_F");
TA_Stand_Guarding(12,5,12,35,"MARKT");
TA_Stand_Drinking(12,35,13,5,"NW_CITY_MERCHANT_PATH_28_D");
TA_Stand_Eating(13,5,13,25,"NW_CITY_MERCHANT_PATH_30");
TA_Stand_Guarding(13,25,13,55,"NW_CITY_MERCHANT_PATH_36_B");
TA_Stand_Guarding(13,55,18,5,"NW_CITY_MERCHANT_PATH_29_B");
TA_Stand_Drinking(18,5,19,5,"NW_CITY_MERCHANT_PATH_28_D");
TA_Stand_Guarding(19,5,20,5,"NW_CITY_MERCHANT_PATH_29_B");
TA_Sit_Throne(20,5,1,5,"NW_CITY_BED_ZURIS");
TA_Sleep(1,5,7,35,"NW_CITY_BED_DARON");
};
|
D
|
// Reply.d
import CodeEnum;
unittest
{
auto e = CodeEnum.OK; // Error: undefined identifier 'OK'
}
|
D
|
clothing of a distinctive style or for a particular occasion
put on special clothes to appear particularly appealing and attractive
|
D
|
module android.java.javax.crypto.spec.SecretKeySpec;
public import android.java.javax.crypto.spec.SecretKeySpec_d_interface;
import arsd.jni : ImportExportImpl;
mixin ImportExportImpl!SecretKeySpec;
import import0 = android.java.java.lang.Class;
|
D
|
/Users/apple-1/Documents/xCode/CoreDataSampleApp/Build/Intermediates/SwiftMigration/CoreDataSampleApp/Intermediates.noindex/CoreDataSampleApp.build/Debug-iphonesimulator/CoreDataSampleAppUITests.build/Objects-normal/x86_64/CoreDataSampleAppUITests.o : /Users/apple-1/Documents/xCode/CoreDataSampleApp/CoreDataSampleAppUITests/CoreDataSampleAppUITests.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/XCTest.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Modules/module.modulemap
/Users/apple-1/Documents/xCode/CoreDataSampleApp/Build/Intermediates/SwiftMigration/CoreDataSampleApp/Intermediates.noindex/CoreDataSampleApp.build/Debug-iphonesimulator/CoreDataSampleAppUITests.build/Objects-normal/x86_64/CoreDataSampleAppUITests~partial.swiftmodule : /Users/apple-1/Documents/xCode/CoreDataSampleApp/CoreDataSampleAppUITests/CoreDataSampleAppUITests.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/XCTest.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Modules/module.modulemap
/Users/apple-1/Documents/xCode/CoreDataSampleApp/Build/Intermediates/SwiftMigration/CoreDataSampleApp/Intermediates.noindex/CoreDataSampleApp.build/Debug-iphonesimulator/CoreDataSampleAppUITests.build/Objects-normal/x86_64/CoreDataSampleAppUITests~partial.swiftdoc : /Users/apple-1/Documents/xCode/CoreDataSampleApp/CoreDataSampleAppUITests/CoreDataSampleAppUITests.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/XCTest.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Modules/module.modulemap
|
D
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.